/* ==========================================================================
   Estilos para la Página de Mapa (Aula)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Estilos de Navegación y Header
   -------------------------------------------------------------------------- */

/* Estilos para la navbar con transparencia y efecto borroso (Glassmorphism) */
#header-navbar {
    --s-start-0: 2.391200382592061%;
    --s-end-0: 43.902064173373226%;
    --x-0: 7%;
    --c-0: hsla(306, 0%, 0%, 1);
    --y-0: 9%;
    
    --c-1: hsla(306, 0%, 0%, 1);
    --x-1: 96%;
    --s-start-1: 9%;
    --s-end-1: 54.805582404585024%;
    --y-1: 93%;
    
    --s-start-2: 3%;
    --s-end-2: 26.722813338714598%;
    --y-2: 103%;
    --x-2: -2%;
    --c-2: hsla(166.53061224489795, 72%, 60%, 1);
    
    --c-3: hsla(180, 100%, 50%, 0.46);
    --y-3: 82%;
    --s-start-3: 2.391200382592061%;
    --s-end-3: 32.0689540200964%;
    --x-3: 33%;
    
    --y-4: 81%;
    --s-start-4: 4.40642490323111%;
    --s-end-4: 37.23528104246256%;
    --c-4: hsla(212.43243243243245, 88%, 26%, 0.58);
    --x-4: 37%;
    
    --c-5: hsla(271.9148936170212, 98%, 53%, 0.31);
    --s-start-5: 3%;
    --s-end-5: 32.537089799783296%;
    --x-5: 54%;
    --y-5: 99%;
    
    --s-start-6: 6%;
    --s-end-6: 42.501105312974815%;
    --c-6: hsla(262.82352941176475, 100%, 50%, 0.15);
    --x-6: 104%;
    --y-6: 43%;
    
    --y-7: -16%;
    --s-start-7: 5%;
    --s-end-7: 13.10107024898374%;
    --x-7: 104%;
    --c-7: hsla(298.60465116279073, 36%, 23%, 1);
    
    --y-8: 30%;
    --x-8: 97%;
    --s-start-8: 2.391200382592061%;
    --s-end-8: 27.141813016850573%;
    --c-8: hsla(180, 100%, 50%, 0.31);
    
    --s-start-9: 5%;
    --s-end-9: 21.32164536610654%;
    --x-9: 78%;
    --c-9: hsla(219.2079207920792, 83%, 23%, 0.59);
    --y-9: 4%;

    background-color: hsla(305, 0%, 0%, 1) !important;
    background-image: 
        radial-gradient(circle at var(--x-0) var(--y-0), var(--c-0) var(--s-start-0), transparent var(--s-end-0)), 
        radial-gradient(circle at var(--x-1) var(--y-1), var(--c-1) var(--s-start-1), transparent var(--s-end-1)), 
        radial-gradient(circle at var(--x-2) var(--y-2), var(--c-2) var(--s-start-2), transparent var(--s-end-2)), 
        radial-gradient(circle at var(--x-3) var(--y-3), var(--c-3) var(--s-start-3), transparent var(--s-end-3)), 
        radial-gradient(circle at var(--x-4) var(--y-4), var(--c-4) var(--s-start-4), transparent var(--s-end-4)), 
        radial-gradient(circle at var(--x-5) var(--y-5), var(--c-5) var(--s-start-5), transparent var(--s-end-5)), 
        radial-gradient(circle at var(--x-6) var(--y-6), var(--c-6) var(--s-start-6), transparent var(--s-end-6)), 
        radial-gradient(circle at var(--x-7) var(--y-7), var(--c-7) var(--s-start-7), transparent var(--s-end-7)), 
        radial-gradient(circle at var(--x-8) var(--y-8), var(--c-8) var(--s-start-8), transparent var(--s-end-8)), 
        radial-gradient(circle at var(--x-9) var(--y-9), var(--c-9) var(--s-start-9), transparent var(--s-end-9)) !important;
    background-blend-mode: normal !important;
    background-size: cover !important;
    
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

#header-navbar > * {
    position: relative;
    z-index: 2;
}

/* Tipografía de los enlaces de navegación */
#header-navbar .nav-link {
    font-weight: bold !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 15px !important;
}

#header-navbar .dropdown-toggle {
    font-weight: bold !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 15px !important;
}

/* Ajuste del logo en la navbar */
#header-navbar .navbar-brand img {
    height: 35px !important;
}

/* --------------------------------------------------------------------------
   2. Sección Hero (Título Principal)
   -------------------------------------------------------------------------- */

.hero-section {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        #042962; /* Azul institucional oscuro */
    color: white;
    padding: 100px 0 80px 0;
    position: relative;
    overflow: hidden;
}

/* Efecto de superposición para profundidad */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.4;
}

/* Responsive Design para Hero Section */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .hero-section {
        padding: 60px 0 40px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 50px 0 30px 0;
    }
}

