/* header.css */

.header {
    height: var(--header-height);
    background-color: rgba(128, 0, 32, 0.82); /* Borgoña translúcido */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(255, 133, 161, 0.15);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(128, 0, 32, 0.5) 0%, #DC143C 25%, #FFB7C5 50%, #DC143C 75%, rgba(128, 0, 32, 0.5) 100%);
    box-shadow: 0 4px 16px rgba(255, 183, 197, 0.6); /* Sombra/resplandor más visible y vibrante */
    pointer-events: none;
}

.header.scrolled {
    background-color: rgba(128, 0, 32, 0.9); /* Borgoña en scroll/sticky */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), var(--shadow-sm);
    height: 70px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo {
    max-height: 45px;
    width: auto;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff; /* Ajustado a blanco para combinar con el nuevo tema */
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: #ffffff; /* Color de letra blanco */
    font-weight: 500; /* Grosor 500 */
    font-size: 15.4px; /* Aumentado 10% desde 14px */
    text-transform: uppercase; /* Mayúsculas */
    padding: 8px 16px;
    border-radius: 50px;
    transition: all var(--transition-base);
    position: relative; /* Added relative positioning for badge placement */
}

.nav-item:hover {
    background-color: #DC143C; /* Fondo carmesí en hover */
    color: #ffffff;
}

.header.scrolled .nav-item {
    color: #ffffff;
}

.header.scrolled .nav-item:hover {
    background-color: #DC143C;
    color: #ffffff;
}

.header.scrolled .menu-toggle svg {
    stroke: #ffffff;
}

/* Menu Badge (Floating top-right) */
.menu-badge {
    position: absolute;
    top: -5px;
    right: 2px;
    background-color: #FFE5A3;
    color: #800020;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

/* Hamburguesa y Menú Móvil (Estilos Base) */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background-color var(--transition-base), transform var(--transition-spring);
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle svg {
    stroke: #ffffff !important; /* Forzar iconos blancos sobre borgoña */
}

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

.menu-toggle:active {
    transform: scale(0.9);
}

/* Control de visibilidad de iconos SVG Lucide */
.menu-toggle .icon-close {
    display: none;
}

.menu-toggle .icon-menu {
    display: block;
    transition: transform 0.3s var(--ease-spring);
}

.menu-toggle.is-active .icon-menu {
    display: none;
}

.menu-toggle.is-active .icon-close {
    display: block;
    animation: rotateIn 0.3s var(--ease-spring) both;
}

@keyframes rotateIn {
    from {
        transform: rotate(-90deg) scale(0.8);
        opacity: 0;
    }
    to {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Bloquear scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

/* Media Queries (Últimas en la cascada) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .logo {
        max-height: 38px;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(128, 0, 32, 0.92); /* Borgoña translúcido más suave */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1.5px solid #DC143C; /* Borde carmesí */
        z-index: 999;
        display: block;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s var(--ease-spring), opacity 0.25s ease;
        box-shadow: var(--shadow-md);
        pointer-events: none;
    }

    .main-nav.is-active {
        max-height: 520px;
        opacity: 1;
        pointer-events: auto;
        padding-bottom: 2rem;
        overflow-y: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        padding: 1.5rem 1rem 2rem 1rem;
        text-align: center;
        align-items: center;
    }

    .nav-item {
        font-size: 1.265rem; /* Aumentado un 10% desde 1.15rem */
        padding: 10px 48px; /* Balanced padding to prevent badge overlap and keep text centered */
        display: inline-block;
        width: 100%;
        max-width: 320px; /* Increased from 290px */
        text-align: center;
        position: relative;
        box-sizing: border-box;
    }

    .nav-item.btn {
        width: 100%;
        max-width: 320px;
        font-size: 1.265rem; /* Aumentado un 10% desde 1.15rem */
        margin-top: 0.25rem;
    }

    .nav-item .menu-badge {
        position: absolute;
        right: 50px; /* Aligns to the top-right corner of the centered text */
        top: 2px;
        transform: none;
        margin-left: 0;
    }

    /* Animación de entrada escalonada para los enlaces */
    @keyframes mobileNavFade {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-nav.is-active .nav-list li {
        animation: mobileNavFade 0.3s var(--ease-spring) both;
    }

    .main-nav.is-active .nav-list li:nth-child(1) { animation-delay: 0.05s; }
    .main-nav.is-active .nav-list li:nth-child(2) { animation-delay: 0.10s; }
    .main-nav.is-active .nav-list li:nth-child(3) { animation-delay: 0.15s; }
}



/* ═══════════════════════════════════════
   OFFICE MODE — fixed eye toggle
   ═══════════════════════════════════════ */

/* Button */
.office-mode-btn {
    position: fixed;
    top: calc(var(--header-height) + 14px);
    right: 0;
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.97) 0%, rgba(255, 220, 232, 0.97) 100%);
    border: 1.5px solid rgba(220, 20, 60, 0.25);
    border-right: none;
    border-radius: 20px 0 0 20px;
    padding: 8px 14px 8px 12px;
    cursor: pointer;
    color: #800020;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: -3px 3px 14px rgba(220, 20, 60, 0.15), inset 0 1px 0 rgba(255,255,255,0.6);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
}

