@import 'variables.css';

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&display=swap');

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: var(--font-main);
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Extra padding removed from body, dynamically placed to keep footer background */
}

a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; color: var(--pan-blue); }

.container {
    width: 100%;
    max-width: 768px; /* Mobile first / App constraints */
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

/* ========================================================= */
/* DUAL HEADER (TOP UTILITY + MAIN HEADER)                   */
/* ========================================================= */

/* TOP UTILITY HEADER */
.top-header {
    background-color: var(--pan-blue);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 0.5rem 0;
}
.top-header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}
.top-header-left {
    display: flex; align-items: center; gap: 0.5rem;
}
.top-badge {
    background: var(--pan-yellow); color: var(--pan-blue);
    padding: 2px 6px; border-radius: var(--radius-sm);
    font-weight: 800; font-size: 0.7rem; text-transform: uppercase;
}
.top-text { font-weight: 600; text-align: center; }
.top-header-right { display: none; }

/* MAIN HEADER */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: var(--spacing-3) 0;
}
.main-header-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.app-title { font-size: 1.4rem; font-weight: 800; color: var(--pan-blue); display: flex; align-items: center; gap: 4px; }
.app-title span { color: var(--pan-yellow); }

.mobile-actions { display: flex; align-items: center; gap: 0.8rem; }
.mobile-btn {
    background: transparent; border: none; color: var(--text-primary);
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
}
.user-avatar-mobile {
    width: 36px; height: 36px; border-radius: 50%; background: var(--pan-yellow);
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--pan-blue); font-size: 0.9rem;
}
.desktop-actions { display: none; }

/* FLOATING SEARCH PILL */
.search-pill-container {
    margin: var(--spacing-4) 0;
    position: relative;
    padding: 0 var(--spacing-4);
}
.search-pill {
    width: 100%;
    height: 56px;
    padding: 0 1.5rem 0 3.5rem;
    border-radius: var(--radius-full);
    border: none;
    background: #f0f0f4;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-normal);
}
.search-pill:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 2px var(--pan-yellow);
}
.search-icon {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* CATEGORY SCROLL (Uber Eats style horizontal pills) */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-3);
    padding: var(--spacing-2) var(--spacing-4) var(--spacing-4);
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.category-pill {
    padding: 0.6rem 1.2rem;
    background: #ffffff;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    scroll-snap-align: start;
}
.category-pill.active {
    background: var(--pan-blue);
    color: #ffffff;
}

/* APP RECIPE CARDS (Food Porn UX) */
.feed-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
    padding: 0 var(--spacing-4);
}
.recipe-app-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-app);
    transition: var(--transition-bounce);
}
.recipe-app-card:active {
    transform: scale(0.98);
}
.recipe-img-container {
    position: relative;
    width: 100%;
    height: 260px;
}
.recipe-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Flotantes sobre la imagen */
.badge-time {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.badge-fav {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.recipe-info {
    padding: var(--spacing-4);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.recipe-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}
.recipe-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.recipe-score {
    background: #f0f0f4;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
}

/* MOBILE BOTTOM NAVIGATION BAR */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}
.nav-item.active {
    color: var(--pan-blue);
}
.nav-item svg {
    width: 28px;
    height: 28px;
}
.nav-item.active svg {
    fill: var(--pan-blue);
}

/* DESKTOP NAV CONTAINER (Oculto en móvil) */
.desktop-nav {
    display: none;
}
.desktop-nav-links {
    display: flex;
    gap: var(--spacing-4);
    align-items: center;
}
.desktop-nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-fast);
}
.desktop-nav-links a:hover, .desktop-nav-links a.active {
    color: var(--pan-blue);
}

/* ========================================================= */
/* PAN. x RAPPI STYLE (THE DESKTOP / APP COMPONENTS)         */
/* ========================================================= */