/* --------------------------------------------------------------------------
   3. Navegación Flotante Móvil (Estilo Neumórfico)
   -------------------------------------------------------------------------- */

.floating-mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1020;
    width: 95%;
    max-width: 380px;
    touch-action: pan-x;
    -webkit-user-select: none;
    user-select: none;
}

.floating-mobile-nav .nav-container {
    --s-start-0: 2.391200382592061%;
    --s-end-0: 43.902064173373226%;
    --x-0: 7%;
    --c-0: hsla(306, 0%, 0%, 1);
    --y-0: 9%;
    
    --c-1: hsla(306, 0%, 0%, 1);
    --x-1: 96%;
    --s-start-1: 9%;
    --s-end-1: 54.805582404585024%;
    --y-1: 93%;
    
    --s-start-2: 3%;
    --s-end-2: 26.722813338714598%;
    --y-2: 103%;
    --x-2: -2%;
    --c-2: hsla(166.53061224489795, 72%, 60%, 1);
    
    --c-3: hsla(180, 100%, 50%, 0.46);
    --y-3: 82%;
    --s-start-3: 2.391200382592061%;
    --s-end-3: 32.0689540200964%;
    --x-3: 33%;
    
    --y-4: 81%;
    --s-start-4: 4.40642490323111%;
    --s-end-4: 37.23528104246256%;
    --c-4: hsla(212.43243243243245, 88%, 26%, 0.58);
    --x-4: 37%;
    
    --c-5: hsla(271.9148936170212, 98%, 53%, 0.31);
    --s-start-5: 3%;
    --s-end-5: 32.537089799783296%;
    --x-5: 54%;
    --y-5: 99%;
    
    --s-start-6: 6%;
    --s-end-6: 42.501105312974815%;
    --c-6: hsla(262.82352941176475, 100%, 50%, 0.15);
    --x-6: 104%;
    --y-6: 43%;
    
    --y-7: -16%;
    --s-start-7: 5%;
    --s-end-7: 13.10107024898374%;
    --x-7: 104%;
    --c-7: hsla(298.60465116279073, 36%, 23%, 1);
    
    --y-8: 30%;
    --x-8: 97%;
    --s-start-8: 2.391200382592061%;
    --s-end-8: 27.141813016850573%;
    --c-8: hsla(180, 100%, 50%, 0.31);
    
    --s-start-9: 5%;
    --s-end-9: 21.32164536610654%;
    --x-9: 78%;
    --c-9: hsla(219.2079207920792, 83%, 23%, 0.59);
    --y-9: 4%;

    background-color: hsla(305, 0%, 0%, 1) !important;
    background-image: 
        radial-gradient(circle at var(--x-0) var(--y-0), var(--c-0) var(--s-start-0), transparent var(--s-end-0)), 
        radial-gradient(circle at var(--x-1) var(--y-1), var(--c-1) var(--s-start-1), transparent var(--s-end-1)), 
        radial-gradient(circle at var(--x-2) var(--y-2), var(--c-2) var(--s-start-2), transparent var(--s-end-2)), 
        radial-gradient(circle at var(--x-3) var(--y-3), var(--c-3) var(--s-start-3), transparent var(--s-end-3)), 
        radial-gradient(circle at var(--x-4) var(--y-4), var(--c-4) var(--s-start-4), transparent var(--s-end-4)), 
        radial-gradient(circle at var(--x-5) var(--y-5), var(--c-5) var(--s-start-5), transparent var(--s-end-5)), 
        radial-gradient(circle at var(--x-6) var(--y-6), var(--c-6) var(--s-start-6), transparent var(--s-end-6)), 
        radial-gradient(circle at var(--x-7) var(--y-7), var(--c-7) var(--s-start-7), transparent var(--s-end-7)), 
        radial-gradient(circle at var(--x-8) var(--y-8), var(--c-8) var(--s-start-8), transparent var(--s-end-8)), 
        radial-gradient(circle at var(--x-9) var(--y-9), var(--c-9) var(--s-start-9), transparent var(--s-end-9)) !important;
    background-blend-mode: normal !important;
    background-size: cover !important;
    
    border-radius: 22px;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.12),
        0 12px 25px rgba(0, 0, 0, 0.08),
        0 6px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 1px 0 0 rgba(255, 255, 255, 0.2),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(50px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(50px) saturate(200%) brightness(110%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.floating-mobile-nav .nav-container::-webkit-scrollbar {
    display: none;
}

.floating-mobile-nav .nav-scroll {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 100%;
    width: max-content;
    scroll-snap-type: x proximity;
    scroll-padding: 12px;
    padding: 8px 12px;
    position: relative;
    z-index: 2;
}

.floating-mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 18px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    flex: 0 0 auto;
    min-width: 74px;
    scroll-snap-align: center;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.floating-mobile-nav .nav-item:hover {
    color: #ffffff;
    transform: translateY(-3px) scale(1.02);
    text-decoration: none;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(255, 255, 255, 0.01);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 5px 15px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15),
        inset 1px 0 0 rgba(255, 255, 255, 0.2),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px) saturate(130%);
    -webkit-backdrop-filter: blur(15px) saturate(130%);
}

