/* =========================================
   HEADER — ESTILO PROFESIONAL
========================================= */

.header {
    width: 100%;
    background: var(--color-bg-alt);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(8px);
}

/* =========================================
   CONTENEDOR INTERNO CENTRADO
========================================= */

.header-inner {
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
}

/* =========================================
   LOGO
========================================= */

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.brand-tagline {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: var(--color-text);
    opacity: 0.72;
    line-height: 1.1;
    white-space: nowrap;
}

/* =========================================
   NAVBAR — ESCRITORIO
========================================= */

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.nav-group {
    position: relative;
}

.nav-group-btn {
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    cursor: pointer;
    white-space: nowrap;
    transition: 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-group-btn:hover {
    background: var(--color-hover);
    border-color: var(--color-primary);
}

/* Dropdown */
.nav-group-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    z-index: 9999;
}

.nav-group:hover .nav-group-menu {
    display: block;
}

.nav-group-menu a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--color-text);
    border-radius: 10px;
    transition: all 0.25s ease;
    position: relative;
    font-size: 15px;
}

/* =========================================
   HEADER RIGHT (IDIOMA + TEMA)
========================================= */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.lang-select,
.theme-toggle-btn {
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    color: var(--color-text);
    cursor: pointer;
    transition: 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-select:hover,
.theme-toggle-btn:hover {
    background: var(--color-hover);
    border-color: var(--color-primary);
}

/* =========================================
   BOTÓN HAMBURGUESA (OCULTO EN ESCRITORIO)
========================================= */

.mobile-menu-toggle {
    display: none;
    font-size: 28px;
    line-height: 1;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    width: 42px;
    height: 42px;
    color: var(--color-text);
    cursor: pointer;
    margin-left: auto;
}



/* =========================================
   MÓVIL PEQUEÑO
========================================= */

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .nav-group-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}



/* Cuando el menú está expandido, el header debe volverse vertical */
.header-inner.menu-open {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

/* ============================
   MENÚ MÓVIL SIMPLE
============================ */

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    }

    /* Overlay menú móvil pantalla completa */
    .nav-mobile-fullscreen {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(30, 30, 30, 0.98);
        z-index: 2000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: opacity 0.3s;
    }
    .nav-mobile-fullscreen.is-expanded {
        display: flex;
        opacity: 1;
    }
    .nav-mobile-fullscreen a {
        color: #fff;
        font-size: 2rem;
        font-weight: 700;
        text-decoration: none;
        margin: 12px 0;
        transition: color 0.2s;
    }
    .nav-mobile-fullscreen a:hover {
        color: var(--color-primary);
    }
    .nav-mobile-fullscreen .close-btn {
        position: absolute;
        top: 24px;
        right: 24px;
        font-size: 2.2rem;
        color: #fff;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2100;
    }


.nav-mobile a {
    padding: 12px;
    background: var(--color-bg-alt);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    border: 1px solid var(--color-border);
}

.nav-mobile a:hover {
    background: var(--color-hover);
    border-color: var(--color-primary);
}

/* Mostrar menú móvil cuando se abre */
.nav-mobile.is-expanded {
    display: flex;
}

/* Comportamiento móvil */
@media (max-width: 1024px) {
    .nav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .header-right {
        display: none !important;
    }

    .footer .header-right {
        display: flex !important;
        width: 100%;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--color-border);
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }

    .footer .theme-toggle-btn,
    .footer .lang-select {
        justify-content: center;
        height: 36px;
        border-radius: 9px;
        font-size: 12px;
        line-height: 1;
        padding: 0 10px;
    }

    .footer .lang-select {
        flex: 0 0 auto;
        width: 64px;
        min-width: 64px;
        font-weight: 700;
    }

    .footer .theme-toggle-btn {
        flex: 1 1 auto;
        min-width: 0;
        font-weight: 600;
        gap: 3px;
        overflow: hidden;
        padding: 0 8px;
        height: 34px;
        font-size: 11px;
    }

    .footer .theme-toggle-btn .theme-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 90px;
    }

    .footer .theme-toggle-btn .theme-icon {
        display: none;
    }
}
