/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--chickin-orange-web) 0%, #ff8c1a 100%);
    color: var(--chickin-anthracite);
    position: relative; /* Normal en móvil */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky solo en desktop */
@media (min-width: 992px) {
    .site-header {
        position: sticky;
    }
}

/* En móvil, bajar z-index para que el WhatsApp button (z-index: 1030) quede por encima */
@media (max-width: 991px) {
    .site-header {
        z-index: 100;
    }
}

/* Cuando el nav está abierto, subir el z-index */
.site-header.nav-open {
    z-index: 1015;
}

.site-header.scrolled {
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
}

.site-header.scrolled .header-container {
    height: 70px;
}

.site-header.scrolled .header-logo img {
    height: 42px;
}

/* Asegurar que el toggle esté visible sobre el overlay */
.site-header.nav-open .mobile-menu-toggle {
    z-index: 1020;
}

.header-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado en mobile */
    height: 85px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@media (min-width: 992px) {
    .header-container {
        justify-content: space-between; /* Normal en desktop */
    }
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    z-index: 1002;
    text-decoration: none;
    position: relative;
    transition: opacity 0.3s ease;
}

/* Ocultar logo cuando el menú móvil está abierto */
@media (max-width: 991px) {
    .site-header.nav-open .header-logo {
        opacity: 0;
        pointer-events: none;
    }
}

.header-logo img {
    height: 52px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.header-logo:hover img {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Desktop Navigation */
.header-nav {
    display: none; /* Hidden on mobile by default */
}

@media (min-width: 992px) {
    .header-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-lg);
}

.nav-link {
    font-family: 'League Spartan', sans-serif;
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--chickin-anthracite);
    text-decoration: none;
    letter-spacing: 0.08em;
    padding: 0.65rem 0.25rem;
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--chickin-anthracite);
    border-radius: 3px 3px 0 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -2px 8px rgba(40, 40, 45, 0.3);
}

.nav-link:hover {
    color: var(--chickin-anthracite);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
}

/* Header Actions (Desktop) */
.header-actions {
    display: none;
}

@media (min-width: 992px) {
    .header-actions {
        display: flex;
        gap: 1rem;
    }
}

/* CTA Base Styles */
.btn-header-cta {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: normal;
    max-width: 200px;
    line-height: 1.3;
    text-align: center;
    min-height: 40px;
}

.btn-header-cta .cta-text {
    flex: 1;
}

.btn-header-cta .cta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1); /* Siempre blanco por defecto */
}

.btn-header-cta:hover .cta-icon {
    transform: scale(1.1);
}

/* CTA Variant: Solid */
.btn-header-solid {
    color: var(--chickin-white);
    background-color: var(--chickin-anthracite);
    box-shadow: 0 4px 15px rgba(40, 40, 45, 0.3);
}

.btn-header-solid .cta-icon {
    filter: brightness(0) invert(1); /* Blanco */
}

.btn-header-solid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
    z-index: -1;
}

.btn-header-solid:hover::before {
    left: 100%;
}

.btn-header-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 40, 45, 0.4);
    background-color: #1a1a1d;
}

.btn-header-solid:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 40, 45, 0.3);
}

/* CTA Variant: Outline */
.btn-header-outline {
    color: var(--chickin-anthracite);
    background-color: transparent;
    border: 2px solid var(--chickin-anthracite);
    box-shadow: 0 2px 10px rgba(40, 40, 45, 0.15);
}

.btn-header-outline .cta-icon {
    filter: brightness(0); /* Negro para outline */
}

.btn-header-outline:hover {
    color: var(--chickin-white);
    background-color: var(--chickin-anthracite);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(40, 40, 45, 0.3);
}

.btn-header-outline:hover .cta-icon {
    filter: brightness(0) invert(1); /* Blanco en hover */
}