.floating-mobile-nav .nav-item:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.floating-mobile-nav .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-mobile-nav .nav-item.active .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.floating-mobile-nav .nav-item.active .nav-label {
    opacity: 1;
    font-weight: 700;
}

.floating-mobile-nav .nav-icon {
    color: #ffffff !important;
    font-size: 20px;
    margin-bottom: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 3;
}

.floating-mobile-nav .nav-icon i,
.floating-mobile-nav .nav-icon svg,
.floating-mobile-nav .nav-icon .lnr {
    color: #ffffff !important;
}

.floating-mobile-nav .nav-item:hover .nav-icon {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.floating-mobile-nav .nav-label {
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Efectos táctiles para móviles */
.floating-mobile-nav .nav-item:active {
    transform: translateY(-1px) scale(0.97);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.1s ease;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
    .floating-mobile-nav {
        display: block !important;
        animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Ajustes para pantallas muy pequeñas */
    @media (max-width: 480px) {
        .floating-mobile-nav {
            width: 96%;
            max-width: 360px;
            bottom: 18px;
        }
        
        .floating-mobile-nav .nav-container {
            padding: 8px 10px;
            border-radius: 20px;
            backdrop-filter: blur(45px) saturate(190%) brightness(105%);
            -webkit-backdrop-filter: blur(45px) saturate(190%) brightness(105%);
        }

        .floating-mobile-nav .nav-scroll {
            padding: 8px 12px;
            gap: 10px;
        }
        
        .floating-mobile-nav .nav-item {
            padding: 8px 10px;
            min-width: 70px;
            border-radius: 16px;
        }
        
        .floating-mobile-nav .nav-icon {
            font-size: 17px;
            margin-bottom: 3px;
        }
        
        .floating-mobile-nav .nav-label {
            font-size: 9.5px;
            font-weight: 600;
        }
    }

    /* Ajustes para pantallas extra pequeñas */
    @media (max-width: 375px) {
        .floating-mobile-nav {
            width: 97%;
            max-width: 340px;
            bottom: 16px;
        }
        
        .floating-mobile-nav .nav-container {
            padding: 6px 8px;
            border-radius: 18px;
        }

        .floating-mobile-nav .nav-scroll {
            padding: 8px 12px;
            gap: 10px;
        }
        
        .floating-mobile-nav .nav-item {
            padding: 6px 8px;
            min-width: 66px;
        }
        
        .floating-mobile-nav .nav-icon {
            font-size: 15px;
        }
        
        .floating-mobile-nav .nav-label {
            font-size: 9px;
        }
    }
}

/* Animación de entrada desde abajo */
@keyframes slideInUp {
    from {
    transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
    transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   4. Estilos Generales del Cuerpo y Contenedores
   -------------------------------------------------------------------------- */

body {
    --global-nav-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0.02) 100%), rgba(255, 255, 255, 0.005);
    background: #f6f7fb;
    margin: 0 !important;
    padding: 0 !important;
}

html {
    background: #f6f7fb;
    margin: 0 !important;
    padding: 0 !important;
}

.container {
    background-color: transparent !important;
}

.text-center {
    background-color: transparent !important;
}

* {
    box-sizing: border-box;
}

/* Ocultar navbar desktop en móvil */
@media (max-width: 768px) {
    #header-navbar {
        display: none !important;
    }
    
    #mapa {
        padding-top: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .mobile-back-btn {
        top: 80px !important;
        left: 12px !important;
        z-index: 1200 !important;
    }
}
.floating-mobile-nav .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-mobile-nav .nav-item.active .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.floating-mobile-nav .nav-item.active .nav-label {
    opacity: 1;
    font-weight: 700;
}

.floating-mobile-nav .nav-icon {
    color: #ffffff !important;
    font-size: 20px;
    margin-bottom: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 3;
}

.floating-mobile-nav .nav-icon i,
.floating-mobile-nav .nav-icon svg,
.floating-mobile-nav .nav-icon .lnr {
    color: #ffffff !important;
}

.floating-mobile-nav .nav-item:hover .nav-icon {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.floating-mobile-nav .nav-label {
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Efectos táctiles para móviles */
.floating-mobile-nav .nav-item:active {
    transform: translateY(-1px) scale(0.97);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.1s ease;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
    .floating-mobile-nav {
        display: block !important;
        animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Ajustes para pantallas muy pequeñas */
    @media (max-width: 480px) {
        .floating-mobile-nav {
            width: 96%;
            max-width: 360px;
            bottom: 18px;
        }
        
        .floating-mobile-nav .nav-container {
            padding: 8px 10px;
            border-radius: 20px;
            backdrop-filter: blur(45px) saturate(190%) brightness(105%);
            -webkit-backdrop-filter: blur(45px) saturate(190%) brightness(105%);
        }

        .floating-mobile-nav .nav-scroll {
            padding: 8px 12px;
            gap: 10px;
        }
        
        .floating-mobile-nav .nav-item {
            padding: 8px 10px;
            min-width: 70px;
            border-radius: 16px;
        }
        
        .floating-mobile-nav .nav-icon {
            font-size: 17px;
            margin-bottom: 3px;
        }
        
        .floating-mobile-nav .nav-label {
            font-size: 9.5px;
            font-weight: 600;
        }
    }

    /* Ajustes para pantallas extra pequeñas */
    @media (max-width: 375px) {
        .floating-mobile-nav {
            width: 97%;
            max-width: 340px;
            bottom: 16px;
        }
        
        .floating-mobile-nav .nav-container {
            padding: 6px 8px;
            border-radius: 18px;
        }

        .floating-mobile-nav .nav-scroll {
            padding: 8px 12px;
            gap: 10px;
        }
        
        .floating-mobile-nav .nav-item {
            padding: 6px 8px;
            min-width: 66px;
        }
        
        .floating-mobile-nav .nav-icon {
            font-size: 15px;
        }
        
        .floating-mobile-nav .nav-label {
            font-size: 9px;
        }
    }
}

/* Animación de entrada desde abajo */
@keyframes slideInUp {
    from {
    transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
    transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   4. Estilos Generales del Cuerpo y Contenedores
   -------------------------------------------------------------------------- */

body {
    --global-nav-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0.02) 100%), rgba(255, 255, 255, 0.005);
    background: #f6f7fb;
    margin: 0 !important;
    padding: 0 !important;
}

html {
    background: #f6f7fb;
    margin: 0 !important;
    padding: 0 !important;
}

.container {
    background-color: transparent !important;
}

.text-center {
    background-color: transparent !important;
}

* {
    box-sizing: border-box;
}

/* Ocultar navbar desktop en móvil */
@media (max-width: 768px) {
    #header-navbar {
        display: none !important;
    }
    
    #mapa {
        padding-top: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .mobile-back-btn {
        top: 80px !important;
        left: 12px !important;
        z-index: 1200 !important;
    }
    .ub-gmaps-topbar {
        top: 22px !important;
        left: 12px !important;
    }
    /* Hide Eventos from mobile navbar */
    #navEventos,
    .navbar-collapse a[href="eventos.html"] {
        display: none !important;
    }
}
/* --------------------------------------------------------------------------
   5. Estilos de Búsqueda y Filtros
   -------------------------------------------------------------------------- */

.ub-controls-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 8px 0;
}

.ub-controls-tab {
    width: 100%;
    border: 2px solid #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    padding: 12px 14px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.ub-controls-tab:focus,
.ub-controls-tab:focus-visible {
    outline: none !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.ub-controls-tab:active {
    transform: translateY(1px);
}

.ub-controls-tab::-moz-focus-inner {
    border: 0;
}

.ub-controls-tab.is-active {
    background: linear-gradient(135deg, #ffffff 0%, #eaf4ff 100%);
}

.ub-controls-panels {
    width: 100%;
}

.ub-controls-panel {
    display: none;
}

.ub-controls-panel.is-active {
    display: block;
}

.ub-controls-panel .search-wrapper {
    margin: 10px 0;
}

.ub-controls-panel .filter-container {
    margin: 10px 0;
}

.search-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modern-search {
    width: 100%;
    max-width: 1200px;
    padding: 18px 25px 18px 55px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
}

/* Icono de lupa */
.modern-search::before {
    content: "🔍";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    font-size: 16px;
    color: #3498db;
    pointer-events: none;
    z-index: 2;
}

.modern-search:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.modern-search:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.modern-search::placeholder {
    color: #6c757d;
    font-weight: 400;
}

/* Botón de búsqueda para móviles */
.search-btn {
    display: none;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos modernos para el contenedor de filtros */
.filter-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter-wrapper {
    position: relative;
    max-width: 500px;
    width: 100%;
    /* Animación de entrada */
    animation: slideInUp 0.6s ease-out;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    text-align: center;
}

/* Select moderno personalizado */
.modern-select {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 50px;
}

.modern-select:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.modern-select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

/* Opciones del select */
.modern-select option {
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    background-color: #ffffff;
    border: none;
}

.modern-select option:hover {
    background-color: #f8f9fa;
}

.modern-select option:checked {
    background-color: #3498db;
    color: white;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efecto de pulso para indicar interactividad */
.modern-select:not(:focus):hover {
    animation: gentlePulse 2s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
    }
}

/* Responsive para controles de búsqueda y filtro */
@media (max-width: 768px) {
    .search-wrapper {
        margin: 15px 0;
        padding: 0 15px;
    }
    
    .modern-search {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        display: flex;
    }
    
    .filter-container {
        margin: 20px 0;
        padding: 0 15px;
    }
    
    .filter-wrapper {
        max-width: 100%;
    }
    
    .modern-select {
        padding: 12px 15px;
        font-size: 14px;
        background-position: right 12px center;
        background-size: 18px;
        padding-right: 40px;
    }
    
    .filter-label {
        font-size: 14px;
    }
}

/* --------------------------------------------------------------------------
   6. Estilos del Mapa y Leyenda
   -------------------------------------------------------------------------- */

.leyenda-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.leyenda-icon {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.leyenda-icon[src$=".png"] {
    filter: none;
}

/* Ocultar leyenda inline completamente (se usa modal) */
.leyenda-marcadores, #leyendaMarcadores {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

.leyenda-marcadores h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.leyenda-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.leyenda-texto {
    color: #666;
    font-size: 11px;
}

/* Ajustes del contenedor del mapa */
#mapa {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
}

/* Hacer que el mapa ocupe toda la altura disponible */
#map {
    height: clamp(280px, 48svh, 520px) !important;
    margin: 0 0 120px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    position: relative;
}

@media (min-width: 769px) {
    #map {
        margin-right: 0 !important;
        position: relative;
    }
    
    /* Ocultar elementos móviles en desktop */
    .leyenda-tab {
        display: none !important;
    }
}

/* Ocultar footer */
footer {
    display: none !important;
}

/* Resetear márgenes contenedores */
#mapa .container,
#mapa .row,
#mapa .col-lg-12,
body, html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body {
    overflow-x: hidden !important;
}

.ub-map-screen {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
}

.ub-map-stage {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 0;
}

@media (max-width: 768px) {
    .ub-map-stage {
        height: 100svh;
        min-height: 0;
    }
}

.ub-map-screen #map {
    height: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
}

.ub-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1200;
}

.ub-map-loading__spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(0, 0, 0, 0.10);
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ub-map-loading__text {
    color: rgba(0, 0, 0, 0.68);
    font-weight: 600;
}

.ub-gmaps-topbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.ub-gmaps-topbar > * {
    pointer-events: auto;
}

.ub-gmaps-menu {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, rgba(29, 46, 143, 0.92) 0%, rgba(29, 46, 143, 0.84) 55%, rgba(29, 46, 143, 0.90) 100%), rgba(29, 46, 143, 0.78);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.94);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ub-gmaps-search {
    flex: 1 1 auto;
    background: linear-gradient(135deg, rgba(29, 46, 143, 0.92) 0%, rgba(29, 46, 143, 0.84) 55%, rgba(29, 46, 143, 0.90) 100%), rgba(29, 46, 143, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    position: relative;
}

.ub-gmaps-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    height: 44px;
    margin: 0;
}

.ub-gmaps-search__back {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ub-gmaps-search__icon {
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    margin-left: 4px;
}

.ub-gmaps-search__input {
    border: 0;
    outline: 0;
    flex: 1 1 auto;
    height: 44px;
    font-size: 15px;
    background: transparent;
    color: rgba(255, 255, 255, 0.96);
}

.ub-gmaps-search__input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.ub-gmaps-search__mic {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    flex-shrink: 0;
}

.ub-gmaps-search__mic:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.05);
}

.ub-gmaps-search__mic:active {
    transform: scale(0.95);
}

.ub-gmaps-search__mic.is-listening {
    background: rgba(234, 67, 53, 0.95) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(234, 67, 53, 0.8);
    animation: google-mic-pulse 1.2s infinite alternate ease-in-out;
}

@keyframes google-mic-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 6px rgba(234, 67, 53, 0.5);
    }
    100% {
        transform: scale(1.12);
        box-shadow: 0 0 18px rgba(234, 67, 53, 0.9);
    }
}

