/* ==========================================================================
   HEADER INTELIGENTE CON INTERACCIÓN DE SCROLL Y MENÚ MOVIL INTEGRADO
   ========================================================================== */

/* --- HEADER BASE: FIJO EN EL TOP --- */
.site-header {
    position: fixed;
    top: -10px; /* Corrección de sintaxis segura */
    left: 0;
    width: 100%;
    height: auto;
    background: var(--color-arena);
    z-index: var(--z-header);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
}

/* --- HEADER SCROLLED: Añade sombra glassmorphism al scroll --- */
.site-header.header-scrolled {
    box-shadow: var(--shadow-glass);
    background: rgba(247, 245, 240, 0.95);
    backdrop-filter: blur(10px);
}

/* --- HEADER HIDDEN: Se oculta cuando bajas (scroll down) --- */
.site-header.header-hidden {
    transform: translateY(-100%);
}

/* --- CONTENEDOR INTERIOR DEL HEADER --- */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}

@media (min-width: 992px) {
    .header-inner {
        height: 80px;
        padding: 0 40px;
    }
}

/* --- LOGO --- */
.logo-container {
    flex-shrink: 0;
}

.site-logo {
    font-family: var(--font-titulos);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-madera-oscura);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.site-logo:hover {
    color: var(--color-oro-cobrizo);
}

/* --- NAVEGACIÓN DESKTOP --- */
.desktop-nav {
    flex: 1;
    margin: 0 40px;
    display: none;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-size: var(--text-base);
    color: var(--color-madera-oscura);
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-oro-cobrizo);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-list a:hover::after,
.nav-list .current-menu-item a::after {
    width: 100%;
}

/* --- ACCIONES DEL HEADER (Botón Reservar + Hamburguesa) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* ==========================================================================
   FUSIÓN DE ESTILO BIOLUMINESCENTE - BOTÓN RESERVAR GLOBAL
   ========================================================================== */
.btn-reservar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Degradado de alta gama Oro Cobrizo a Terracota */
    background: linear-gradient(135deg, var(--color-oro-cobrizo) 0%, var(--color-terracota) 100%) !important;
    color: var(--color-blanco) !important;
    
    padding: 10px 24px !important;
    border-radius: 50px !important; /* Forma de píldora de vidrio */
    
    /* Fino filete de luz blanca interna */
    border: 1.2px solid rgba(255, 255, 255, 0.35) !important; 
    
    font-family: var(--font-principal) !important;
    font-weight: 900 !important;
    font-size: 15.5px !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    
    /* Brillo bioluminiscente de fondo */
    box-shadow: 0 4px 14px rgba(212, 163, 115, 0.35), 
                0 0 10px rgba(212, 163, 115, 0.15) !important;
    
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                background 0.35s ease,
                box-shadow 0.35s ease !important;
    cursor: pointer;
}

.btn-reservar:hover {
    transform: translateY(-2px) scale(1.03) !important;
    background: linear-gradient(135deg, var(--color-terracota) 0%, var(--color-oro-cobrizo) 100%) !important;
    box-shadow: 0 8px 20px rgba(212, 163, 115, 0.5), 
                0 0 15px rgba(212, 163, 115, 0.25) !important;
    color: var(--color-blanco) !important;
}

/* --- CONTROL RESPONSIVO DE VISIBILIDAD DE RESERVAS (ECO-LUJO UX) --- */
@media (max-width: 991px) {
    /* 1. Ocultamos el botón de la cabecera móvil para desahogar espacio */
    .header-actions .btn-reservar {
        display: none !important;
    }
}

/* --- BOTÓN HAMBURGUESA (MÓVIL) --- */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

@media (min-width: 992px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle:hover {
    opacity: 0.7;
}

.menu-toggle.is-active .bar {
    background: var(--color-oro-cobrizo);
}

.bar {
    width: 24px;
    height: 3px;
    background: var(--color-madera-oscura);
    margin: 4px 0;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* --- MENÚ MÓVIL DESPLEGABLE (DRAWER) --- */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-arena);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
}

.mobile-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(140, 112, 95, 0.1);
    display: flex;
    align-items: center;
    height: 70px;
}

.mobile-logo {
    font-family: var(--font-titulos);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-madera-oscura);
}

.mobile-nav-wrapper {
    padding: 20px 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid rgba(140, 112, 95, 0.1);
}

