/* Component: filterable post listing (template-parts/components/post-filter.php). */

.post-filter { padding: 70px 0 0; background-color: var(--c-white); }
.post-filter__inner { padding-inline: 10px; }
.post-filter__tabs { display: flex; gap: 40px; }
.post-filter__tab { padding: 0; font-size: 32px; font-weight: 700; line-height: 48px; color: var(--c-heading); white-space: nowrap; background: none; border: 0; }
.post-filter__tab[aria-selected="true"] { color: transparent; background: linear-gradient(89.49deg, #b11a9c 0%, #b11a9c 45%, #824deb 100%); -webkit-background-clip: text; background-clip: text; }
.post-filter__chips { padding-top: 11px; }
.post-filter__chips[hidden] { display: none; }
.post-filter__chip {
	display: inline-block;
	margin: 14px 24px 4px 0;
	padding: 12px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 27px;
	color: #46444e;
	background-color: #f6f4f8;
	border-radius: 50px;
	transition: background-color .2s, color .2s;
}
.post-filter__chip:hover, .post-filter__chip[aria-pressed="true"] { color: var(--c-white); background-color: var(--c-primary); }

.post-filter__results { padding-top: 50px; transition: opacity .2s; }
.post-filter.is-loading .post-filter__results { opacity: .5; pointer-events: none; }
.post-filter__reset { display: inline-block; margin: -20px 0 20px; padding: 13px 18px; font-size: 16px; line-height: 24px; }
.post-filter__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.post-filter__empty { padding: 40px 0; font-size: 18px; text-align: center; }

.post-card { min-height: 420px; background-color: var(--c-white); border: 1px solid rgba(0, 0, 0, .125); border-radius: 4px; overflow: hidden; }
.post-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card__media { display: block; line-height: 0; }
.post-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 405 / 208; object-fit: cover; }
.post-card__body { display: block; padding: 20px; }
.post-card__type { display: block; padding: 15px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; font-weight: 600; line-height: 27px; color: #1b1336; }
.post-card__type span { padding: 8px 20px; border: 1px solid #b5179e; border-radius: 10px; }
.post-card__title { display: block; margin-top: 1px; font-size: 20px; font-weight: 700; line-height: 27px; color: #1b1435; }
.post-card__link:hover .post-card__title { color: var(--c-primary); }

.post-filter__more { padding: 80px 0 60px; text-align: center; }
.post-filter__load { padding: 13px 18px; font-size: 16px; line-height: 24px; }
.post-filter__grid + .post-filter__more, .post-filter__empty + .post-filter__more { margin-top: 0; }
.post-filter__results > :last-child:not(.post-filter__more) { margin-bottom: 110px; }

@media (max-width: 1024px) {
	.post-filter__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.post-filter { padding-top: 20px; }
	.post-filter__inner { padding-inline: 20px; }
	.post-filter__tabs { gap: 20px; overflow-x: auto; scrollbar-width: none; }
	.post-filter__tabs::-webkit-scrollbar { display: none; }
	.post-filter__tab { font-size: 26px; line-height: 42px; }
	.post-filter__chips { padding-top: 6px; }
	.post-filter__chip { margin: 5px 12px 5px 0; padding: 8px 16px; }
	.post-filter__results { padding-top: 50px; }
	.post-filter__grid { grid-template-columns: 1fr; }
	.post-filter__more { padding: 40px 0 50px; }
}

/* Card style "story" (case studies): image card, title over a dark gradient, round arrow. */
.post-filter__grid--story { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 30px; }
.story-card { position: relative; height: 500px; overflow: hidden; border-radius: 10px; }
.story-card__link { display: block; height: 100%; color: var(--c-white); }
.story-card__media { position: absolute; inset: 0; line-height: 0; transition: transform .5s ease-in-out; }
.story-card__media img { width: 100%; height: 100%; object-fit: cover; }
.story-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .14) 49.5%, rgba(0, 0, 0, .9) 100%), linear-gradient(180deg, rgba(0, 0, 0, .5) 10.13%, rgba(0, 0, 0, 0) 27.55%); }
.story-card__link:hover .story-card__media, .story-card__link:focus-visible .story-card__media { transform: scale(1.2); }
.story-card__title { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; width: 90%; margin: 0; padding: 24px; font-size: 24px; font-weight: 600; line-height: 34px; color: var(--c-white) !important; }
.story-card__arrow { position: absolute; right: 24px; bottom: 24px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #1b1435; background: var(--c-white); border-radius: 50%; }
.story-card__arrow .icon { width: 14px; height: 14px; fill: currentColor; }
.story-card__link:hover .story-card__arrow { color: var(--c-white); background: linear-gradient(90deg, #b5179e 0%, #824deb 100%); }
@media (max-width: 1120px) {
	.story-card__title { width: 80%; font-size: 22px; line-height: 32px; }
}
@media (max-width: 767px) {
	.post-filter__grid--story { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.story-card__media { transition: none; }
}