.ub-gmaps-search__btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ub-search-suggest {
    position: static;
    border-top: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
    z-index: 1400;
    max-height: min(420px, calc(100svh - 140px));
    overflow-y: auto;
}

.ub-search-suggest__item {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    text-align: left;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.88);
}

.ub-search-suggest__item + .ub-search-suggest__item {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ub-search-suggest__item:active {
    background: rgba(0, 0, 0, 0.04);
}

.ub-search-suggest__icon {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.64);
    flex: 0 0 auto;
}

.ub-search-suggest__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.ub-search-suggest__primary {
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ub-search-suggest__secondary {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.56);
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ub-search-overlay {
    position: absolute;
    inset: 0;
    z-index: 1080;
    background: rgba(245, 245, 245, 0.96);
}

body.ub-search-open .ub-gmaps-menu {
    display: none;
}

body.ub-search-open .ub-gmaps-topbar {
    left: 12px;
    right: 12px;
}

body.ub-search-open .mobile-back-btn {
    display: none !important;
}

body.ub-drawer-open {
    overflow: hidden !important;
}

body.ub-route-active .floating-mobile-nav,
body.ub-route-active .ub-gmaps-topbar,
body.ub-route-active .mobile-back-btn,
body.ub-route-active .ub-search-overlay,
body.ub-route-active .ub-drawer-overlay {
    display: none !important;
}

.ub-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.50);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
}