.office-mode-btn:hover {
    background: linear-gradient(135deg, #fff0f5 0%, #ffd6e7 100%);
    box-shadow: -4px 4px 18px rgba(220, 20, 60, 0.22), inset 0 1px 0 rgba(255,255,255,0.7);
    color: #5a0010;
}

.office-mode-btn:active {
    transform: scale(0.95);
}

/* Active (office mode ON) — burdeos sólido */
.office-mode-btn.is-active {
    background: linear-gradient(135deg, #800020 0%, #5a0010 100%);
    color: #ffe0ec;
    border-color: rgba(255, 183, 197, 0.3);
    box-shadow: -3px 3px 14px rgba(90, 0, 16, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

.office-mode-btn.is-active:hover {
    background: linear-gradient(135deg, #900025 0%, #6a0015 100%);
    color: #fff0f5;
}

/* Eye icons */
.office-icon--closed { display: none; }

.office-mode-btn.is-active .office-icon--open  { display: none; }
.office-mode-btn.is-active .office-icon--closed { display: block; }

/* Label — hidden on mobile, visible on desktop */
.office-mode-label {
    display: none;
}

@media (min-width: 768px) {
    .office-mode-label {
        display: inline;
    }
}

/* ── Office Mode ON: hide all images ── */
.office-mode img {
    visibility: hidden !important;
    /* Keep layout space so the page doesn't reflow */
}

/* Replace hidden images with a neutral grey placeholder */
.office-mode img::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    background: #d0d0d0;
    border-radius: 4px;
}

/* For images that are absolutely/relatively positioned wrappers */
.office-mode [class*="img"],
.office-mode [class*="-img"] {
    background: #d8d8d8 !important;
}

/* Also hide background-image sections that carry explicit inline style */
.office-mode [style*="background-image"] {
    background-image: none !important;
    background-color: #d0d0d0 !important;
}

/* Hero slides with bg images */
.office-mode .hero-slide img,
.office-mode .hero-bg img {
    visibility: hidden !important;
}

/* ── Office Mode Toast ── */
.office-mode-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: inherit;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    white-space: normal;
}

.office-mode-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ON: dark/neutral */
.office-mode-toast.is-on {
    background: linear-gradient(135deg, #800020 0%, #5a0010 100%);
    color: #ffe0ec;
    border: 1px solid rgba(255, 183, 197, 0.2);
}

/* OFF: light rose */
.office-mode-toast.is-off {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ef 100%);
    color: #5a0010;
    border: 1px solid rgba(220, 20, 60, 0.2);
}
