@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@900&family=Inter:wght@400;600;800&display=swap');

/* --- 1. LIMPIEZA TOTAL (IDM 2026 ARRIBA) --- */
.page-content { 
    padding: 20px 0 40px !important; 
    background: transparent !important; 
}
.section-margin {
    margin-top: 0 !important; 
}

.internal-huge-title { 
    font-size: clamp(2rem, 7vw, 4.5rem) !important; 
    margin: 10px 0 30px !important;
    font-family: 'Orbitron', sans-serif;
    color: #00f0ff !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

/* --- 2. CRONÓMETRO INTERNO --- */
.countdown-box-center { 
    padding: 30px 0 !important; 
    background: transparent !important;
}

.box-title { 
    margin-bottom: 40px !important; 
    font-family: 'Orbitron', sans-serif !important;
    color: #00f0ff !important;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.timer-grid.center-grid { 
    display: flex !important; 
    gap: 25px !important; 
    justify-content: center !important;
    background: transparent !important;
}

.timer-grid.center-grid .time-box {
    background: rgba(112, 0, 255, 0.15) !important;
    border: 2px solid rgba(112, 0, 255, 0.4) !important;
    padding: 35px 25px !important;
    border-radius: 25px !important;
    min-width: 150px !important; 
}

.timer-grid.center-grid .time-box span {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 4rem !important; 
    color: white !important;
}

.timer-grid.center-grid .time-box label {
    font-size: 0.9rem !important; 
    color: #00f0ff !important;
    font-weight: 800 !important;
    margin-top: 15px !important;
    letter-spacing: 2px !important;
}

/* --- 3. GALERÍA --- */
.posters-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 25px !important; 
}

.poster-thumb { 
    position: relative;
    cursor: pointer;
    height: 400px !important; 
    border-radius: 25px !important; 
    overflow: hidden !important; 
    border: 1px solid rgba(255,255,255,0.1) !important;
    transition: 0.4s ease;
}

.poster-thumb:hover { 
    transform: translateY(-10px) !important; 
    border-color: #00f0ff !important;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.4) !important; 
}

.poster-thumb img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: contain !important; 
    background: rgba(0,0,0,0.3) !important;
}


/* --- 4. VISOR (MODAL) --- */
.event-modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.98); 
    z-index: 9999; 
    padding: 0 !important; 
}

.modal-content { 
    display: flex !important; 
    width: 100% !important; 
    height: 100vh !important; 
    margin: 0 !important; 
}

.modal-left { 
    flex: 1 !important; 
    background: #000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 60px; 
    border-right: 1px solid rgba(255, 255, 255, 0.1); 
}

.modal-left img { 
    max-width: 100%; 
    max-height: 90%; 
    object-fit: contain !important; 
}

.modal-right { 
    flex: 1 !important; 
    padding: 60px; 
    overflow-y: auto; 
}

.modal-gallery-title { 
    font-family: 'Orbitron'; 
    color: #00f0ff; 
    border-bottom: 2px solid #00f0ff; 
    padding-bottom: 20px; 
    font-size: 1.8rem; 
}

.photo-scroll { 
    display: grid !important; 
    grid-template-columns: 1fr 1fr !important; 
    gap: 20px !important; 
    margin-top: 30px !important; 
}

.photo-scroll img { 
    width: 100% !important; 
    height: 250px !important; 
    object-fit: cover !important; 
    border-radius: 15px !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer;
}

.photo-scroll img:hover {
    box-shadow: 0 0 15px var(--cyan) !important; /* Brillo cian en hover */
    border-color: var(--cyan) !important; /* Opcional: borde cian también */
}

.close-modal { 
    position: fixed; 
    top: 20px; 
    right: 30px; 
    font-size: 2.5rem; 
    color: white; 
    cursor: pointer; 
    z-index: 10001; 
    opacity: 0.3; 
    transition: all 0.4s ease;
    font-weight: 200;
}

.close-modal:hover { 
    opacity: 1; 
    color: #00f0ff; 
    text-shadow: 0 0 15px #00f0ff;
}

/* =========================================
   SECCIÓN DE REGISTRO Y BOTÓN (GLOBAL)
   ========================================= */
.registration-container {
    margin: 40px auto;
    max-width: 1100px;
    padding: 20px;
}

.registration-card {
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.2);
}

.reg-text h3 {
    font-family: 'Orbitron', sans-serif;
    color: #00f0ff;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.reg-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-glitch-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    color: #00f0ff;
    padding: 18px 40px;
    border-radius: 12px;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 15px rgba(0, 240, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    overflow: hidden;
}

.btn-glitch-link:hover {
    background: #00f0ff; 
    color: #05000a;
    border-color: transparent;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.6), 0 0 80px rgba(0, 240, 255, 0.4);
    transform: translateY(-5px) scale(1.03);
}

.btn-glitch-link i {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
}

.btn-glitch-link:hover i {
    transform: rotate(-15deg) scale(1.2);
}

