/* ==========================================================================
   1. IMPORTACIONES Y RESET GLOBAL
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Roboto Condensed', sans-serif; 
}

::-webkit-scrollbar {
    width: 20px;       
    height: 16px;      
}

::-webkit-scrollbar-track {
    background-color: white;
}

::-webkit-scrollbar-thumb {
    background-color: #dc3d3d;
 
    border: 4px solid white; 
    border-radius: 10px; 
    transition: 1s;
}

::-webkit-scrollbar-thumb:hover{
    background-color: #0a4179;
    transition: 1s;
}
html {
    scroll-behavior: smooth;
}

body {
    background-image: url(img/index_back.png);
    background-size: cover;
    background-attachment: fixed;
    overflow-y: auto !important
}

/* Enlaces generales - Actualizado a  Institucional */
a, .btn- {
    text-decoration: none;
    padding: 10px;
    background-color: #dc3d3d;/*  Institucional */
    border-radius: 50px;
    color: white;
    
}
a:hover{
     text-decoration: none;
    padding: 10px;
    background-color: #dc3d3d;/*  Institucional */
    border-radius: 50px;
    color: white;
    transform: scale(1.05);

}
.documentacion a {
    text-decoration: none;
    padding: 10px 0;
    background-color: #dc3d3d;
    border-radius: 50px;
    color: white !important;
    display: inline-block;
    width: 220px; /* Tamaño uniforme garantizado */
    text-align: center;
    font-weight: bold;
    transition: 0.3s ease;
    margin:  0;
    align-items: center;
}
/* Centra el contenido de las cajas de la sidebar */
.box {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrado horizontal */
    text-align: center;  /* Centrado de texto */
}

/* Asegura que los párrafos dentro de las cajas no pierdan su formato */
.box p {
    width: 100%;
}

/* ==========================================================================
   2. PANTALLA DE BIENVENIDA (SPLASH)
   ========================================================================= */
/* #splash {
    position: fixed;
    width: 100%;
    height: 100vh;
    background-image: url(img/background2.jpg);
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: transform 0.8s ease-out, opacity 0.5s;
}

#splash-logo {
    width: 50%;
    animation: pulso 2s infinite;
}

@keyframes pulso {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
} */

/* ==========================================================================
   3. ESTRUCTURA Y GRID PRINCIPAL
   ========================================================================= */
#main-content {
   opacity: 1 !important; /* Cambiamos 0 por 1 para que sea visible siempre en PC */
    transition: opacity 1s;
    display: block !important; /* Nos aseguramos de que el contenedor exista en el flujo */
}

.grid-container {
    display: grid;
    grid-template-columns: 30% 70%; 
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    align-items: start;
}

.sidebar, .noticias {
    display: flex;
    flex-direction: column;
}


/* Contenedores de contenido */
.box, .noticias, .full-box, .information, .courses-section {
    background: rgba(255, 255, 255, 1);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    box-shadow: 0px 4px 6px rgb(42, 24, 57);
}

/* ==========================================================================
   4. NAVEGACIÓN (STICKY NAV)
   ========================================================================= */
.navegacion {
    position: sticky;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 2px solid #ccc;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.nav-logo h2 {
    margin: 0;
    font-size: 1.5rem;
    background: none; 
    -webkit-background-clip: initial;
    background-clip: initial;
    color: #0a4179; 
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    background: transparent;
    color: #0a4179 !important; 
    padding: 5px 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
    border-radius: 0;
}

.nav-links a:hover {
    color: #dc3d3d !important; /* Hover  Institucional */
    background: transparent;
}

/* ==========================================================================
   5. COMPONENTES VISUALES (SLIDER Y CURSOS)
   ========================================================================= */
.slider-container {
    grid-column: 1 / span 2;
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: none;
    margin-bottom: 20px;
   
}

.slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.slide { width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #0a4179; 
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
}

.prev:hover,.next:hover{

    transition: 1s;
  background-color: #dc3d3d;
}

.prev:active, .next:active{
    background: #0a4179; 
    
    transition: 1s;

}

