:root {
    --fondo-principal: #0a0e14;
    --fondo-secundario: transparent;
    --texto-principal: #c9d1d9;
    --texto-resalte: #00e5ff;
    --borde: #222d3d;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; scroll-behavior: smooth; }

body { background-color: var(--fondo-principal); color: var(--texto-principal); line-height: 1.6; overflow-x: hidden; position: relative; }

/* ==============================================
   FONDOS DINÁMICOS (Nebulosas Flotantes)
=============================================== */
.bg-orb {
    position: fixed; border-radius: 50%; filter: blur(120px);
    z-index: 0; opacity: 0.4; animation: float 20s infinite ease-in-out alternate; pointer-events: none;
}
.orb-1 { top: -10%; left: -10%; width: 400px; height: 400px; background: rgba(0, 229, 255, 0.4); animation-delay: 0s; }
.orb-2 { bottom: -10%; right: -10%; width: 500px; height: 500px; background: rgba(0, 102, 255, 0.3); animation-delay: -5s; }
.orb-3 { top: 40%; left: 50%; width: 350px; height: 350px; background: rgba(138, 43, 226, 0.25); animation-delay: -10s; transform: translateX(-50%); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* ==============================================
   ANIMACIONES SCROLL (REVEAL)
=============================================== */
.reveal { transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
body.js-ready .reveal { opacity: 0; transform: translateY(50px); }
body.js-ready .reveal.active { opacity: 1; transform: translateY(0); }

/* ==============================================
   ESTRUCTURA BASE Y NAVEGACIÓN (Z-INDEX 9999)
=============================================== */
.header { 
    background-color: rgba(10, 14, 20, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 9999; 
}
.seccion-inicio, .contenedor, .footer { position: relative; z-index: 2; }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; max-width: 1300px; margin: 0 auto; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; z-index: 9999; }
.logo-img { height: 45px; width: auto; object-fit: contain; }
.logo-texto { color: var(--texto-resalte); font-size: 1.5rem; font-weight: bold; }
.atomo-giratorio { animation: spin 10s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.menu-toggle { display: none; }

.nav-links { list-style: none; display: flex; gap: 25px; margin: 0 auto; }
.nav-links a { color: var(--texto-principal); text-decoration: none; font-weight: 500; font-size: 0.95rem; position: relative; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--texto-resalte); transition: 0.3s; }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: #fff; }

/* SECCIONES TITULOS */
.contenedor { max-width: 1100px; margin: 0 auto; padding: 70px 20px; }
.titulo-seccion { text-align: center; font-size: 2.2rem; color: var(--texto-resalte); margin-bottom: 30px; }
.descripcion-seccion { text-align: center; margin-bottom: 40px; color: #8b949e; }

/* ==============================================
   ESTILO DE CRISTAL CON AURA SUTIL (COMPARTIDO)
=============================================== */
.contenido-acerca, 
.contenido-comite, 
.bloque-resultado,
.tarjeta-interactiva,
.arbol-archivos, 
.faq-contenedor, 
.tarjeta-contacto-central {
    background: rgba(18, 24, 32, 0.65); 
    backdrop-filter: blur(15px); 
    border: 1px solid rgba(0, 229, 255, 0.2); 
    border-radius: 20px; 
    padding: 40px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); 
    transition: all 0.3s ease;
    margin: 0 auto;
    max-width: 950px;
}

.contenido-acerca:hover, 
.contenido-comite:hover, 
.bloque-resultado:hover,
.tarjeta-interactiva:hover,
.arbol-archivos:hover, 
.faq-contenedor:hover, 
.tarjeta-contacto-central:hover {
    border-color: var(--texto-resalte); 
    box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15); 
    transform: translateY(-4px);
}

.bloque-resultado { margin-bottom: 60px; max-width: 1050px; }
.faq-contenedor { display: flex; flex-direction: column; gap: 15px; }

/* ==============================================
   ACERCA DE 
=============================================== */
.contenido-acerca h3 { color: #fff; border-bottom: 1px solid var(--borde); padding-bottom: 5px; margin: 30px 0 15px; }
.contenido-acerca ul { list-style: none; padding-left: 35px; }
.contenido-acerca li { margin-bottom: 10px; font-size: 1.05rem; }
.contenido-acerca li i { color: var(--texto-resalte); margin-right: 10px; }

/* ==============================================
   INICIO Y CARRUSELES
=============================================== */
.seccion-inicio { position: relative; height: 85vh; display: flex; justify-content: center; align-items: center; text-align: center; padding: 20px; overflow: hidden; }
#particulas-fondo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.contenido-inicio { position: relative; z-index: 2; max-width: 800px; }
.contenido-inicio h2 { font-size: 3.5rem; color: #ffffff; margin-bottom: 20px; text-shadow: 0 0 15px rgba(0, 229, 255, 0.3); }

.btn-principal { display: inline-block; margin-top: 30px; padding: 12px 30px; background-color: var(--texto-resalte); color: #000; text-decoration: none; border-radius: 30px; font-weight: bold; box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); transition: 0.3s;}
.btn-principal:hover { background-color: #fff; transform: translateY(-2px); }
.pulse-anim { animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.carrusel-envoltura { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; padding: 15px 0; border-radius: 15px; margin-top: 20px;}
.carrusel-pista { display: flex; gap: 25px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 5px; scrollbar-width: none; }
.carrusel-pista::-webkit-scrollbar { display: none; }
.grande .carrusel-img { height: 380px; width: 550px; object-fit: cover; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); flex-shrink: 0; transition: 0.4s ease; }
.grande .carrusel-img:hover { transform: scale(1.03); border: 2px solid var(--texto-resalte); }
.carrusel-btn { position: absolute; z-index: 10; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: 0.3s ease; font-size: 1.3rem; }
.carrusel-btn:hover { background: rgba(0, 229, 255, 0.4); border-color: var(--texto-resalte); transform: scale(1.1); }
.carrusel-btn.left { left: 10px; }
.carrusel-btn.right { right: 10px; }

/* AJUSTE PARA FOTOS VERTICALES DE CORTES */
img[src*="cortes-2"], img[src*="cortes-3"], img[src*="cortes-4"], img[src*="cortes-5"], img[src*="cortes-6"] {
    object-position: top center !important;
}

/* COMITÉ (Página Principal) */
.contenido-comite h3 { color: #fff; border-bottom: 1px solid var(--borde); padding-bottom: 5px; margin: 20px 0 10px; }
.grid-comite { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 25px 0; }
.grid-comite ul { list-style: none; }
.grid-comite li { margin-bottom: 10px; }
.grid-comite i { color: var(--texto-resalte); width: 25px; }

/* ==============================================
   RESULTADOS Y MEDALLAS
=============================================== */
.titulo-olimpiada { color: #fff; margin-bottom: 25px; font-size: 1.7rem; text-align: center; letter-spacing: 1px;}
.tabla-responsiva { width: 100%; overflow-x: auto; margin-bottom: 30px; border-radius: 8px; }
.tabla-ganadores { width: 100%; border-collapse: collapse; min-width: 600px; background: rgba(10, 14, 20, 0.8); }
.tabla-ganadores th, .tabla-ganadores td { padding: 15px; text-align: left; border-bottom: 1px solid var(--borde); }
.tabla-ganadores th { background-color: rgba(0, 229, 255, 0.05); color: var(--texto-resalte); font-weight: bold; text-transform: uppercase; font-size: 0.9rem;}
.tabla-ganadores tr:hover { background-color: rgba(255,255,255,0.05); }

.medalla { 
    padding: 6px 14px; border-radius: 20px; font-weight: bold; font-size: 0.85rem; color: #fff; 
    display: inline-block; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: inset 0 0 5px rgba(255,255,255,0.5), 0 4px 6px rgba(0,0,0,0.4);
    position: relative; overflow: hidden;
}
.medalla::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg); transition: 0.6s;
}
.tabla-ganadores tr:hover .medalla::after { left: 150%; }

.medalla.oro { background: linear-gradient(135deg, #FFDF00 0%, #D4AF37 50%, #996515 100%); color: #332200; text-shadow: 1px 1px 0px rgba(255,255,255,0.5); }
.medalla.plata { background: linear-gradient(135deg, #E0E0E0 0%, #C0C0C0 50%, #808080 100%); color: #111; text-shadow: 1px 1px 0px rgba(255,255,255,0.5); }
.medalla.bronce { background: linear-gradient(135deg, #CD7F32 0%, #A0522D 50%, #5C3A21 100%); text-shadow: 1px 1px 2px rgba(0,0,0,0.6); }
.medalla.mencion { background: linear-gradient(135deg, #607D8B 0%, #455A64 50%, #263238 100%); text-shadow: 1px 1px 2px rgba(0,0,0,0.6); border: 1px solid #78909c; }

/* ==============================================
   INSCRIPCIÓN BOTONES 
=============================================== */
.tarjeta-interactiva { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    background: linear-gradient(135deg, rgba(18,24,32,0.8) 0%, rgba(26,37,54,0.8) 100%); text-align: center;
}
.icono-gigante { font-size: 4rem; color: var(--texto-resalte); margin: 15px 0; }
.btn-brillante { display: inline-block; margin-top: 20px; padding: 15px 35px; background: transparent; color: var(--texto-resalte); border: 2px solid var(--texto-resalte); text-decoration: none; font-weight: bold; border-radius: 50px; transition: 0.3s; }
.btn-brillante:hover { background: var(--texto-resalte); color: #000; }

/* ==============================================
   MATERIAL DIDÁCTICO (Carpetas 3D)
=============================================== */
.carpeta { margin-bottom: 15px; }
.carpeta-interactiva-3d { 
    display: flex; align-items: center; justify-content: flex-start; gap: 20px;
    padding: 10px 20px; background: rgba(0, 229, 255, 0.05); border-radius: 15px;
    cursor: pointer; border: 1px solid transparent; transition: 0.3s; user-select: none;
}
.carpeta-interactiva-3d:hover { border-color: rgba(0, 229, 255, 0.3); background: rgba(0, 229, 255, 0.1); }
.texto-carpeta-3d { color: #fff; font-weight: bold; font-size: 1.4rem; flex-grow: 1; }
.icono-desplegable { color: var(--texto-resalte); transition: transform 0.3s; font-size: 1.2rem; }
.carpeta-interactiva-3d.activo .icono-desplegable { transform: rotate(90deg); }

.carpeta-sub { margin-left: 45px; margin-top: 10px; border-left: 2px solid var(--borde); padding-left: 15px; }
.carpeta-interactiva-3d.mini { padding: 5px 15px; background: transparent; }
.carpeta-interactiva-3d.mini .texto-carpeta-3d { font-size: 1.1rem; }

.carpeta-interactiva-3d.micro { padding: 8px 15px; gap: 10px; background: transparent; }
.carpeta-interactiva-3d.micro:hover { background: rgba(255, 255, 255, 0.05); }
.carpeta-interactiva-3d.micro .fa-folder { color: #d97706; font-size: 1.2rem; }

.carpeta-contenido { display: none; margin-top: 8px; animation: fadeIn 0.4s ease-out; }
.carpeta-contenido.abierto { display: block; }

.file-3d-wrap { width: 60px; height: 40px; position: relative; }
.file-3d { position: absolute; top: 0; left: 0; width: 240px; height: 160px; transform: scale(0.25); transform-origin: top left; perspective: 1500px; z-index: 10; }
.mini .file-3d-wrap { width: 48px; height: 32px; }
.mini .file-3d { transform: scale(0.2); }

.file-3d .work-5 { background-color: #d97706; width: 100%; height: 100%; transform-origin: top; border-radius: 1rem; border-top-left-radius: 0; transition: all 0.3s ease; position: relative; }
.file-3d .work-5::after { content: ''; position: absolute; bottom: 99%; left: 0; width: 80px; height: 16px; background-color: #d97706; border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.file-3d .work-5::before { content: ''; position: absolute; top: -15px; left: 75.5px; width: 16px; height: 16px; background-color: #d97706; clip-path: polygon(0 35%, 0% 100%, 50% 100%); }
.file-3d .paper { position: absolute; inset: 4px; border-radius: 1rem; transition: all 0.3s ease; transform-origin: bottom; user-select: none; }
.file-3d .work-4 { background-color: #a1a1aa; }
.carpeta-interactiva-3d:hover .work-4 { transform: rotateX(-20deg); }
.file-3d .work-3 { background-color: #d4d4d8; }
.carpeta-interactiva-3d:hover .work-3 { transform: rotateX(-30deg); }
.file-3d .work-2 { background-color: #e4e4e7; }
.carpeta-interactiva-3d:hover .work-2 { transform: rotateX(-38deg); }
.file-3d .work-1 { position: absolute; bottom: 0; background: linear-gradient(to top, #f59e0b, #fbbf24); width: 100%; height: 156px; border-radius: 1rem; border-top-right-radius: 0; transition: all 0.3s ease; transform-origin: bottom; display: flex; align-items: flex-end; }
.file-3d .work-1::after { content: ''; position: absolute; bottom: 99%; right: 0; width: 146px; height: 16px; background-color: #fbbf24; border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.file-3d .work-1::before { content: ''; position: absolute; top: -10px; right: 142px; width: 12px; height: 12px; background-color: #fbbf24; clip-path: polygon(100% 14%, 50% 100%, 100% 100%); }
.carpeta-interactiva-3d:hover .work-1 { box-shadow: inset 0 20px 40px #fbbf24, inset 0 -20px 40px #d97706; transform: rotateX(-46deg) translateY(1px); }

.archivo-lista { list-style: none; padding-left: 20px; padding-bottom: 10px; }
.grid-archivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 10px;}
.archivo-item a { display: flex; align-items: center; gap: 10px; color: var(--texto-principal); text-decoration: none; background: rgba(10, 14, 20, 0.8); padding: 10px 15px; border-radius: 5px; border: 1px solid var(--borde); transition: all 0.3s ease; font-size: 0.95rem; margin-bottom: 5px; }
.archivo-item a i { color: #E2574C; font-size: 1.2rem; }
.archivo-item a:hover { border-color: var(--texto-resalte); transform: translateX(5px); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ==============================================
   FAQ CON CATEGORÍAS ANIDADAS
=============================================== */
.faq-categoria-bloque {
    margin-bottom: 15px;
    background: rgba(18, 24, 32, 0.8);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
}
.faq-categoria-btn {
    width: 100%; text-align: left; padding: 20px;
    background: rgba(0, 229, 255, 0.05); border: none;
    color: var(--texto-resalte); font-size: 1.3rem; font-weight: bold;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: 0.3s;
}
.faq-categoria-btn:hover { background: rgba(0, 229, 255, 0.1); }
.faq-categoria-btn i { transition: transform 0.3s; }

.faq-categoria-respuestas {
    max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; padding: 0 20px;
}
.faq-categoria-bloque.activo .faq-categoria-respuestas {
    max-height: 3500px; 
    padding: 10px 20px 20px;
}
.faq-categoria-bloque.activo .faq-categoria-btn i {
    transform: rotate(180deg);
}

.faq-item { background: rgba(10, 14, 20, 0.6); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.faq-pregunta { width: 100%; text-align: left; padding: 15px 20px; background: transparent; border: none; color: #fff; font-size: 1rem; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.faq-pregunta:hover { color: var(--texto-resalte); }
.faq-respuesta { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: rgba(10, 14, 20, 0.4); }
.faq-respuesta p { padding: 0 20px 20px; color: var(--texto-principal); font-size: 0.95rem; }
.faq-item.activo .faq-respuesta { max-height: 400px; }
.faq-item.activo .faq-pregunta i { transform: rotate(180deg); color: var(--texto-resalte); }

/* ==============================================
   CONTACTO Y REDES
=============================================== */
.tarjeta-contacto-central { text-align: center; }
.coordinadores-flex { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.info-personal { 
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--borde);
    transition: 0.3s;
}
.info-personal h3 { color: #fff; font-size: 1.8rem; margin-bottom: 5px; }
.cargo { color: var(--texto-resalte); font-weight: bold; margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; font-size: 0.85rem;}
.datos-contacto { list-style: none; }
.datos-contacto li { display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 1.1rem; margin-bottom: 10px; }
.datos-contacto i { color: var(--texto-resalte); font-size: 1.2rem; }

.redes-sociales { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; text-align: center; }
.redes-sociales p { margin-bottom: 15px; color: #8b949e; font-size: 0.95rem; }
.iconos-redes { display: flex; justify-content: center; gap: 30px; align-items: center; }
.enlace-red { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; transition: 0.3s; }
.enlace-red img { width: 45px; height: 45px; transition: transform 0.3s, filter 0.3s; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); }
.enlace-red:hover img { transform: scale(1.15) translateY(-5px); filter: drop-shadow(0 6px 12px rgba(0, 229, 255, 0.4)); }
.enlace-red:hover span { color: var(--texto-resalte); }

.footer { text-align: center; padding: 30px; border-top: 1px solid var(--borde); position: relative; z-index: 2;}

/* ==============================================
   ENLACE DE CORREOS GLOBALES
=============================================== */
.enlace-correo {
    color: var(--texto-resalte);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed var(--texto-resalte);
    transition: 0.3s;
}
.enlace-correo:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ==============================================
   BOTÓN VOLVER ARRIBA (Con texto desplegable)
=============================================== */
.btn-volver-arriba {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, rgba(18,24,32,0.9) 0%, rgba(26,37,54,0.9) 100%);
    color: var(--texto-resalte);
    border: 1px solid var(--texto-resalte);
    height: 50px;
    width: 50px; 
    border-radius: 50px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-volver-arriba i {
    font-size: 1.5rem;
    min-width: 50px; 
}

.texto-volver {
    max-width: 0;
    opacity: 0;
    font-size: 0.95rem;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.4s ease;
}

.btn-volver-arriba.mostrar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-volver-arriba:hover {
    background: var(--texto-resalte);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
    transform: translateY(-5px);
    width: 180px; 
    padding-right: 20px; 
}

.btn-volver-arriba:hover .texto-volver {
    max-width: 150px; 
    opacity: 1;
}

/* ==============================================
   PÁGINA EXCLUSIVA: COMITÉ DEPARTAMENTAL
=============================================== */
.grid-departamentos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px;
    margin-bottom: 50px;
}

.tarjeta-departamento {
    background: rgba(18, 24, 32, 0.65);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tarjeta-departamento:hover {
    border-color: var(--texto-resalte);
    box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15);
    transform: translateY(-4px);
}

.titulo-departamento {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.titulo-departamento i {
    color: var(--texto-resalte);
}

/* --- LISTA DE MIEMBROS INTERACTIVA --- */
.lista-miembros {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    margin-bottom: 20px;
    flex-grow: 1; 
}

.perfil-miembro {
    display: flex;
    align-items: center; 
    gap: 18px; 
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px; 
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    cursor: pointer; 
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.perfil-miembro:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateX(5px) scale(1.02);
}

.avatar {
    width: 75px; 
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--texto-resalte);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    flex-shrink: 0; 
}

.avatar-placeholder {
    width: 75px; 
    height: 75px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.1);
    color: var(--texto-resalte);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; 
    border: 2px solid var(--texto-resalte);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.info-miembro h4 {
    color: #fff;
    font-size: 1.15rem; 
    margin-bottom: 2px;
    position: relative;
    z-index: 2;
}

.info-miembro p {
    color: #8b949e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

/* Ocultar la descripción larga en la vista normal (Solo visible en modal) */
.perfil-miembro .desc-miembro {
    display: none;
}

/* ==============================================
   EFECTOS: ASTRO Y TECH (CON LUZ GIRATORIA FLUIDA)
=============================================== */
.tarjeta-astro, .tarjeta-tech {
    position: relative;
    border: none !important;
    overflow: hidden;
    background: transparent !important;
    z-index: 1;
}

.tarjeta-astro:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.4), 0 0 60px rgba(138, 43, 226, 0.3) !important;
}

.tarjeta-astro::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: inherit; 
    background: 
        radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 102, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 40%),
        #0a0e14; 
    z-index: -1;
    animation: nebula-pulso 10s infinite alternate linear;
}

.tarjeta-tech::after {
    content: '';
    position: absolute;
    inset: 2px; 
    background: #0b1316;
    border-radius: inherit;
    z-index: -1;
}

@keyframes nebula-pulso {
    0% { transform: scale(1); background-position: 0% 0%; }
    100% { transform: scale(1.03); background-position: 10% 10%; }
}

/* LUZ GIRATORIA (Escalada 300% para evitar cortes) */
.tarjeta-astro::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; 
    width: 300%; height: 300%; 
    background: conic-gradient(from 0deg, transparent 80%, #ffffff 95%, #00e5ff 100%);
    animation: rotacion-luz 4s linear infinite;
    z-index: -2;
}

.tarjeta-tech::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; 
    width: 300%; height: 300%; 
    background: conic-gradient(from 0deg, transparent 75%, #00ffcc 100%);
    animation: rotacion-luz 3s linear infinite;
    z-index: -2;
}

@keyframes rotacion-luz {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ajustes de color para las tarjetas con efectos */
.tarjeta-astro .avatar-placeholder,
.info-personal.tarjeta-astro h3 { 
    color: #fff; 
    border-color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.info-personal.tarjeta-astro {
    padding: 25px !important;
    border-radius: 15px;
}

.tarjeta-tech .titulo-departamento i { 
    color: #00ffcc; 
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}
.tarjeta-tech .avatar-placeholder {
    border-color: #00ffcc;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}
.tarjeta-tech .btn-tech {
    color: #00ffcc;
    border-color: rgba(0, 255, 204, 0.3);
}
.tarjeta-tech .btn-tech:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #00ffcc;
}
.cargo-tech {
    color: #00ffcc !important;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    font-weight: bold;
}


/* Botones Desplegables de Funciones */
.btn-funciones {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--texto-resalte);
    padding: 12px 15px; 
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
    margin-top: 10px;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-funciones:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--texto-resalte);
}

.lista-funciones {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.lista-funciones.activo {
    max-height: 400px;
    margin-top: 15px;
}

.lista-funciones ul {
    list-style: none;
    padding-left: 10px;
}

.lista-funciones li {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--texto-principal);
    position: relative;
    padding-left: 15px;
    line-height: 1.4;
}

.lista-funciones li::before {
    content: '•';
    color: var(--texto-resalte);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -4px;
}

/* ==============================================
   VENTANA EMERGENTE (MODAL PARA MIEMBROS)
=============================================== */
.modal-overlay {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px);
    z-index: 10000; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    transition: 0.3s ease;
}

.modal-overlay.activo { 
    opacity: 1; 
    visibility: visible; 
}

.modal-content {
    background: rgba(18, 24, 32, 0.95); 
    border: 1px solid var(--texto-resalte);
    border-radius: 20px; 
    padding: 40px; 
    max-width: 450px; 
    width: 90%;
    position: relative; 
    transform: scale(0.8) translateY(20px); 
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 50px rgba(0, 229, 255, 0.2); 
}

/* Asegurar que el modal no herede fondos extraños */
.modal-content .desc-miembro, .modal-content h4, .modal-content p {
    position: relative;
    z-index: 5;
}

.modal-overlay.activo .modal-content { 
    transform: scale(1) translateY(0); 
}

.btn-cerrar-modal {
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: transparent;
    border: none; 
    color: #8b949e; 
    font-size: 1.5rem; 
    cursor: pointer; 
    transition: 0.3s;
}

.btn-cerrar-modal:hover { 
    color: var(--texto-resalte); 
    transform: scale(1.1) rotate(90deg); 
}

/* Ajustes de lo que se inyecta en el Modal */
.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-body .avatar, 
.modal-body .avatar-placeholder {
    width: 120px; 
    height: 120px; 
    margin: 0 auto 20px;
    font-size: 3rem; 
}

.modal-body .info-miembro h4 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--texto-resalte);
}

.modal-body .info-miembro p {
    font-size: 1rem;
}

.modal-body .desc-miembro {
    display: block !important; 
    margin-top: 20px;
    font-size: 1.05rem !important;
    color: #c9d1d9 !important;
    line-height: 1.6;
}

/* ==============================================
   RESPONSIVE (Celulares, Menú Overlay)
=============================================== */
@media (max-width: 850px) {
    .menu-toggle { 
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 30px;
        cursor: pointer;
        z-index: 9999;
        position: relative;
    }

    .hamburger-lines {
        width: 100%;
        height: 3px;
        background-color: var(--texto-resalte);
        position: absolute;
        transition: all 0.4s ease;
        border-radius: 5px;
    }

    .hamburger-lines::before,
    .hamburger-lines::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: var(--texto-resalte);
        transition: all 0.4s ease;
        border-radius: 5px;
    }

    .hamburger-lines::before { top: -10px; }
    .hamburger-lines::after { top: 10px; }

    .menu-toggle:not(.active) .hamburger-lines::before { animation: move-top 2s infinite ease-in-out; }
    .menu-toggle:not(.active) .hamburger-lines::after { animation: move-bottom 2s infinite ease-in-out; }

    @keyframes move-top {
        0%, 100% { transform: translateX(0); width: 100%; }
        50% { transform: translateX(10px); width: 60%; }
    }

    @keyframes move-bottom {
        0%, 100% { transform: translateX(0); width: 100%; }
        50% { transform: translateX(-10px); width: 60%; }
    }

    .menu-toggle.active .hamburger-lines { background-color: transparent; }
    .menu-toggle.active .hamburger-lines::before { top: 0; transform: rotate(45deg); background-color: #fff; animation: none; }
    .menu-toggle.active .hamburger-lines::after { top: 0; transform: rotate(-45deg); background-color: #fff; animation: none; }
    
    .nav-links { 
        position: fixed; 
        top: 0; left: 0; 
        width: 100vw; height: 100vh; 
        background: rgba(10, 14, 20, 0.98); 
        backdrop-filter: blur(15px); 
        display: flex;
        flex-direction: column; 
        justify-content: center; 
        align-items: center;
        gap: 15px; 
        opacity: 0;
        visibility: hidden;
        transform: scale(1.1); 
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9998; 
    }
    .nav-links.active { opacity: 1; visibility: visible; transform: scale(1); }
    .nav-links li { text-align: center; border: none; width: 100%; }
    .nav-links a { font-size: 1.8rem; display: inline-block; }
    
    .contenido-inicio h2 { font-size: 2.2rem; }
    .grande .carrusel-img { height: 250px; width: 85vw; }
    .grid-comite { grid-template-columns: 1fr; }
    .contenido-acerca, .contenido-comite, .bloque-resultado, .tarjeta-interactiva, .arbol-archivos, .faq-contenedor, .tarjeta-contacto-central { padding: 30px 15px; }
    .carpeta-interactiva-3d { padding: 10px; gap: 10px; }
    .texto-carpeta-3d { font-size: 1.1rem; }
    .file-3d-wrap { width: 48px; height: 32px; }
    .file-3d { transform: scale(0.2); }
    .faq-categoria-btn { font-size: 1.1rem; padding: 15px; }

    .btn-volver-arriba { bottom: 15px; right: 15px; width: 38px; height: 38px; }
    .btn-volver-arriba i { font-size: 1.1rem; min-width: 38px; }
    .btn-volver-arriba:hover { width: 38px; padding-right: 0; }
    .btn-volver-arriba:hover .texto-volver { display: none; }
}