/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Header */
header {
    background-color: #004080;
    color: white;
    padding: 10px 0;
}

.header-content {
    display: flex;
    align-items: center;
    /* Alinea verticalmente todos los hijos */
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0;
    /* Elimina espacio vertical extra */
}

.logo,
.logo-facultad {
    display: flex;
    align-items: center;
    /* Alinea verticalmente el contenido interno */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img,
.logo-facultad img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.3rem;
}

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

/* Enlaces */
nav ul.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

nav ul.nav-links li a:hover {
    background-color: #0066cc;
}

/* Ocultar botón hamburguesa en desktop */
.hamburger-btn {
    display: none;
}

/* --- VERSIÓN MÓVIL OPTIMIZADA --- */
@media (max-width: 768px) {

    /* Reducir tamaño de logo en móvil */
    .logo img,
    .logo-facultad img {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 1rem;
        /* Texto más pequeño */
    }

    /* Navegación Responsive */
    nav ul.nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        background-color: #004080;
        position: absolute;
        top: 80px;
        /* Ajustado a altura real del header móvil (60+20) */
        left: 0;
        padding: 20px 0;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        /* Inicialmente oculto */
        display: none;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    nav ul.nav-links.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul.nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul.nav-links li:last-child {
        border-bottom: none;
    }

    nav ul.nav-links li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 16px 20px;
        /* Target táctil grande */
        font-size: 1.1rem;
    }

    nav ul.nav-links li a:hover {
        background-color: #00509e;
    }

    /* Botón Hamburguesa Mejorado */
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        /* Estándar touch */
        height: 44px;
        padding: 0;
        cursor: pointer;
        background: transparent;
        border: none;
        /* Sin borde para look más limpio */
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

    .hamburger-btn:active {
        background-color: rgba(255, 255, 255, 0.1);
        /* Feedback táctil */
    }

    .hamburger-box {
        width: 30px;
        height: 24px;
        position: relative;
    }

    /* Líneas del menú */
    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 4px;
        position: absolute;
        /* Transición por defecto: Revertir (Rotar -> Expandir) */
        transition: transform 0.15s cubic-bezier(0.55, 0.055, 0.675, 0.19) 0s,
            top 0.15s cubic-bezier(0.55, 0.055, 0.675, 0.19) 0.15s,
            background-color 0s linear 0.15s;
    }

    .hamburger-inner {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-inner::before {
        content: '';
        top: -10px;
    }

    .hamburger-inner::after {
        content: '';
        top: 10px;
    }

    /* Estados Activos (Animación: Colapsar -> Rotar) */
    .hamburger-btn.is-active .hamburger-inner {
        transform: rotate(0deg);
        background-color: transparent !important;
        transition-delay: 0.15s;
        /* Esperar a que colapse para desaparecer */
    }

    .hamburger-btn.is-active .hamburger-inner::before {
        top: 0;
        transform: rotate(45deg);
        transition: top 0.15s cubic-bezier(0.55, 0.055, 0.675, 0.19) 0s,
            transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1) 0.15s;
    }

    .hamburger-btn.is-active .hamburger-inner::after {
        top: 0;
        transform: rotate(-45deg);
        transition: top 0.15s cubic-bezier(0.55, 0.055, 0.675, 0.19) 0s,
            transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1) 0.15s;
    }

    /* Ajustes Generales */
    body {
        font-size: 16px;
        /* Base legible */
    }

    .container {
        padding: 0 16px;
        /* Padding lateral estándar móvil */
        width: 100%;
    }

    .section {
        padding: 30px 16px;
        margin: 16px 0;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Botones Full Width */
    .btn,
    .evento-link,
    button[type="submit"] {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px;
        margin-top: 10px;
        font-size: 1rem;
    }

    /* Dashboard en Móvil */
    .charts-grid {
        grid-template-columns: 1fr;
        /* Una columna */
        gap: 20px;
    }

    .chart-wrapper {
        height: 250px;
        /* Un poco menos alto en móvil */
    }

    .balance-monto {
        font-size: 2.5rem;
        /* Ajustar para que quepa */
    }

    /* Ajustes Tablas */
    .tabla-transparencia-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-transparencia th,
    .tabla-transparencia td {
        padding: 10px;
        font-size: 0.9rem;
        white-space: nowrap;
        /* Evitar quiebres feos, permitir scroll */
    }
}

