@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@900&family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-dark: #050505;
    --purple: #7000ff;
    --cyan: #00f0ff;
    --text-gray: #a1a1aa;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-dark); color: white; font-family: 'Inter', sans-serif; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Fondo Animado */
.animated-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: radial-gradient(circle at 50% 50%, #1a0b2e 0%, #000000 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; animation: float 10s infinite alternate; }
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--purple); }
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: var(--cyan); animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, 50px); } }

/* Navegación */
.logo-corner { position: absolute; top: 30px; left: 40px; z-index: 100; display: flex; align-items: center; gap: 20px; }
.logo-img { width: 100px; }
.btn-volver { text-decoration: none; color: white; font-weight: 800; display: flex; align-items: center; gap: 10px; transition: var(--transition); }
.btn-volver:hover { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); transform: translateX(-5px); }

/* --- HERO: TITULOS GIGANTES --- */
@keyframes atmosphericPulse {
    0%, 100% { filter: drop-shadow(0 0 25px var(--glow-color)); opacity: 1; }
    50% { filter: drop-shadow(0 0 10px var(--glow-color)); opacity: 0.85; }
}

.hero-entry {
    position: relative; /* ESTO ES IMPORTANTE: Define los límites para el logo */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}
.subtitle-top { color: var(--cyan) !important; letter-spacing: 6px; font-weight: 800; font-size: 1.1rem; text-transform: uppercase; margin-bottom: 15px; }
.glitch-title { font-family: 'Orbitron'; line-height: 1.1; text-transform: uppercase; margin: 0; }
.main-text { 
    display: none;
    /* Aumentamos considerablemente los valores */
    font-size: clamp(2.5rem, 7vw, 7rem) !important;
    letter-spacing: -2px;
    line-height: 0.9; /* Un poco más junto para que se vea compacto */
    text-shadow: 0 0 30px rgba(216, 180, 254, 0.4); /* Un brillo extra */
}
.subtitle-top {
    color: var(--cyan) !important;
    letter-spacing: 6px;
    font-weight: 800;
    font-size: 1.3rem; /* Un poco más grande también */
    text-transform: uppercase;
    margin-bottom: 20px;
}
.mini-text { display: none; font-size: 1.4rem; opacity: 0.5; margin-top: 15px; font-weight: 800; letter-spacing: 3px; }