.ub-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100svh;
    width: min(320px, 86vw);
    background: linear-gradient(180deg, rgba(16, 22, 54, 0.92) 0%, rgba(16, 22, 54, 0.82) 100%);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    z-index: 2010;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0 22px 22px 0;
    overflow: hidden;
}

.ub-drawer.is-open {
    transform: translateX(0);
}

.ub-drawer__header {
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
}

.ub-drawer__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ub-drawer__titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ub-drawer__title {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    letter-spacing: 0.2px;
}

.ub-drawer__subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ub-drawer__close {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 0;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.92);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ub-drawer__content {
    padding: 14px 14px 18px 14px;
    overflow: auto;
}

.ub-drawer__section {
    padding: 12px 2px 8px 2px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70);
}

.ub-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.ub-drawer__item {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.ub-drawer__item + .ub-drawer__item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ub-drawer__item-icon {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ub-drawer__item-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ub-drawer__item-check {
    width: 26px;
    height: 26px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    color: #93c5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.18s ease, transform 0.18s ease;
    flex: 0 0 auto;
}

.ub-drawer__item.is-active {
    background: rgba(147, 197, 253, 0.16);
    box-shadow: none;
}

.ub-drawer__item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: #93c5fd;
    border-radius: 999px;
}

.ub-drawer__item.is-active .ub-drawer__item-icon {
    background: rgba(147, 197, 253, 0.18);
    color: #93c5fd;
}

.ub-drawer__item.is-active .ub-drawer__item-check {
    opacity: 1;
    transform: scale(1);
}

.ub-drawer__item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.30);
}