.social-icons a {
    margin-left: 10px;
    display: inline-block;
}

.social-icons img {
    width: 30px;
    height: 30px;
}

/* Redes sociales en barra aparte */
.social-bar {
    background-color: #003366;
    padding: 10px 0;
    margin-top: 10px;
    /* Añadido para separar de los links de navegación */
}

.social-bar .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    /* Centra verticalmente los íconos y texto */
}

.social-bar .social-icons img {
    width: 30px;
    height: 30px;
    transition: filter 0.3s ease;
}

/* Logo Facultad de Ingeniería */
.logo-facultad {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

/* Sections */
.section {
    background-color: white;
    padding: 40px 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.section h2 {
    margin-bottom: 20px;
    color: #004080;
}

.section h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #0066cc;
}

/* Inicio */
.inicio .banner {
    text-align: center;
    margin-bottom: 30px;
}

.inicio .noticias ul {
    list-style-type: disc;
    margin-left: 20px;
}

.accesos-rapidos {
    text-align: center;
    margin-top: 30px;
}

.accesos-rapidos .btn {
    background-color: #004080;
    color: white;
    padding: 12px 25px;
    margin: 10px 15px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.accesos-rapidos .btn:hover {
    background-color: #0066cc;
}

/* Equipo */
.equipo {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.miembro {
    text-align: center;
    max-width: 180px;
}

.miembro img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

/* Estilos para la sección del equipo */
.equipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    /* Más pequeño para juntar más */
    gap: 12px;
    /* Espacio ligeramente mayor entre tarjetas */
    margin-top: 20px;
}

.miembro {
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 10px;
    /* Menos padding para que estén más juntos */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.miembro:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.13);
}

.miembro-img {
    width: 80px;
    /* Más pequeño para juntar más */
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #004080;
}

.miembro h4 {
    font-size: 0.95rem;
    color: #004080;
    margin-bottom: 3px;
}

.miembro p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

/* Botones generales */
.btn {
    background-color: #004080;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Animación al pulsar */
.btn:active {
    background-color: #003366;
    transform: scale(0.95);
}

/* Galería */
.galeria {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
    justify-content: center;
}

.galeria img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

/* Formularios */
.contact-form {
    max-width: 600px;
    margin: 20px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.contact-form button {
    width: 150px;
    align-self: flex-start;
}

/* Información contacto */
.info-contacto {
    margin-top: 30px;
    text-align: center;
}

.redes-contacto a {
    margin: 0 8px;
}

.redes-contacto img {
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease;
}

/* Footer */
footer {
    background-color: #00254d;
    color: white;
    text-align: center;
    padding: 15px 10px;
}

footer nav ul.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

footer nav ul.footer-links li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

footer nav ul.footer-links li a:hover {
    text-decoration: underline;
}

/* Estilos para el título y subtítulo */
.titulo-principal {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

.subtitulo {
    font-size: 1rem;
    font-weight: 300;
    color: white;
    margin: 0;
}

/* Banner cuadrado con imágenes de noticias */
.banner-noticias {
    margin-bottom: 20px;
}

.banner-cuadrado {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.imagen-banner {
    width: 100%;
    padding-top: 100%;
    /* Relación de aspecto cuadrada */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.imagen-banner:hover {
    transform: scale(1.05);
}

/* Estilos para el banner dinámico de noticias */
#banner-noticias .swiper {
    width: 80%;
    height: 350px;
    /* Ajustar el alto del banner para que los puntos sean visibles */
}

#banner-noticias .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#banner-noticias .swiper-slide img {
    max-height: 250px;
    /* Reducir el alto máximo de las imágenes */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#banner-noticias .swiper-pagination {
    bottom: 10px;
    /* Ajustar la posición de los puntos de paginación */
}

#banner-noticias .swiper-pagination-bullet-active {
    background-color: #f59e0b !important;
    /* Color amarillo */
}

#banner-noticias .swiper-button-next,
#banner-noticias .swiper-button-prev {
    color: #f59e0b;
    /* Color amarillo */
}

.dark #banner-noticias .swiper-button-next,
.dark #banner-noticias .swiper-button-prev {
    color: #facc15;
    /* Color amarillo brillante para modo oscuro */
}

/* Malla Interactiva */
.malla-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.malla-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #004080;
    margin-bottom: 20px;
    text-align: center;
}