.priority-math .title-math .main-text { display: block; background: linear-gradient(to right, #fff, #d8b4fe); -webkit-background-clip: text; -webkit-text-fill-color: transparent; --glow-color: rgba(216, 180, 254, 0.6); animation: atmosphericPulse 15s infinite ease-in-out; }
.priority-math .title-kahoot .mini-text { display: block; color: var(--cyan); }
.priority-kahoot .title-kahoot .main-text { display: block; background: linear-gradient(to right, var(--cyan), #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; --glow-color: rgba(0, 240, 255, 0.6); animation: atmosphericPulse 15s infinite ease-in-out; }
.priority-kahoot .title-math .mini-text { display: block; color: white; }
.connector-x { display: none; }

.hero-desc { max-width: 800px; font-size: 1.1rem; color: #aaa; margin-top: 30px; line-height: 1.6; }
.scroll-down { margin-top: 40px; font-size: 2.5rem; color: rgba(255,255,255,0.2); animation: bounce 2s infinite; text-decoration: none; }

/* --- OBJETIVO --- */
.objective-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 40px; padding: 70px; margin: 60px 0 100px; text-align: left; backdrop-filter: blur(10px); }
.objective-title { font-family: 'Orbitron'; color: var(--cyan); font-size: 2.5rem; margin-bottom: 25px; }
.objective-text { text-align:justify; line-height: 1.8; hyphens: auto; #ccc; font-size: 1.3rem; line-height: 2; max-width: 1000px; }
.objective-card:hover { border-color: var(--cyan); box-shadow: 0 0 30px rgba(0, 240, 255, 0.2); transform: translateY(-10px); }

/* --- EVENTOS (CORRECCIÓN FINAL DE ENCIMADO) --- */
.split-events { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Fuerza 2 columnas en PC */
    gap: 40px; 
    padding-bottom: 100px; 
}
.event-card { 
    position: relative; min-height: 550px; border-radius: 40px; overflow: hidden; 
    display: flex; flex-direction: column; justify-content: flex-end; 
    align-items: flex-start; text-align: left; padding: 30px; 
    border: 1px solid rgba(255,255,255,0.1); transition: var(--transition);
}
.event-card:hover { border-color: var(--cyan); box-shadow: 0 0 30px rgba(0, 240, 255, 0.2); }
.card-bg, .card-bg-purple { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter: brightness(0.4); background-size: cover; background-position: center; }

/* --- ESTILO CENTRAL PARA EL SITIO --- */
.container {
    max-width: 1200px; /* Ancho máximo deseado para PC */
    margin: 0 auto;    /* Centra el contenedor */
    padding: 0 20px;   /* Márgenes laterales internos para móvil */
    width: 100%;       /* Para que ocupe todo el ancho en pantallas pequeñas */
}
/* Contenedor con GAP para evitar encimado */
.card-content { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; /* DISTANCIA FIJA ENTRE ELEMENTOS */
    width: 100%;
}

.next-event-timer small { 
    color: var(--cyan) !important; 
    font-family: 'Orbitron', sans-serif !important; 
    font-size: 0.7rem; 
    letter-spacing: 2px; 
    font-weight: 800;
    display: block;
    margin-bottom: 15px;
}

.timer-grid { display: flex; gap: 12px; }
.time-box { 
    background: rgba(112, 0, 255, 0.15); border: 1px solid rgba(112, 0, 255, 0.4); 
    padding: 12px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; min-width: 75px; 
}
.time-box span { font-family: 'Orbitron'; font-size: 1.8rem; color: white; line-height: 1; font-weight: 900; }
.time-box label { font-size: 0.5rem; color: var(--cyan); font-weight: 800; margin-top: 5px; }

.tag { background: var(--cyan); color: black; padding: 8px 16px; border-radius: 6px; font-size: 0.8rem; font-weight: 800; width: fit-content; }
.tag-purple { background: var(--purple); color: white; }

button { padding: 14px 28px; border-radius: 50px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 10px; border: none; transition: 0.3s; }
.btn-white { background: white; color: black; }
.btn-white:hover { background: var(--cyan); transform: scale(1.05); }
.btn-purple { background: var(--purple); color: white; }

.seccion-dual {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 50px 20px;
    justify-content: center;
    background: var(--transition); 
}

.columna {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    padding: 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #00f0ff; 
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    text-align: center;

    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    transform: translateY(0); 
    will-change: transform, box-shadow;
}

.columna:hover {
    border-color: #00f0ff; 
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.5);
    transform: translateY(-15px);
}

#contenedor-curiosidades, .card-truco {
    display: flex;
    flex-direction: column;
    height: 100%; 
    justify-content: space-between; 
    flex-grow: 1; 
}

.titulo-neon {
    color: #00d4ff; 
    text-shadow: 0 0 10px #00d4ff;
    font-family: 'Arial Black', sans-serif;
    margin-bottom: 20px;
}

.btn-interactivo {
    background: transparent;
    color: #fff;
    border: 1px solid #00d4ff;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
    margin-top: auto;
    display: inline-block;
    align-items: center;
    align-self: center;
}

.btn-interactivo:hover {
    background: #00d4ff;
    color: #000;
    box-shadow: 0 0 20px #00d4ff;
}

#texto-curiosidad {
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 100px;
}

/* Contenedor de las fuentes */
.referencias-tech {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 212, 255, 0.3);
    text-align: left;
    font-family: 'Courier New', Courier, monospace; 
    font-size: 0.8rem;
}

.label-fuente {
    color: #00d4ff;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.lista-enlaces {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-enlaces li {
    margin-bottom: 5px;
}

.link-neon {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.link-neon:before {
    content: "> "; 
    color: #00d4ff;
}

.link-neon:hover {
    color: #00f0ff;
    text-shadow: 0 0 8px #00f0ff;
    transform: translateX(5px); 
}

/* --- DISEÑO DE BOTONES MIXTOS (EQUIPO 4) --- */

.kahoot-mixed-actions {
    display: flex !important;
    flex-direction: column !important; /* Uno arriba del otro */
    align-items: flex-start !important; /* Mantiene el primer botón a la izquierda */
    gap: 15px !important;
    width: 100% !important;
    margin-top: 10px !important;
}

/* El primer botón se queda con su tamaño original */
.kahoot-mixed-actions .btn-link {
    width: auto !important;
}

/* EL BOTÓN DE ABAJO: Se expande y brilla */
.btn-ediciones-full {
    width: 100%; /* Ocupa todo el ancho de la card */
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 14px !important;
    background-color: var(--cyan) !important;
    color: #000 !important;
    border-radius: 50px !important; /* Forma de píldora */
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 900 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    
    /* EFECTO DE BRILLO CIAN */
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5) !important;
    transition: all 0.3s ease !important;
    pointer-events: auto !important;
}

.btn-ediciones-full:hover {
    background-color: #fff !important;
    box-shadow: 0 0 30px var(--cyan) !important;
    transform: scale(1.02) !important;
}
/* Ajuste para que se vea bien en celular */
@media (max-width: 480px) {
    .kahoot-actions {
        flex-direction: column !important;
    }
}

/* --- MODAL DE HISTORIAL (ESTILO BUAP) --- */
.modal-historial {
    display: none; /* Escondido por defecto */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 5, 20, 0.8); /* Fondo morado muy oscuro */
    backdrop-filter: blur(15px); /* DESENFOQUE DE FONDO */
    z-index: 30000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content-tech {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cyan);
    border-radius: 30px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.2);
}