.ub-drawer__item:active {
    background: rgba(255, 255, 255, 0.06);
}

.ub-filter-select--hidden {
    display: none !important;
}

.ub-gmaps-fabs {
    position: fixed;
    right: 16px;
    bottom: 120px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ub-gmaps-fabs .leyenda-button,
.ub-gmaps-fabs .nearest-bathroom-button,
.ub-gmaps-fabs .route-med-button {
    position: static;
    left: auto;
    bottom: auto;
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   7. Estilos de Componentes Flotantes (Global)
   -------------------------------------------------------------------------- */

/* Botón de leyenda de marcadores */
.leyenda-button {
    position: fixed;
    bottom: 120px;
    left: 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.leyenda-button.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.leyenda-button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

/* Botón de baño más cercano (encima de leyenda) */
.nearest-bathroom-button {
    position: fixed;
    bottom: 170px;
    left: 20px;
    background: #004DA3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 77, 163, 0.40);
    transition: all 0.3s ease;
}

.nearest-bathroom-button:hover {
    background: #003C80;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 77, 163, 0.48);
}

.nearest-bathroom-button img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

.route-med-button img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}
/* Modal de leyenda */
/* Botón de ruta a Servicio Médico (encima del de baños) */
.route-med-button {
    position: fixed;
    bottom: 220px;
    left: 20px;
    background: #e5e7eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.14);
    transition: all 0.3s ease;
}

.route-med-button:hover {
    background: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
/* Modal de leyenda */
.leyenda-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 15000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.leyenda-modal.show {
    display: flex;
}

.leyenda-content {
    background: white;
    border-radius: 20px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.leyenda-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.leyenda-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Responsive design para elementos flotantes en móviles */
@media (max-width: 768px) {
    .leyenda-marcadores {
        display: none !important;
    }
    

/* Deshabilitar interacción con la barra móvil cuando hay un modal Bootstrap */
.modal-open .floating-mobile-nav {
    pointer-events: none;
}
    
    .leyenda-tab {
        display: none !important;
    }

    /* Ajustes específicos de posición para evitar solapamientos */
    .leyenda-button {
        bottom: 130px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    .nearest-bathroom-button {
        bottom: 180px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    .route-med-button {
        bottom: 230px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    /* Ajustar el mapa para móviles */
    #map {
        height: clamp(260px, 42svh, 420px) !important;
        position: relative;
    }
}

.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.55) !important;
}

.modal {
    z-index: 1050 !important;
}

/* Correcciones visuales para modales de permiso y ruta */
#geoPermissionModal .modal-content {
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25) !important;
    margin: 0 auto !important;
    width: auto !important;
}
#geoPermissionModal.modal {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#geoPermissionModal .modal-dialog {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
#geoPermissionModal .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    width: 90%;
}
#geoPermissionModal .modal-header {
    border-bottom: 1px solid #e1e5ea !important;
}
#geoPermissionModal .modal-title {
    font-weight: 700;
    color: #2c3e50;
}
#geoPermissionModal .modal-body {
    color: #2c3e50;
    line-height: 1.5;
    padding: 16px 20px !important;
}
#geoPermissionModal .modal-dialog {
    max-width: 560px !important;
    margin: 1.75rem auto !important;
}
#geoPermissionModal .btn-primary {
    background: #1e63c6;
    border: none;
    font-weight: 700;
}
#geoPermissionModal .btn-primary:hover {
    background: #1853a4;
}
#geoPermissionModal .btn-secondary {
    background: #646b73;
    border: none;
    font-weight: 700;
}
#geoPermissionModal .btn-secondary:hover {
    background: #4f565e;
}

