/* Estilos para el header */
.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.header-visible {
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

/* Animación Ken Burns para el fondo */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.ken-burns {
    animation: kenBurns 20s ease-out infinite alternate;
}

/* Estilos del Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.dark #splash-screen {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
    animation: logoFloat 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .splash-logo {
        width: 150px;
        margin-bottom: 20px;
    }
}

.splash-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2563eb;
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    line-height: 1.4;
    max-width: 300px;
}

.dark .splash-text {
    color: #60a5fa;
}

@media (max-width: 768px) {
    .splash-text {
        font-size: 1rem;
        margin-bottom: 30px;
        max-width: 250px;
    }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark .loading-spinner {
    border-color: #374151;
    border-top-color: #60a5fa;
}

.loading-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.dark .loading-text {
    color: #9ca3af;
}

@keyframes logoFloat {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-10px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ocultar el contenido principal hasta que termine el splash */
#main-content {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#main-content.show {
    opacity: 1;
}

/* Mejoras adicionales para la experiencia visual */
#splash-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(3, 10, 140, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.dark #splash-screen::before {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* Animación de pulso sutil para el logo */
@keyframes pulse-subtle {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 3s ease-in-out infinite;
}

/* Efecto adicional de resplandor para el logo */
.logo-glow {
    position: relative;
}

.logo-glow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-glow:hover::before {
    opacity: 1;
}

/* Estilos para navegación activa */
.nav-link.active {
    color: #030A8C !important;
    font-weight: 600;
    position: relative;
}

.dark .nav-link.active {
    color: #0511F2 !important;
}

/* Indicador visual para enlaces activos en desktop */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #030A8C;
    border-radius: 50%;
}

.dark .nav-link.active::after {
    background-color: #0511F2;
}

/* Estilos para enlaces activos en móvil */
.mobile-menu-link.nav-link.active {
    background-color: #f3f4f6 !important;
    color: #030A8C !important;
    font-weight: 600;
}

.dark .mobile-menu-link.nav-link.active {
    background-color: #374151 !important;
    color: #0511F2 !important;
}