/* El Grid donde salen los carteles o fotos */
.grid-historial {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Estilo para los Carteles del Pasado */
.card-poster {
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: 0.3s;
    position: relative;
}

.card-poster:hover {
    border-color: var(--cyan);
    transform: scale(1.05);
}

.card-poster img { width: 100%; height: 300px; object-fit: cover; }

.poster-overlay {
    position: absolute; bottom: 0; width: 100%;
    background: linear-gradient(transparent, black);
    padding: 15px; text-align: center;
}

/* --- FIX PARA EL BOTÓN DE CERRAR --- */
.close-historial {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: var(--cyan);
    cursor: pointer;
    z-index: 31000; /* Super alto para que siempre esté arriba */
    transition: 0.3s;
    line-height: 1;
}

.close-historial:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--cyan);
    transform: scale(1.2);
}

/* Asegurar que el modal se vea sobre todo */
.modal-historial {
    z-index: 30000 !important;
}

.btn-ediciones-full {
    /* ... tus otros estilos (background, etc) ... */
    
    pointer-events: auto !important; /* ESTO PERMITE EL CLIC */
    cursor: pointer !important;
    z-index: 10; /* Lo pone por encima del filtro oscuro de la card */
}

/* --- FIX PARA QUE LA FOTO SE VEA ARRIBA DE TODO --- */

.lightbox-modal {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* MÁS ALTO QUE EL OTRO MODAL */
    z-index: 60000 !important; 
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
}

.lightbox-content {
    position: relative;
    max-width: 80%; /* No ocupa toda la pantalla */
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#imgLightboxGrande {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    border: 3px solid var(--cyan);
    box-shadow: 0 0 30px var(--cyan);
    border-radius: 15px;
    object-fit: contain;
}

/* --- ESTILO PARA LAS FOTOS DE LA GALERÍA --- */

.grid-historial {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Columnas iguales */
    gap: 15px;
    padding: 20px 0;
}

.foto-item {
    width: 100%;
    aspect-ratio: 4 / 3; /* Todas las fotos tendrán la misma proporción */
    overflow: hidden;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #111; /* Fondo por si la foto tarda en cargar */
}

/* EFECTO: Se iluminan al pasar el cursor */
.foto-item:hover {
    border-color: var(--cyan); /* El borde cian que te gusta */
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6); /* Iluminación neón */
    transform: scale(1.03); /* Se hace un poquito más grande */
}

.foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la foto para que llene el cuadro sin deformarse */
}

/* --- DISEÑO FINAL Y ELEGANTE PARA LA 'X' (EQUIPO 4) --- */

.btn-cerrar-modal {
    position: absolute;
    top: 20px; /* Ajustado para que esté dentro del modal */
    right: 30px; /* Ajustado para que esté dentro del modal */
    background-color: transparent !important; /* ELIMINA EL FONDO BLANCO */
    border: none !important; /* ELIMINA EL BORDE */
    color: var(--cyan) !important; /* COLOR CIAN COMO EL DISEÑO ANTERIOR */
    font-size: 2.2rem !important; /* Tamaño de la X */
    font-weight: 900 !important;
    cursor: pointer !important;
    z-index: 51000 !important; /* Asegura que esté por encima de todo */
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; /* Pequeño padding para aumentar el área de clic */
    border-radius: 5px; /* Ligero redondeado opcional, o ninguno */
    pointer-events: auto !important; /* IMPORTANTE para que el clic funcione */
}

