
/* Importar la fuente de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Para un desplazamiento suave al hacer clic en los enlaces del menú */
html {
    scroll-behavior: smooth;
}

/* -------------------------------------- */
/* ESTILOS GLOBALES Y BORDES LATERALES    */
/* -------------------------------------- */
body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    
    position: relative; /* ¡Importante para los bordes! */
    width: 100%;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 60px;
    background: linear-gradient(180deg, #003366, #0056b3, #ff9900);
    border-radius: 0 50% 50% 0;
    z-index: -1;
    opacity: 0.7;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 60px;
    background: linear-gradient(180deg, #003366, #0056b3, #ff9900);
    border-radius: 50% 0 0 50%;
    z-index: -1;
    opacity: 0.7;
}

/* -------------------------------------- */
/* ESTILOS DEL ENCABEZADO Y NAVEGACIÓN    */
/* -------------------------------------- */
header {
    background-color: #003366;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.header-container {
    padding: 0 20px;
}

.header-content h1 {
    font-size: 2.5em;
    margin: 0;
}

.header-content p {
    font-size: 1.2em;
    margin-top: 5px;
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.uabcs-logo {
    width: 80px;
    height: auto;
    margin: 0 10px;
}

.logo-extra img {
    height: 60px;
    width: auto;
    margin: 0 10px;
}

.main-nav {
    background-color: #0056b3;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #ff9900;
}

/* -------------------------------------- */
/* ESTILOS DE SECCIONES GENERALES         */
/* -------------------------------------- */
section {
    padding: 50px 20px;
    text-align: center;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #003366;
    font-size: 2em;
    margin-bottom: 20px;
}

.cta-button {
    background-color: #0056b3;
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #003c7d;
}

/* -------------------------------------- */
/* SECCIONES ESPECÍFICAS                  */
/* -------------------------------------- */
#introduccion {
    background-color: #f0f8ff;
}

#informacion {
    background-color: #ffffff;
}

.info-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-item {
    margin: 10px;
    max-width: 250px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f7f7f7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid #0056b3;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.info-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #003366;
    margin-top: 0;
}

.info-icon {
    font-size: 2.5em;
    color: #ff9900;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.info-item:hover .info-icon {
    transform: scale(1.2);
}

#ubicacion {
    padding: 50px 0;
    text-align: center;
}

.map-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border-radius: 8px;
}

#temas {
    background-color: #f7f7f7;
}

.temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
    justify-content: center;
}

.tema-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tema-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.tema-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #003366;
    font-size: 1.5em;
    margin-top: 0;
}

/*
 * Este es el código que organiza las fotos en una cuadrícula.
 * Por favor, asegúrate de que tu HTML tenga las clases .gallery-container
 * y .gallery-item para que funcione correctamente.
 */

/* 1. Contenedor principal de la galería. Aquí es donde definimos la cuadrícula. */
.gallery-container {
    display: grid;
    /* La clave para la cuadrícula: crea columnas que se ajustan automáticamente. */
    grid-template-columns: repeat(3, 1fr);
    /* Espacio entre las fotos. */
    gap: 15px;
    margin: 0 auto;
    max-width: 1000px; /* O el ancho que prefieras */
}

/* 2. Estilos para cada ítem individual de la galería. */
.gallery-item {
    overflow: hidden; /* Oculta cualquier parte de la imagen que se salga */
    border-radius: 8px; /* Bordes redondeados */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Sombra suave para un efecto de tarjeta */
    transition: transform 0.3s ease; /* Transición suave para el efecto hover */
    cursor: pointer; /* Cambia el cursor para indicar que es clickeable */
}

/* 3. Estilos para la imagen dentro de cada ítem. */
.gallery-item img {
    width: 100%; /* La imagen ocupa todo el ancho de su contenedor (.gallery-item) */
    height: 200px; /* **ALTURA FIJA:** Todas las imágenes serán de 150px de alto. */
    object-fit: cover; /* **MANTIENE LA PROPORCIÓN:** Evita que las imágenes se deformen. */
    display: block; /* Elimina cualquier espacio extra debajo de la imagen. */
}

/* 4. Efecto de zoom al pasar el mouse sobre el ítem. */
.gallery-item:hover {
    transform: scale(1.05);
}
#participacion {
    background-color: #ffffff;
}

footer {
    background-color: #333333;
    color: #ffffff;
    text-align: center;
    padding: 20px;
}

footer p {
    margin: 0;
}

/* -------------------------------------- */
/* ANIMACIONES AL HACER SCROLL            */
/* -------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------- */
/* BOTÓN BACK TO TOP                      */
/* -------------------------------------- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 40px;
    color: #0056b3;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* -------------------------------------- */
/* MEDIA QUERIES para diseño responsivo   */
/* -------------------------------------- */
@media (max-width: 768px) {
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav li {
        margin: 5px 10px;
    }

    h1 {
        font-size: 2em;
    }
}

@media (max-width: 600px) {
    .header-content h1 {
        font-size: 1.8em;
    }

    .header-content p {
        font-size: 1em;
    }

    .info-item {
        max-width: 100%;
    }

    .main-nav li {
        margin: 5px;
    }

    .main-nav a {
        font-size: 0.9em;
    }
}
