/* FP Posts: structure only, the look comes from widget controls */
.fp-posts__grid {
    --fp-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--fp-cols), minmax(0, 1fr));
    gap: 32px 24px;
}

/* Whole card is clickable through the title link; the category link sits above it */
.fp-posts__card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s;
}
.fp-posts__title a::after { content: ""; position: absolute; inset: 0; }
.fp-posts__cat { position: relative; z-index: 1; }
.fp-posts__card:focus-within { outline: 2px solid currentColor; outline-offset: 2px; }
.fp-posts__title a:focus-visible { outline: none; }

.fp-posts__media { display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.fp-posts__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.fp-posts--zoom-yes .fp-posts__card:hover .fp-posts__image { transform: scale(1.04); }

.fp-posts__body { display: flex; flex-direction: column; flex-grow: 1; gap: 8px; padding: 16px 0 0; }
.fp-posts__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; font-size: .875em; }
.fp-posts__meta a { color: inherit; text-decoration: none; }
.fp-posts__title { margin: 0; }
.fp-posts__title a { color: inherit; text-decoration: none; }
.fp-posts__excerpt { margin: 0; }
/* Pinned to the bottom so a row of cards lines up */
.fp-posts__more { margin-top: auto; font-weight: 600; text-decoration: none; color: inherit; }

/* Filter and pagination share the pill layout */
.fp-posts__filter { margin-bottom: 32px; }
.fp-posts__pagination { margin-top: 40px; }
.fp-posts__filter ul,
.fp-posts__pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.fp-posts__filter-link,
.fp-posts__pagination .page-numbers:not(ul) {
    display: inline-block;
    padding: .45em .9em;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
    transition: color .2s, background-color .2s, border-color .2s;
}
.fp-posts__filter-link[aria-current],
.fp-posts__pagination .page-numbers[aria-current] { font-weight: 700; }
.fp-posts__pagination .dots { border-color: transparent; }

@media (max-width: 767px) {
    .fp-posts--filter-scroll-yes .fp-posts__filter ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .fp-posts--filter-scroll-yes .fp-posts__filter li { flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .fp-posts__card, .fp-posts__image, .fp-posts__filter-link, .fp-posts__pagination .page-numbers { transition: none; }
    .fp-posts--zoom-yes .fp-posts__card:hover .fp-posts__image { transform: none; }
}
