@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&display=swap');

/* ==================================================== */
/*                      General                         */
/* ==================================================== */

:root {
    --primary-color: #002964;
    --secondary-color: #cd9804;
    --background-color: #f2f2f2;
    --text-color: #333;
    --text-color-white: #fff;
    --heading-color: #002964;
    --link-color: #fff;
    --link-hover-color: #cd9804;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================================================== */
/*                     Top Bar                          */
/* ==================================================== */

.top-bar {
    background: linear-gradient(to right, #044e99, #003366);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-family: Arial, sans-serif;
}

.social-icons a {
    color: white;
    font-size: 18px;
    margin-right: 10px;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #ffcc00;
}

.top-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.top-links li {
    position: relative;
    margin-right: 15px;
}

.top-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-links a:hover {
    background-color: white;
    color: #003366;
    border-radius: 4px;
}

.top-links .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #044e99;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1000;
    min-width: 150px;
}

.top-links .dropdown a {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.top-links .dropdown a:last-child {
    border-bottom: none;
}

.top-links li:hover .dropdown {
    display: block;
}

.top-links .aula-virtual {
    border: 1px solid white;
    border-radius: 4px;
    padding: 8px 12px;
}

.top-links .aula-virtual:hover {
    background-color: white;
    color: #003366;
}

/* ==================================================== */
/*                      Header                          */
/* ==================================================== */

.header .social-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 10px;
}

.header .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: white;
    font-size: 18px; 
}

.header .social-icons a:hover {
    background-color: #cd9804;
    transform: scale(1.1);
}

/* ==================================================== */
/*                   Sección Principal                  */
/* ==================================================== */

.header .social-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 10px;
}

.header .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: white;
    font-size: 18px; 
}

.header .social-icons a:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

/* ==================================================== */
/*                      Carreras                        */
/* ==================================================== */

.seccion-carrera {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: Arial, sans-serif;
}

.contenido-principal {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.texto-carrera {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.texto-carrera h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.texto-carrera p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: justify;
}

/* Slider container */
.slider-container {
    flex: 2;
    position: relative;
    overflow: hidden;
}

#imagen-principal {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.controles-slider {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.preview-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0.25rem;
    width: 60px;
}

.preview-control img {
    width: 100%;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.preview-control img.activa {
    opacity: 1;
    border: 2px solid #3b82f6;
}

.barra {
    width: 100%;
    height: 4px;
    background-color: #d1d5db;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    margin-top: 4px;
}

.barra .progreso {
    width: 0;
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.1s linear;
}

.barra.activa .progreso {
    animation: progresoAnimacion 5s linear;
}

.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.slide-out {
    opacity: 0;
    transform: translateX(-20px);
}

.slide-in {
    opacity: 1;
    transform: translateX(0);
}

@keyframes progresoAnimacion {
    0% { width: 0; }
    100% { width: 100%; }
}

/* ==================================================== */
/*                    video content                     */
/* ==================================================== */

.container-v {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 80px 20px;
    min-height: 70vh;
    box-sizing: border-box;
    background-color: var(--primary-color);
    color: white;
}

.video-container {
    flex: 0 0 42.5%;
    max-width: 42.5%;
    padding-right: 20px;
    margin-left: 80px;
}

.video-container video {
    width: 100%;
    height: auto;
    max-height: 42.5vh;
    object-fit: cover;
    border-radius: 15px;
}

.text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-left: 20px;
    overflow-y: auto;
    font-size: 1.1em;
    color: white;
    margin-right: 80px;
    text-align: justify;
}

.text-container h2 {
    color: var(--secondary-color);
}

.seccion-titulo {
    text-align: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 35px;
}

/* ==================================================== */
/*                    Actualidades                      */
/* ==================================================== */

.actualidades {
    padding: 4rem 0;
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.actualidades .section-title {
    color: var(--secondary-color);
}

.container .section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-size: 35px;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.noticia-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    transform: translateY(-5px);
}

.noticia-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.noticia-titulo {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.noticia-resumen {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    text-align: justify;
}

.btn-ver-mas {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.btn-ver-mas:hover {
    background-color: var(--link-color);
    color: var(--primary-color);
}

.noticia-imagen-container {
    width: 100%;
    padding-top: 56.25%;
    position: relative;
    overflow: hidden;
}

.noticia-imagen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================================================== */
/*                      Servicios                       */
/* ==================================================== */

.servicios {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.servicios .container {
    max-width: 1200px;
    height: 600px auto;
    margin: 0 auto;
    padding: 0 20px;
}

.servicios-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.servicio {
    background-color: var(--primary-color);
    /* background-color: rgba(255, 255, 255, 0.1); */
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.servicio:hover {
    transform: translateY(-5px);
}

.servicio i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.servicios h2 {
    color: var(--primary-color);
}

.servicio h3 {
    color: var(--text-color-white);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.servicio p {
    color: var(--text-color-white);
    font-size: 0.9rem;
}

.servicios-ver-mas {
    text-align: center;
}

.servicios-ver-mas .btn-ver-mas {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 600;
    margin-top: 30px;
}

.servicios-ver-mas .btn-ver-mas:hover {
    background-color: var(--primary-color);
}

/* ==================================================== */
/*                Instituciones amigas                  */
/* ==================================================== */

.instituciones-amigas {
    padding: 4rem 0;
    background-color: #ffffff;
}

.instituciones-amigas h2 {
    font-size: 35px;
    color: var(--primary-color);
}

.instituciones-amigas .container {
    max-width: 100%;
    padding: 0 20px;
    overflow-x: auto;
}

.instituciones-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    min-width: min-content;
}

.institucion {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.institucion:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.institucion img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==================================================== */
/*                       Footer                         */
/* ==================================================== */

.footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style-type: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

/* ==================================================== */
/*                    media queries                     */
/* ==================================================== */

@media (max-width: 1200px) {
    .institucion {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 768px) {
    .contenido-principal {
        flex-direction: column;
    }

    .texto-carrera {
        margin-bottom: 1rem;
    }

    .menu-icon {
        display: block;
    }

    .logo img {
        width: 65px;
        height: 65px;
        margin-left: 1.3rem;
    }

    .navbar {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
    }

    .navbar.active {
        display: flex;
    }

    .navbar li {
        margin: 0.5rem 0;
    }

    .container-v {
        flex-direction: column;
        width: 100%;
    }

    .video-container, .text-container {
        flex: 1 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 2rem;
        display: flex;
        margin-left: 40px;
        margin-right: 40px;
    }

    .video-container video {
        max-height: 57.5vh;
    }

    .contenido-principal {
        flex-direction: column;
    }

    .preview-control img {
        height: 35px;
    }

    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .servicios-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .institucion {
        width: 110px;
        height: 110px;
    }

    .instituciones-container {
        justify-content: flex-start;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }

    .servicios-container {
        grid-template-columns: 1fr;
    }

    .instituciones-container {
        gap: 1rem;
    }

    .institucion {
        width: 90px;
        height: 90px;
    }
}
