:root {
    --azul-base: #00c3ff;
    --azul-profundo: #0929db;
    --azul-gradiente: linear-gradient(135deg, #00ccff 0%, #001f4d 100%);
    --gris-fondo: #f1f3f5;
    --gris-oscuro: #27292b;
    --blanco: #ffffff;
    --texto: #251e1e;
    --borde: #0044ff;
    --utility-bg: #f8f9fa;
    --utility-text: #6c757d;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--gris-fondo);
    color: var(--texto);
}

.container { 
    max-width: 850px; 
    margin: 25px auto; 
    padding: 0 16px; 
    box-sizing: border-box; 
}

.utility-bar {
    background-color: var(--utility-bg);
    border-bottom: 1px solid #e9ecef;
    padding: 8px 20px;
    font-size: 12.5px;
    color: var(--utility-text);
}

.utility-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.utility-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.facebook-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.facebook-link img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
}

.facebook-link:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.main-nav {
    background-color: var(--blanco);
    border-bottom: 3px solid var(--azul-profundo);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.imagen {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 195, 255, 0.6);
    border: 3px solid rgba(0, 195, 255, 0.85);
    object-fit: cover;
    flex-shrink: 0;
}

.brand-text {
    text-align: left;
}

.brand-text h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--azul-profundo);
    letter-spacing: -0.5px;
}

.brand-text p {
    margin: 1px 0 0 0;
    font-size: 11px;
    color: var(--utility-text);
    text-transform: uppercase;
    font-weight: 600;
}

nav {
    display: flex;
    justify-content: center;
    background: var(--blanco);
    flex-wrap: wrap;
    gap: 5px;
}

nav .nav-btn {
    background: none;
    border: none;
    color: #495057;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    border-bottom: 3px solid transparent;
}

nav .nav-btn:hover {
    color: var(--azul-base);
}

nav .nav-btn.active {
    color: var(--blanco);
    background-color: var(--azul-profundo);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    background: linear-gradient(-45deg, #00ccff, #0929db, #001f4d, #0056b3);
    background-size: 400% 400%;
    animation: movimientoLiquido 14s ease infinite;
    overflow: hidden;
}

.slider-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.35;
    background-image: 
        radial-gradient(circle, #ffffff 12%, transparent 13%),
        radial-gradient(circle, #ffffff 16%, transparent 17%);
    background-size: 180px 180px, 240px 240px;
    background-position: 0 0, 50px 70px;
    animation: flotarEfectos 22s linear infinite, destelloBrillo 4s ease-in-out infinite alternate;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--blanco);
    border: none;
    width: 45px;
    height: 65px;
    font-size: 32px;
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.2s;
}

.slider-arrow:hover { background-color: rgba(0, 0, 0, 0.7); }
.arrow-left { left: 0; border-radius: 0 4px 4px 0; }
.arrow-right { right: 0; border-radius: 4px 0 0 4px; }

.slider-container {
    width: 100%;
    height: calc(100% - 40px);
    position: relative;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;           
    background-color: #0b192e;     
    object-position: center;     
    z-index: 1;
}

.map-text-container {
    display: none; 
}

.marquee-ticker {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 40px;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--blanco);
    display: flex;
    align-items: center;
    z-index: 4;
    font-size: 13.5px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.ticker-title {
    background-color: var(--azul-base);
    color: #27292b;
    font-weight: 800;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    box-shadow: 4px 0 10px rgba(0,0,0,0.3);
    z-index: 5;
}

.ticker-wrap { flex-grow: 1; overflow: hidden; }
.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: simularMarquesina 25s linear infinite;
}

@keyframes simularMarquesina {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.alerta-en-vivo {
    background-color: #ebf8ff;
    border-left: 4px solid #3182ce;
    color: #2b6cb0;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.seccion {
    display: none;
    background: var(--blanco);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    animation: suavizarEntrada 0.25s ease forwards;
}
.seccion.activa { display: block; }

@keyframes suavizarEntrada {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.seccion h2 { margin-top: 0; color: var(--azul-profundo); font-size: 22px; }
.hero-card { text-align: center; padding: 15px 0; }
.accesos-rapidos { display: flex; gap: 15px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.btn-accion {
    background-color: var(--azul-base); color: var(--blanco); border: none;
    padding: 12px 22px; border-radius: 6px; font-size: 14.5px; font-weight: 500;
    cursor: pointer; transition: background 0.2s;
}
.btn-accion:hover { background-color: var(--azul-profundo); }
.btn-secundario { background-color: #4a5568; }
.btn-secundario:hover { background-color: #2d3748; }

.buscador-caja input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-family: inherit;
    color: #2d3748;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    box-sizing: border-box;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease-in-out;
}
.buscador-caja input:focus {
    outline: none;
    border-color: var(--azul-base);
    box-shadow: 0 10px 15px -3px rgba(0, 195, 255, 0.15);
    transform: translateY(-1px);
}
.buscador-caja input::placeholder { color: #a0aec0; font-style: italic; opacity: 0.85; }

/* Recorridos y Desgloses */
.ruta-card { background: var(--blanco); border: 1px solid var(--borde); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.ruta-header { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: #f8fafc; font-weight: 600; }
.ruta-header:hover { background: #f1f5f9; color: var(--azul-base); }
.badge-frecuencia { background: #28a745; color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; }

.ruta-detalles { display: none; padding: 20px; background: #fafafa; border-top: 1px solid var(--borde); }
.ruta-detalles.abierto { display: block; }
.variante-recorrido { margin-top: 15px; padding: 10px; background: #ffffff; border-left: 3px solid var(--azul-base); border-radius: 4px; }
.camino { font-size: 13.5px; color: #4a5568; margin: 4px 0 0 0; }

.grid-informacion { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 20px; }
@media (max-width: 680px) { .grid-informacion { grid-template-columns: 1fr; } }
.info-bloque h3 { margin-top: 0; font-size: 16px; color: var(--azul-profundo); border-bottom: 1px solid var(--borde); padding-bottom: 6px; }
.info-bloque ul { padding-left: 20px; line-height: 1.8; }

form input, form select, form textarea { width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid #cbd5e0; border-radius: 6px; box-sizing: border-box; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(39, 41, 43, 0.6); backdrop-filter: blur(9px);
    display: flex; justify-content: center; align-items: center; z-index: 200;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content {
    background-color: var(--blanco); padding: 30px; border-radius: 14px;
    max-width: 400px; width: 85%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: scale(0.8); transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}
.modal-overlay.show .modal-content { transform: scale(1); }
.modal-icon { font-size: 38px; margin-bottom: 10px; }
.modal-btn { width: auto; margin-top: 15px; padding: 10px 25px; }

@keyframes movimientoLiquido { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes flotarEfectos { from { background-position: 0 0, 50px 70px; } to { background-position: 0 -180px, 50px -170px; } }
@keyframes destelloBrillo { 0% { opacity: 0.2; } 100% { opacity: 0.5; } }