/* El Super Hero Inmersivo */
.pan-hero-block {
    background-color: var(--pan-blue);
    padding: var(--spacing-8) var(--spacing-4);
    text-align: center;
    color: #ffffff;
    width: 100%;
}
.pan-hero-block h1 {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: var(--spacing-6);
    letter-spacing: -0.03em;
}
.hero-search-giant {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: var(--radius-sm); /* Cuadro grande como en Rappi */
    background: #ffffff;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-search-giant input {
    flex: 1;
    border: none;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.hero-search-giant input:focus { outline: none; }
.hero-search-giant svg {
    margin-left: 1.5rem;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

/* QUICK TAGS HERO */
.hero-quick-tags {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}
.hero-quick-tags span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}
.hero-quick-tags a {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-decoration: none;
}
.hero-quick-tags a:hover {
    background: var(--pan-yellow);
    color: var(--pan-blue);
    border-color: var(--pan-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Las Chunky Cards (Categorías Grandes 3D) */
.chunky-section {
    padding: var(--spacing-6) var(--spacing-4);
}
.chunky-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-4);
}
.chunky-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-4);
}
@media (min-width: 768px) {
    .chunky-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-6);
    }
}
.chunky-card {
    background: #ffffff;
    border-radius: var(--radius-xl); /* Curva inmensa y premium */
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03); /* Leve bisel */
    text-decoration: none;
    flex: 0 0 220px; /* FUERZA EL ANCHO: a 220px para que el texto encaje en una línea */
}
.chunky-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}
.chunky-top {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4);
    position: relative;
    overflow: hidden; /* Corta el efecto de brillo pseudo-elemento */
}
/* Efecto Gloss superpuesto (Geometría interna) */
.chunky-top::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
/* GRADIENTES PREMIUM */
.bg-grad-yellow { background: linear-gradient(135deg, #FFD54F 0%, #FFB300 100%); }
.bg-grad-red { background: linear-gradient(135deg, #EF5350 0%, #D32F2F 100%); }
.bg-grad-green { background: linear-gradient(135deg, #66BB6A 0%, #388E3C 100%); }
.bg-grad-orange { background: linear-gradient(135deg, #FFA726 0%, #F57C00 100%); }

/* EL MEDALLÓN CULINARIO FLOTANTE (Round 3D Image) */
.chunky-top img {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6); /* Glassmorphism ring */
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
    background-color: #fff; /* En caso de imágenes con transparencia previene visual sucia */
    transition: var(--transition-bounce);
    z-index: 2; /* Sobre el brillo */
}
.chunky-card:hover .chunky-top img {
    transform: scale(1.15) rotate(8deg);
}
.chunky-bottom {
    padding: var(--spacing-4) var(--spacing-2);
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--pan-blue); /* Letra oscura azul P.A.N. para extra legibilidad sobre blanco */
    background: #ffffff;
}

/* CORPORATE FOOTER REDESIGN */
.corporate-footer {
    background-color: var(--pan-blue);
    color: #ffffff;
    margin-top: var(--spacing-8);
    font-family: var(--font-main);
    padding-bottom: 80px; /* Space for the bottom nav bar in mobile */
}
.footer-top-cta {
    background-color: var(--pan-yellow);
    padding: var(--spacing-5) 0;
    color: var(--pan-blue);
}
.footer-top-cta .container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
    text-align: center;
}
.cta-content h2 {
    color: var(--pan-blue);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-2);
}
.cta-content p {
    font-weight: 600;
    font-size: 1.05rem;
}
.cta-form form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--radius-full);
    background: #ffffff;
    overflow: hidden;
    padding: 0.3rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.cta-form input {
    flex: 1;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    outline: none;
    color: var(--text-primary);
}
.cta-form button {
    background-color: var(--pan-blue);
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}
.cta-form button:hover {
    background-color: #000c3b;
}
.footer-main-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}
.footer-brand-col {
    max-width: 400px;
}
.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--spacing-3);
}
.footer-logo span {
    color: var(--pan-yellow);
}
.footer-brand-col p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-4);
}
.footer-socials {
    display: flex;
    gap: var(--spacing-3);
}
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    transition: all 0.3s ease;
}
.footer-socials a:hover {
    background: var(--pan-yellow);
    color: var(--pan-blue);
    transform: translateY(-3px);
}
.footer-socials svg {
    width: 20px;
    height: 20px;
}
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-5);
    width: 100%;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-4);
    position: relative;
    padding-bottom: var(--spacing-2);
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 3px;
    background: var(--pan-yellow);
    border-radius: 2px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li {
    margin-bottom: var(--spacing-3);
}
.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
}
.footer-col ul li a:hover {
    color: var(--pan-yellow);
    transform: translateX(4px);
}
.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: var(--spacing-4) 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    align-items: center;
    text-align: center;
}
.footer-bottom-inner p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}
.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-4);
}
.legal-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}
.legal-links a:hover {
    color: #ffffff;
}