/* Modal de Ruta a Servicio Médico */
.route-modal-header {
    background: #f5f7fa;
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #e1e5ea;
}
.route-modal .modal-dialog {
    max-width: 95vw !important;
    width: 95vw !important;
}
.route-modal .modal-content {
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25) !important;
    border: none !important;
    overflow: hidden;
    margin: 0 !important;
    width: auto !important;
}
.route-modal#routeModal {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.route-modal .modal-dialog {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
.route-modal .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1200px;
    width: 95vw;
}
.route-title {
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
}
.route-modal-footer {
    background: #fff;
    border-top: 1px solid #e1e5ea;
    padding: 16px;
}
.route-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.route-direction {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-weight: 600;
}
.route-direction-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #3498db;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}
.route-direction-btn:hover {
    background: #2980b9;
}
.route-close-btn {
    background: #646b73;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 10px 18px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.route-close-btn:hover {
    background: #4f565e;
}

.ub-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ub-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 12px 25px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 500px;
    width: 90%;
}
.ub-modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ub-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #042962;
}
.ub-modal-body {
    padding: 20px 24px;
    color: #333;
}
.ub-modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.ub-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ub-btn-primary {
    background: linear-gradient(135deg, #0c3872 0%, #042962 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(12, 56, 114, 0.3);
}
.ub-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 56, 114, 0.4);
}
.ub-btn-secondary {
    background: #e9ecef;
    color: #495057;
}
.ub-btn-secondary:hover {
    background: #dee2e6;
    transform: translateY(-2px);
}

.ub-btn-danger {
    background: rgba(234, 67, 53, 0.98);
    color: #fff;
    box-shadow: 0 4px 18px rgba(234, 67, 53, 0.28);
}

.ub-btn-danger:hover {
    background: rgba(234, 67, 53, 1);
}
.ub-close-button {
    color: #6c757d;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.ub-close-button:hover {
    color: #042962;
    background: rgba(0, 0, 0, 0.05);
}

.ub-modal#ubRouteModal .ub-modal-content {
    max-width: 1200px;
    width: 95vw;
}
.ub-modal#ubRouteModal .ub-modal-footer {
    justify-content: center;
}

#ubCancelNavModal {
    z-index: 20005;
}

#ubCancelNavModal .ub-modal-content.ub-cancel-nav-content {
    max-width: 460px;
    width: min(92vw, 460px);
}

