/* ==================== CONTENEDOR PRINCIPAL ==================== */

.post {
    padding: 2rem 0;
}

.post-container {
    max-width: 820px;
    /* Ancho estándar en posts */
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==================== ANCLAS QUE DAN ESPACIO AL NAVBAR CON LINKS ==================== */

.reading h2,
.reading h3,
.reading h4 {
    scroll-margin-top: 75px;
}

/* ==================== READING BASE ==================== */

.reading {
    font-family: var(--font-cabinet);
    color: var(--color-text-secondary);
}

.reading-lead {
    text-align: justify;
}

.reading h1 {
    font-size: var(--size-font-section-subtitle);
    font-weight: 800;
    letter-spacing: 0.025em;
}

.reading h2 {
    font-size: 2.30rem;
    font-weight: 700;
    margin-top: 2rem;
}

.reading h3 h4 {
    font-size: 1.60rem;
    font-weight: 700;
    margin-top: 1.5rem;
}

.reading p ol ul {
    font-size: var(--size-font-section-subdescription);
    font-weight: 400;
    line-height: 1.5;
}

/* ====== Imágenes intercaladas ====== */
.reading-figure {
    margin: 1.5rem 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.18);
}

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

.reading-caption {
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    opacity: 0.85;
}

/* ==================== MENU DE CONTENIDO ==================== */

.toc {
    padding: 1.0rem;
    margin: 2.0rem 0;
    border-radius: var(--card-radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0px 0px 15px rgba(0, 0, 0, 0.2);
}

.toc-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    /* letter-spacing: 0.25rem; */
}

/* Listas */
.toc-list {
    list-style: none;
    /* Quitamos el estilo nativo porque numeraremos con counters */
    padding: 0;
    /* line-height: 1.75; */
    counter-reset: toc-main;
    /* Counter principal: 1,2,3... */
}

.toc-sublist {
    list-style: none;
    /* Quitamos el estilo nativo porque numeraremos con counters */
    padding: 0;
}

/* Ítems principales: 1., 2., 3., ... */
.toc-list>li {
    position: relative;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    /* Espacio para "1." */
    counter-increment: toc-main;
    counter-reset: toc-sub;
    /* Cada ítem principal reinicia subnumeración */
}

.toc-list>li::before {
    content: counter(toc-main) ".";
    position: absolute;
    left: 0;
    top: 0;
    /* font-weight: 700; */
}

/* Subítems: 5.1, 5.2, ... */
.toc-sublist>li {
    position: relative;
    padding-left: 2.50rem;
    /* Espacio para "1.1" */
    counter-increment: toc-sub;
    /* line-height: 2; */
}

.toc-sublist>li::before {
    content: counter(toc-main) "." counter(toc-sub);
    position: absolute;
    left: 0;
    top: 0;
    /* font-weight: 700; */
}

.toc-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    border-bottom: 1px solid transparent;
    transition:
        /* Controla la velocidad del hover */
        color 0.1s ease,
        font-weight 0.25s ease;
}

.toc-link:hover {
    font-weight: 700;
    color: var(--color-accent-aqua-secondary);
}

/* ==================== CODE BLOKS ==================== */

.code-block {
    border-radius: var(--card-radius);
    overflow: hidden;
    background: var(--color-accent-code-block);
    color: var(--color-text-tertiary);
    margin-top: 0.5rem;
}

.code-block-title {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* Color del encabezado */
.code-block-terminal .code-block-title {
    background: var(--color-accent-code-block);
}

.code-block pre {
    margin: 0;
    padding: 0.5rem;
    overflow: auto;
}

.code-block pre code {
    background: transparent;
    border: 0;
    padding: 0.5rem;
    display: block;
    white-space: pre;
}

/* ==================== CHECKLIST ==================== */

.checklist li {
    margin: 0.5rem 0;
}

/* ==================== CALLOUTS ==================== */

.callout {
    position: relative;
    padding: 1rem 1rem 0.25rem 1rem;
    border-radius: var(--card-radius);
    /* box-shadow: 0px 16px 24px rgba(0, 0, 0, 0.311); */
    box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.92);
}

/* Barra lateral */
.callout::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
    background: currentColor;
}

.callout-title {
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.callout-info {
    color: #6ec1ff;
}

.callout-warning {
    color: #ffbf00;
}

.callout-error {
    color: #ff0000;
}

.callout-success {
    color: #6fcf97;
}

.callout-tip {
    color: #bb86fc;
}