/* CTA Variant: Ghost */
.btn-header-ghost {
    color: var(--chickin-anthracite);
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-header-ghost .cta-icon {
    filter: brightness(0); /* Negro para ghost */
}

.btn-header-ghost:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: var(--chickin-anthracite);
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-inner::before, .hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 100%; /* Completamente fuera del viewport */
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para mobile */
    max-height: 100vh;
    max-height: 100dvh;
    min-height: -webkit-fill-available;
    background: linear-gradient(165deg, #1a1a1d 0%, var(--chickin-anthracite) 100%);
    z-index: 200; /* Bajo para no interferir con WhatsApp button */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-lg) var(--spacing-md);
    
    /* Animación */
    opacity: 0;
    pointer-events: none;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.nav-open .mobile-nav-overlay {
    left: 0; /* Mover a la vista */
    opacity: 1;
    pointer-events: auto;
}

/* Contenedor del nav móvil */
.mobile-nav {
    width: 100%;
    max-width: 500px;
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Prevenir scroll del body cuando el menú está abierto */
.site-header.nav-open ~ * {
    overflow: hidden;
}

body:has(.site-header.nav-open) {
    overflow: hidden !important;
}

/* Hamburger animation when open */
.site-header.nav-open .hamburger-inner {
    transform: rotate(45deg);
    background-color: var(--chickin-white);
}

.site-header.nav-open .hamburger-inner::before {
    top: 0;
    opacity: 0;
    transform: rotate(-90deg);
}

.site-header.nav-open .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    background-color: var(--chickin-white);
}

/* Mobile Nav List */
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-item {
    margin: var(--spacing-md) 0;
    opacity: 0;
    transform: translateX(50px) scale(0.9);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.nav-open .mobile-nav-item {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.site-header.nav-open .mobile-nav-item:nth-child(1) { transition-delay: 0.15s; }
.site-header.nav-open .mobile-nav-item:nth-child(2) { transition-delay: 0.25s; }
.site-header.nav-open .mobile-nav-item:nth-child(3) { transition-delay: 0.35s; }
.site-header.nav-open .mobile-nav-item:nth-child(4) { transition-delay: 0.45s; }

.mobile-nav-link {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    color: var(--chickin-white);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: inline-block;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chickin-orange-web), #ffaa55);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link:hover {
    color: var(--chickin-orange-web);
    transform: translateX(8px);
}

.mobile-nav-link:hover::after {
    width: calc(100% - 2rem);
}

/* Mobile CTA Styles */
.mobile-nav-cta {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
}

.site-header.nav-open .mobile-nav-cta {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.55s;
}

.btn-mobile-cta {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: normal;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    line-height: 1.3;
}

.btn-mobile-cta .cta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1); /* Siempre blanco */
}

/* Mobile CTA - Solid variant */
.btn-mobile-cta.btn-header-solid {
    background: linear-gradient(135deg, var(--chickin-orange-web) 0%, #ff8c1a 100%);
    color: var(--chickin-white);
    border: 2px solid var(--chickin-orange-web);
}

.btn-mobile-cta.btn-header-solid:active {
    transform: scale(0.97);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.btn-mobile-cta.btn-header-solid .cta-icon {
    filter: brightness(0) invert(1);
}

/* Mobile CTA - Outline variant */
.btn-mobile-cta.btn-header-outline {
    background-color: transparent;
    color: var(--chickin-white);
    border: 2px solid var(--chickin-white);
}

.btn-mobile-cta.btn-header-outline:active {
    background-color: var(--chickin-white);
    color: var(--chickin-anthracite);
    transform: scale(0.97);
}

.btn-mobile-cta.btn-header-outline .cta-icon {
    filter: brightness(0) invert(1);
}

.btn-mobile-cta.btn-header-outline:active .cta-icon {
    filter: brightness(0);
}

/* Mobile CTA - Ghost variant */
.btn-mobile-cta.btn-header-ghost {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--chickin-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-mobile-cta.btn-header-ghost:active {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(0.97);
}

.btn-mobile-cta.btn-header-ghost .cta-icon {
    filter: brightness(0) invert(1);
}

/* Actualizar delays de animación para incluir el CTA */
.site-header.nav-open .mobile-nav-item:nth-child(5) { transition-delay: 0.55s; }
.site-header.nav-open .mobile-nav-item:nth-child(6) { transition-delay: 0.65s; }
