/* --- CONFIGURACIÓN GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f7f5f0; /* Tono arena suave */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: scroll;
}

/* --- CABECERA ESTILO ARCHIVO HISTÓRICO --- */
.main-header {
    background-color: #ffffff; /* Fondo blanco limpio */
    padding: 30px 20px 15px 20px;
    border-bottom: 1px solid #e8e4db;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.main-header .site-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 3.2rem;
    color: #777777;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.main-header .site-subtitle {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #999999;
    margin-top: 12px;
    margin-bottom: 0;
    font-style: italic;
}

/* --- MENÚ DE NAVEGACIÓN --- */
.main-nav {
    background-color: #1b365d; /* Azul profundo heráldico/naval */
    padding: 0;
    border-bottom: 3px solid #c5a059; /* Línea dorada */
    position: relative;
    z-index: 100;
}

.nav-links {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    padding: 0 20px;
}

.nav-links li a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: #c5a059; /* Dorado al pasar por encima o estar activo */
    color: #ffffff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 15px 20px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

/* --- CUERPO PRINCIPAL (ESTRUCTURA DE TABLA TRADICIONAL) --- */
.main-container {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 20px;
    display: table;
    width: 100%;
    table-layout: fixed;
    flex: 1;
}

/* --- SECCIÓN DE CONTENIDO --- */
.content-area {
    display: table-cell;
    width: 75%;
    vertical-align: top;
    padding-right: 30px;
}

.web-section {
    background-color: #ffffff;
    padding: 40px;
    border: 1px solid #e8e4db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.web-section h2 {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    color: #1b365d;
    margin-bottom: 20px;
    font-weight: normal;
    border-bottom: 1px solid #e8e4db;
    padding-bottom: 10px;
}

.web-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444444;
    margin-bottom: 20px;
}

.web-section .subtitle {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #666666;
    margin-top: -15px;
    margin-bottom: 30px;
}

/* --- COLUMNA LATERAL (SIDEBAR) --- */
.sidebar {
    display: table-cell;
    width: 25%;
    vertical-align: top;
    background-color: #ffffff;
    padding: 30px 20px;
    border: 1px solid #e8e4db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar h3 {
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    color: #1b365d;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c5a059;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links li a {
    color: #555555;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quick-links li a:hover {
    background-color: #f7f5f0;
    color: #1b365d;
    padding-left: 12px;
}

/* --- BOTONES --- */
.btn-primary {
    background-color: #1b365d;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #c5a059;
}

/* --- PIE DE PÁGINA --- */
.main-footer {
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e8e4db;
    margin-top: auto;
}

.main-footer p {
    font-size: 0.85rem;
    color: #888888;
}

/* --- MAQUETACIÓN DE FILAS Y TARJETAS EN SUCEDIÓ.HTML --- */
.editoriales-container-table {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 20px;
    margin-top: -20px;
}

.editorial-row {
    display: table-row;
}

.editorial-col {
    display: table-cell;
    width: 100%;
    vertical-align: top;
    padding: 0;
}

.editorial-title {
    font-family: 'Georgia', serif;
    font-size: 1.4rem;
    color: #1b365d;
    margin-bottom: 5px;
    font-weight: normal;
}

.editorial-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px !important;
    font-style: italic;
}

.book-card-mini {
    background: #ffffff;
    border: 1px solid #e8e4db;
    padding: 15px;
    position: relative;
    min-height: 180px;
    transition: all 0.2s ease;
}

.book-cover-mini {
    width: 110px;
    height: 150px;
    background-color: #eaeaea;
    float: left;
    border: 1px solid #dcd7ca;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.book-cover-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-col:first-child .book-info-mini {
    margin-left: 135px;
}

.editorial-col:last-child .book-info-mini {
    margin-left: 145px;
}

.book-info-mini h4 {
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 6px;
}

.book-info-mini p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #555;
    margin-bottom: 8px;
}

.book-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 5px;
}

.book-card-link:hover .book-card-mini {
    background-color: #f2eee4 !important;
    border-color: #c5a059 !important;
    transform: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .main-container,
    .content-area,
    .sidebar,
    .editoriales-container-table,
    .editorial-row,
    .editorial-col {
        display: block !important;
        width: 100% !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .sidebar {
        margin-top: 25px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}
.featured-image-box img {
  width: 100%;       /* Obliga a la imagen a ocupar el 100% del ancho disponible */
  height: auto;      /* Mantiene la proporción original para que no se "aplane" o "estire" */
  display: block;
}
/* =========================================================================
   NUEVO ESTILO: LISTADO COMPACTO DE DOCUMENTOS (ESTILO ÍNDICE DE LEGAJO)
   ========================================================================= */
   .tabla-documentos {
       display: flex;
       flex-direction: column;
       background-color: #fff;
       border: 1px solid #e8e4db;
       border-radius: 6px;
       box-shadow: 0 2px 8px rgba(0,0,0,0.04);
       margin-top: 25px;
       overflow: hidden;
       width: 100%; /* Ocupa el 100% de la columna izquierda asignada */
   }

.fila-documento {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f0ea;
    transition: background-color 0.2s ease;
}

/* Evitamos el borde en la última línea */
.fila-documento:last-child {
    border-bottom: none;
}

/* Efecto sutil al pasar el ratón por la fila */
.fila-documento:hover {
    background-color: #faf9f6;
}

/* Columna 1: Fecha destacada */
.fecha-lista {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    font-weight: bold;
    color: #c5a059; /* El dorado corporativo de tu web */
    min-width: 100px;
    flex-shrink: 0;
}

/* Columna 2: Título y descripción compacta */
.info-lista {
    flex-grow: 1;
    padding: 0 20px;
}

.info-lista h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #2b2b2b;
    font-family: 'Georgia', serif;
}

.info-lista p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Columna 3: Botón de acción discreto */
.accion-lista {
    flex-shrink: 0;
}

.btn-lista {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #c5a059;
    text-decoration: none;
    border: 1px solid #e2dacb;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
}

.btn-lista:hover {
    background-color: #c5a059;
    color: #fff;
    border-color: #c5a059;
}

/* Adaptación para pantallas de móvil (se vuelve tarjeta automáticamente) */
@media (max-width: 768px) {
    .fila-documento {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    .info-lista {
        padding: 0;
    }
    .btn-lista {
        width: 100%;
        text-align: center;
    }
}