.semestres-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.semestre {
    min-width: 250px;
    background-color: #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.semestre-title {
    background-color: #004080;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

.curso {
    background-color: #ffffff;
    margin: 10px;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.curso:hover {
    background-color: #f59e0b;
    color: white;
    transform: scale(1.05);
}

.curso.aprobado {
    background-color: #4caf50;
    color: white;
}

.curso.bloqueado {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

/* Capsulas programas útiles para la carrera */
.capsulas-container {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.capsulas-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #004080;
    margin-bottom: 20px;
    text-align: center;
}

.video-folders {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.folder {
    flex: 1 1 300px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.folder:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.folder h3 {
    font-size: 1.5rem;
    color: #004080;
    margin-bottom: 10px;
    text-align: center;
}

.folder ul {
    list-style: none;
    padding: 0;
}

.folder li {
    margin-bottom: 15px;
}

.folder h4 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.folder iframe {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Capsulas Electivos */
.electivos-folders {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.folder {
    flex: 1 1 300px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
}

.folder h3 {
    font-size: 1.5rem;
    color: #004080;
    margin-bottom: 10px;
}

.toggle-video-btn {
    background-color: #004080;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.toggle-video-btn:hover {
    background-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container {
    margin-top: 15px;
}

.video-container iframe {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mensaje antes de los electivos */
.capsulas-message {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

/* Redes sociales con texto */
.social-link {
    display: flex;
    align-items: center;
    /* Centra verticalmente el ícono y el texto */
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s ease;
}

.social-link img {
    width: 30px;
    height: 30px;
    filter: none;
    /* Eliminar el filtro para que los colores no se inviertan */
    transition: transform 0.3s ease;
}

.social-link:hover img {
    transform: scale(1.1);
    /* Efecto de zoom al pasar el mouse */
}

.social-link:hover {
    color: #f59e0b;
    /* Cambiar color del texto al pasar el mouse */
}

/* Estilos para el banner de áreas del equipo */
.equipo-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.area {
    flex: 1 1 250px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
}

.area h4 {
    font-size: 1.2rem;
    color: #004080;
    margin-bottom: 10px;
}

.area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area ul li {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 5px;
}

/* Estilos para las fotos de las personas */
.person-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

/* Texto centrado para quienes somos */
.quienes-texto-centrado {
    text-align: center;
    margin-bottom: 48px;
    /* Más espacio debajo del texto */
    margin-top: 12px;
    /* Un poco de espacio arriba */
    font-size: 1.15rem;
    /* Ligeramente más grande */
    color: #333;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para centrar el botón de estatutos */
.btn-estatutos {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 8px;
}

/* Contacto: diseño en dos columnas */
.contacto-flex {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.contacto-formulario {
    flex: 1 1 340px;
    min-width: 280px;
}

.contacto-mapa {
    flex: 1 1 340px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contacto-mapa iframe {
    width: 100%;
    max-width: 400px;
    height: 350px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Nueva clase para centrar el texto debajo de ambas columnas */
.contacto-ubicacion-centro {
    text-align: center;
    margin-top: 18px;
    font-size: 1.08rem;
    color: #004080;
    font-weight: 500;
}

/* Responsive para contacto */
@media (max-width: 900px) {
    .contacto-flex {
        flex-direction: column;
        gap: 24px;
    }

    .contacto-mapa iframe {
        max-width: 100%;
        height: 250px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    nav ul.nav-links {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    nav ul.nav-links li a {
        display: block;
        padding: 10px;
        background-color: #003366;
        border-radius: 4px;
    }

    .equipo {
        flex-direction: column;
        align-items: center;
    }

    .galeria {
        flex-direction: column;
        align-items: center;
    }

    .galeria img {
        width: 90%;
        height: auto;
    }

    .semestres-container {
        flex-direction: row;
        /* Mantener fila para scroll horizontal */
        overflow-x: auto;
        padding-bottom: 15px;
        gap: 15px;
    }

    .video-folders {
        flex-direction: column;
        gap: 15px;
    }

    .folder iframe {
        height: 180px;
    }

    .electivos-folders {
        flex-direction: column;
        gap: 15px;
    }

    .video-container iframe {
        height: 180px;
    }

    /* Botón hamburguesa limpio */
    .hamburger-btn {
        display: block;
        background: none;
        border: none;
        padding: 6px;
        margin-left: auto;
        cursor: pointer;
    }

    /* Flexbox para distribuir las 3 barras */
    .hamburger-box {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        /* mayor espacio entre líneas */
        align-items: center;
        width: 30px;
        height: 26px;
        /* alto aumentado */
    }

    /* todas las barras */
    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        content: "";
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 2px;
        position: static !important;
        transform: none !important;
        margin: 0;
    }

    /* Elimina offsets previos */
    .hamburger-inner::before,
    .hamburger-inner::after {
        top: auto !important;
    }

    /* Menú oculto por defecto */
    nav ul.nav-links {
        display: none !important;
    }

    /* Mostrar menú al hacer clic */
    nav ul.nav-links.show {
        display: flex !important;
        flex-direction: column;
        background-color: #004080;
        width: 100%;
        padding: 10px 0;
    }

    nav ul.nav-links.show li a {
        padding: 12px;
        text-align: center;
    }
}

/* Mejoras para móviles */
@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }

    .container {
        width: 98%;
        padding: 0 4px;
    }

    header {
        padding: 8px 0;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Centrar texto junto al logo */
    .logo>div {
        text-align: center;
    }

    /* Ocultar logo de la facultad en móvil para ganar espacio */
    .logo-facultad {
        display: none;
    }

    /* Ajustar tamaños */
    .logo img {
        width: 50px;
        height: 50px;
    }

    .titulo-principal {
        font-size: 1.1rem;
    }

    .subtitulo {
        font-size: 0.9rem;
    }

    nav ul.nav-links {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px 0;
        margin-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: #004080 #e3e3e3;
    }

    nav ul.nav-links li {
        display: inline-block;
    }

    nav ul.nav-links li a {
        display: inline-block;
        min-width: 120px;
        padding: 12px 10px;
        font-size: 1rem;
        background-color: #003366;
        border-radius: 6px;
        text-align: center;
        margin-right: 2px;
        margin-bottom: 0;
        white-space: nowrap;
        transition: background 0.2s;
    }

    nav ul.nav-links li a:active {
        background-color: #004080;
    }

    .social-bar {
        padding: 8px 0;
    }

    .social-bar .social-icons {
        gap: 10px;
    }

    .section {
        padding: 18px 6px;
        margin: 12px 0;
        border-radius: 6px;
    }

    .section h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .section h3 {
        font-size: 1.05rem;
        margin-top: 14px;
        margin-bottom: 7px;
    }

    .equipo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .miembro-img {
        width: 55px;
        height: 55px;
        margin-bottom: 5px;
    }

    .miembro h4 {
        font-size: 0.85rem;
    }

    .miembro p {
        font-size: 0.8rem;
    }

    .galeria img {
        width: 98%;
        height: auto;
    }

    .banner-noticias .swiper {
        width: 100%;
        height: 220px;
    }

    #banner-noticias .swiper-slide img {
        max-height: 120px;
    }

    .malla-container {
        padding: 10px;
    }

    .malla-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .semestres-container {
        flex-direction: row;
        gap: 10px;
        padding-bottom: 10px;
        overflow-x: auto;
    }

    .semestre {
        min-width: 260px;
        /* Ancho fijo para que funcione el scroll */
        margin-bottom: 0;
    }

    .curso {
        margin: 6px;
        padding: 7px;
        font-size: 0.95rem;
    }

    .capsulas-container {
        padding: 8px 4px;
        /* menos padding */
        margin: 12px 0;
    }

    .capsulas-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .video-folders {
        gap: 10px;
    }

    .video-folders .folder {
        flex: 1 1 100%;
        /* ancho completo */
        max-width: 100%;
        padding: 6px;
        /* menos padding interno */
        border-radius: 6px;
    }

    /* También aplicar a electivos si se desea igualar estilo */
    .electivos-folders .folder {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 6px;
        border-radius: 6px;
    }

    /* Reducir altura de la sección de cápsulas sin video */
    .video-container {
        margin-top: 8px !important;
    }

    .video-container p {
        padding: 8px 0 !important;
        font-size: 0.95rem !important;
    }

    /* No mostrar la nav del footer en móvil */
    footer nav {
        display: none !important;
    }
}

/* Cuerpo Académico */
.cuerpo-academico {
    margin-top: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 32px 20px;
}

.cuerpo-academico-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #004080;
    margin-bottom: 8px;
    text-align: center;
}

.cuerpo-academico-fuente {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 18px;
    text-align: center;
}

.cuerpo-academico-fuente a {
    color: #0066cc;
    text-decoration: underline;
}

.cuerpo-academico-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #004080;
    color: #fff;
    font-weight: bold;
    padding: 10px 28px;
    border-radius: 8px;
    margin: 0 auto 18px auto;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
}

.cuerpo-academico-btn:hover {
    background: #0066cc;
    transform: scale(1.05);
}

.cuerpo-academico-search {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 18px auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: #f4f8ff;
    display: block;
}

.cuerpo-academico-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.cuerpo-academico-item {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 18px 14px;
    border-left: 4px solid #004080;
}

.cuerpo-academico-item h3 {
    font-size: 1.08rem;
    font-weight: bold;
    color: #004080;
    margin-bottom: 6px;
}

.cuerpo-academico-item p {
    font-size: 0.98rem;
    color: #444;
    margin-bottom: 4px;
}

.cuerpo-academico-item p:last-child {
    font-size: 0.85rem;
    color: #666;
    background: #e3e8f0;
    border-radius: 6px;
    display: inline-block;
    padding: 2px 10px;
    margin-top: 8px;
}

/* Para scroll suave en toda la página */
html {
    scroll-behavior: smooth;
}

/* Botones animados al pulsar */
.btn {
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn:active {
    background-color: #003366;
    transform: scale(0.95);
}

/* Estilos para el botón grande de recursos académicos */
.btn-recursos-drive {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 28px auto;
    background-color: #f59e0b;
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    padding: 22px 0;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
    transition: background 0.2s, transform 0.2s;
}

.btn-recursos-drive:hover {
    background-color: #fbbf24;
    color: #004080;
    transform: scale(1.03);
}

/* Margen para la subsección de material de estudio */
.material-estudio-subsection {
    margin-bottom: 32px;
    text-align: center;
}

.material-estudio-subsection h3 {
    font-size: 1.3rem;
    color: #004080;
    margin-bottom: 16px;
    font-weight: bold;
}

/* Logo Facultad de Ingeniería más pequeño */
.logo-facultad img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Mejoras para móviles */
@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }

    .container {
        width: 98%;
        padding: 0 4px;
    }

    header {
        padding: 8px 0;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Centrar texto junto al logo */
    .logo>div {
        text-align: center;
    }

    /* Ocultar logo de la facultad en móvil para ganar espacio */
    .logo-facultad {
        display: none;
    }

    /* Ajustar tamaños */
    .logo img {
        width: 50px;
        height: 50px;
    }

    .titulo-principal {
        font-size: 1.1rem;
    }

    .subtitulo {
        font-size: 0.9rem;
    }

    nav ul.nav-links {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px 0;
        margin-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: #004080 #e3e3e3;
    }

    nav ul.nav-links li {
        display: inline-block;
    }

    nav ul.nav-links li a {
        display: inline-block;
        min-width: 120px;
        padding: 12px 10px;
        font-size: 1rem;
        background-color: #003366;
        border-radius: 6px;
        text-align: center;
        margin-right: 2px;
        margin-bottom: 0;
        white-space: nowrap;
        transition: background 0.2s;
    }

    nav ul.nav-links li a:active {
        background-color: #004080;
    }

    .social-bar {
        padding: 8px 0;
    }

    .social-bar .social-icons {
        gap: 10px;
    }

    .section {
        padding: 18px 6px;
        margin: 12px 0;
        border-radius: 6px;
    }

    .section h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .section h3 {
        font-size: 1.05rem;
        margin-top: 14px;
        margin-bottom: 7px;
    }

    .equipo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .miembro-img {
        width: 55px;
        height: 55px;
        margin-bottom: 5px;
    }

    .miembro h4 {
        font-size: 0.85rem;
    }

    .miembro p {
        font-size: 0.8rem;
    }

    .galeria img {
        width: 98%;
        height: auto;
    }

    .banner-noticias .swiper {
        width: 100%;
        height: 220px;
    }

    #banner-noticias .swiper-slide img {
        max-height: 120px;
    }

    .malla-container {
        padding: 10px;
    }

    .malla-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .semestres-container {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 0;
    }

    .semestre {
        min-width: 98%;
        margin-bottom: 8px;
    }

    .curso {
        margin: 6px;
        padding: 7px;
        font-size: 0.95rem;
    }

    .capsulas-container {
        padding: 8px 4px;
        /* menos padding */
        margin: 12px 0;
    }

    .capsulas-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .video-folders {
        gap: 10px;
    }

    .video-folders .folder {
        flex: 1 1 100%;
        /* ancho completo */
        max-width: 100%;
        padding: 6px;
        /* menos padding interno */
        border-radius: 6px;
    }

    /* También aplicar a electivos si se desea igualar estilo */
    .electivos-folders .folder {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 6px;
        border-radius: 6px;
    }

    /* Reducir altura de la sección de cápsulas sin video */
    .video-container {
        margin-top: 8px !important;
    }

    .video-container p {
        padding: 8px 0 !important;
        font-size: 0.95rem !important;
    }

    /* No mostrar la nav del footer en móvil */
    footer nav {
        display: none !important;
    }
}

/* Mapa responsivo: max-width desktop y ratio 16:9 */
.map-responsive {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    /* ancho máximo en pantallas grandes */
    margin: 20px auto;
    padding-bottom: 56.25%;
    /* relación 16:9 */
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Ratio más alto en móviles para mejor visibilidad */
@media (max-width: 768px) {
    .map-responsive {
        padding-bottom: 75%;
        /* relación 4:3 approx. */
        max-width: 100%;
    }
}

/* Botón hamburguesa oculto en desktop */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* En móviles: mostrar hamburguesa y ocultar menú por defecto */
@media (max-width: 768px) {

    /* Botón hamburguesa */
    .hamburger-btn {
        display: block;
        background: none;
        border: none;
        padding: 6px;
        margin-left: auto;
        cursor: pointer;
    }

    /* Contenedor para las tres líneas */
    .hamburger-box {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 30px;
        height: 26px;
    }

    /* Barras */
    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        content: "";
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 2px;
        margin: 0;
        position: static !important;
        transform: none !important;
    }

    /* Menú oculto por defecto */
    nav ul.nav-links {
        display: none !important;
    }

    /* Mostrar menú al hacer clic */
    nav ul.nav-links.show {
        display: flex !important;
        flex-direction: column;
        background-color: #004080;
        width: 100%;
        padding: 10px 0;
    }

    nav ul.nav-links.show li a {
        padding: 12px;
        text-align: center;
    }
}




/* Ayudantes Pares */
.ayudantes-container {
    margin-top: 32px;
}

.ayudantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ayudante-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-left: 4px solid #004080;
    transition: transform 0.3s ease;
}

.ayudante-card:hover {
    transform: translateY(-5px);
}

.ayudante-card h3 {
    color: #004080;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.ayudante-card .asignatura {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.ayudante-card .contacto {
    color: #0066cc;
    font-size: 0.9rem;
}

/* Transparencia */
.finanzas-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    margin-top: 20px;
}

.finanza-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1 1 200px;
    max-width: 300px;
}

.finanza-card h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.finanza-card .monto {
    font-size: 1.5rem;
    font-weight: bold;
}

.text-green-600 {
    color: #16a34a;
}

.text-red-600 {
    color: #dc2626;
}

.text-blue-600 {
    color: #2563eb;
}

.tabla-transparencia-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.tabla-transparencia {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Para forzar scroll en móviles */
}

.tabla-transparencia th,
.tabla-transparencia td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabla-transparencia th {
    background-color: #f4f8ff;
    color: #004080;
    font-weight: bold;
}

.tabla-transparencia tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge.ingreso {
    background-color: #dcfce7;
    color: #166534;
}

.badge.egreso {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive adjustments for new sections */
@media (max-width: 600px) {
    .finanza-card {
        flex: 1 1 100%;
    }

    .tabla-transparencia th,
    .tabla-transparencia td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Eventos Grid Redesign */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.evento-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.evento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.evento-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.evento-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.evento-card:hover .evento-image {
    transform: scale(1.05);
}

.evento-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.evento-date {
    color: #d4a017;
    /* Gold/Mustard color */
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evento-title {
    color: #004080;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.evento-desc {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.evento-link {
    color: #004080;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    transition: color 0.2s;
}

.evento-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Responsive adjustments for events */
@media (max-width: 768px) {
    .eventos-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        padding: 10px;
    }

    .evento-image-container {
        height: 180px;
    }
}

/* Rediseño Quiénes Somos */
.mision-vision-container {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.mv-card {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #004080;
    min-width: 280px;
}

.mv-card.vision {
    border-top-color: #d4a017;
    /* Gold for Vision */
}

.mv-card h3 {
    font-size: 1.5rem;
    color: #004080;
    margin-bottom: 15px;
    margin-top: 0;
}

.mv-card p {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

/* Rediseño Equipo */
.equipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.miembro {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.miembro:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.miembro-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #f0f0f0;
    transition: border-color 0.3s;
}

.miembro:hover .miembro-img {
    border-color: #004080;
}

.miembro h4 {
    color: #004080;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.miembro p {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mision-vision-container {
        flex-direction: column;
    }

    .equipo-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }
}

@media (max-width: 480px) {
    .equipo-grid {
        grid-template-columns: 1fr;
        /* 1 column on very small screens */
    }
}

/* Rediseño Material de Estudio */
.material-grid {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.material-card {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    min-width: 280px;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.material-card h4 {
    color: #004080;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.material-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Botón Drive mejorado */
.btn-recursos-drive {
    display: inline-block;
    background-color: #004080;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-recursos-drive:hover {
    background-color: #003366;
    transform: scale(1.05);
}

/* Links de contribución */
.contribute-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.link-action {
    color: #004080;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.link-action:hover {
    border-bottom-color: #004080;
}

.separator {
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .material-grid {
        flex-direction: column;
    }
}

/* Reseñas de Electivos */
.resenas-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.resenas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.resena-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #004080;
}

.resena-card h4 {
    color: #004080;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.resena-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.rating-label {
    font-weight: bold;
    color: #333;
}

.stars {
    color: #ffd700;
    /* Gold color for stars */
    letter-spacing: 2px;
}

/* Formulario de Reseña */
.form-resena-container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #004080;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.review-form select,
.review-form input[type="number"],
.review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.review-form textarea {
    resize: vertical;
}

/* Estrellas interactivas */
.star-rating {
    display: inline-flex;
    gap: 5px;
    cursor: pointer;
}

.star-rating .star {
    font-size: 1.5rem;
    color: #ccc;
    transition: color 0.2s;
}

.star-rating .star.active,
.star-rating .star:hover,
.star-rating .star:hover~.star {
    color: #ffd700;
}

/* Invertir hover para que se iluminen de izquierda a derecha correctamente con flex-direction normal */
/* Nota: La lógica de hover simple CSS a veces requiere flex-direction: row-reverse, pero aquí usaremos JS para manejar la clase .active */

.btn-submit-review {
    background-color: #004080;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-submit-review:hover {
    background-color: #003366;
}

/* Reseñas Horizontales y Promedio */
.reviews-wrapper {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.average-rating-box {
    background-color: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.average-rating-box h4 {
    color: #004080;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.avg-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.95rem;
    color: #333;
}

.avg-value {
    font-weight: bold;
    color: #d4a017;
    margin-left: 5px;
}

.reviews-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

/* Custom scrollbar for reviews */
.reviews-scroll::-webkit-scrollbar {
    height: 8px;
}

.reviews-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.reviews-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.reviews-scroll::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Adjust card for horizontal layout */
.reviews-scroll .resena-card {
    min-width: 280px;
    max-width: 300px;
    flex: 0 0 auto;
    /* Don't shrink */
    margin-top: 0 !important;
    /* Override inline style if any */
}

/* Reseñas Apilables (Stacked) */
/* Reseñas Apilables (Stacked) */
.reviews-stack-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 180px;
    /* Altura reducida */
    margin: 0 auto;
    perspective: 1000px;
}

.resena-card-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px;
    /* Padding reducido */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid #eee;
    user-select: none;
}

/* Efecto de pila más compacto */
.resena-card-stack:nth-child(1) {
    z-index: 3;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.resena-card-stack:nth-child(2) {
    z-index: 2;
    transform: translateY(6px) scale(0.98);
    /* Menor desplazamiento y escala */
    opacity: 0.9;
}

.resena-card-stack:nth-child(3) {
    z-index: 1;
    transform: translateY(12px) scale(0.96);
    opacity: 0.8;
}

.resena-card-stack:nth-child(n+4) {
    z-index: 0;
    transform: translateY(18px) scale(0.94);
    opacity: 0;
    pointer-events: none;
}

/* Botón de eliminar (Admin) */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    display: none;
    /* Oculto por defecto */
    z-index: 10;
}

.delete-btn:hover {
    background: #cc0000;
}

/* Mostrar botón cuando el modo admin está activo */
body.admin-mode .delete-btn {
    display: block;
}

/* Carousel de Convenios */
.convenios-section {
    position: relative;
    padding: 0 20px;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.partner-card {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.arrow {
    background-color: rgba(0, 64, 128, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 10;
    flex-shrink: 0;
}

.arrow:hover {
    background-color: #003366;
}

.arrow.left {
    margin-right: 10px;
}

.arrow.right {
    margin-left: 10px;
}

/* Modal Ayudantes */
.ayudante-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ayudante-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Countdown Timer */
#countdown-container {
    background: linear-gradient(135deg, #004080 0%, #0066cc 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 64, 128, 0.2);
    position: relative;
    overflow: hidden;
}

#countdown-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#countdown-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 10px 15px;
    border-radius: 10px;
    min-width: 70px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.countdown-item .number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.countdown-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .countdown-timer {
        gap: 10px;
    }

    .countdown-item {
        min-width: 55px;
        padding: 8px 5px;
    }

    .countdown-item .number {
        font-size: 1.4rem;
    }
}

/* Calculator & What If Simulator */
#what-if-simulator {
    animation: fadeIn 0.5s ease-out;
}

.grade-visual-container {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Search Bar for Electives */
.search-container {
    text-align: center;
    margin-bottom: 20px;
}

#search-electivos {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    outline: none;
}

#search-electivos:focus {
    border-color: #004080;
    box-shadow: 0 4px 10px rgba(0, 64, 128, 0.15);
}

/* --- Comentarios Generales --- */
.comentarios-generales {
    background-color: #f4f8ff;
    padding: 60px 0;
}

.comentario-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border-left: 4px solid #004080;
    animation: fadeIn 0.5s ease;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.comentario-author {
    font-weight: bold;
    color: #004080;
    font-size: 1.1rem;
}

.comentario-date {
    font-size: 0.85rem;
    color: #888;
}

.comentario-body {
    color: #333;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Dashboard Transparencia */
.transparencia-dashboard {
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.balance-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.balance-card {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.balance-card.total {
    border-right: 1px solid #eee;
}

.balance-card h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-monto {
    font-size: 3.5rem;
    font-weight: 800;
    color: #004080;
    margin: 0;
    line-height: 1.1;
}

.balance-subtext {
    font-size: 0.9rem;
    color: #999;
    margin-top: 5px;
}

.balance-card.summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid #f5f5f5;
}

.summary-item span {
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
}

.summary-monto {
    font-weight: 800;
    font-size: 1.3rem;
}

.summary-monto.text-green {
    color: #10b981;
}

.summary-monto.text-red {
    color: #ef4444;
}

@media (max-width: 768px) {
    .balance-container {
        flex-direction: column;
        gap: 20px;
    }

    .balance-card.total {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }
}

/* Grids Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.chart-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    /* Sombra más suave y moderna */
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    /* Efecto hover */
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 250px;
    /* Altura reducida */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

/* --- Prestamos Section --- */
.prestamos-section {
    margin-top: 50px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.prestamos-section h3 {
    text-align: center;
    color: #004080;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.prestamos-info {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.prestamos-rules {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #004080;
}

.prestamos-rules h4 {
    color: #004080;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.prestamos-rules ul {
    list-style: none;
    padding: 0;
}

.prestamos-rules ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    color: #475569;
}

.prestamos-rules ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.prestamos-items {
    flex: 1.5;
    min-width: 300px;
}

.prestamos-items h4 {
    color: #334155;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.item-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.item-card h5 {
    color: #004080;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.item-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

@media (max-width: 768px) {
    .prestamos-info {
        flex-direction: column;
        gap: 20px;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}