/**
 * Resources list — Figma 3222:3884 / 3222:3961.
 * Hero classes reuse .wsfd-pg-hero from programs-grants.css when both load;
 * this file also defines hero rules so Resources works standalone.
 */

/* -------------------------------------------------------------------------- */
/* Hero (Divi TB section)                                                     */
/* -------------------------------------------------------------------------- */

.wsfd-pg-hero.wsfd-res-hero,
.wsfd-res-hero.wsfd-pg-hero {
	position: relative;
	min-height: var(--wsfd-photo-hero-parent-height, 300px);
	height: auto;
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-end !important;
	align-items: stretch !important;
	padding: 32px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px));
	background-color: var(--wsfd-protection, #371f1b);
	background-size: cover !important;
	background-position: center 30% !important;
	background-repeat: no-repeat !important;
	isolation: auto;
	z-index: 0;
	box-sizing: border-box;
}

body .et_pb_section.wsfd-res-hero,
body .et_pb_section.et_pb_section_0_tb_body.wsfd-res-hero {
	background-position: center 30% !important;
	background-size: cover !important;
	flex-direction: column !important;
	justify-content: flex-end !important;
	align-items: stretch !important;
	min-height: var(--wsfd-photo-hero-parent-height, 300px) !important;
	height: auto !important;
	/* Beat TB padding-left/right:64px — title rail = --wsfd-page-inline. */
	padding-left: var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px)) !important;
	padding-right: var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px)) !important;
}

/* Hero veil: only with featured image. Topo / non-featured → no overlay. */
.wsfd-res-hero::before {
	content: none;
	display: none;
}

/* Featured-image heroes — solid #371f1b @75% multiply.
 * isolation:isolate so mix-blend-mode multiplies against the photo BG
 * (not the page behind). Header z-index (100100) stays above hero. */
body.page-has-featured .wsfd-res-hero,
body.page-has-featured .et_pb_section.wsfd-res-hero,
.wsfd-res-hero.wsfd-hero--has-featured,
.et_pb_section.wsfd-res-hero.wsfd-hero--has-featured,
.et_pb_section.wsfd-pg-hero.wsfd-res-hero.wsfd-hero--has-featured,
/* Resources list often keeps a TB-baked photo BG without a WP featured image. */
body.page-id-109 .et_pb_section.wsfd-res-hero,
body.page-id-109 .et_pb_section.wsfd-pg-hero.wsfd-res-hero {
	isolation: isolate;
}

body.page-has-featured .wsfd-res-hero::before,
body.page-has-featured .et_pb_section.wsfd-res-hero::before,
body.page-has-featured .et_pb_section.wsfd-pg-hero.wsfd-res-hero::before,
.wsfd-res-hero.wsfd-hero--has-featured::before,
.et_pb_section.wsfd-res-hero.wsfd-hero--has-featured::before,
.et_pb_section.wsfd-pg-hero.wsfd-res-hero.wsfd-hero--has-featured::before,
body.page-id-109 .et_pb_section.wsfd-res-hero::before,
body.page-id-109 .et_pb_section.wsfd-pg-hero.wsfd-res-hero::before {
	content: '';
	display: block;
	position: absolute;
	inset: 0;
	background: #371f1b;
	opacity: 0.75;
	mix-blend-mode: multiply;
	pointer-events: none;
	z-index: 0;
}

.wsfd-res-hero h1.et_pb_module_header,
.wsfd-res-hero .et_pb_heading_container h1,
.wsfd-res-hero .wsfd-pg-hero__title h1,
.wsfd-res-hero .wsfd-pg-hero__title,
h1.wsfd-pg-hero__title {
	position: relative;
	z-index: 1;
	margin: 0 !important;
	color: #fff !important;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display) !important;
	font-weight: var(--wsfd-h1-weight, 700) !important;
	font-size: var(--wsfd-h1-size, 64px) !important;
	line-height: var(--wsfd-h1-lh, 70px) !important;
	letter-spacing: 0 !important;
	text-align: left !important;
}

/* Hero shell lock (intentional) — direct-child only */
.et_pb_section.wsfd-res-hero > .et_pb_row,
.wsfd-res-hero > .et_pb_row {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	margin-top: auto !important;
	padding: 0 !important;
	align-self: stretch !important;
}

.et_pb_section.wsfd-res-hero > .et_pb_row > .et_pb_column {
	width: 100% !important;
	max-width: 100% !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-end !important;
	align-items: flex-start !important;
}

/*
 * Full-bleed TB body shell ONLY (rows 2 / 25).
 * Direct-child selectors — do NOT zero nested Divi rows/modules editors set
 * in Visual Builder (padding / gutters / max-width must remain editable).
 */
