/* Baseframe 0.19.2 — editorial presentation, mobile first. */

.bf-document {
    margin-inline: auto;
    color: #262626;
}

.bf-opening {
    margin-bottom: 1.75rem;
}

.bf-section {
    margin-inline: 0;
    padding: 2rem 0;
}

.bf-section + .bf-section {
    margin-top: 0;
}

.bf-section--soft {
    background: #f7f7f7;
}

.bf-section--plain {
    background: #fff;
}

.bf-section__inner {
    width: 100%;
    margin-inline: auto;
}


.bf-section__heading {
    margin: 0 0 1.15rem;
    font-size: 1.5rem;
    line-height: 1.22;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.bf-closing {
    margin-top: 0;
    padding-top: 2rem;
}

.bf-block {
    margin-bottom: 1.1rem;
}

.bf-opening .bf-block.bf-block--paragraph{
    padding:12px;
}

.bf-block:last-child {
    margin-bottom: 0;
}

.bf-block__lead,
.bf-block--note > p {
    margin-bottom: .65rem;
}

.bf-block--bullets ul,
.bf-block--numbered-steps ol,
.bf-block--checklist ul {
    margin-top: 0;
    margin-bottom: 0;
}

.bf-block--note {
    padding: 1rem 1.15rem;
    border-left: 3px solid currentColor;
}

.bf-block--note > p:last-child {
    margin-bottom: 0;
}

.bf-block--checklist ul {
    list-style: none;
    padding-left: 0;
}
.bf-block--numbered-steps ol{
    margin: 0 0 1em 1em;
}
.bf-block--checklist ol, 
.bf-block--checklist ul{
    margin: 0 0 0.5em .5em;
}

.bf-block--checklist li {
    position: relative;
    padding-left: 1.65rem;
}

.bf-block--checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
}

/* Editorial image/content layout: one column by default. */
.bf-content-with-visual {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

.bf-content-with-visual__media,
.bf-content-with-visual__content {
    min-width: 0;
}

.bf-content-with-visual__media {
    align-self: center;
}

.bf-visual {
    margin: 0;
}

.bf-visual__link {
    display: block;
}

.bf-visual__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    margin-inline: auto;
}

/* Tablet / desktop enhancements. */
@media (min-width: 769px) {
    .bf-opening {
        margin-bottom: 2rem;
    }

    .bf-section--text > .bf-section__inner {
        width: 90%;
    }

    .bf-section--visual > .bf-section__inner {
        width: 100%;
    }

    .bf-section {
        margin-inline: 0;
        padding: 2.5rem 0;
    }

    .bf-section__heading {
        margin-bottom: 1.25rem;
        font-size: 1.75rem;
    }

    .bf-content-with-visual {
        gap: 2rem;
        margin-bottom: 1.5rem;
    }

    .bf-content-with-visual--1-3 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }

    .bf-content-with-visual--1-3.bf-content-with-visual--media-right {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

    .bf-content-with-visual--media-right .bf-content-with-visual__content {
        grid-column: 1;
        grid-row: 1;
    }

    .bf-content-with-visual--media-right .bf-content-with-visual__media {
        grid-column: 2;
        grid-row: 1;
    }

    .bf-visual__image {
        max-height: 500px;
    }
}

@media (min-width: 1100px) {
    .bf-section {
        margin-inline: 0;
        padding-inline: 0;
    }
}

/* Editorial paragraph disclosure. Content stays in initial HTML and remains
 * visible without JS; JS adds .bf-fold-ready after initialization. */
