/* Estilos Generales */
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900");
@import url("fontawesome-all.min.css");
body,p {
    font-family: "Source Sans Pro", "sans-serif";
    font-weight: 300;
    font-size: 13pt;
    line-height: 1.75em;
    color: #39454b;
    letter-spacing: 0.025em;
}

/* Encabezado */
.page-header {
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 8em 1em 4em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-header h1 {
    font-size: 2.5em;
    margin: 0;
}

/* Contenido Principal */
.content-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2em;
}

.intro-text {
	font-family: "Source Sans Pro", "sans-serif";
    text-align: justify;
    margin-bottom: 2em;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Visor Principal */
.main-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2em;
    position: relative;
}

.image-viewer {
    width: 80%; /* Ancho de la imagen principal */
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

#main-image {
    display: block;
    width: 100%;
    height: auto;
}

.image-caption {
    text-align: center;
    font-size: 0.8em;
    margin: 0.5em 0 0;
    color: #555;
}

/* Flechas de Navegación */
.arrow {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1em 0.5em;
    cursor: pointer;
    font-size: 1.5em;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background 0.3s;
}

.arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 0;
    margin-left: 10px;
}

.next-btn {
    right: 0;
    margin-right: 10px;
}

/* Miniaturas (Thumbnails) */
.thumbnails-container {
    display: grid;
    /* Crea una cuadrícula de 8 columnas por defecto */
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); 
    gap: 10px;
    justify-items: center;
    padding: 1em;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1; /* Para que todas sean cuadradas */
    object-fit: cover;
    border-radius: 10px; /* Esquinas redondeadas */
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, border 0.3s;
    border: 3px solid transparent; /* Para el borde activo */
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active-thumb {
    opacity: 1;
    border: 3px solid #0056b3; /* Borde azul para indicar la selección */
}

/* Responsividad */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8em;
    }
    .arrow {
        font-size: 1.2em;
        padding: 0.8em 0.4em;
    }
    .image-viewer {
        width: 100%;
    }
    .thumbnails-container {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); /* Más pequeñas en móvil */
    }
    .prev-btn {
        left: -15px; /* Mueve las flechas un poco */
    }
    .next-btn {
        right: -15px;
    }
}