@media (max-width: 576px) {
    .ub-modal-content {
        width: 92%;
        border-radius: 16px;
    }
    .ub-modal-header {
        padding: 16px;
        text-align: center;
    }
    .ub-modal-header h2 {
        font-size: 1.1rem;
        font-weight: 700;
    }
    .ub-modal-body {
        padding: 12px 14px;
    }
    .ub-modal-footer {
        padding: 12px 14px 16px 14px;
        flex-direction: column;
        align-items: center;
    }
    .ub-btn {
        width: 90%;
        justify-content: center;
    }
    #ubRouteMap {
        height: 52vh !important;
    }
    .ub-modal#ubRouteModal .ub-modal-content {
        max-width: 380px;
        width: 92%;
        border-radius: 18px;
    }
    .ub-modal#ubGeoModal .ub-modal-content {
        max-width: 360px;
        width: 92%;
        border-radius: 18px;
    }
}
/* Ajustes finos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .leyenda-button {
        bottom: 125px;
        left: 15px;
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
    .nearest-bathroom-button {
        bottom: 175px;
        left: 15px;
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
    .route-med-button {
        bottom: 225px;
        left: 15px;
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}

@media (max-width: 375px) {
    .leyenda-button {
        bottom: 120px;
        left: 12px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    .nearest-bathroom-button {
        bottom: 170px;
        left: 12px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    .route-med-button {
        bottom: 220px;
        left: 12px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .scroll-to-top {
        bottom: 120px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

.ub-user-location {
    position: relative;
    pointer-events: none;
    display: block;
    width: 32px;
    height: 32px;
    background: transparent;
}

.ub-user-location__img {
    width: 32px;
    height: 32px;
    display: block;
    transform-origin: 50% 50%;
    object-fit: contain;
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
}

.ub-user-location__dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2d7ff9;
    border: 2px solid #1e66ff;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 10px rgba(45, 127, 249, 0.35);
}

.ub-user-location__pulse {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(45, 127, 249, 0.35);
    transform: translate(-50%, -50%) scale(1);
    animation: ubUserPulse 1.8s ease-out infinite;
}

@keyframes ubUserPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(4.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ub-user-location__pulse { animation: none; opacity: 0; }
}

.ub-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10000;
}

.ub-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: #ffffff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.22);
    transform: translateY(110%);
    transition: transform 220ms ease;
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
}

.ub-sheet.is-open {
    transform: translateY(0);
}

.ub-sheet-handle {
    width: 46px;
    height: 5px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.14);
    margin: 10px auto 6px auto;
    flex: 0 0 auto;
}

.ub-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 14px 8px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}

.ub-sheet-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.92);
}

.ub-sheet-subtitle {
    margin-top: 2px;
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.62);
}

.ub-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.95);
    color: rgba(0, 0, 0, 0.75);
    font-size: 22px;
    line-height: 30px;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
}

.ub-sheet-body {
    padding: 12px 14px 14px 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ub-sheet-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
    background: #f2f4f7;
    display: none;
}

.ub-sheet-desc {
    margin-top: 10px;
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.78);
    display: none;
}

.ub-sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ub-sheet-actions .ub-btn {
    flex: 1 1 160px;
}

.ub-sheet-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ub-sheet-section-title {
    font-weight: 700;
    color: rgba(0, 0, 0, 0.86);
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.ub-sheet-section-body {
    color: rgba(0, 0, 0, 0.74);
    font-size: 0.95rem;
}

.ub-sheet-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(0, 0, 0, 0.74);
    font-size: 0.95rem;
}

.ub-sheet-list li {
    margin: 6px 0;
}

.ub-360-content .ub-modal-body {
    padding: 0;
}

.ub-360-scene {
    width: 100%;
    height: 100%;
}

#ub360Modal {
    z-index: 20000;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#ub360Modal .ub-modal-content.ub-360-content {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100svh;
    max-width: none;
    border-radius: 0;
    border: 0;
    background: #000;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

#ub360Modal .ub-modal-header {
    padding: calc(env(safe-area-inset-top) + 12px) 16px 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.55);
}

#ub360Modal .ub-modal-header h2 {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
}

#ub360Modal .ub-close-button {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
}

#ub360Modal .ub-close-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

#ub360Modal .ub-modal-body {
    flex: 1 1 auto;
    padding: 0;
}

.ub-nav-hud {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 900;
    width: min(520px, calc(100% - 24px));
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    border-radius: 14px;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ub-nav-hud__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ub-nav-hud__label {
    font-weight: 700;
    color: rgba(0, 0, 0, 0.72);
}

.ub-nav-hud__value {
    font-weight: 800;
    color: rgba(0, 0, 0, 0.90);
    flex: 1 1 auto;
}

.ub-nav-hud__close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
    color: rgba(0, 0, 0, 0.78);
    font-size: 22px;
    line-height: 30px;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ub-geo-notice {
    position: fixed;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%);
    z-index: 1200;
    width: min(560px, calc(100% - 24px));
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(4, 41, 98, 0.14);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



.ub-geo-notice__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #0c3872 0%, #042962 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(12, 56, 114, 0.25);
}

.ub-geo-notice__content {
    flex: 1 1 auto;
    min-width: 0;
}

.ub-geo-notice__title {
    font-weight: 800;
    font-size: 0.98rem;
    color: #042962;
    margin-bottom: 4px;
}

.ub-geo-notice__body {
    font-size: 0.92rem;
    line-height: 1.35;
    color: #4b5563;
}

.ub-geo-notice__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(4, 41, 98, 0.08);
    color: #042962;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    -webkit-appearance: none;
    appearance: none;
}

.ub-geo-notice__close:hover {
    background: rgba(4, 41, 98, 0.14);
}

.ub-nav-cancel.leaflet-bar {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.leaflet-top.leaflet-right .ub-nav-cancel {
    margin-top: 66px !important;
}

.ub-nav-cancel__btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(234, 67, 53, 0.85);
    background: rgba(234, 67, 53, 0.98);
    color: #fff;
    font-size: 18px;
    line-height: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 12px 26px rgba(234, 67, 53, 0.28), 0 6px 14px rgba(0, 0, 0, 0.18);
}

.ub-nav-cancel__btn:hover {
    background: rgba(234, 67, 53, 1);
}

.ub-user-location__heading {
    position: absolute;
    inset: 0;
    transform-origin: 50% 50%;
}

.ub-user-location__arrow {
    position: absolute;
    left: 50%;
    top: -2px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 9px solid rgba(11, 79, 181, 0.95);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