body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row,
body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row > .et_pb_column,
body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code .et_pb_code_inner,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row > .et_pb_column,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code .et_pb_code_inner {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row,
body.page-id-109 .et_pb_section_1_tb_body.et_pb_section > .et_pb_row > .et_block_row,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row,
body.page-id-109 .wsfd-res-body.et_pb_section > .et_pb_row > .et_block_row {
	padding: 0 !important;
}

body.page-id-109 .et_pb_section_1_tb_body.et_pb_section,
body.page-id-109 .wsfd-res-body.et_pb_section {
	padding: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* List                                                                       */
/* -------------------------------------------------------------------------- */

.wsfd-res-list {
	display: grid !important;
	grid-template-columns: 280px minmax(0, 1fr) !important;
	grid-template-rows: auto;
	column-gap: 48px;
	row-gap: 48px;
	align-items: start;
	padding: 48px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px));
	background: #fff;
	box-sizing: border-box;
	width: 100%;
}

/* Left filter column (not full-width above cards). */
.wsfd-res-list__filters-col {
	grid-column: 1;
	grid-row: 1;
	width: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
	box-sizing: border-box;
	min-width: 0;
}

.wsfd-res-list__intro {
	margin: 0 0 12px;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--wsfd-conserve, #000d04);
}

.wsfd-res-list__sidebar {
	width: 100%;
	position: sticky;
	top: 24px;
	box-sizing: border-box;
	padding: 12px;
	border: 3px solid var(--wsfd-growth, #f4ebe0);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 32px;
	background: #fff;
}

.wsfd-res-list__sidebar-heading {
	margin: 0;
	font-family: var(--wsfd-font-serif) !important;
	font-weight: 600 !important;
	font-size: 22px !important;
	line-height: 26px !important;
	color: var(--wsfd-protection, #371f1b) !important;
}

.wsfd-res-list__rule {
	height: 1px;
	width: 100%;
	margin: 8px 0;
	background: var(--wsfd-growth, #f4ebe0);
}

.wsfd-res-list__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
}

.wsfd-res-list__filter {
	appearance: none;
	box-sizing: border-box;
	min-height: 36px;
	padding: 8px 12px;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: var(--wsfd-protection, #371f1b);
	background-color: var(--wsfd-protection, #371f1b);
	color: #fff;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1.2;
	cursor: pointer;
}

.wsfd-res-list__filter.is-active {
	background: #d1422a;
	background-color: #d1422a;
	color: #fff;
}

.wsfd-res-list__filter--child {
	margin-left: 12px;
	/* R98 — EFSA/child pills match parent filter size. */
	font-size: 16px;
	min-height: 40px;
	padding: 8px 12px;
	opacity: 1;
}

.wsfd-res-list__filter:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-res-list__filter:hover:not(.is-active) {
	background: var(--wsfd-growth, #f4ebe0);
	color: var(--wsfd-protection, #371f1b);
	border-color: var(--wsfd-bark, #d2b99a);
}

/* Light card theme — match Programs sidebar/filter token swap. */
[data-wsfd-card-theme="light"] .wsfd-res-list__filter {
	background: var(--wsfd-growth, #f4ebe0);
	background-color: var(--wsfd-growth, #f4ebe0);
	color: var(--wsfd-protection, #371f1b);
	border-color: var(--wsfd-bark, #d2b99a);
}

[data-wsfd-card-theme="light"] .wsfd-res-list__filter.is-active {
	background: #d1422a;
	background-color: #d1422a;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

[data-wsfd-card-theme="light"] .wsfd-res-list__filter:hover:not(.is-active) {
	background: var(--wsfd-protection, #371f1b);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

.wsfd-res-list__results {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-self: start;
}

.wsfd-res-list__view-toggle {
	display: flex;
	gap: 8px;
	align-items: center;
}

.wsfd-res-list__view-btn {
	appearance: none;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: var(--wsfd-protection, #371f1b);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wsfd-res-list__view-btn.is-active {
	background: #d1422a;
}

.wsfd-res-list__view-btn:hover:not(.is-active) {
	background: var(--wsfd-growth, #f4ebe0);
}

.wsfd-res-list__view-btn:hover:not(.is-active) img {
	filter: brightness(0);
}

.wsfd-res-list__view-btn:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-res-list__view-btn img {
	display: block;
	width: 16px;
	height: auto;
	pointer-events: none;
}

.wsfd-res-list__view-btn img[hidden] {
	display: none;
}

.wsfd-res-list__cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.wsfd-res-list__cards.is-list {
	grid-template-columns: 1fr;
	gap: 12px;
}

.wsfd-res-card {
	margin: 0;
	min-width: 0;
}

.wsfd-res-card.is-hidden {
	display: none !important;
}

/* Figma Resources Card 3222:6134 — title + category pill, no image.
 * Hover/focus invert matches Programs cards (Growth / Protection pairs). */
.wsfd-res-card__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	height: 100%;
	box-sizing: border-box;
	min-width: 0;
	padding: 16px 24px 24px;
	border-radius: 8px;
	border: 4px solid var(--wsfd-ember, #633c35);
	background: var(--wsfd-protection, #371f1b);
	color: #fff;
	text-decoration: none;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		color 0.25s ease;
}

.wsfd-res-list__cards.is-list .wsfd-res-card__inner {
	flex-direction: row;
	align-items: flex-start;
	gap: 16px;
	padding: 14px 18px;
	min-width: 0;
}

/*
 * Beat UA / global a:visited. Dark cards stay white for :link/:visited;
 * hover/focus-visible invert to Growth (Programs SoT).
 */
a.wsfd-res-card__inner:link,
a.wsfd-res-card__inner:visited {
	color: #fff;
}

a.wsfd-res-card__inner:link .wsfd-res-card__title,
a.wsfd-res-card__inner:visited .wsfd-res-card__title,
a.wsfd-res-card__inner:link .wsfd-res-card__desc,
a.wsfd-res-card__inner:visited .wsfd-res-card__desc {
	/*
	 * Inherit inner fill (via __body) so AC sees a solid computed bg and
	 * hover fades as one surface — do not set a second transitioning bg.
	 */
	color: #fff;
	background-color: inherit;
}

a.wsfd-res-card__inner:hover,
a.wsfd-res-card__inner:focus-visible,
a.wsfd-res-card__inner:visited:hover,
a.wsfd-res-card__inner:visited:focus-visible {
	background: var(--wsfd-growth, #f4ebe0);
	border-color: var(--wsfd-bark, #d2b99a);
	color: var(--wsfd-protection, #371f1b);
}

a.wsfd-res-card__inner:hover .wsfd-res-card__title,
a.wsfd-res-card__inner:focus-visible .wsfd-res-card__title,
a.wsfd-res-card__inner:visited:hover .wsfd-res-card__title,
a.wsfd-res-card__inner:visited:focus-visible .wsfd-res-card__title {
	color: var(--wsfd-protection, #371f1b);
}

a.wsfd-res-card__inner:hover .wsfd-res-card__desc,
a.wsfd-res-card__inner:focus-visible .wsfd-res-card__desc,
a.wsfd-res-card__inner:visited:hover .wsfd-res-card__desc,
a.wsfd-res-card__inner:visited:focus-visible .wsfd-res-card__desc {
	color: var(--wsfd-conserve, #000d04);
}

/* Keep category pill white on dark fill when card text inverts */
a.wsfd-res-card__inner:hover .wsfd-res-card__pill,
a.wsfd-res-card__inner:focus-visible .wsfd-res-card__pill,
a.wsfd-res-card__inner:active .wsfd-res-card__pill {
	color: #fff;
}

a.wsfd-res-card__inner:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-res-card__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}

.wsfd-res-card__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: #063915;
	font-family: var(--wsfd-font-body);
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	color: #fff;
}

.wsfd-res-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
	/* Pass inner fill to title/desc for AC sampling + synced hover. */
	background-color: inherit;
}

.wsfd-res-card__title {
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 30px;
	color: #fff;
	background-color: inherit;
	transition: color 0.25s ease;
	word-break: break-word;
}

.wsfd-res-list__cards.is-list .wsfd-res-card__title {
	font-size: 20px;
	line-height: 26px;
}

.wsfd-res-card__desc {
	font-family: var(--wsfd-font-body);
	font-size: 15px;
	line-height: 1.4;
	font-weight: 400;
	/* Solid via inherit — transparent bg fails AC sampling against page. */
	color: #fff;
	background-color: inherit;
	transition: color 0.25s ease;
}

/* Light card theme — reverse default/hover pairs (Programs SoT). */
[data-wsfd-card-theme="light"] .wsfd-res-card__inner,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:link,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited {
	background: var(--wsfd-growth, #f4ebe0);
	border-color: var(--wsfd-bark, #d2b99a);
	color: var(--wsfd-protection, #371f1b);
}

[data-wsfd-card-theme="light"] .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:link .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited .wsfd-res-card__title {
	color: var(--wsfd-protection, #371f1b);
	background-color: inherit;
}

[data-wsfd-card-theme="light"] .wsfd-res-card__desc,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:link .wsfd-res-card__desc,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited .wsfd-res-card__desc {
	color: var(--wsfd-protection, #371f1b);
	background-color: inherit;
}

[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:hover,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:focus-visible,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:hover,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:focus-visible {
	background: var(--wsfd-protection, #371f1b);
	border-color: var(--wsfd-ember, #633c35);
	color: #fff;
}

[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:hover .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:focus-visible .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:hover .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:focus-visible .wsfd-res-card__title,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:hover .wsfd-res-card__desc,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:focus-visible .wsfd-res-card__desc,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:hover .wsfd-res-card__desc,
[data-wsfd-card-theme="light"] a.wsfd-res-card__inner:visited:focus-visible .wsfd-res-card__desc {
	color: #fff;
}

.wsfd-res-list__empty {
	grid-column: 1 / -1;
	padding: 24px;
	color: var(--wsfd-protection, #371f1b);
}

.wsfd-res-list__status.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 1100px) {
	.wsfd-res-list__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 834px) {
	/* Beat Divi TB dynamic minHeight from module JSON (Figma mobile parent). */
	body.page-id-109 .et_pb_section.wsfd-pg-hero.wsfd-res-hero,
	body.page-id-109 .et_pb_section.wsfd-res-hero,
	body .et_pb_section.wsfd-pg-hero.wsfd-res-hero,
	body .et_pb_section.wsfd-res-hero,
	body .et_pb_section.et_pb_section_0_tb_body.wsfd-res-hero,
	.et_pb_section.wsfd-pg-hero.wsfd-res-hero,
	.wsfd-res-hero.wsfd-pg-hero,
	.wsfd-res-hero {
		min-height: var(--wsfd-photo-hero-parent-height-sm, 200px) !important;
		height: auto !important;
		padding: var(--wsfd-hero-crumb-pad-top-sm, 70px) var(--wsfd-page-inline, var(--wsfd-page-gutter, 24px)) 24px !important;
		justify-content: flex-end !important;
		align-items: stretch !important;
	}

	body.page-id-109 .wsfd-res-hero h1.et_pb_module_header,
	body.page-id-109 .wsfd-res-hero .et_pb_heading_container h1,
	body.page-id-109 .wsfd-res-hero .et_pb_heading_container h1.et_pb_module_header,
	body.page-id-109 .wsfd-res-hero .et_pb_heading_container .et_pb_module_header,
	body.page-id-109 .wsfd-res-hero .wsfd-pg-hero__title h1,
	body.page-id-109 .wsfd-res-hero .wsfd-pg-hero__title,
	.wsfd-res-hero h1.et_pb_module_header,
	.wsfd-res-hero .et_pb_heading_container h1,
	.wsfd-res-hero .et_pb_heading_container h1.et_pb_module_header,
	.wsfd-res-hero .et_pb_heading_container .et_pb_module_header,
	.wsfd-res-hero .wsfd-pg-hero__title h1,
	.wsfd-res-hero .wsfd-pg-hero__title h1.et_pb_module_header,
	.wsfd-res-hero .wsfd-pg-hero__title .et_pb_module_header,
	.wsfd-res-hero .wsfd-pg-hero__title,
	h1.wsfd-pg-hero__title,
	body .wsfd-res-hero .et_pb_heading_container .et_pb_module_header {
		font-size: var(--wsfd-photo-hero-h1-size-sm, 38px) !important;
		line-height: var(--wsfd-photo-hero-h1-lh-sm, 40px) !important;
		letter-spacing: 0 !important;
		font-weight: 700 !important;
	}

	/* Mobile: grid only — hide list view toggle (ADA: remove from tab order via hidden). */
	.wsfd-res-list__view-btn[data-wsfd-view="list"] {
		display: none !important;
	}

	.wsfd-res-list__cards.is-list,
	.wsfd-res-list__cards {
		grid-template-columns: 1fr;
	}

	.wsfd-res-list {
		grid-template-columns: 1fr !important;
		column-gap: 16px;
		row-gap: 16px;
		padding: 24px;
	}

	.wsfd-res-list__filters-col,
	.wsfd-res-list__results {
		grid-column: 1;
		grid-row: auto;
		width: 100%;
	}

	.wsfd-res-list__sidebar {
		position: static;
		width: 100%;
		flex: none;
	}

	.wsfd-res-list__sidebar-heading {
		font-size: 20px !important;
		line-height: 24px !important;
	}

	.wsfd-res-list__filters {
		gap: 6px;
	}

	.wsfd-res-list__filter {
		font-size: 13px;
		padding: 8px 12px;
	}

	.wsfd-res-list__cards {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.wsfd-res-card__inner {
		padding: 16px;
		gap: 8px;
	}

	.wsfd-res-card__title {
		font-size: 22px;
		line-height: 26px;
	}
}
