/*
Theme Name: Libro B&W
Description: Tema minimalista. Índice estilo libro tradicional.
Version: 1.0.0
Author: Phillipe Calmet Williams
*/

/* --- 1. Reglas Globales Estrictas (Blanco y Negro) --- */
body {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Enlaces: color normal, sin decoración, con borde inferior punteado */
a {
    color: #000000 !important;
    text-decoration: none !important;
    border-bottom: 1px dotted #000000 !important;
    transition: border-bottom-style 0.2s ease, opacity 0.2s ease;
}

a:hover {
    border-bottom-style: solid !important;
    opacity: 0.7;
}

/* --- 2. Estilos específicos para el contenido de los hitos --- */
.libro-contenido p {
    margin-bottom: 1rem;
}

.libro-contenido h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.libro-contenido h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.libro-contenido table {
    margin-bottom: 1rem;
    margin-top: 2rem;
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
}

.libro-contenido table td,
.libro-contenido table th {
    padding: 0.5rem;
    border: 1px dotted #000000;
    text-align: left;
}

.libro-contenido ol {
    list-style: decimal;
    list-style-position: inside;
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.libro-contenido ul,
.libro-contenido nav ul {
    list-style: disc;
    list-style-position: inside;
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.libro-contenido ol li,
.libro-contenido ul li,
.libro-contenido nav ul li {
    margin-bottom: 0.5rem;
}

/* Forzar enlaces de la navegación inyectada por el plugin */
.libro-navegacion a {
    color: #000000 !important;
    border-bottom: 1px dotted #000000 !important;
    text-decoration: none !important;
}
.libro-navegacion a:hover {
    border-bottom-style: solid !important;
}

/* --- 3. Estilos del Índice de Libro (Shortcode) --- */
.tabla-contenido-libro {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0;
}

/* Título de cada capítulo */
.toc-capitulo {
    margin-bottom: 3rem;
    page-break-inside: avoid;
}

.toc-capitulo > h2,
.toc-capitulo > .text-4xl {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: #000000;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #000000;
    letter-spacing: 0.05em;
}

/* Lista de páginas del capítulo */
.toc-capitulo ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-capitulo ul li {
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
}

/* Líder punteado antes del enlace */
.toc-capitulo ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #000000;
    font-weight: 700;
}

.toc-capitulo ul li a {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: #000000;
    border-bottom: 1px dotted #000000;
    display: inline-block;
    padding-bottom: 2px;
}

.toc-capitulo ul li a:hover {
    border-bottom-style: solid;
}

/* Secciones (sub-capítulos) */
.toc-seccion {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid #000000;
}

.toc-seccion h3,
.toc-seccion .text-2xl {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.toc-seccion ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-seccion ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.toc-seccion ul li::before {
    content: '·';
    position: absolute;
    left: 0.5rem;
    color: #000000;
    font-weight: 700;
    font-size: 1.2rem;
}

.toc-seccion ul li a {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: #000000;
    border-bottom: 1px dotted #000000;
}

/* --- 4. Ajustes para el Formulario de Búsqueda --- */
.search-field {
    border-bottom: 1px dotted #000000 !important;
}

.search-field:focus {
    border-bottom: 1px solid #000000 !important;
    outline: none !important;
}

.search-submit {
    border-bottom: none !important;
}

/* Estilos de paginación en blanco y negro */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #000000;
    color: #000000 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #000000 !important;
    transition: all 0.2s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background-color: #000000;
    color: #ffffff !important;
}