/* ========================================================
   SPLASH SCREEN & PRESENTACI??N MULTIMODAL
   ======================================================== */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    text-align: center;
    overflow: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

#splash-screen.splash-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ========================================================
   1. TEMA SPLASH HUB PRINCIPAL (ESPECTACULAR, ELEGANTE Y LIMPIO)
   ======================================================== */
#splash-screen.splash-hub {
    background: radial-gradient(circle at 50% 42%, #f0fdf4 0%, #f8fafc 55%, #ffffff 100%);
    color: #0f172a;
}

.splash-hub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    padding: 2rem 1.5rem;
    max-width: 680px;
    width: 100%;
}

/* Emblema Central Animado con Anillo Orbital */
.splash-hub-emblem-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-hub-orbit {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 136, 68, 0.35);
    animation: hubOrbitRotate 12s linear infinite;
}

.splash-hub-orbit-dot {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: #008844;
    border-radius: 50%;
    box-shadow: 0 0 10px #008844, 0 0 20px rgba(0, 136, 68, 0.5);
}

.splash-hub-emblem {
    width: 82px;
    height: 82px;
    border-radius: 26px;
    background: linear-gradient(135deg, #008844 0%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 14px 30px -6px rgba(0, 136, 68, 0.4), 0 0 0 6px rgba(255, 255, 255, 0.95);
    animation: hubEmblemPop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-hub-emblem svg {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    animation: hubIconFloat 2.8s ease-in-out infinite;
}

.splash-hub-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    color: #0f172a;
    animation: splashTitleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-hub-title span {
    background: linear-gradient(135deg, #008844 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.splash-hub-subtitle {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: #64748b;
    font-weight: 500;
    margin-top: 0.65rem;
    letter-spacing: 0.02em;
    animation: splashSubIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* P??ldoras de Redes en el Splash */
.splash-hub-badges {
    display: flex;
    gap: 8px;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: splashSubIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.splash-hub-badge.badge-metro {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.splash-hub-badge.badge-emt {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.splash-hub-badge.badge-tussam {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecdd3;
}
.splash-hub-badge.badge-crtm {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Barra L??ser de Carga Espectacular */
.splash-hub-laser-track {
    width: 220px;
    height: 3px;
    background: rgba(226, 232, 240, 0.8);
    border-radius: 999px;
    margin-top: 1.75rem;
    position: relative;
    overflow: hidden;
}

.splash-hub-laser-bar {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #008844, #0284c7, transparent);
    animation: hubLaserSweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ========================================================
   2. TEMAS ESPEC??FICOS DE SECCI??N (METRO / EMT / TUSSAM)
   ======================================================== */
#splash-screen.splash-metro {
    background: linear-gradient(135deg, #004d26 0%, #008844 50%, #059669 100%);
    color: #ffffff;
}
#splash-screen.splash-metro .splash-title { color: #ffffff; }
#splash-screen.splash-metro .splash-title span { color: #86efac; }
#splash-screen.splash-metro .splash-subtitle { color: rgba(255, 255, 255, 0.92); }

#splash-screen.splash-emt {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    color: #004481;
}
#splash-screen.splash-emt .splash-title { color: #004481; }
#splash-screen.splash-emt .splash-title span { color: #005596; }
#splash-screen.splash-emt .splash-subtitle { color: #0369a1; }

#splash-screen.splash-tussam {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%);
    color: #881337;
}
#splash-screen.splash-tussam .splash-title { color: #881337; }
#splash-screen.splash-tussam .splash-title span { color: #d9251d; }
#splash-screen.splash-tussam .splash-subtitle { color: #9f1239; }

#splash-screen.splash-crtm {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fee2e2 100%);
    color: #991b1b;
}
#splash-screen.splash-crtm .splash-title { color: #991b1b; }
#splash-screen.splash-crtm .splash-title span { color: #e2001a; }
#splash-screen.splash-crtm .splash-subtitle { color: #b91c1c; }
#splash-screen.splash-crtm .splash-road-line {
    background: #fecdd3;
    border-bottom: 2px dashed #e2001a;
}

/* Contenido de Secci??n */
.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 1.5rem;
    max-width: 700px;
}

.splash-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    animation: splashTitleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    font-weight: 500;
    margin-top: 0.55rem;
    letter-spacing: 0.03em;
    animation: splashSubIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================
   3. ANIMACI??N COMPLETA DEL AUTOB??S (PRIMERA VEZ DEL D??A)
   ======================================================== */
.splash-bus-track {
    width: 100%;
    position: absolute;
    bottom: 14%;
    left: 0;
    height: 145px;
    overflow: visible;
    pointer-events: none;
}

.splash-road-line {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 2px dashed rgba(255, 255, 255, 0.65);
}

#splash-screen.splash-emt .splash-road-line {
    background: #bae6fd;
    border-bottom: 2px dashed #0284c7;
}

#splash-screen.splash-tussam .splash-road-line {
    background: #fecdd3;
    border-bottom: 2px dashed #e11d48;
}

.splash-bus {
    position: absolute;
    bottom: 14px;
    left: -330px;
    display: flex;
    align-items: center;
    will-change: transform;
    animation: busDriveAcross 3.0s linear forwards;
}

.splash-bus-svg {
    filter: drop-shadow(0 12px 22px rgba(0,0,0,0.42));
}

/* ========================================================
   4. MODO QUICK-FADE / VISITAS REPETIDAS EN EL MISMO D??A
   (Solo texto centrado con animaci??n r??pida y elegante)
   ======================================================== */
.splash-quick .splash-bus-track,
.splash-quick .splash-bus,
.splash-quick .splash-road-line {
    display: none !important;
}

.splash-quick .splash-content,
.splash-quick .splash-hub-container {
    animation: splashQuickCard 1.75s ease forwards;
}

@keyframes splashQuickCard {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-4px) scale(1.01);
    }
}

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */
@keyframes hubOrbitRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hubEmblemPop {
    0% { opacity: 0; transform: scale(0.6) rotate(-8deg); }
    70% { transform: scale(1.06) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes hubIconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

@keyframes hubLaserSweep {
    0% { left: -100%; width: 30%; }
    50% { left: 30%; width: 60%; }
    100% { left: 100%; width: 30%; }
}

@keyframes splashTitleIn {
    0% { opacity: 0; transform: translateY(-16px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashSubIn {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes busDriveAcross {
    0% {
        transform: translate3d(0, 0, 0);
        animation-timing-function: cubic-bezier(0.35, 0.85, 0.55, 1);
    }
    50% {
        transform: translate3d(calc(50vw + 167px), 0, 0);
        animation-timing-function: ease-in-out;
    }
    58% {
        transform: translate3d(calc(50vw + 167px), 0, 0);
        animation-timing-function: cubic-bezier(0.4, 0, 0.8, 0.5);
    }
    100% {
        transform: translate3d(calc(100vw + 550px), 0, 0);
    }
}