.mobile-nav-list a {
    display: block;
    padding: 15px 20px;
    color: var(--color-madera-oscura);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.mobile-nav-list a:hover,
.mobile-nav-list .current-menu-item a {
    background: rgba(212, 163, 115, 0.1);
    color: var(--color-oro-cobrizo);
}

/* Pie del menú móvil (Donde va el botón reservar móvil destacado) */
.mobile-drawer-footer {
    padding: 20px;
    border-top: 1px solid rgba(140, 112, 95, 0.1);
    box-sizing: border-box !important;
}

/* Habilitamos y destacamos a ancho completo el botón de reservas en el menú hamburguesa */
.mobile-drawer-footer .btn-reservar {
    display: inline-flex !important;
    width: 100% !important;
    max-width: none !important;
    height: 48px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
}

/* --- OVERLAY DEL DRAWER --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(58, 53, 50, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   CINTA INTELIGENTE (Smart Ribbon/Stripe)
   ========================================================================== */

/* --- CINTA BASE --- */
.smart-ribbon {
    position: fixed;
    top: 70px; 
    left: 0;
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, var(--color-oro-cobrizo) 0%, var(--color-terracota) 100%);
    color: var(--color-blanco);
    z-index: calc(var(--z-header) - 1);
    padding: 12px 20px;
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
}

@media (min-width: 992px) {
    .smart-ribbon {
        top: 80px; 
        padding: 15px 40px;
        font-size: var(--text-base);
    }
}

/* --- CINTA AL HACER SCROLL DOWN --- */
.site-header.header-hidden ~ .smart-ribbon {
    transform: translateY(calc(-100% - 70px)); 
}

@media (min-width: 992px) {
    .site-header.header-hidden ~ .smart-ribbon {
        transform: translateY(calc(-100% - 80px)); 
    }
}

/* --- CINTA SE PEGA AL TOP --- */
.site-header.header-hidden ~ .smart-ribbon.ribbon-pinned {
    top: 0;
    transform: translateY(0);
    z-index: var(--z-header);
    background: var(--color-madera-oscura);
    border-bottom: 2px solid var(--color-oro-cobrizo);
}

.smart-ribbon[role="status"] {
    position: relative;
}

/* ==========================================================================
   ESPACIADORES GLOBALES
   ========================================================================== */
.header-spacer {
    height: 70px; 
}

.header-spacer.with-ribbon {
    height: calc(70px + 42px); 
}

@media (min-width: 992px) {
    .header-spacer {
        height: 80px; 
    }

    .header-spacer.with-ribbon {
        height: calc(80px + 50px); 
    }
}

/* ==========================================================================
   ANIMACIONES DE TRANSICIÓN SUAVE
   ========================================================================== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.site-header.header-scrolled {
    animation: slideInDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-header.header-hidden {
    animation: slideOutUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   AJUSTE DE SEGURIDAD PARA EL MENÚ HAMBURGUESA EN MÓVILES (AISLADO)
   ========================================================================== */
@media (max-width: 768px) {
    .header-inner {
        margin: 5px 8px !important;
        padding: 0 12px !important;
        height: 64px !important;
    }

    .header-logo-img {
        height: 38px !important;
        min-width: 38px !important;
    }

    .header-announcement-pill {
        padding: 6px 14px !important;
        font-size: 11px !important;
        max-width: 160px; 
    }

    .header-actions {
        margin-left: auto !important; 
        display: flex !important;
        align-items: center;
        gap: 10px;
    }

    .menu-toggle {
        display: flex !important;
        width: 36px !important;
        height: 36px !important;
        justify-content: center !important;
        align-items: center !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }

    .menu-toggle .bar {
        width: 22px !important;
        height: 2.5px !important;
        background-color: var(--color-madera-oscura) !important;
        margin: 3px 0 !important;
        display: block !important;
    }
}

@media (max-width: 768px) {
    .logo-container {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important; 
        max-width: calc(100% - 65px) !important; 
        box-sizing: border-box !important;
    }

    .header-announcement-pill {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 32px !important;
        padding: 0 14px !important;
        font-size: 11px !important;
        white-space: nowrap !important; 
        overflow: hidden !important;
        max-width: 230px !important; 
        flex-shrink: 1 !important; 
        box-sizing: border-box !important;
    }

    .header-announcement-pill span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important; 
        max-width: 100% !important;
    }

    .wa-calendar-icon {
        width: 12px !important;
        height: 12px !important;
        flex-shrink: 0 !important;
    }
}


