/*
Theme Name: Ronin Telegraph Classic Theme
Description: Professional news theme for Ronin Network ecosystem - Classic PHP Version
Version: 2.2.0 - Header Fixed + Mobile Hamburger Menu
Author: Ronin Telegraph Team
*/

/* ====================================
   CSS Reset and Root Variables
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --ronin-blue: #14213D;
    --ronin-red: #E63946;
    --ronin-cian: #00CFC1;
    --ronin-white: #FFFFFF;
    --ronin-gray: #333333;
    
    /* Project Colors */
    --axie-color: #ff6b35;
    --ronin-color: #0066cc;
    --pixels-color: #00ff00;
    
    /* Additional Colors */
    --ronin-light: #f8fafc;
    --ronin-dark: #0f1419;
    --border-color: rgba(255,255,255,0.1);
    --card-shadow: 0 4px 20px rgba(0,0,0,0.1);
    --hover-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ====================================
   Base Styles
   ==================================== */
body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: var(--ronin-gray);
    background-color: var(--ronin-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================================
   Typography
   ==================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Press Start 2P', cursive;
    color: var(--ronin-blue);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.9rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--ronin-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--ronin-cian);
}

/* ====================================
   HEADER - 3 ROW STRUCTURE (FIXED)
   Row 1: Logo + CTA + Auth
   Row 2: Menu + Social Icons
   Row 3: Crypto Ticker
   ==================================== */

.header {
    background: linear-gradient(135deg, var(--ronin-blue) 0%, var(--ronin-dark) 100%);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(0,207,193,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: -1;
}

/* ====================================
   ROW 1: Logo + CTA Message + Auth
   ==================================== */
.header-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Logo - Grande y visible */
.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    line-height: 1.1;
    color: var(--ronin-cian);
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0,207,193,0.5);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--ronin-red);
    text-shadow: 0 0 25px rgba(230,57,70,0.6);
    transform: scale(1.02);
}

/* CTA Message */
.header-cta-message {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    margin-left: 30px;
    flex-grow: 1;
}

/* Right Section - Auth */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
}

.user-logged {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-logged-out {
    display: flex;
    gap: 12px;
}

/* Check-in Button */
.checkin-btn {
    background: linear-gradient(135deg, var(--ronin-red), #c62828);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230,57,70,0.3);
    letter-spacing: 1px;
}

.checkin-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,57,70,0.5);
}

.checkin-btn.disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Stats */
.checkin-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
}

.stat-icon {
    font-size: 1rem;
}

.stat-label {
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.stat-value {
    font-weight: 700;
    color: var(--ronin-cian);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
}

.user-icon {
    font-size: 1rem;
}

.username {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

/* Logout Button */
.logout-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(230,57,70,0.2);
    color: var(--ronin-red);
}

/* Auth Buttons (Login/Sign Up) */
.auth-btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.login-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.login-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: var(--ronin-cian);
    color: var(--ronin-cian);
}

.signup-btn {
    background: var(--ronin-red);
    color: white;
    border: 2px solid var(--ronin-red);
}

.signup-btn:hover {
    background: #c62828;
    border-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230,57,70,0.4);
}

/* ====================================
   ROW 2: Main Menu + Social Icons
   ==================================== */
.header-row-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Main Navigation */
.main-nav {
    flex-grow: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 16px 18px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--ronin-cian);
    background: rgba(0,207,193,0.1);
}

.nav-link.active {
    color: var(--ronin-red);
    background: rgba(230,57,70,0.15);
}

/* Dropdown */
.nav-item-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ronin-blue);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    min-width: 220px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 1000;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    background: rgba(0,207,193,0.15);
    color: var(--ronin-cian);
}

.dropdown-link.active {
    background: rgba(230,57,70,0.2);
    color: var(--ronin-red);
}

.project-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dropdown-link-all {
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
    font-weight: 600;
    color: var(--ronin-cian);
}