.bf-fold-ready .bf-fold-extra:not(.bf-fold-extra--open) { display: none; }
.bf-fold-toggle { display: none; appearance: none; background: transparent; border: 0; box-shadow: none; padding: 7px 0; margin: 3px 0 12px; color: #536471; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; }
.bf-fold-ready .bf-fold-toggle { display: inline-block; }
.bf-fold-toggle:hover, .bf-fold-toggle:focus-visible { color: #1d9bf0; text-decoration: underline; }



/* Agregar a style.css del child theme; sólo afecta archivos category. */
.category .bf-category-page--grouped { width:100%; }
.category .bf-category-groups { display:grid; gap:32px; margin:30px 0 36px; }
.category .bf-category-group { padding:26px; background:#f7f8f9; border:1px solid #eceff0; border-radius:16px; }
.category .bf-category-group__header { display:flex; align-items:start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.category .bf-category-group__header h2 { margin:0 0 5px; font-size:clamp(20px,2vw,25px); line-height:1.3; }
.category .bf-category-group__header h2 a { color:#222; text-decoration:none; }
.category .bf-category-group__header h2 a:hover { text-decoration:underline; }
.category .bf-category-group__description { margin:0; color:#616971; line-height:1.5; }
.category .bf-category-group__more { flex:none; color:#354b40; font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap; }
.category .bf-category-group__more:hover { text-decoration:underline; }
.category .bf-category-group__children { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.category .bf-category-group__children a { padding:6px 11px; background:#fff; border:1px solid #e3e7e5; border-radius:100px; color:#43534a; text-decoration:none; font-size:13px; }
.category .bf-category-group__children a:hover { background:#edf1ee; }
.category .bf-category-group__posts {display:grid;grid-template-columns: repeat(3,minmax(0,1fr));gap: 10px;}
.category .bf-category-group__posts .bf-category-card { min-width:0; background:#fff; border-radius:10px; overflow:hidden; }
.category .bf-category-group__posts .bf-category-card__media img {display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius: 0;}
.category .bf-category-group__posts .bf-category-card h3 {font-size:15px;line-height:1.45;padding: 6px 8px 0;margin:0;}
.category .bf-category-group__posts .bf-category-card__excerpt {font-size:13px;line-height:1.5;padding: 6px 6px 6px;margin:0;color:#667078;}
.category .bf-category-group__empty { color:#667078; margin:0; font-size:14px; }
.category .bf-category-direct { margin:30px 0; }
.category .bf-category-direct > h2 { font-size:23px; margin-bottom:20px; }
@media (max-width:900px) { .category .bf-category-group__posts { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* ======================================================
   BASEFRAME — CATEGORÍAS EN MÓVIL
   Tarjetas horizontales, compactas y desplazables
   ====================================================== */

@media (max-width: 600px) {

    .category .bf-category-groups {
        gap: 18px;
    }

    .category .bf-category-group {
        padding: 12px;
        border-radius: 12px;
        min-width: 0;
    }

    .category .bf-category-group__header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 14px;
    }

    .category .bf-category-group__header h2 {
        font-size: 20px;
        line-height: 1.25;
    }

    .category .bf-category-group__description {
        font-size: 13px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .category .bf-category-group__more {
        align-self: flex-start;
        font-size: 13px;
    }

    /* Carrusel horizontal */
    .category .bf-category-group__posts {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;

        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;

        padding: 0 0 8px;
        scrollbar-width: thin;
    }

    /* Una tarjeta y parte de la siguiente */
    .category .bf-category-group__posts .bf-category-card {
        flex: 0 0 72%;
        width: 72%;
        min-width: 0;
        scroll-snap-align: start;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
        padding-bottom: 35px !important;
    }

    .category .bf-category-group__posts .bf-category-card__media img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        display: block;
    }

    .category .bf-category-group__posts .bf-category-card h3 {
        font-size: 14px;
        line-height: 1.4;
        padding: 10px 10px 12px;
        margin: 0;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    /* El excerpt se conserva en HTML, pero se oculta en móvil */
    .category .bf-category-group__posts .bf-category-card__excerpt {
        display: none;
    }

}



/* ==========================================
   BASEFRAME — PUBLICACIONES RELACIONADAS
   ========================================== */

.single-post .bf-related {
    width: 100%;
    max-width: 1200px;
    margin: 32px auto 48px;
    padding: 24px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 14px;
}

.single-post .bf-related > h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #333;
}

/* Desktop: 3 columnas */
.single-post .bf-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.single-post .bf-related__item {
    display: block;
    min-width: 0;
    color: #333;
    text-decoration: none;
}

.single-post .bf-related__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.single-post .bf-related__item h3 {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
}

.single-post .bf-related__item:hover h3 {
    color: #53684c;
}

/* Mobile: una columna */
@media (max-width: 767px) {
    .single-post .bf-related {
        padding: 16px 12px;
        margin: 24px auto 32px;
        border-radius: 12px;
    }

    .single-post .bf-related__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .single-post .bf-related > h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }
}