/* ========================================================= */
/* MEDIA QUERIES (DESKTOP / TABLET UP SCALER)                */
/* ========================================================= */
@media (min-width: 768px) {
    /* 1. Global Container */
    .container {
        max-width: 1200px;
    }
    body {
        padding-bottom: 0; /* No bottom nav in desktop */
    }

    /* 2. Responsive Navigation Switching */
    .bottom-nav {
        display: none !important;
    }
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: var(--spacing-6);
    }
    .mobile-actions {
        display: none;
    }
    .desktop-actions {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    /* Top Header Extensions */
    .top-header-inner {
        justify-content: space-between;
    }
    .top-header-right {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    .top-header-right a {
        color: #fff; opacity: 0.9; font-weight: 500; font-size: 0.85rem;
    }
    .top-header-right a:hover { opacity: 1; text-decoration: underline; }
    .lang-selector-top {
        border: none; background: transparent; color: #fff; font-weight: 600;
        cursor: pointer; padding-left: 0.8rem; border-left: 1px solid rgba(255,255,255,0.2); outline: none;
    }
    .lang-selector-top option { color: #000; }
    
    /* Desktop Main Header Enhancements */
    .main-header { padding: var(--spacing-4) 0; }
    
    /* Search Bar in Header */
    .header-search {
        display: flex; align-items: center;
        background: #f0f0f4; border-radius: var(--radius-full);
        padding: 0.6rem 1.2rem; width: 280px; transition: var(--transition-normal);
        border: 2px solid transparent;
    }
    .header-search:focus-within {
        background: #fff; border-color: var(--pan-yellow); box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    .header-search input {
        border: none; background: transparent; width: 100%; outline: none;
        padding-left: 0.5rem; font-family: var(--font-main); font-weight: 500; color: var(--text-primary);
    }
    .icon-search { width: 18px; height: 18px; color: var(--text-muted); }
    
    /* Desktop Button */
    .btn-login {
        background: var(--pan-yellow); color: var(--pan-blue);
        border: none; padding: 0.7rem 1.5rem; border-radius: var(--radius-full);
        font-weight: 700; cursor: pointer; transition: var(--transition-fast);
        box-shadow: 0 4px 10px rgba(254, 204, 32, 0.3); font-family: var(--font-main);
    }
    .btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(254, 204, 32, 0.4); }

    /* 4. Category Pills Center alignment */
    .category-scroll {
        justify-content: center;
    }

    /* SLIDER INFINITO / MARQUEE (Full Width hack) */
    .marquee-wrapper {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        overflow: hidden;
        padding: var(--spacing-6) 0;
        background: #fdfdfd; /* Suave contraste de fondo */
    }

    .marquee-track {
        display: flex;
        width: max-content; /* Crece libremente todo lo necesario */
        gap: var(--spacing-4);
        padding: 0 var(--spacing-4);
        animation: scrollMarquee 40s linear infinite;
    }
    
    .marquee-track:hover {
        animation-play-state: paused;
    }

    @keyframes scrollMarquee {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - (var(--spacing-4) / 2))); }
    }

    /* Ocultamos chunky-grid normal al usar el track */
    .chunky-grid {
        display: none;
    }

    /* Responsive Corporate Footer */
    .corporate-footer {
        padding-bottom: 0; /* Reset since bottom nav is gone in desktop */
    }
    .footer-top-cta .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    .cta-form form {
        min-width: 450px;
        margin: 0;
    }
    .footer-main-wrapper {
        flex-direction: row;
        justify-content: space-between;
        gap: var(--spacing-8);
    }
    .footer-brand-col {
        flex: 0 0 350px;
    }
    .footer-links-grid {
        flex: 1;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
    }
    /* 5. Food Catalog Feed Layout (Grid Expansion) */
    .feed-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: var(--spacing-6);
    }

    /* 6. RECIPE SPLIT VIEW (The Desktop Readability Magic) */
    .recipe-desktop-split {
        display: flex;
        gap: var(--spacing-8);
        align-items: flex-start;
        padding-top: var(--spacing-6);
    }
    .recipe-desktop-left {
        flex: 1;
        position: sticky;
        top: 100px; /* Sticks the hero image while scrolling ingredients */
    }
    .recipe-desktop-right {
        flex: 1.2;
    }
    /* Restringir la altura loca del header en PC */
    .recipe-hero-app {
        height: 500px !important;
        border-radius: var(--radius-xl);
        overflow: hidden;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* MODERN LANG SELECTOR (Glassmorphism & Next Gen) */
.modern-lang-selector {
    position: relative;
    display: inline-block;
}
.lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.top-header .lang-btn {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--pan-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.top-header .lang-btn:hover {
    background: var(--pan-yellow);
    color: var(--pan-blue);
}
.lang-text {
    min-width: 2ch;
}
.lang-btn svg {
    width: 18px; height: 18px;
    transition: transform 0.3s ease;
}
.modern-lang-selector:hover .lang-btn svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
}
.modern-lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    top: calc(100% + 5px);
}
.lang-dropdown-inner {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}
.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.2rem;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-decoration: none;
}
.lang-dropdown a:hover {
    background: rgba(0,0,0,0.05);
    color: var(--pan-blue);
    transform: translateX(4px);
}
.lang-dropdown a.active {
    background: var(--pan-blue);
    color: #ffffff;
}
.lang-dropdown a.active span {
    filter: brightness(1.1);
}

