/* Estilos generales */
body {
    background-color: #f8f8ff;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 20px;
    scroll-behavior: smooth;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 2px 4px 25px rgba(18, 114, 172, 0.4);
}

/* Header con imágenes horizontales */
header {
    text-align: center;
    border-bottom: 5px solid #fabd30;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header-text {
    margin-bottom: 30px;
}

.header-images {
    display: flex;
    flex-direction: row; /* Imágenes en horizontal */
    justify-content: center; /* Centra las imágenes horizontalmente */
    align-items: center; /* Alinea las imágenes verticalmente */
    gap: 40px; /* Espacio entre las imágenes */
    margin-bottom: 20px;
    flex-wrap: wrap; /* Permite que las imágenes se adapten en móviles */
}

/* Contenedor de cada imagen */
.image-container {
    display: inline-block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Efecto hover suave para las imágenes - SOLO MOVIMIENTO */
.image-container:hover {
    transform: translateY(-8px);
}

/* Estilos de las imágenes - MISMO TAMAÑO */
.escudo, .virgen {
    width: 350px; /* MISMO TAMAÑO para ambas imágenes */
    height: 350px; /* Altura fija para mantener proporción cuadrada */
    object-fit: contain; /* Mantiene la proporción de la imagen */
    box-shadow: 2px 4px 25px rgba(18, 114, 172, 0.4);
    border-radius: 8px;
    transition: transform 0.4s ease;
}

/* Títulos */
h1, h2 {
    color: #1272ac;
    margin: 0.2em 0;
}

h1 {
    font-size: 1.8em;
    margin-bottom: 0.3em;
}

h2 {
    font-size: 1.3em;
    margin-top: 0;
}

h3 {
    color: #1272ac;
    border-bottom: 2px solid #fabd30;
    padding-bottom: 5px;
}

h4 {
    color: #333;
    font-weight: bold;
}

/* Estilos para la lista de contenido */
.toc-list {
    list-style-type: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    text-decoration: none;
    color: #1272ac;
    font-weight: bold;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.toc-list a:hover {
    text-decoration: underline;
    color: #fabd30;
    background-color: #f0f8ff;
}

/* Otros estilos */
blockquote {
    background: #f0f8ff;
    border-left: 5px solid #1272ac;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #1272ac;
    color: white;
}

ul, ol {
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

#bibliografia p {
    margin-bottom: 1em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-images {
        flex-direction: column; /* Imágenes en vertical en móviles */
        gap: 30px;
    }
    
    .escudo, .virgen {
        width: 280px;
        height: 280px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .escudo, .virgen {
        width: 250px;
        height: 250px;
    }
    
    h1 {
        font-size: 1.3em;
    }
    
    h2 {
        font-size: 1.1em;
    }
}

/* --- NUEVOS ESTILOS --- */
/* Estilos para el botón "Subir al inicio" */
.subir-inicio {
    display: block;
    text-align: right;
    margin-top: 15px;
    font-weight: bold;
    color: #1272ac;
    text-decoration: none;
    transition: color 0.3s;
}

.subir-inicio:hover {
    color: #fabd30;
    text-decoration: underline;
}