﻿/* ===================================================================
   07) NAVBAR (Desktop & General)
   =================================================================== */
.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 999; /* Alto para que no lo tape el contenido al hacer scroll */
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(36,75,92,.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Fallback para navegadores antiguos que no soportan blur */
@supports not (backdrop-filter: blur(10px)) {
    .nav-wrap {
        background: #ffffff;
    }
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: .2px;
    color: var(--brandDark);
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(47,93,115,.10);
    border: 1px solid rgba(47,93,115,.22);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .logo:after {
        content: "";
        width: 12px;
        height: 12px;
        border-radius: 4px;
        background: rgba(198,182,74,.95);
        box-shadow: 0 0 0 7px rgba(47,93,115,.10);
    }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .nav-links a {
        color: rgba(36,75,92,.80);
        font-weight: 750;
        font-size: 14px;
        padding: 10px 10px;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

        .nav-links a:hover {
            background: rgba(47,93,115,.06);
            color: var(--brandDark);
        }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Oculto por defecto en escritorio */
.burger {
    display: none;
}

/* ===================================================================
   08) MOBILE DRAWER (Menú Deslizable Lateral)
   =================================================================== */
.drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050; /* SUPER ALTO: Para que pase por encima de la barra Nav (999) */
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(6px);
}

    .drawer.open {
        display: block;
    }

.drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: min(380px, 92vw);
    background: #ffffff;
    border-left: 1px solid rgba(36,75,92,.14);
    padding: 16px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

    .drawer-panel .close {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        color: var(--brandDark);
    }

.drawer-nav {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

    .drawer-nav a {
        padding: 12px 12px;
        border-radius: 14px;
        border: 1px solid rgba(36,75,92,.14);
        background: #ffffff;
        color: var(--brandDark);
        font-weight: 800;
        transition: all 0.2s ease;
    }

        .drawer-nav a:hover {
            background: rgba(47,93,115,.06);
            transform: translateX(4px); /* Pequeño empuje elegante al tocar */
        }

/* ===================================================================
   BOTÓN CERRAR (X) DEL MENÚ MÓVIL
   =================================================================== */
.btn-close-drawer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(36, 75, 92, 0.08);
    color: var(--brandDark);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-close-drawer svg {
        width: 20px;
        height: 20px;
    }

    .btn-close-drawer:hover,
    .btn-close-drawer:focus {
        background: #E03C31;
        color: #ffffff;
        transform: scale(1.05);
    }

/* ===================================================================
   RESPONSIVE DEL NAVBAR (Tablets y Celulares)
   =================================================================== */
@media (max-width: 992px) {
    /* Escondemos los links de texto para que no rompan el diseño */
    .nav-links {
        display: none !important;
    }

    /* Previene que el nav se rompa si los elementos son muy grandes */
    .nav {
        flex-wrap: nowrap;
    }

    /* Mostramos el botón de la hamburguesa */
    .burger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px 14px;
        font-size: 22px;
        background: #ffffff;
        color: var(--brandDark);
        border: 1px solid rgba(36, 75, 92, 0.15);
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        margin-left: auto; /* Empuja el botón al extremo derecho */
    }

        .burger:hover {
            background: rgba(47,93,115,.06);
        }
}