.next { right: 15px; color:white;}
.prev { left: 15px; color: white; }

/* Cursos */
.courses-section { flex-grow: 1; }

.cursos-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    flex-grow: 1;
}

.cursos {
    width: 80%;
    height: 40%;
    margin-top: 5px;
    border-radius: 20px;
}

/* ==========================================================================
   6. TIPOGRAFÍA Y TÍTULOS 
   ========================================================================= */
h1 {
    padding: 4px 18px 4px 18px;
    background: linear-gradient(90deg, #0a4179 0%, #0a4179 100%);
    color: white; /* Texto blanco para contraste */
    border-radius: 40px 0 40px 0;
    text-align: center;
    margin-bottom: 10px;
    transition: 1s;
    opacity: 1 !important;
    background-color: #0a4179 !important;
    box-shadow: 4px 3px 0 #dc3d3d;
    }

h1:hover { 
    transform: scale(1.03); 
    background: #0a4179; 
    transform: scale(1.02);
    background: #0a4179 !important; 
    color: white !important;
    box-shadow: 6px 5px 0 #dc3d3d !important;
    transition: 0.3s; 
}

h3, h2, h4, h5 {
    /* Gradiente Institucional Azul ->  */
    background: linear-gradient(90deg, #0a4179 0%, #0a4179 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 5px;
    color: transparent;
    font-weight: bold;
    display: inline-block;
    
}

li {margin: 10px 0px 10px 0px; }

/* ==========================================================================
   7. SECCIÓN DE NOTICIAS Y DOCUMENTOS
   ========================================================================= */

.noticias img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    align-self: center;
    
}

/* Documentación */
.doc-info { display: flex; flex-direction: column; gap: 25px; }
.documentacion { display: flex; align-items: center; gap: 5px; }
.cuerpo-doc { display: flex; flex-direction: column; gap: 8px; }
.iconos { width: 60px; height: auto; flex-shrink: 0; }

/* ==========================================================================
   8. FOOTER Y BIOGRAFÍA
   ========================================================================= */
.footer-info {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.full-box { display: flex; flex-direction: column; gap: 50px; }

#aboutFAF { display: flex; align-items: flex-start; gap: 30px; }
.about-text { flex: 2; text-align: justify; }
.bio-img {
    flex: 1;
    max-width: 350px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#misionAndVision {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #ddd;
    padding-top: 30px;
}

.mv-column { flex: 1; padding: 10px; }
.mv-column h2 { border-bottom: 2px solid #0a4179; /* Borde  Institucional */ }

/* Contacto e Iconos Sociales */
.information {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: auto !important; 
    align-self: flex-start !important; 
    width: 100%;
}
/* Estilo para el contenedor de horarios */
.horarios-docentes {
    width: 100%;
    margin-top: 20px;
}

.acordeon-item {
    border-bottom: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 5px;
}

.acordeon-header {
    width: 100%;
    padding: 15px;
    background: #0a4179;
    color: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}



/* --- ESTILO TABLA ACLE --- */
.acle-content {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);

}

.acle-content th {
    background-color: #0a4179; /* Azul Institucional */
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.acle-content td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

/* Efecto cebra para legibilidad */
.acle-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.acle-content tr:hover {
    background-color: #f1f1f1;
}

/* Columna de Profesor en negrita */
.acle-content td:last-child {
    font-weight: 600;
    color: #0a4179;
}
.acordeon-content {
    display: none; /* Oculto por defecto */
    padding: 15px;
    font-size: 0.9rem;
        transition: 1s;

}


.tabla-horarios {
    width: 100%;
    border-collapse: collapse;
}

.tabla-horarios td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.tabla-horarios tr:last-child td { border: none; }
.information a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 20px;
    background-color: #dc3d3d;
    color: white !important;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 10px;
}

.information a img { width: 24px; height: auto; display: block; }

/* ==========================================================================
   9. ELEMENTOS FLOTANTES Y RELOJ - Actualizado a  Institucional
   ========================================================================= */
.botones-flotantes-container {
    position: fixed !important;
    bottom: 120px !important;
    right: 20px !important;
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    z-index: 999999 !important; 
    transition: opacity 0.8s ease, visibility 0.8s ease;
    opacity: 1 !important; 
    visibility: visible !important;
}

.btn-flotante {
    padding: 1em;
    border-radius: 20px;
    border: none;
  background: linear-gradient(90deg, #0a4179 0%, #0a4179 100%);
    color: white;
    transition: 1s;
    cursor: pointer;
    box-shadow: 4px 4px 0 #dc3d3d;
}

#modal-close-btn{
      background: linear-gradient(90deg, #0a4179 0%, #0a4179 100%);
      box-shadow: 4px 4px 0 #dc3d3d;
      color: white;
      align-items: center;
      padding: 5px 10px 5px 10px;
      border-radius: 10px;
      display: inline-block;
      font-size: 17px;
}
.modal-footer {
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    width: 100%;
    padding-top: 15px;
    
}

.btn-flotante:hover {
    transform: scale(1.05);
    background-color: #0a4179; 
     box-shadow: 4px 4px 0 rgb(251, 255, 0);
}

.reloj-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reloj-container:hover {
    transform: scale(1.1);
}

#fecha-actual { font-size: 0.8rem; text-transform: capitalize; color: #555; font-weight: 600; }
#hora-digital { font-family: 'Courier New', Courier, monospace; font-size: 1.2rem; font-weight: bold; letter-spacing: 2px; }

/* ==========================================================================
   10. VENTANAS MODALES
   ========================================================================= */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000000;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: aparecerModal 0.4s ease;
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-thumb { background: #0a4179; /* Scrollbar  Institucional */ border-radius: 10px; }
.modal-content::-webkit-scrollbar-track { background: #f1f1f1; }

.close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; }
.close-btn:hover { color: #0a4179; /* Hover  Institucional */ }

@keyframes aparecerModal {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   11. RESPONSIVE Y UTILIDADES
   ========================================================================= */
section[id], div[id] { scroll-margin-top: 100px; }

/* Tablets y Laptops pequeñas */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr; /* Pasa a una sola columna */
        padding: 10px;
    }

    .slider-container {
        height: 300px; /* Reducimos altura del slider */
    }

    .information {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en el footer */
    }
}

/* Móviles */
@media (max-width: 768px) {
  
    .navegacion {
        width: 100% !important;
        height: auto !important;
        padding: 5px !important; 
        flex-direction: column !important;
        left: 0 !important;
        box-shadow: none !important; 
    }

    .nav-logo h2 {
        font-size: 1.1rem !important; /* Título más pequeño para ganar espacio */
    }

    .nav-links {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important; 
        width: 95% !important; 
        margin: 0 auto !important;
    }

    .nav-links a {
        padding: 6px 2px !important; /* Botones más bajos */
        font-size: 0.75rem !important; /* Fuente pequeña para evitar desbordes */
    }

    /* 3. Priorizamos las noticias (Contenido Principal) */
    .grid-container {
        display: block !important; /* Eliminamos el grid para evitar columnas invisibles */
        padding: 10px 5px !important; /* Casi sin márgenes laterales */
        width: 100% !important;
    }

    .noticias {
        width: 100% !important;
        padding: 10px !important;
        margin-top: 5px !important; /* Pegamos más las noticias al slider/nav */
    }

    /* 4. Ajuste de imágenes de noticias para que no se corten */
    .noticia-card img {
        height: 180px !important; /* Un poco más bajas para ver más noticias a la vez */
        width: 100% !important;
    }



    #aboutFAF {
        flex-direction: column;
        align-items: center;
    }

    .bio-img {
        max-width: 100%;
        width: 100%;
        order: -1; /* La foto sube arriba del texto en móvil */
    }

    #misionAndVision {
        flex-direction: column;
    }

    .information {
        grid-template-columns: 1fr; /* 1 sola columna en el footer */
        text-align: center;
    }

    .information a {
        width: 100%; /* Botones de redes sociales a ancho completo */
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .cursos {
        width: 100%; /* Banners de cursos ocupan todo el ancho */
        height: auto;
    }

    /* Ajuste para los botones flotantes en móvil para que no tapen contenido */
    .botones-flotantes-container {
        bottom: 100px !important;
        right: 10px !important;
        transform: scale(0.8);
    }
}

.noticia-img-dinamica {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    object-fit: cover;
}

.noticia-fecha {
    font-size: 0.85rem;
    color: #0a4179;
    font-weight: bold;
  
}

/* Fix de sintaxis: eliminación de llave huérfana detectada al final del archivo original */

/* ==========================================================================
   12. EXTRAS
   ========================================================================= */

   #welcome{
        background: rgba(255, 255, 255, 0.6);
        padding: 0px 30px 0px 30px;
        border-radius: 10px;
   }


   /* estilo para los botones de paginación de noticias */
  
.paginacion-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-bottom: 10px;
}

.btn-paginacion {
    background-color: #f1f1f1;
    border: 2px solid #0a4179;
    color: #0a4179;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-paginacion:hover {
    background-color: #0a4179;
    color: white;
}

.btn-paginacion.active {
    background-color: #0a4179;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


.sidebar {
    height: fit-content;
}

   /* ==========================================================================
   13. Apartado de Noticias (carga)
   ========================================================================= */
   /* Contenedor dinámico de noticias */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 20px;
    width: 100%;
    margin-top: 20px;
    align-items: start;
}

/* Tarjeta individual de noticia */
.noticia-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0px 2px 2px rgb(168, 138, 193);
    border: 1px solid #eee;
    align-self: start;
}

