/* ESTILO NORD - CONFIGURACIÓN GLOBAL */

body {
    background-color: #2E3440;
    margin: 0;
    padding: 0;
    text-align: center;
    font-family: "Mono", "Consolas", "MS PGothic", sans-serif;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- ANIMACIÓN DE NIEVE --- */
.snow {
    position: fixed;
    /* Empezamos el contenedor más arriba para que la nieve ya esté cayendo al cargar */
    top: -100vh;
    left: 0;
    width: 100%;
    /* Altura extra para tener un flujo continuo de copos */
    height: 200vh;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #D8DEE9 50%, transparent),
        radial-gradient(1.5px 1.5px at 40px 70px, #E5E9F0 50%, transparent),
        radial-gradient(1.5px 1.5px at 120px 80px, #D8DEE9 50%, transparent),
        radial-gradient(1px 1px at 90px 40px, #ECEFF4 50%, transparent);
    background-size: 150px 150px;
    /* Ciclo infinito y lineal (velocidad constante) */
    animation: snowFall 12s linear infinite;
    opacity: 0.8;
    z-index: 0;
}

.snow::before,
.snow::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.2px 1.2px at 10px 20px, #D8DEE9 50%, transparent),
        radial-gradient(1.5px 1.5px at 150px 120px, #E5E9F0 50%, transparent),
        radial-gradient(1px 1px at 50px 80px, #E5E9F0 50%, transparent);
    background-size: 200px 200px;
    /* Usamos tiempos diferentes (20s y 35s) para que las capas no se solapen */
    animation: snowFallSlow 20s linear infinite;
    opacity: 0.6;
}

.snow::after {
    background-size: 250px 250px;
    animation-duration: 35s;
    /* Capa más lenta para mayor profundidad */
    opacity: 0.3;
}

/* --- LÓGICA DE MOVIMIENTO INFINITO --- */

/* Animación para la capa frontal */
@keyframes snowFall {
    from {
        /* Empieza en su posición original (-100vh) */
        transform: translate(0, 0);
    }

    to {
        /* Se desplaza exactamente 100vh hacia abajo para que el ciclo sea perfecto */
        transform: translate(20px, 100vh);
    }
}

/* Animación para las capas de fondo */
@keyframes snowFallSlow {
    from {
        transform: translate(0, 0);
    }

    to {
        /* Desplazamiento lateral distinto para variar el efecto del viento */
        transform: translate(15px, 100vh);
    }
}

/* --- HEADER --- */
h1 {
    position: relative;
    color: #88C0D0;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 15px 0;
    z-index: 10;
    animation: nordGlow 3s ease-in-out infinite;
}

@keyframes nordGlow {

    0%,
    100% {
        text-shadow: 0 0 6px rgba(136, 192, 208, 0.4), 2px 2px 8px rgba(15, 20, 25, 0.9);
    }

    50% {
        text-shadow: 0 0 10px rgba(136, 192, 208, 0.7), 0 0 25px rgba(136, 192, 208, 0.45);
    }
}

/* --- CONTENEDOR PRINCIPAL --- */
.container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Mantiene a los laterales arriba */
    width: 100%;
    max-width: 98vw;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 30px;
    /* Aumentado el espacio entre bloques */
    flex: 1;
}

/* --- BLOQUES (ESTILO COMÚN) --- */
.info,
.news,
.center-block {
    background-color: #3B4252;
    color: #D8DEE9;
    border-radius: 12px;
    border: 1px solid rgba(136, 192, 208, 0.25);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 20, 25, 0.7);
    box-sizing: border-box;
    z-index: 1;
}

/* --- LATERALES --- */
.info,
.news {
    width: 260px;
    flex-shrink: 0;
    min-height: 300px;
    text-align: left;
    margin-top: 0;
    /* Asegura que estén arriba del todo */
}

/* --- BLOQUE CENTRAL --- */
.center-block {
    flex-grow: 1;
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    /* Hace que el bloque central esté un poco más bajo que los laterales */
}

/* --- REDES Y ENLACES --- */
.redes-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    margin-top: 15px;
}

.redes-container img {
    display: block;
    height: auto;
}

.info a {
    color: #88C0D0;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease;
}

.info a:hover {
    color: #0faad4;
    text-decoration: underline;
}

/* --- IMAGEN DENTRO DEL CENTRAL --- */
.imagen {
    margin-top: 25px;
}

.imagen img {
    max-width: 150px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- FOOTER --- */
footer {
    width: fit-content;
    margin: 30px auto 20px;
    /* Más espacio arriba del footer */
    padding: 12px 25px;
    background-color: #3B4252;
    color: #D8DEE9;
    border-radius: 12px;
    border: 1px solid rgba(136, 192, 208, 0.25);
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(15, 20, 25, 0.6);
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 1100px) {
    .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .center-block {
        order: -1;
        width: 100%;
        min-width: 100%;
        margin-top: 0;
        /* En móviles quitamos el margen extra para aprovechar espacio */
    }

    .info,
    .news {
        width: 48%;
        flex-grow: 1;
    }
}

@media (max-width: 600px) {

    .info,
    .news {
        width: 100%;
    }
}