/* =============================================
   HEADER — IronBlock
   ============================================= */

   header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    /* Estado inicial: transparente */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

/* Fondo glass cuando se hace scroll */
header.scrolled {
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Logo ─────────────────────────────────── */
.logo { display: flex; align-items: center; }

.logo-img {
    height: 42px;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.logo-img:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

/* ── Nav desktop ─────────────────────────── */
.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--light);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    line-height: 1.5;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.25s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255, 193, 7, 0.1);
}

/* ── Botón Cotizar ───────────────────────── */
.btn-cotizar {
    background: transparent;
    color: var(--primary) !important;   /* ← CORREGIDO: texto oscuro sobre fondo amarillo */
    padding: 9px 22px !important;
    border-radius: 6px;
    font-weight: 700;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    border: 2px solid var(--primary);
    letter-spacing: 0.3px;
}
.btn-cotizar:hover {
    background: transparent;
    color: var(--primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 193, 7, 0.25);
}

/* ── Hamburger ────────────────────────────── */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    flex-shrink: 0;
    transition: background 0.2s;
}
.mobile-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--light);
    border-radius: 3px;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                opacity   0.25s ease,
                width     0.3s ease;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ── Menú móvil ────────────────────────────── */
@media (max-width: 768px) {

    .mobile-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100dvh - 70px);
        
        /* Fondo difuminado (glassmorphism) */
        background: rgba(26, 26, 26, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                    opacity   0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        max-width: 320px;
        padding: 0 2rem;
        margin: 0 auto;
    }

    .nav-menu li {
        width: 100%;
        justify-content: center;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    /* Animación escalonada */
    .nav-menu.active li:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.08s; }
    .nav-menu.active li:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.16s; }
    .nav-menu.active li:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
    .nav-menu.active li:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.32s; }

    /* ── ESTILO MEJORADO DE LOS BOTONES MÓVILES ── */
    .nav-menu a {
        font-size: 1.1rem;
        font-weight: 700;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1rem 1.5rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        background: rgba(255, 255, 255, 0.03);
        border: 2px solid var(--primary);
        border-radius: 10px;
        color: var(--primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        position: relative;
        overflow: hidden;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--primary);
        color: var(--secondary);
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
        border-color: var(--primary);
    }
    
    .nav-menu a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -75%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s ease;
    }
    .nav-menu a:hover::before {
        left: 125%;
    }
    
    .btn-cotizar {
        margin: 0;
        padding: 1rem 1.5rem !important;
        font-size: 1.1rem;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        background: var(--primary);
        color: #000 !important;
        border: 2px solid var(--primary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    .btn-cotizar:hover {
        background: transparent;
        color: var(--primary) !important;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    }
}

/* ── Tablet intermedio ───────────────────── */
@media (max-width: 900px) and (min-width: 769px) {
    .nav-menu ul { gap: 0.5rem; }
    .nav-menu a  { font-size: 0.88rem; padding: 8px 12px; }
}