/* ============================================================
   global-style.css - Estilos globales base
   SOLO lo que usan TODAS las páginas
   ============================================================ */

/* ---------- VARIABLES CSS ---------- */
:root {
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Arial', 'Helvetica', 'sans-serif';
    --font-heading: 'Georgia', 'Times New Roman', serif;
    
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-xxl: 80px;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --header-height: 60px;
    --max-width: 1200px;
}

/* ---------- RESET Y BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-color);
    font-family: var(--font-serif);
    line-height: 1.7;
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
}

/* ---------- TIPOGRAFÍA ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: .9rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

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

ul, ol {
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

ul ul, ol ol {
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- CONTENEDOR ---------- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ---------- MAIN ---------- */
main {
        padding: 10px;
        min-height: 80vh;  /* Cambiado de 60vh a ... */
    max-width: 100%;  /* ← Asegúrate de que sea 100% */
}
/* ============================================
   INTRO - 
   ============================================ */

/* === PORTADA (100% ancho, título sobreimpreso) === */
.cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.cover-portrait {
    width: 100%;
    height: auto;
    display: block;
}

.cover h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    margin: 0;
    text-align: center;
    width: 90%;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.05em;
}

.cover-subtitle {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-style: italic;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
}

.cover-scroll {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.15em;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}
/* === NOTA AL PIE === */
.notapie {
    font-style: italic;
    padding: 12px 0;
    border-top: 1px solid var(--border-color, #444);
    color: var(--text-muted, #888);
    font-size: 0.9em;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .notapie {
        padding: 10px 0;
        font-size: 0.85em;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .notapie {
        padding: 8px 0;
        font-size: 0.8em;
        margin-top: 12px;
        border-top-width: 1px;
    }
}
/* === CAPÍTULOS === */
.capitulo h1 {
    font-size: 2em;
    text-align: left;
    letter-spacing: 4px;
    color: var(--text-color);
    padding: 0 0 8px 20px;
    margin-bottom: 30px;
    font-family: Georgia, Garamond, "Times New Roman", serif;
    background: transparent;
    border-left: 4px solid var(--accent-primary, #ffb900);
    line-height: 1.3;
}

.capitulo h1 small {
    display: block;
    font-size: 0.5em;
    letter-spacing: 2px;
    color: var(--text-muted, #888);
    font-weight: normal;
    margin-top: 4px;
    font-family: inherit;
}

.capitulo h1 a {
    color: var(--text-color);
    font-size: 0.5em;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.capitulo h1 a:hover {
    opacity: 1;
}
.capitulo h2 {
    font-size: 1.5em;
    text-align: left;
    letter-spacing: 4px;
    color: var(--text-color);
    padding: 0 0 8px 20px;
    margin-bottom: 30px;
    font-family: Georgia, Garamond, "Times New Roman", serif;
    background: transparent;
    border-left: 4px solid var(--accent-primary, #ffb900);
    line-height: 1.3;
}

.capitulo h2 small {
    display: block;
    font-size: 0.5em;
    letter-spacing: 2px;
    color: var(--text-muted, #888);
    font-weight: normal;
    margin-top: 4px;
    font-family: inherit;
}

.capitulo h2 a {
    color: var(--text-color);
    font-size: 0.5em;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.capitulo h2 a:hover {
    opacity: 1;
}
/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {
    .capitulo h1 {
        font-size: 1.8em;
        padding: 0 0 6px 16px;
        border-left-width: 4px;
        margin-bottom: 25px;
    }
    
    .capitulo h1 small {
        font-size: 0.55em;
        letter-spacing: 1.5px;
    }
}

/* Móviles grandes / tablets pequeñas */
@media (max-width: 768px) {
    .capitulo h1 {
        font-size: 1.5em;
        padding: 0 0 6px 14px;
        border-left-width: 3px;
        margin-bottom: 20px;
        letter-spacing: 3px;
    }
    
    .capitulo h1 small {
        font-size: 0.6em;
        letter-spacing: 1px;
        margin-top: 3px;
    }
    
    .capitulo h1 a {
        font-size: 0.6em;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .capitulo h1 {
        font-size: 1.2em;
        padding: 0 0 4px 10px;
        border-left-width: 3px;
        margin-bottom: 16px;
        letter-spacing: 2px;
        line-height: 1.4;
    }
    
    .capitulo h1 small {
        font-size: 0.65em;
        letter-spacing: 0.5px;
        margin-top: 2px;
    }
    
    .capitulo h1 a {
        font-size: 0.7em;
    }
}

/* Pantallas muy grandes (opcional) */
@media (min-width: 1400px) {
    .capitulo h1 {
        font-size: 2.4em;
        padding: 0 0 10px 28px;
        border-left-width: 5px;
        margin-bottom: 35px;
    }
    
    .capitulo h1 small {
        font-size: 0.45em;
        letter-spacing: 3px;
    }
}
/* ============================================
   TEXT ALIGNMENT
   ============================================ */
.left { text-align: left; }
.right { text-align: right; }
.center { display: flex; justify-content: center; }
.center img { display: block; margin-left: auto; margin-right: auto; }
.left + *,
.center + *,
.right + * { text-align: unset; }
/* ============================================
   IMG ALIGNMENT
   ============================================ */
.center img { display: block; margin-left: auto; margin-right: auto; }
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
.cuadl {
    float: left;
    height: auto;
    margin: 0 1.5rem 0.5rem 0;
}
/* ===== HERO ===== */
.hero-section {
    background: #000000;
background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 68, 135, 1) 15%, rgba(0, 68, 135, 1) 100%);
    color: #fff;
    padding: 5px 20px;
    margin: 0px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 12px;
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 12px;
}

.hero-content .logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.hero-content .logo img {
    width: 32px;
    height: 32px;
    display: block;
}

.hero-content h1 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content .logo img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.2rem;
    }
    
    .hero-content .logo img {
        width: 24px;
        height: 24px;
    }
}
/* ===== (INDEX) ===== */
.section-notice {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a2e;
}
.section-title {
    text-align: center;
    color: #1a1a2e;
}
/* ===== MENÚ ===== */
.main-header {
    background-color: var(--bg-content);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px var(--shadow-light);
    height: 40px; /* Altura fija del header */
    display: flex;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    height: 40px; /* Misma altura que el header */
    gap: var(--spacing-sm);
    flex-wrap: nowrap; /* Evita que los elementos salten a otra línea */
}

/* ===== Resto del menú (sin cambios) ===== */
.nav-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: 4px 12px; /* Reducido para que quepa en 40px */
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.9rem; /* Ligeramente más pequeño */
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    white-space: nowrap; /* Evita que los textos del menú se partan */
}

.nav-menu li a:hover {
    color: var(--link-hover);
    background-color: rgba(79, 195, 247, 0.1);
    text-decoration: none;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--link-color);
    transition: all var(--transition);
    transform: translateX(-50%);
}

.nav-menu li a:hover::after {
    width: 60%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

/* ===== Selector de idiomas ===== */
.language-selector select {
    background-color: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    min-width: 100px;
    height: 30px; /* Altura fija para que encaje en 40px */
}

.language-selector select:hover {
    border-color: var(--link-color);
    background-color: var(--bg-content);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

/* ===== Selector de tema ===== */
.theme-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    height: 30px;
}

.theme-checkbox {
    display: none;
}

.theme-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    position: relative;
    padding-left: 40px;
    min-height: 24px;
    height: 24px;
}

.theme-slider {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 18px;
    background: var(--border-color);
    border-radius: 20px;
    transition: all var(--transition);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.theme-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--bg-body);
    border-radius: 50%;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-checkbox:checked + .theme-label .theme-slider {
    background: var(--accent-primary);
}

.theme-checkbox:checked + .theme-label .theme-slider::after {
    transform: translateX(16px);
}

.theme-icon-dark,
.theme-icon-light {
    font-size: 1rem;
    transition: all var(--transition);
    line-height: 1;
}

.theme-checkbox:not(:checked) + .theme-label .theme-icon-light {
    opacity: 0.3;
}

.theme-checkbox:checked + .theme-label .theme-icon-dark {
    opacity: 0.3;
}

/* ============================================================
   RESPONSIVE DEL MENÚ
   ============================================================ */

@media (max-width: 768px) {
    .main-header {
        height: auto;
        min-height: 40px;
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
        height: auto;
        flex-wrap: wrap;
    }

    .nav-left {
        width: 100%;
    }

    .nav-menu {
        justify-content: center;
        gap: var(--spacing-xs);
        flex-wrap: wrap;
    }

    .nav-menu li a {
        padding: 4px 10px;
        font-size: 0.85rem;
        white-space: normal;
    }

    .nav-right {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .language-selector select {
        min-width: 80px;
        font-size: 0.8rem;
        height: 28px;
    }

    .theme-selector {
        height: 28px;
    }

    .theme-label {
        padding-left: 36px;
        min-height: 22px;
        height: 22px;
        font-size: 0.9rem;
    }

    .theme-slider {
        width: 30px;
        height: 16px;
    }

    .theme-slider::after {
        width: 12px;
        height: 12px;
    }

    .theme-checkbox:checked + .theme-label .theme-slider::after {
        transform: translateX(14px);
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu li a {
        width: 100%;
        text-align: center;
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .language-selector select {
        min-width: 70px;
        font-size: 0.75rem;
        height: 26px;
        padding: 2px 6px;
    }

    .theme-label {
        padding-left: 32px;
        min-height: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .theme-slider {
        width: 26px;
        height: 14px;
    }

    .theme-slider::after {
        width: 10px;
        height: 10px;
        top: 2px;
        left: 2px;
    }

    .theme-checkbox:checked + .theme-label .theme-slider::after {
        transform: translateX(12px);
    }
}
/* ============================================================
   FOOTER - new-footer_ES.php
   ============================================================ */

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.site-footer {
    background: #0d0d0d !important;
    color: #e0e0e0 !important;
    padding: 2rem 1rem !important;
    margin-top: 2rem !important;
    border-top: 2px solid #333 !important;
    width: 100% !important;
    clear: both !important;
    display: block !important;
}

/* ============================================================
   FILA 1: TRES COLUMNAS
   ============================================================ */
.footer-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}
.footer-col {
    flex: 1 !important;
    min-width: 200px !important;
}
.footer-col h4 {
    color: #e0e0e0 !important;
    font-size: 1rem !important;
    border-bottom: 1px solid #333 !important;
    padding-bottom: 0.4rem !important;
    font-family: Georgia, serif !important;
}
.footer-col p {
    color: #888 !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
}
.footer-col ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.footer-col ul li {
    margin-bottom: 0.4rem !important;
}
.footer-col ul li a {
    color: #888 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}
.footer-col ul li a:hover {
    color: #4fc3f7 !important;
    text-decoration: underline !important;
}

/* ============================================================
   FILA 2: AUTOR Y LICENCIA
   ============================================================ */
.footer-bottom {
    border-top: 1px solid #333 !important;
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
}
.footer-bottom-content {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}
.footer-bottom-content p {
    color: #888 !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
}
.footer-licencia {
    display: inline-flex;
    align-items: center;
}
.footer-licencia a {
    color: #888 !important;
    text-decoration: none !important;
}
.footer-licencia a:hover {
    color: #4fc3f7 !important;
}
.footer-licencia img {
    vertical-align: middle !important;
    border: 0 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
   .footer-col {
           flex: 1 1 100% !important;
       }

    .footer-col-desc {
        order: 1;
    }
    .footer-col-menu {
        order: 2;
    }
    .footer-col-legal {
        order: 3;
    }
       .footer-bottom-content {
           flex-direction: column !important;
           text-align: center !important;
    }
    .footer-licencia a {
        justify-content: center;
    }
}

@media (max-width: 480px) {
   .site-footer {
           padding: 1.5rem 0.5rem 1rem !important;
    }
    .footer-row {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .footer-col h4 {
        font-size: 0.9rem;
    }
    .footer-col p,
    .footer-col ul li a {
        font-size: 0.75rem !important;
    }

    .footer-bottom-content p {
        font-size: 0.7rem;
    }

    .footer-licencia img {
        width: 70px;
        height: auto;
    }
}
/* ============================================================
   FOOTER - Centrar columnas de menú
   ============================================================ */

/* Aplicar a las columnas que contienen los menús */
.footer-col-menu,
.footer-col-legal {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra horizontalmente el contenido */
}

/* Asegurar que los títulos también estén centrados */
.footer-col-menu h4,
.footer-col-legal h4 {
    text-align: center;
    width: 100%;
}

/* Los <ul> se centran, pero los <li> mantienen su alineación a la izquierda */
.footer-col-menu ul,
.footer-col-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left; /* Mantiene los <li> alineados a la izquierda */
}

/* Opcional: si quieres que los <li> tengan un ancho mínimo para que se vean ordenados */
.footer-col-menu ul li,
.footer-col-legal ul li {
    padding-left: 0;
    margin-bottom: 0.4rem;
}
/* ============================================
   TABLA CLASIFICACIÓN - Estilos
   ============================================ */

.tabla-clasificacion {
    width: 100%;
    max-width: 950px;
    margin: 1rem auto;
    border-collapse: collapse;
    border: 1px solid #999;
    font-size: 0.95rem;
}

/* Cabecera */
.th-cabecera {
    padding: 12px 16px;
    border: 1px solid #999;
    text-align: center;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
}

/* Celdas de datos */
.td-datos {
    padding: 12px 16px;
    border: 1px solid #999;
    vertical-align: middle;
    text-align: center;
}

/* Celdas expandidas (ocupan 3 columnas) */
.td-expandido {
    padding: 16px 20px;
    border: 1px solid #999;
    vertical-align: top;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
}

.h4-expandido {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color:#000;
}

.ol-expandido {
    margin: 0;
    padding-left: 24px;
}

.ol-expandido li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .tabla-clasificacion {
        font-size: 0.85rem;
    }

    .th-cabecera,
    .td-datos,
    .td-expandido {
        padding: 10px 14px;
    }

    .td-expandido {
        padding: 12px 14px;
    }

    .ol-expandido {
        padding-left: 20px;
    }

    .ol-expandido li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tabla-clasificacion {
        font-size: 0.75rem;
    }

    .th-cabecera,
    .td-datos,
    .td-expandido {
        padding: 8px 12px;
    }

    .td-expandido {
        padding: 10px 12px;
    }

    .ol-expandido {
        padding-left: 16px;
    }

    .ol-expandido li {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .h4-expandido {
        font-size: 0.9rem;
    }
}
/* ============================================
   /TABLA CLASIFICACIÓN - Estilos
   ============================================ */
   .note {
       font-family: "Comic Sans MS", "Lucida Handwriting", "Brush Script MT", cursive;
       color: rgb(59, 47, 42);
       background-color: rgb(244, 236, 216);
       max-width: 900px;       
      box-shadow: 0 0 50px var(--shadow-color);
       line-height: 1.8;
       padding: 3rem 4rem;
       margin: 35px auto;
}

/* ============================================
   LISTA DEFINICIÓN - dl/dt/dd
   ============================================ */

/* Cada entrada es un dl independiente */
dl {
  margin: 0;
  padding: 0px 30px 0px 30px;
}

dl.even {
  background: #e0d6bc;
}

dl.odd {
  background: #efefef;
}

/* Fecha + Nombre en la misma línea */
dt {
  font-weight: 700;
  padding: 6px 0 2px 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  display: inline;
}
.document dt {
  color: #3b2f2a;}
/* Espacio entre fecha y nombre */
dt::after {
  content: "  ";
  white-space: pre;
}

/* Descripción */
dd {
  margin: 0;
  padding: 0 0 6px 30px;
  font-size: 15px;
  line-height: 1.6;
  text-align: justify;
  font-family: "Times New Roman", Times, serif;
  display: block;
}
.document dd {
  color: #4a3f35;}
/* ============================================================
   GRID DE LIBROS (grd.php)
   ============================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.libros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    width: 100%;
}

.libro-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: 0 2px 8px var(--shadow-light);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.libro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: var(--link-color);
}

.libro-card .libro-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-content);
}

.libro-card .libro-contenido {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.libro-card .libro-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.libro-card .libro-titulo a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color var(--transition);
}

.libro-card .libro-titulo a:hover {
    color: var(--link-color);
    text-decoration: none;
}

.libro-card .libro-autor {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.libro-card .libro-resumen {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    flex: 1;
    margin-bottom: var(--spacing-md);
}

.libro-card .libro-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.libro-card .libro-meta .libro-leer-mas {
    color: var(--link-color);
    font-weight: 500;
    transition: all var(--transition);
}

.libro-card .libro-meta .libro-leer-mas:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .libros-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .libros-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SECTION NOTICE
   ============================================================ */
/* ===== (INDEX) ===== */
.section-notice {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a2e;
}
.section-title {
    text-align: center;
    color: #1a1a2e;
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.mb-10 { margin-bottom: var(--spacing-sm); }
.mb-20 { margin-bottom: var(--spacing-md); }
.mb-30 { margin-bottom: var(--spacing-lg); }
.mt-10 { margin-top: var(--spacing-sm); }
.mt-20 { margin-top: var(--spacing-md); }
.mt-30 { margin-top: var(--spacing-lg); }
.p-20 { padding: var(--spacing-md); }
.p-30 { padding: var(--spacing-lg); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--link-color);
}

::selection {
    background: var(--link-color);
    color: var(--bg-body);
}
::-moz-selection {
    background: var(--link-color);
    color: var(--bg-body);
}

/* ============================================================
   IMPRESIÓN
   ============================================================ */
@media print {
    .main-header,
    .hero-section,
    .language-selector,
    .theme-selector,
    .nav-right {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}
/* ============================================
   BOTÓN VOLVER A LA FICHA
   ============================================ */
/* ============================================
   BOTÓN VOLVER A LA FICHA (AZUL)
   ============================================ */
.center.button {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}
/* Variante más elegante: borde azul con fondo transparente */
.center.button a {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: transparent;
    color: var(--link-color, #4fc3f7);
    text-decoration: none;
    border: 2px solid var(--link-color, #4fc3f7);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.center.button a:hover {
    background: var(--link-color, #4fc3f7);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.5);
}

/* ============================================
   DOCUMENTO
   ============================================ */
   
.documento {
    font-family: "Times New Roman", Times, serif;
    text-align: justify;
    line-height: 1.8;
    background-color: #f6eee0;
    padding: 10px 80px 60px 80px;
    box-shadow: 0 0 50px var(--shadow-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #1a1a1a;
    width: 100%;
    margin-bottom: 2em;
}

.documento h1, .documento h2, .documento h3, .documento h4, .documento h5, .documento h6,
.documento p, .documento a, .documento strong, .documento .doc-parte, .documento .direccion,
.documento .doc-title, .documento .doc-subtitle {
     color: #1a1a1a;
}

/* Título */
.documento h1 {
  font-size: 28px;
  text-align: center;
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #000000;
  border-bottom: 2px solid #c4b59a;
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.documento h1 small {
    display: block;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: none;
    color: rgb(0, 0, 0);
    margin-top: 4px;
    font-weight: normal;
}
.documento .doc-fecha, .documento .doc-firma p:first-child {
     color: #1a1a1a;
}

.documento .doc-divider {
    color: #999;
    border-color: #ccc;
}

.documento .campo {
    border-bottom-color: #999;
}

.documento .doc-title small {
    color: #555;
}

.doc-title {
    text-align: center;
    font-size: 24px;
    letter-spacing: 6px;
    text-transform: uppercase;
    border-bottom: 2px solid #8aaa8a;
    padding-bottom: 20px;
    margin: 30px 0 20px;
}

.doc-title small {
    display: block;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: none;
    margin-top: 8px;
}

.doc-subtitle {
    text-align: center;
    font-size: 18px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    margin: 30px 0 20px;
}

.doc-fecha {
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
}

.doc-parte {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 25px 0 5px;
}

.doc-compra {
    margin-top: 25px;
}

.doc-divider {
    margin: 30px 0 20px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 12px 0;
}

.campo {
    display: inline-block;
    min-width: 150px;
    border-bottom: 1px dotted #666;
    padding: 0 10px;
}

.direccion {
    display: block;
    padding-left: 20px;
    margin: 2px 0;
    font-size: 13px;
}