/* ========== NAVBAR.CSS COMPLETO (SUBMENÚ CONTENIDO) ========== */
.navbar {
    display: flex;
    justify-content: center; 
    align-items: center; 
    position: fixed;
    top: 0;
    left: 0; 
    width: 100%; 
    height: 60px; 
    z-index: 1000;

    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1280px; 
    margin: 0 auto;
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links > li {
    margin: 0 10px;
    position: relative; 
}

.nav-links a {
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links > li > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    height: 3px; 
    width: 0;
    background: hsl(19, 100%, 47%); 
    transition: width 0.3s ease; 
    transform: translateX(-50%);
    border-radius: 10px;
}

.nav-links > li:hover > a::after {
    width: 75px;
}

/* ============================================================
   ESTILOS SUBMENÚ (DESPLEGABLE CONTENIDO - SIN FRANJA)
   ============================================================ */
.submenu {
    position: absolute;
    top: 50px; /* LO HE VUELTO A BAJAR PARA QUE SE VEA BIEN, AHORA NO SE CERRARÁ */
    left: 0;
    min-width: 220px; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px);
    list-style: none;
    padding: 8px; 
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 8px; 
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ESTO ES LO QUE ARREGLA TU PROBLEMA: Puente invisible */
.submenu::before {
    content: "";
    position: absolute;
    top: -15px; /* Cubre el hueco de aire hacia arriba */
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent; /* Es invisible, pero mantiene el hover */
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li {
    width: 100%; 
}

.submenu li a {
    position: relative;
    border: 1px solid transparent;
    padding: 10px 20px;
    font-weight: 400;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    display: table;
    width: auto;
    box-sizing: border-box;
    background: transparent;
}

/* Mismo subrayado del menú principal: nace en el centro y crece
   hacia ambos lados, adaptándose al ancho de cada enlace. */
.submenu li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    height: 3px;
    width: 0;
    background: hsl(19, 100%, 47%);
    transition: width 0.3s ease;
    transform: translateX(-50%);
    border-radius: 10px;
}

@media (hover: hover) and (pointer: fine) {
    .submenu li a:hover::after {
        width: calc(100% - 40px);
    }
}

/* En móvil se conserva el menú táctil sin subrayado de hover. */
@media (max-width: 1024px) {
    .submenu li a::after {
        display: none !important;
    }
}


/* Acceso a Explorar mediante lupa y elementos de acción de la navbar. */
.enlace-icono-buscar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    line-height: 0;
    text-decoration: none;
}

/* Los tres accesos comparten la misma caja y alineación. */
.iconos-derecha {
    display: flex;
    align-items: center;
    gap: 15px;
}

.iconos-derecha > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    line-height: 0;
    text-decoration: none;
}

/* Mismo tamaño, comportamiento y transición para lupa, usuario y región. */
.iconos-derecha .icono,
.iconos-derecha .icono-user-nav,
.iconos-derecha .icono-buscar {
    display: block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    box-sizing: border-box;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Naranja de acción para la lupa y el acceso de usuario. */
.enlace-icono-buscar:hover .icono-buscar,
.enlace-icono-buscar:focus-visible .icono-buscar,
.iconos-derecha > a:hover .icono-user-nav,
.iconos-derecha > a:focus-visible .icono-user-nav {
    filter: brightness(0) saturate(100%) invert(42%) sepia(98%) saturate(3240%) hue-rotate(1deg) brightness(101%) contrast(105%);
    opacity: 1;
}

/* ============================================================
   ELEMENTOS ADICIONALES (LOGO, ICONOS, ACTIVE)
   ============================================================ */
.logo {
    height: 35px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}


.nav-links > li.active > a::after {
    width: 75px;
    background: #000;
}


/* Estilos iniciales del botón hamburguesa (oculto en desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    gap: 5px;
    z-index: 1100;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #000;
    transition: 0.3s;
}

/* ============================================================
   RESPONSIVE: PANTALLAS MENORES A 1024px
   ============================================================ */

.navbar {
    display: flex;
    justify-content: center; 
    align-items: center; 
    position: fixed;
    top: 0;
    left: 0; 
    width: 100%; 
    height: 60px; 
    z-index: 3000; /* AHORA MANDA SOBRE TODO */

    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1280px; 
    margin: 0 auto;
}

/* ESCRITORIO */
.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links > li {
    margin: 0 10px;
    position: relative; 
}

.nav-links a {
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================================
   RESPONSIVE: ESTILO LATERAL
   ============================================================ */

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex !important;
    }

    .nav-links {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 60px !important; /* SE QUEDA JUSTO DEBAJO DE LA NAVBAR */
        left: -100% !important;
        width: 100% !important; /* Ocupa el ancho como en tu captura */
        max-width: 400px;
        height: calc(100vh - 60px) !important; /* Altura restando la barra superior */

        background: #ffffff !important; /* Fondo sólido y limpio */
        
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 10px 0 !important; /* Limpiamos el padding excesivo */
        
        transition: left 0.3s ease-in-out !important;
        z-index: 2500; /* Por debajo de la navbar (3000) */
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0 !important;
    }

    .nav-links li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f0; /* Línea divisoria fina */
    }

    /* ENLACES MÓVIL: Texto a la izquierda, Flecha a la derecha */
    .nav-links a {
        color: #000 !important;
        font-size: 1.05rem !important;
        padding: 18px 20px !important;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        font-weight: 700 !important; /* Negrita tipo Marca */
        border-radius: 0 !important;
    }

    /* LA FLECHITA (Indicador de que hay más) */
    .has-submenu > a::after {
        content: '\203A'; /* Icono de flecha > */
        font-size: 1.5rem;
        color: #999;
        transition: transform 0.3s;
    }

    .has-submenu.open > a::after {
        transform: rotate(90deg); /* Apunta hacia abajo al abrir */
    }

    /* SUBMENÚS: Lista plana debajo del padre */
    .submenu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: #f9f9f9 !important; /* Fondo ligeramente gris para diferenciar */
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        border: none !important;
        box-shadow: none !important;
    }

    .has-submenu.open .submenu {
        display: block !important;
    }

    .submenu li a {
        padding: 15px 20px 15px 40px !important; /* Sangría a la derecha */
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: #333 !important;
        border-bottom: 1px solid #eee;
    }

    /* Quitamos efectos de escritorio */
    .nav-links > li > a::after { display: none !important; }
}

/* ======================================================================================
ELIMINAR CUANDO SE QUITE LA ETIQUETA BETA DEL CABECERO, JUNTO CON EL SPAN DEL HTML.
====================================================================================== */
.badge-beta {
    position: absolute;
    top: 8px;          /* Ajusta según prefieras más arriba o abajo */
    right: -60px;       /* Ajusta según el ancho de tu logo */
    background-color: #ff5200;
    color: #ffffff;
    font-size: 12px;    /* Tamaño pequeño y elegante */
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    pointer-events: none; /* Para que no interfiera con el clic al logo */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}