/* Resources page (patterns/resources-*.php, page-resources.php) and the resource archive/single templates. */

.fx-resources-section.fx-band--white { border-top: 1px solid var(--wp--preset--color--border); }
.fx-resources-hero + .fx-resources-section.fx-band--white { border-top: 0; }

/* ---------- Hero ---------- */
.fx-resources-hero { padding-block: clamp(48px, 7vw, 88px); }
.fx-resources-hero__title { max-width: 26ch; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; }
.fx-resources-hero .fx-eyebrow + .fx-resources-hero__title { margin-top: 20px; }
.fx-resources-hero__lede { max-width: 66ch; font-size: clamp(16px, 1.6vw, 18px); }
.fx-resources-hero .fx-resources-hero__title + .fx-resources-hero__lede { margin-top: 22px; }
.fx-resources-hero--archive .fx-resources-hero__title { max-width: 28ch; }

.fx-resources-crumb a { color: inherit; }
.fx-resources-crumb a:hover { color: var(--wp--preset--color--white); }

.fx-resources-notice {
	margin-top: 24px;
	max-width: 66ch;
	padding: 14px 16px;
	border: 1px solid var(--wp--preset--color--ink-700);
	border-left: 2px solid var(--wp--preset--color--signal);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--ink-800);
}
.fx-band--ink .fx-resources-notice__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--mono-sm);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--signal);
}
.fx-resources-notice__body { margin-top: 8px !important; font-size: var(--wp--preset--font-size--small); line-height: 1.55; }

/* Anchor chips */
.fx-band .wp-block-buttons.fx-resources-chips { gap: 10px; margin-top: 32px; }
.fx-resources-chips .wp-block-button__link {
	min-height: 44px;
	padding: 0 16px;
	font-size: 13px;
}
.fx-resources-chips .is-style-secondary-dark .wp-block-button__link { border-color: rgba(255, 255, 255, 0.28); }

/* ---------- Section head: the site's heading stack, with "View all" under the heading ---------- */
.fx-resources-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fx-resources-head .fx-eyebrow + .fx-resources-title { margin-top: 16px; }
.fx-resources-viewall {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--mono-sm);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.fx-resources-viewall a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--fg-3);
}
.fx-resources-viewall a::after { content: "\2192"; margin-left: 6px; }
.fx-resources-viewall a:hover { color: var(--wp--preset--color--brand); }
.fx-resources-intro { margin-top: 18px; max-width: 80ch; line-height: 1.6; }
.fx-resources-intro + .fx-resources-viewall { margin-top: 6px; }

/* ---------- Cards ---------- */
.fx-resources-grid.fx-card-grid {
	grid-template-columns: repeat(auto-fit, minmax(max(260px, calc((100% - 32px) / 3)), 1fr)); /* at most 3 columns, like the design */
	margin-top: 28px;
	padding: 0;
}
.fx-resources-archive .fx-resources-grid.fx-card-grid { margin-top: 0; }
.fx-resources-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 22px;
}
.fx-resources-card:has(a:hover) { border-color: var(--wp--preset--color--fg-3); box-shadow: var(--wp--preset--shadow--2); }
.fx-resources-card .fx-mono-label a { color: inherit; }
.fx-resources-card .fx-resources-card__title {
	margin-top: 12px;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.35;
	letter-spacing: 0;
}
.fx-resources-card__title a { color: var(--wp--preset--color--ink); }
.fx-resources-card__title a:hover { color: var(--wp--preset--color--brand); }
.fx-resources-card .fx-resources-card__body,
.fx-resources-card .fx-resources-card__body p {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--wp--preset--color--fg-2);
}
.fx-resources-card__body .wp-block-post-excerpt__more-text { display: none; }
.fx-resources-card .fx-resources-card__status {
	margin-top: auto;
	padding-top: 16px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 10px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fg-3);
}
.fx-resources-card__status::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 8px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--signal);
	vertical-align: 1px;
}

/* Pagination: real buttons with page numbers, so more posts are obvious. */
.fx-resources-pagination { margin-top: 40px; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.fx-resources-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
	border: 1px solid var(--wp--preset--color--ink); border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink); text-decoration: none;
	transition: background-color 200ms var(--wp--custom--easing), color 200ms var(--wp--custom--easing);
}
.fx-resources-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next):hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.fx-resources-pagination .wp-block-query-pagination-numbers { display: flex; gap: 6px; margin-inline: auto; }
.fx-resources-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
	border-radius: var(--wp--custom--radius--md); color: var(--wp--preset--color--ink); text-decoration: none;
}
.fx-resources-pagination a.page-numbers:hover { background: var(--wp--preset--color--soft); }
.fx-resources-pagination .page-numbers.current { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }

/* Blog search and topic filters (shortcode in home.html, markup in functions.php) */
.fx-blog-filters { display: grid; gap: 18px; margin-bottom: 32px; }
.fx-blog-search { display: flex; gap: 8px; width: 100%; max-width: 640px; }
.fx-blog-search input {
	flex: 1 1 0; width: 0; min-width: 0; min-height: 48px; padding: 0 16px; font: inherit; font-size: 16px;
	color: var(--wp--preset--color--ink); background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--md);
}
.fx-blog-search input:focus { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 1px; border-color: var(--wp--preset--color--brand); }
.fx-blog-search button { flex: 0 0 auto; min-height: 48px; padding: 0 22px; border: 0; cursor: pointer; }
.fx-blog-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-blog-topics a {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border); color: var(--wp--preset--color--ink);
	font-size: 14px; text-decoration: none; transition: border-color 200ms var(--wp--custom--easing), background-color 200ms var(--wp--custom--easing);
}
.fx-blog-topics a:hover { border-color: var(--wp--preset--color--ink); }
.fx-blog-topics a[aria-current="true"] { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.fx-blog-count { margin: 0; font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--fg-2); }
.fx-blog-count a { color: var(--wp--preset--color--brand); }
.fx-blog-empty { font-size: 17px; }
@media (max-width: 879px) {
	.fx-resources-pagination .wp-block-query-pagination-numbers { order: 3; width: 100%; justify-content: center; }
}

/* ---------- Single resource ---------- */
.fx-resources-single__title {
	max-width: 28ch;
	font-size: clamp(30px, 4vw, 48px);
	line-height: 1.08;
	letter-spacing: -0.025em;
}
.fx-resources-hero .fx-eyebrow + .fx-resources-single__title { margin-top: 20px; }
.fx-resources-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }
.fx-resources-meta a { color: inherit; }
.fx-resources-meta a:hover { color: var(--wp--preset--color--white); }
.fx-resources-single__image { max-width: 760px; margin: 0 0 32px; }
.fx-resources-single__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--wp--custom--radius--md); border: 1px solid var(--wp--preset--color--border); }
.fx-resources-single .wp-block-post-content { font-size: var(--wp--preset--font-size--body-lg); line-height: 1.65; }
.fx-resources-back { margin-top: 48px !important; font-weight: 500; }
.fx-resources-back a { display: inline-flex; align-items: center; min-height: 48px; }
.fx-resources-back a::before { content: "\2190"; margin-right: 8px; }

/* ---------- Closing CTA ---------- */
.fx-resources-cta .fx-eyebrow + .fx-resources-cta__title { margin-top: 16px; }
.fx-resources-cta__title {
	max-width: 24ch;
	font-size: clamp(26px, 3.6vw, 44px);
	line-height: 1.12;
	letter-spacing: -0.02em;
}

/* Tables in resource and blog articles (case study "at a glance", whitepaper data tables). */
.fx-resources-single .wp-block-table { margin: 32px 0; overflow-x: auto; }
.fx-resources-single .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
}
.fx-resources-single .wp-block-table :is(th, td) {
	border: 0;
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.fx-resources-single .wp-block-table tbody tr:last-child > * { border-bottom: 0; }
.fx-resources-single .wp-block-table thead th {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fg-2);
	background: var(--wp--preset--color--soft);
}
.fx-resources-single .wp-block-table.fx-at-a-glance td:first-child { width: 28%; white-space: nowrap; }
@media (max-width: 879px) {
	.fx-resources-single .wp-block-table.fx-at-a-glance td:first-child { white-space: normal; }
}
.fx-resources-single .wp-block-quote {
	margin: 32px 0;
	padding-left: 24px;
	border-left: 2px solid var(--wp--preset--color--brand);
	font-style: italic;
}

/* Case study summary: the one or two sentences above "At a glance" (what was found and what changed). */
.fx-resources-single .fx-case-summary {
	margin: 24px 0 8px;
	padding-left: 20px;
	border-left: 2px solid var(--wp--preset--color--brand);
	font-size: clamp(18px, 1.8vw, 20px);
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}