.noticia-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
    border: #0a4179 solid 3px;
}

.noticia-card .fecha {
    font-weight: bold;
    color:white;
    background-color:  #0a4179;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 9px;
    font-size: 0.85rem;
    box-shadow: 4px 3px 0 #dc3d3d;
    text-align: center;
}

/* Responsividad: 1 columna en móviles */
@media (max-width: 1024px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }
}

/* zoom de imagenes */

.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    cursor: grab;
    transition: 1s;
}


.lightbox-img:active {
    transform: scale(1.5);
    cursor: grabbing;
}


.noticia-card img {
    cursor: zoom-in;
}

audio{
  width: 100%;
}

.acordeon-content {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    width: 100%;
}


.audio-player {
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
}


.btn-pdf {
    display: inline-block;
    padding: 10px 20px;
    background-color: #dc3d3d; 
    color: white !important;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    text-align: center;
    width: 100%;
}


.popup-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.popup-box {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 15px;
    position: relative;
    border: 3px solid #0a4179;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: bounceIn 0.5s ease; 
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.close-popup {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3d3d;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.horarios-docentes + .horarios-docentes {
    margin-top: 0px !important;
}


.horarios-docentes:first-of-type {
    margin-bottom: 0px !important;
}

.horarios-docentes .acordeon-item {
    margin-bottom: 0px !important;
}

.btn-leer-mas {
    background: none;
    border: none;
    color: #0a4179;
    font-weight: bold;
    cursor: pointer;
    padding: 0 15px 15px 15px; 
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: block;
}

.btn-leer-mas:hover {
    color: #dc3d3d;
    text-decoration: underline;
    transform: translateX(5px);
    }

    .galeria-extra {
    display: grid; /* Se activará con JS */
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9; 
}

.foto-miniatura {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.foto-miniatura:hover {
    transform: scale(1.05);
    border-color: #0a4179;
}

.noticia-card p {
    white-space: pre-wrap !important; 
    padding: 10px 15px;
    font-size: 0.9rem;
}

.galeria-extra {
    display: none; 
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 8px;
    padding: 10px 15px;
    background: #f4f4f4;
}

.foto-miniatura {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #0a4179;
    transition: 0.3s;
}

.foto-miniatura:hover {
    transform: scale(1.05);
}

.btn-leer-mas {
    background: none;
    border: none;
    color: #0a4179;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
    text-align: left;
}