/* =========================================
   FORUM LAOUT (COMMUNITY)
========================================= */

.forum-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}
@media (max-width: 900px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }
}

/* Forum Controls */
.forum-controls {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    align-items: center;
}
.btn-forum {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-forum:hover {
    background: rgba(0, 0, 0, 0.05);
}
.btn-forum.active {
    background: rgba(0,0,0,0.1);
}

/* Forum Post */
.forum-post {
    display: flex;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.post-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
    margin-right: 15px;
}
.vote-up, .vote-down {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}
.vote-up:hover { color: #ff4500; }
.vote-down:hover { color: #7193ff; }
.vote-count {
    font-weight: bold;
    margin: 5px 0;
}
.post-content {
    flex: 1;
}
.post-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}
.post-meta .subreddit {
    font-weight: bold;
    color: var(--pan-blue);
}
.post-title {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
}
.post-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}
.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
}
.post-actions .action {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
}
.post-actions .action:hover {
    background: rgba(0,0,0,0.05);
}

/* Sidebar Widgets */
.sidebar-widget {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}
.widget-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}
.subreddit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.subreddit-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.subreddit-list li:last-child {
    border-bottom: none;
}
.subreddit-list .icon {
    font-size: 1.5rem;
    margin-right: 10px;
}
.subreddit-list span {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}
.btn-join {
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-join:hover {
    background: rgba(0,0,0,0.1);
}

/* =========================================
   SEO & FAQ BLOCKS (CATEGORY AEO)
========================================= */

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.faq-item {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item[open] {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.faq-item summary {
    padding: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--pan-blue);
    font-weight: 400;
    transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
.faq-content {
    padding: 0 20px 20px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: fadeInDown 0.3s ease;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   CATEGORY EXPERT FILTER SYSTEM
========================================= */
.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-8);
    align-items: start;
}

@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
    }
    .filter-sidebar {
        position: static !important;
        margin-bottom: var(--spacing-6);
    }
}

.filter-sidebar {
    background: #ffffff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-5);
    position: sticky;
    top: 100px; /* Debajo del Main Header fijo */
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.filter-sidebar-title {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: var(--spacing-3);
    border-bottom: 2px solid rgba(0,0,0,0.04);
}
.filter-sidebar-title svg {
    color: var(--pan-yellow);
}

.filter-group {
    margin-bottom: var(--spacing-5);
}

.filter-group-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--pan-blue);
    margin-bottom: var(--spacing-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-2);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.filter-label:hover {
    color: var(--text-primary);
}

.filter-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    margin-right: 12px;
    font: inherit;
    color: currentColor;
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface-border);
    border-radius: 6px;
    transform: translateY(-1px);
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.filter-label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transform-origin: bottom left;
    transition: 120ms transform ease-in-out;
    background-color: #fff;
}

.filter-label input[type="checkbox"]:checked {
    background-color: var(--pan-blue);
    border-color: var(--pan-blue);
    box-shadow: 0 2px 5px rgba(0, 19, 93, 0.2);
}
.filter-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