/* Social Links - En Row 2 a la derecha */
.social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 10px;
    flex-shrink: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.social-link:hover {
    color: var(--ronin-cian);
    background: rgba(0,207,193,0.15);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* ====================================
   ROW 3: Crypto Ticker - AUTO-SCROLL INFINITO
   ==================================== */
.header-row-3 {
    background: rgba(0,0,0,0.2);
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}

.crypto-ticker {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* Wrapper que contiene ambos sets de items */
.ticker-wrapper {
    display: flex;
    width: fit-content;
    animation: ticker-scroll 40s linear infinite;
}

/* Animación de scroll continuo */
@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-items {
    display: flex;
    gap: 25px;
    padding: 0 10px;
    flex-shrink: 0;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.crypto-symbol {
    color: #00CFC1;
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 50px;
}

.crypto-price {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.crypto-change {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.crypto-change.positive {
    color: #2ed573;
    background: rgba(46,213,115,0.15);
}

.crypto-change.negative {
    color: #ff4757;
    background: rgba(255,71,87,0.15);
}

/* ====================================
   MOBILE HAMBURGER MENU
   ==================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(0,207,193,0.2);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 1024px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .header-cta-message {
        display: none;
    }
    
    .nav-link {
        padding: 14px 14px;
        font-size: 0.8rem;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 900px) {
    .header-row-1 {
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .checkin-stats {
        gap: 8px;
    }
    
    .stat-item {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    /* Mostrar hamburger menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Row 1: Logo + Hamburger */
    .header-row-1 {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 0;
    }
    
    .logo {
        font-size: 1.2rem;
        order: 1;
    }
    
    .header-cta-message {
        display: none;
    }
    
    .header-right-section {
        order: 3;
        display: flex;
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        order: 2;
    }
    
    /* Row 2: Menu colapsado */
    .header-row-2 {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--ronin-blue);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 0 20px;
        border: none;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .header-row-2.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-radius: 0;
        border: none;
        border-left: 3px solid var(--ronin-cian);
        background: rgba(0,0,0,0.2);
        display: none;
    }
    
    .nav-item-dropdown:hover .dropdown-menu {
        display: block;
    }
    
    /* Social icons en mobile menu */
    .social-links {
        margin-top: 20px;
        padding: 20px;
        justify-content: center;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Overlay para cerrar menu */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Auth buttons en mobile */
    .user-logged {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .auth-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .auth-btn {
        padding: 8px 14px;
        font-size: 0.7rem;
    }
    
    .checkin-btn {
        padding: 8px 15px;
        font-size: 0.6rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .ticker-items {
        gap: 15px;
    }
    
    .ticker-item {
        font-size: 0.7rem;
    }
    
    .crypto-symbol {
        min-width: 40px;
        font-size: 0.7rem;
    }
    
    .crypto-price {
        font-size: 0.75rem;
    }
    
    .crypto-change {
        font-size: 0.65rem;
    }
}

/* ====================================
   Hero Section
   ==================================== */
.hero-section {
    margin-bottom: 40px;
}

.hero-article {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: white;
    max-height: 500px;
}

.hero-image {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-emoji {
    font-size: 4rem;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 40px 30px 30px;
}

.hero-tag {
    display: inline-block;
    background: var(--ronin-red);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-title a {
    color: white;
    text-decoration: none;
}

.hero-title a:hover {
    color: var(--ronin-cian);
}

.hero-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.hero-project,
.hero-author,
.hero-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ====================================
   News Grid
   ==================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ronin-blue), var(--ronin-cian));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--ronin-red);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: var(--ronin-blue);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--ronin-red);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    font-family: 'Inter', sans-serif;
}

.card-author,
.card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ====================================
   Bottom Widgets
   ==================================== */
.bottom-widgets {
    margin: 60px 0;
}

.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.widget-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: #14213D;
    margin-bottom: 20px;
    border-bottom: 3px solid #E63946;
    padding-bottom: 10px;
}

.widget-post {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.widget-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.widget-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #14213D, #00CFC1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.widget-content {
    flex: 1;
}

.widget-post-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #14213D;
}

.widget-post-title a {
    color: inherit;
    text-decoration: none;
}

.widget-post-title:hover a {
    color: #E63946;
}

.widget-post-date {
    font-size: 0.75rem;
    color: #999;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #00CFC1;
}

.newsletter-form button {
    padding: 12px 20px;
    background: #E63946;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.newsletter-form button:hover {
    background: #00CFC1;
    transform: translateY(-2px);
}

/* ====================================
   Responsive - News Grid
   ==================================== */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-overlay {
        padding: 30px 20px 20px;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-excerpt {
        font-size: 0.9rem;
    }
}