/* =========================================================
   MENÚ UNIFICADO — MIRAI Innovations
   Todas las páginas usan el mismo estilo de menú que Productos:
   header claro, enlaces tipo píldora, solo UNA opción activa
   (azul) y botón "Certificados" destacado. Menú hamburguesa
   desde 1100 px.
   Se carga al final (después del CSS de cada página) y se activa
   con la clase "nav-unificada" en <body>. Las páginas de Productos
   ya tienen este estilo por productos-base.css.
   ========================================================= */
html body.nav-unificada {
    --nu-ink: #0B1B30;
    --nu-dark: #1A2F4D;
    --nu-navy: #1E3A5F;
    --nu-blue: #4A9EFF;
    --nu-blue-600: #2F86F0;
    --nu-blue-700: #1F6FD1;
    --nu-light: #7CB8FF;
    --nu-ice: #EAF3FF;
    --nu-border: #E2E8F0;
}

html body.nav-unificada header,
html body.nav-unificada header.is-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nu-border) !important;
    box-shadow: 0 6px 20px -14px rgba(26, 47, 77, 0.25) !important;
}

html body.nav-unificada .header-container,
html body.nav-unificada header.is-scrolled .header-container {
    max-width: 1320px;
    padding: 0.75rem 2rem;
    gap: 1rem;
}

html body.nav-unificada .logo-container {
    text-decoration: none;
}

html body.nav-unificada .logo-container img {
    height: 46px;
    filter: none;
}

html body.nav-unificada .logo-text .main-title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--nu-dark);
}

html body.nav-unificada .logo-text .subtitle {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--nu-blue-600);
}

html body.nav-unificada nav ul {
    gap: 0.2rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

html body.nav-unificada nav ul li a {
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    transform: none;
}

html body.nav-unificada nav ul li a::before,
html body.nav-unificada nav ul li a::after {
    display: none !important;
}

html body.nav-unificada nav ul li a:hover {
    color: var(--nu-navy);
    background: #F1F5FA;
    transform: none;
}

html body.nav-unificada nav ul li a.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-600));
    border: 0;
    box-shadow: 0 6px 14px -6px rgba(74, 158, 255, 0.7);
}

html body.nav-unificada nav ul li a.btn-certificados {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.3rem;
    font-size: 0.88rem;
    text-transform: none;
    letter-spacing: normal;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--nu-blue-700), var(--nu-navy));
    box-shadow: 0 8px 18px -10px rgba(31, 111, 209, 0.8);
}

html body.nav-unificada nav ul li a.btn-certificados:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-700));
}

html body.nav-unificada .menu-toggle span {
    background: var(--nu-navy);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

html body.nav-unificada .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
html body.nav-unificada .menu-toggle.active span:nth-child(2) { opacity: 0; }
html body.nav-unificada .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

html body.nav-unificada :focus-visible {
    outline-color: rgba(74, 158, 255, 0.55);
}

@media (max-width: 1240px) {
    html body.nav-unificada nav ul li a {
        padding: 0.5rem 0.6rem;
        font-size: 0.84rem;
    }
}

/* Menú hamburguesa desde 1100 px (igual que Productos) */
@media (max-width: 1100px) {
    html body.nav-unificada .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    html body.nav-unificada nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.99) !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        transition: max-height 0.35s ease;
    }

    html body.nav-unificada nav.active {
        max-height: 640px;
        border-bottom: 1px solid var(--nu-border);
        box-shadow: 0 16px 30px -16px rgba(26, 47, 77, 0.35);
    }

    html body.nav-unificada nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem 1.5rem 1.5rem;
    }

    html body.nav-unificada nav ul li {
        width: 100%;
    }

    html body.nav-unificada nav ul li a {
        display: block;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        color: #475569;
    }

    html body.nav-unificada nav ul li a.active {
        color: #fff;
    }

    html body.nav-unificada nav ul li a.btn-certificados {
        display: flex;
        justify-content: center;
        margin: 0.3rem 0 0;
        border-radius: 10px;
    }
}

@media (max-width: 767px) {
    html body.nav-unificada .header-container,
    html body.nav-unificada header.is-scrolled .header-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    html body.nav-unificada .logo-container img {
        height: 40px;
    }
}
