/* ==========================================================================
   COMPONENTE · Listado del blog (archivo): filtros + rejilla + paginación
   Enfoque Mobile-First. Valores fieles al CSS de Figma (Blog · Sección 2).
   ========================================================================== */

.blist-block {
    padding: var(--pt-m, 40px) 0 var(--pb-m, 56px);
    background-color: #FFFFFF;
    box-sizing: border-box;
    font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}

.blist-block .sec-custom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* ---- Encabezado + filtros ---- */
.blist-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.blist-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.blist-tagline {
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: 2.16px;
    text-transform: uppercase;
}

.blist-heading {
    margin: 0;
    font-weight: 600;
    font-size: 26px;                /* móvil; 32px en escritorio */
    line-height: 120%;
    letter-spacing: -0.72px;
    color: #27292B;
}

/* ---- Filtros (pills) ---- */
.blist-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 16px;
    width: 100%;
}

.blist-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid #D7D9DB;
    border-radius: 60px;
    background: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.45px;
    color: #6C7981;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blist-pill:hover {
    border-color: #006491;
    color: #27292B;
}

.blist-pill.is-active {
    background: #EAF4FA;
    border-color: #006491;
    color: #27292B;
}

/* ---- Contenedor de resultados (se reemplaza vía AJAX) ---- */
.blist-results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    transition: opacity 0.2s ease;
}

.blist-results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Rejilla (móvil: 1 columna) ---- */
.blist-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 30px;
    width: 100%;
}

/* ---- Tarjeta ---- */
.blist-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.blist-card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 453 / 283;
    border-radius: 23px;
    background-color: #EAF4FA;      /* fallback si no hay imagen */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.blist-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    padding: 4px 16px;
    background: #EAF4FA;
    border-radius: 12px;
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.45px;
    color: #006491;
}

.blist-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.blist-card-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.blist-card-title {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    line-height: 140%;
    letter-spacing: -0.3px;
    color: #27292B;
}

.blist-card-title a {
    color: inherit;
    text-decoration: none;
}

.blist-card-title a:hover {
    color: #006491;
}

.blist-card-excerpt {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.45px;
    color: #6C7981;
    /* Máximo 2 líneas, con puntos suspensivos si sobra */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blist-card-link {
    font-weight: 500;
    font-size: 14px;
    line-height: 110%;
    letter-spacing: -0.154px;
    color: #006491;
    text-decoration: none;
}

.blist-card-link span {
    transition: transform 0.2s ease;
    display: inline-block;
}

.blist-card-link:hover span {
    transform: translateX(4px);
}

/* ---- Paginación ---- */
.blist-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
}

.blist-page,
.blist-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.45px;
    color: #27292B;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blist-page:hover,
.blist-arrow:not(.is-disabled):hover {
    background: #EAF4FA;
}

.blist-page.is-active {
    background: #006491;
    color: #FFFFFF;
}

.blist-arrow.is-disabled {
    color: #A1A6AA;
    cursor: default;
}

.blist-empty {
    font-size: 16px;
    color: #6C7981;
}

/* ==========================================================================
   Tablet (≥600px): 2 columnas
   ========================================================================== */
@media (min-width: 600px) {
    .blist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Escritorio (≥992px): 3 columnas + título mayor
   ========================================================================== */
@media (min-width: 992px) {
    .blist-block {
        padding: var(--pt-d, 80px) 0 var(--pb-d, 100px);
    }

    .blist-heading {
        font-size: 32px;
    }

    .blist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
