/* VARIABLES GLOBALES         */

:root {
    /* Colores sobrios: azules y grises */
    --color-primario: #1e40af;
    --color-secundario: #3b82f6;
    --color-fondo: #f1f5f9;
    --color-tarjeta: #ffffff;
    --color-texto: #1f2937;
    --color-borde: #e2e8f0;
}

/* SELECTORES BÁSICOS         */

body {
    background-color: var(--color-fondo);
    font-family: 'Merriweather', serif;
    color: var(--color-texto);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

p {
    margin-top: 16px;
}

figure.figura-foto {
    margin: 0;
    width: 50%;
}

figcaption {
    margin-top: 8px;
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: #6b7280;
}

a {
    color: var(--color-secundario);
    text-decoration: none;
}

/* CLASES Y IDs               */

.contenedor-principal {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.contenido-principal {
    flex-grow: 1;
    padding: 50px;
    margin-left: 290px; /* Margen para el menú lateral */
}

.tarjeta-seccion {
    background-color: var(--color-tarjeta);
    padding: 24px;
    margin-bottom: 32px;
}

.titulo-seccion {
    font-size: 32px;
    color: var(--color-primario);
    margin-bottom: 16px;
}

.titulo-principal {
    font-size: 32px;
    color: var(--color-primario);
    margin-bottom: 8px;
    margin-left: 16px;
    text-align: center;
}

.subtitulo-principal {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-secundario);
    margin-bottom: 16px;
    margin-left: 16px;
    text-align: center;
}

.subtitulo-seccion {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-secundario);
    margin-top: 24px;
    margin-bottom: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.oculto {
    display: none;
}

.elemento-centrado {
    text-align: center;
}

.contenedor-banner {
    width: 100%;
    height: 200px;
    margin-bottom: 32px;
    overflow: hidden;
}

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


/* ESTILOS DEL MENÚ LATERAL        */

.menu-lateral {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    background-color: var(--color-primario);
    color: var(--color-tarjeta);
    padding: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.encabezado-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.titulo-menu {
    font-size: 24px;
    font-weight: 700;
}

.navegacion-menu {
    height: 100%;
    overflow-y: auto;
}

.lista-navegacion {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 24px;
}

.enlace-navegacion {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.enlace-navegacion:hover {
    background-color: var(--color-secundario);
}

.enlace-navegacion.activo {
    background-color: var(--color-secundario);
    font-weight: 700;
}

.icono {
    font-size: 18px;
}

.texto-enlace {
    white-space: nowrap;
}

/* TABLA Y LISTA            */

.lista-principios {
    list-style: disc;
    list-style-position: inside;
    margin-top: 16px;
    padding-left: 0;
}

.lista-principios li {
    margin-top: 8px;
}

.contenedor-tabla {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.encabezado-tabla {
    background-color: var(--color-primario);
    color: var(--color-tarjeta);
}

.celda-tabla {
    padding: 16px;
    text-align: left;
    border: 1px solid var(--color-borde);
}

/* GALERÍA DE FOTOS Y ENLACES */

.galeria-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid var(--color-borde);
    background-color: var(--color-fondo);
}

.slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 450px; /* Altura fija para centrar el contenido */
    align-items: center; /* Centrado vertical */
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centrado vertical del contenido del slide */
    height: 100%;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 350px; /* Para que la imagen no sea más grande que el contenedor */
}

.slide figcaption {
    padding: 16px;
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: #6b7280;
    background-color: var(--color-tarjeta);
    width: 100%;
    box-sizing: border-box;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.enlaces-fotos {
    list-style: none;
    padding: 0;
}

.enlaces-fotos li + li {
    margin-top: 12px;
}

/* FORMULARIO               */

.formulario-contacto {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.grupo-formulario {
    margin-bottom: 8px;
}

.grupo-formulario.expandir-2 {
    grid-column: span 1;
}

.etiqueta-formulario {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.entrada-formulario {
    width: 98%;
    padding: 12px;
    border: 1px solid #d1d5db;
    outline: none;
}

.boton-enviar {
    width: 100%;
    background-color: var(--color-secundario);
    color: var(--color-tarjeta);
    padding: 12px 24px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    outline: none;
}

/* ESTILOS DE TRIVIA SIMPLIFICADOS      */
.trivia-container {
    padding: 32px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
}

.question {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primario);
    text-align: center;
    margin-bottom: 1.5rem;
}

.choices {
    display: grid;
    gap: 1rem;
}

.choice-btn {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-borde);
    background-color: var(--color-tarjeta);
    color: var(--color-texto);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: none;
}

.choice-btn.correct-answer {
    background-color: #10b981;
    color: white;
    border-color: #059669;
}

.choice-btn.incorrect-answer {
    background-color: #ef4444;
    color: white;
    border-color: #dc2626;
}

.feedback {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
}

.score-display {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-top: 2rem;
    color: var(--color-primario);
}

#form-message {
    text-align: center;
    font-weight: bold;
    color: #16a34a; /* Un color verde para el mensaje de éxito */
}