/* ============================================================
   Insight archive — the listing that fills the content slot of the
   insight archive template. Everything is scoped to
   .fab-insight-archive; the hero above and the CTA / newsletter below
   are template-zone BLOCKS, not this bundle.
   ============================================================ */

.fab-insight-archive {
    font-family: var(--fabrement-font-body, "DM Sans", sans-serif);
    color: var(--fabrement-text, #455060);
}

/* This site leaves --fabrement-pad-inline and --fabrement-content-max undefined, so the
   platform's .fabrement-block-inner falls back to 1440px with NO side gutter, while the
   header and footer blocks set 1360px / 20px themselves. Same restatement as the
   single-insight bundle; drop it if the site ever defines those variables. */
.fab-insight-archive .fabrement-block-inner {
    max-width: 1360px;
    padding-inline: 20px;
}

.fab-insight-archive .fia-list {
    background: var(--fabrement-surface, #ffffff);
    padding: 90px 0;
}

/* ---------- grid ---------- */

.fab-insight-archive .fia-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 40px;
}

.fab-insight-archive .fia-card {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 20px;
    align-items: start;
}

/* a post with no featured image gives its text the whole row rather than
   leaving a hole where the thumbnail would be */
.fab-insight-archive .fia-card--nomedia {
    grid-template-columns: minmax(0, 1fr);
}

.fab-insight-archive .fia-card-media {
    display: block;
    overflow: hidden;
    min-width: 0;
}

.fab-insight-archive .fia-card-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 420ms ease-out;
}

.fab-insight-archive .fia-card:hover .fia-card-img {
    transform: scale(1.04);
}

.fab-insight-archive .fia-card-text {
    min-width: 0;
}

.fab-insight-archive .fia-card-meta {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.45;
    color: var(--fabrement-text-muted, #9aa3af);
}

.fab-insight-archive .fia-card-link {
    text-decoration: none;
}

.fab-insight-archive .fia-card-title {
    margin: 0;
    font-family: var(--fabrement-font-heading, "DM Sans", sans-serif);
    font-size: clamp(18px, 1.8vw, 24px);
    font-weight: 600;
    line-height: 1.28;
    color: var(--fabrement-heading, #1d3557);
    transition: opacity 300ms ease;
}

.fab-insight-archive .fia-card-link:hover .fia-card-title,
.fab-insight-archive .fia-card-link:focus-visible .fia-card-title {
    opacity: 0.7;
}

/* ---------- empty state ---------- */

.fab-insight-archive .fia-empty {
    margin: 0;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.44;
    color: var(--fabrement-text, #455060);
}

/* ---------- pagination ----------
   the_posts_pagination() prints nothing at all when there is only one page,
   so these rules simply never apply on a short archive. */

.fab-insight-archive .pagination {
    margin-top: 70px;
}

.fab-insight-archive .pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fab-insight-archive .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(29, 53, 87, 0.18);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: var(--fabrement-heading, #1d3557);
    text-decoration: none;
    transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.fab-insight-archive .pagination a.page-numbers:hover,
.fab-insight-archive .pagination a.page-numbers:focus-visible {
    background: var(--fabrement-secondary, #c7d3a5);
    border-color: var(--fabrement-secondary, #c7d3a5);
}

.fab-insight-archive .pagination .page-numbers.current {
    background: var(--fabrement-primary, #1d3557);
    border-color: var(--fabrement-primary, #1d3557);
    color: var(--fabrement-text-inverse, #ffffff);
}

.fab-insight-archive .pagination .page-numbers.dots {
    border-color: transparent;
    min-width: 24px;
    padding: 0;
}

.fab-insight-archive .fia-pg-ic {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.fab-insight-archive .fia-pg-back svg {
    transform: rotate(180deg);
}

.fab-insight-archive .fia-pg-ic svg {
    display: block;
}

/* WordPress prints the pagination's own <h2 class="screen-reader-text">; this site's
   frame does not define that class, so without this the label renders as a visible
   heading above the page numbers. */
.fab-insight-archive .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- focus ---------- */

.fab-insight-archive a:focus-visible {
    outline: 2px solid var(--fabrement-heading, #1d3557);
    outline-offset: 3px;
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
    .fab-insight-archive .fia-list {
        padding: 56px 0;
    }

    .fab-insight-archive .fia-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }
}

@media (max-width: 781px) {
    .fab-insight-archive .fia-list {
        padding: 40px 0;
    }

    .fab-insight-archive .fia-card {
        gap: 16px;
    }

    .fab-insight-archive .pagination {
        margin-top: 40px;
    }

    .fab-insight-archive .fia-pg-lbl {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fab-insight-archive .fia-card-img,
    .fab-insight-archive .fia-card-title,
    .fab-insight-archive .pagination .page-numbers {
        transition: none;
    }

    .fab-insight-archive .fia-card:hover .fia-card-img {
        transform: none;
    }
}
