/* ========================================
   HEADER PREMIUM — SANJURJO BADÍA 105
   ======================================== */

/* ── Base ─────────────────────────────── */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.07), 0 4px 24px rgba(0,0,0,0.06);
}

/* ── Layout interior ─────────────────── */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.4s ease;
}

.modern-header.scrolled .header-content {
    padding: 12px 40px;
}

/* ── Logo ────────────────────────────── */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-higoma {
    height: 60px;
    width: auto;
    transition: opacity 0.3s ease;
    filter: brightness(0) invert(1);
}

.modern-header.scrolled .logo-higoma {
    filter: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: none;
    line-height: 1;
    transition: color 0.4s ease;
}

.modern-header.scrolled .brand-name {
    color: var(--rojo-oscuro);
}

/* ── Navegación ──────────────────────── */
.main-navigation {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
    text-shadow: none;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.12);
}

.modern-header.scrolled .nav-link {
    color: #3a3a3a;
}

.modern-header.scrolled .nav-link:hover {
    color: var(--rojo-oscuro);
    background: rgba(92,42,37,0.06);
}

/* Indicador página activa */
.nav-link.active {
    color: white;
}

.modern-header.scrolled .nav-link.active {
    color: var(--rojo-oscuro);
}

/* ── Header Actions ──────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* ── Iconos sociales ─────────────────── */
.social-icons-header {
    display: flex;
    gap: 4px;
    align-items: center;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.75);
    transition: color 0.3s ease, background 0.3s ease;
    text-decoration: none;
    font-size: 0.85rem;
    border: none;
}

.social-icon:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.modern-header.scrolled .social-icon {
    color: #666;
    background: transparent;
}

.modern-header.scrolled .social-icon:hover {
    color: var(--rojo-oscuro);
    background: rgba(92,42,37,0.07);
}

/* Separador vertical entre redes y botón */
.header-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.25);
    transition: background 0.4s ease;
}

.modern-header.scrolled .header-divider {
    background: #e0e0e0;
}

/* ── Botón CTA ───────────────────────── */
.btn-register {
    background: transparent;
    color: white;
    padding: 9px 22px;
    border-radius: 100px;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border: 1.5px solid rgba(255,255,255,0.65);
    white-space: nowrap;
}

.btn-register:hover {
    background: white;
    color: var(--rojo-oscuro);
    border-color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.modern-header.scrolled .btn-register {
    background: var(--rojo-oscuro);
    color: white;
    border-color: var(--rojo-oscuro);
    box-shadow: none;
}

.modern-header.scrolled .btn-register:hover {
    background: #7a3530;
    border-color: #7a3530;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(92,42,37,0.25);
}

/* ── Hamburger ───────────────────────── */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255,255,255,0.1);
}

.modern-header.scrolled .hamburger-menu:hover {
    background: rgba(0,0,0,0.05);
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.35s ease;
    border-radius: 2px;
    display: block;
}

.modern-header.scrolled .hamburger-menu span {
    background: var(--rojo-oscuro);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Menu Overlay ─────────────── */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.55);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ── Mobile Menu Panel ───────────────── */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 90vw;
    height: 100dvh;
    background: #fff;
    z-index: 1001;
    transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.18);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0ebe9;
}

.mobile-logo {
    height: 36px;
    width: auto;
}

.close-mobile-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-mobile-menu:hover {
    background: #f5f0ef;
    color: var(--rojo-oscuro);
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 13px 24px;
    color: #2a2a2a;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.2s ease;
    border-radius: 0;
}

.mobile-nav-link:hover {
    background: #faf5f4;
    color: var(--rojo-oscuro);
    padding-left: 30px;
}

.mobile-nav-link i {
    width: 20px;
    font-size: 0.95rem;
    margin-right: 12px;
    color: var(--rojo-oscuro);
    opacity: 0.7;
}

/* Botón CTA en móvil */
.mobile-cta {
    margin: 16px 24px 8px;
    padding: 13px 24px;
    background: var(--rojo-oscuro);
    color: white !important;
    border-radius: 100px;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
}

.mobile-cta:hover {
    background: #7a3530 !important;
    color: white !important;
    padding-left: 24px;
}

.mobile-menu-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0ebe9;
}

.mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mobile-social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f5f0ef;
    color: var(--rojo-oscuro);
    transition: all 0.2s ease;
    font-size: 0.95rem;
    text-decoration: none;
}

.mobile-social-icons a:hover {
    background: var(--rojo-oscuro);
    color: white;
    transform: translateY(-2px);
}

/* ── Responsive ──────────────────────── */
@media (max-width: 1100px) {
    .main-navigation {
        gap: 2px;
    }

    .nav-link {
        font-size: 0.74rem;
        padding: 8px 8px;
    }

    .header-content {
        padding: 18px 28px;
    }

    .modern-header.scrolled .header-content {
        padding: 10px 28px;
    }
}

@media (max-width: 991px) {
    .main-navigation,
    .social-icons-header,
    .header-divider,
    .btn-register,
    .header-actions .lang-toggle {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .header-content {
        padding: 14px 20px;
    }

    .modern-header.scrolled .header-content {
        padding: 10px 20px;
    }

    .logo-higoma {
        height: 54px;
    }
}

@media (max-width: 576px) {
    .logo-higoma {
        height: 48px;
    }
}

/* ── Language Toggle ─────────────────── */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: 100px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.lang-toggle:hover {
    border-color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.08);
}

.modern-header.scrolled .lang-toggle {
    border-color: #d0c8c6;
}

.modern-header.scrolled .lang-toggle:hover {
    border-color: var(--rojo-oscuro);
    background: rgba(92,42,37,0.05);
}

.lang-opt {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0 2px;
}

.lang-opt:hover {
    color: white;
}

.lang-opt.active {
    color: white;
}

.modern-header.scrolled .lang-opt {
    color: #aaa;
}

.modern-header.scrolled .lang-opt.active {
    color: var(--rojo-oscuro);
}

.modern-header.scrolled .lang-opt:hover {
    color: var(--rojo-oscuro);
}

.lang-sep {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    pointer-events: none;
}

.modern-header.scrolled .lang-sep {
    color: #ccc;
}

/* Versión móvil del selector de idioma */
.lang-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 24px 16px;
    padding: 12px 20px;
    border: 1.5px solid #e8e0de;
    border-radius: 10px;
    background: #faf5f4;
    width: calc(100% - 48px);
}

.lang-toggle-mobile .lang-opt {
    color: #aaa;
    font-size: 0.8rem;
}

.lang-toggle-mobile .lang-opt.active {
    color: var(--rojo-oscuro);
}

.lang-toggle-mobile .lang-sep {
    color: #ddd;
}

.mobile-lang-sep {
    height: 1px;
    background: #f0ebe9;
    margin: 8px 0 4px;
}