/* --- QR AJUSTADO --- */
.qr-placeholder {
    width: 130px !important;
    height: auto !important;
    min-height: 150px !important;
    background: white !important;
    padding: 10px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-placeholder img {
    width: 110px !important; 
    height: 110px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

.qr-placeholder span {
    color: #000 !important;
    font-size: 10px !important;
    font-weight: bold !important;
    margin-top: 5px !important;
}

/* =========================================
   HERO Y MODAL DESCRIPCIONES
   ========================================= */
.modal-description {
    background: rgba(0, 240, 255, 0.05);
    border-left: 4px solid #00f0ff;
    padding: 25px !important;
    margin-top: 20px;
    border-radius: 0 15px 15px 0;
    backdrop-filter: blur(5px);
}

#modalYear {
    font-family: 'Orbitron', sans-serif !important;
    color: #00f0ff !important;
    font-size: 1.8rem !important;
    letter-spacing: 4px;
}

#modalDescriptionText {
    font-family: 'Inter', sans-serif !important;
    color: #e0e0e0 !important;
    line-height: 1.8 !important;
}

.hero-matematicas {
    position: relative;
    width: 100%;
    height: 400px; /* Reducido para que suba el contenido */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #00f2ff;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(0,242,255,0.5);
}


/* --- TEXTO DE INSTRUCCIÓN ABAJO DEL TÍTULO --- */

.click-hint {
    text-align: center;
    color: #00f0ff; /* Tu color cian neón */
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -15px; /* Lo pega un poco más al título de arriba */
    margin-bottom: 30px; /* Le da aire antes de que empiecen los carteles */
    opacity: 0.8;
    animation: pulseText 3s infinite ease-in-out;
}

/* Una animación muy suave para que el texto "respire" y llame la atención */
@keyframes pulseText {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
}

/* --- ESTILO FINAL DEL MAPA CU2 --- */

.map-final-container {
    width: 100% !important;
    max-width: 1000px !important;
    height: 450px !important; /* Altura fija para que NO desaparezca */
    margin: 20px auto !important;
    border: 3px solid #00f0ff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.3) !important;
}

.map-final-container iframe {
    width: 100% !important;
    height: 100% !important;
    filter: none !important; /* IMPORTANTE: Sin filtros para que el PIN sea ROJO */
}

/* El botón de registro oficial */
.registration-link-area {
    text-align: center;
    margin-top: 25px;
}

.btn-idm-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border: 2px solid #00f0ff;
    color: #00f0ff;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    border-radius: 50px;
    transition: 0.3s;
    font-weight: bold;
}

.btn-idm-link:hover {
    background: #00f0ff;
    color: #000;
}

.theme-label {
    color: #fff;
    font-size: 0.8rem;
    margin-top: 15px;
    opacity: 0.7;
    letter-spacing: 2px;
}

/* =========================================
   ESTILOS RESPONSIVOS (MEDIA QUERIES)
   ========================================= */
@media (max-width: 1024px) {
    .posters-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
    }
}

@media (max-width: 768px) {
    .internal-huge-title { font-size: 2.5rem !important; }

    .timer-grid.center-grid { gap: 8px !important; flex-wrap: wrap !important; }
    .timer-grid.center-grid .time-box { min-width: 70px !important; padding: 15px 5px !important; }
    .timer-grid.center-grid .time-box span { font-size: 1.8rem !important; }

    .registration-card { flex-direction: column; text-align: center; }
    .reg-actions { flex-direction: column; }
    .btn-glitch-link { width: 100%; justify-content: center; }

    .posters-grid { grid-template-columns: 1fr !important; }
    .modal-content { flex-direction: column !important; height: auto !important; overflow-y: auto !important; }
    .modal-left { width: 100% !important; height: 50vh !important; }
    .modal-right { width: 100% !important; }
    .photo-scroll { grid-template-columns: 1fr !important; }

    /* Parche scroll móvil */
    .event-modal { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
    .modal-content { height: auto !important; min-height: 100vh !important; overflow: visible !important; }
}

/* --- FIX RESPONSIVO MATEMÁTICAS (INTERNAS) --- */
@media (max-width: 768px) {
    /* El contenedor del título ya no tiene altura fija de 400px */
    #seccion-matematicas {
        height: auto !important;
        min-height: 300px !important;
        padding: 40px 10px !important;
    }

    /* FORZAMOS que el título inline se haga pequeño */
    #seccion-matematicas h1 {
        font-size: 1.8rem !important; /* El 4.5rem era demasiado */
        line-height: 1.2 !important;
        padding: 0 15px !important;
    }

    /* El botón de VOLVER se alinea a la izquierda de nuevo */
    .logo-corner {
        position: relative !important;
        padding: 20px !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }

    /* Ajuste de las cajas de info para que no se encimen */
    .info-bar {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 20px !important;
    }
}

/* --- PASO 2: ESTILOS DEL LIGHTBOX (EQUIPO 4) --- */

.lightbox-overlay {
    display: none; /* Escondido por defecto */
    position: fixed;
    z-index: 20000; /* Un valor altísimo para que esté sobre TODO */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fondo negro casi total */
    justify-content: center;
    align-items: center;
    cursor: zoom-out; /* Indica que al dar clic se cierra */
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex; /* Se muestra cuando añadimos la clase .active con JS */
}

#lightboxImage {
    max-width: 90%;
    max-height: 90vh;
    border: 3px solid #00f0ff; /* Marco cian tecnológico */
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.5);
    transition: transform 0.3s ease; /* Pequeño efecto de entrada */
}

/* Efecto al abrir */
.lightbox-overlay.active #lightboxImage {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 20001;
}

.close-lightbox:hover {
    color: #00f0ff;
    text-shadow: 0 0 10px #00f0ff;
}