.btn-cerrar-modal:hover {
    color: #fff !important; /* Se pone blanco al hover para dar feedback */
    transform: rotate(90deg); /* Animación de rotación al hover */
    text-shadow: 0 0 15px var(--cyan); /* Brillo cian al hover */
}
/* --- COLABORADORES (MOVIMIENTO GARANTIZADO) --- */
.collab-section { padding: 100px 0;width: 100%; margin-left: 0;     margin-right: 0;}
.section-title { font-family: 'Orbitron'; text-align: center; font-size: clamp (1.8rem, 5vw, 3.5rem) !important; margin-bottom: 50px; color: var(--cyan);width: 100%;max-width: 100%;margin-bottom: 50px;padding: 0 10px;letter-spacing: 2px;text-transform: uppercase;overflow-wrap: break-word;word-wrap: break-word; }
.collab-subtitle { font-family: 'Orbitron'; color: white; margin: 70px 0 30px; font-size: 1.1rem; border-bottom: 2px solid var(--cyan); padding-bottom: 15px;padding-left: 10px; display: block; width: 100%; }
.collab-grid { display: grid !important; width: 100%; padding:0; margin: 0; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))!important; gap: 25px!important; }
.collab-card { 
    background: rgba(255,255,255,0.03); padding: 25px; border-radius: 20px; text-align: center; 
    border: 1px solid rgba(255,255,255,0.1); transition: var(--transition); 
    width: 100% !important;
    max-width: 100%;
}
.collab-card:hover { transform: translateY(-15px); border-color: var(--cyan); }
.collab-img-wrapper { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 15px; overflow: hidden; border: 2px solid var(--purple); transition: 0.3s; }
.collab-card:hover .collab-img-wrapper { border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.collab-img { width: 100%; height: 100%; object-fit: cover; }
.collab-name { color: white; font-weight: 800; font-size: 0.9rem; }
/* --- AJUSTE DE TÍTULOS LARGOS --- */
.collab-title {
    /* El tamaño base es 4rem, pero se reducirá dinámicamente en móvil */
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    max-width: 100%;
    margin-bottom: 30px;
    text-align: center;
}

/* --- FOOTER ORIGINAL A COLOR --- */
.main-footer { padding: 80px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.8); }
.footer-brand-logo { width: 160px; margin-bottom: 25px; border-radius: 15px; filter: none !important; }
.footer-social { display: flex; justify-content: center; gap: 40px; margin: 30px 0; }
.footer-social a { color: white; font-size: 2.2rem; }

/* Estilos Internos Base */
.page-content { padding: 150px 0 80px; text-align: center; }
.info-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 60px 0; }
.info-item { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 20px; text-align: left; display: flex; align-items: center; gap: 20px; border: 1px solid rgba(255,255,255,0.1); }
.info-card-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 30px; padding: 50px; margin-bottom: 60px; text-align: left; }

.locked { opacity: 0.6; pointer-events: none; }
@media (max-width: 900px) {
    .split-events { 
        grid-template-columns: 1fr !important;
    }
    .event-card {
        height: auto !important; 
        min-height: 500px !important;
    }
}

/* --- FIX RESPONSIVO INDEX (EQUIPO 4) --- */
@media (max-width: 768px) {
    .collab-section {
        padding: 60px 0; /* Menos espacio arriba/abajo en móvil */
    }
    .collab-subtitle {
        font-size: 0.9rem !important; /* Subtítulos más pequeños */
        text-align: center;
        border-bottom: 1px solid var(--cyan);
    }
    .event-card {
        min-height: 500px;
        padding: 25px; /* Menos espacio en las orillas para el celular */
    }
    .timer-grid {
        gap: 8px;
        justify-content: center;
    }
    .logo-corner {
        position: relative !important; /* Deja de flotar y ocupa su espacio */
        top: 0 !important;
        left: 0 !important;
        padding: 20px !important;
        justify-content: center !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .hero-entry {
        min-height: auto !important; /* Que la pantalla no sea tan larga */
        padding-top: 0 !important;
        justify-content: flex-start !important;
    }

    .main-text {
        font-size: 2.2rem !important; /* Tamaño manejable para móvil */
        margin-top: 10px !important;
    }
}