/**
 * Search Results + 404 — Figma 3233:6959 / 3233:6335.
 */

/* -------------------------------------------------------------------------- */
/* Full-bleed TB body shell ONLY (rows 2 / 25)                                */
/* Direct-child — nested Divi rows keep VB padding/gutters/max-width.         */
/* -------------------------------------------------------------------------- */

body.search .wsfd-search-body.et_pb_section > .et_pb_row,
body.search .wsfd-search-body.et_pb_section > .et_pb_row > .et_pb_column,
body.search .wsfd-search-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.search .wsfd-search-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code .et_pb_code_inner,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code .et_pb_code_inner,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code .et_pb_code_inner {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.search .wsfd-search-body.et_pb_section > .et_pb_row,
body.search .wsfd-search-body.et_pb_section > .et_pb_row > .et_block_row,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row,
body.error404 .wsfd-404-body.et_pb_section > .et_pb_row > .et_block_row,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row,
body.page-id-308 .wsfd-404-body.et_pb_section > .et_pb_row > .et_block_row {
	padding: 0 !important;
}

body.search .wsfd-search-body.et_pb_section,
body.error404 .wsfd-404-body.et_pb_section,
body.page-id-308 .wsfd-404-body.et_pb_section {
	padding: 0 !important;
	background: transparent !important;
}

/* -------------------------------------------------------------------------- */
/* Search hero — topo / dark protection                                       */
/* -------------------------------------------------------------------------- */

.wsfd-search {
	display: block;
	width: 100%;
	background: #fff;
}

.wsfd-search-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 32px;
	width: 100%;
	min-height: 280px;
	padding: 64px var(--wsfd-page-gutter, 64px);
	box-sizing: border-box;
	background-color: var(--wsfd-protection, #371f1b);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	text-align: center;
	isolation: isolate;
}

.wsfd-search-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 13, 4, 0.55);
	pointer-events: none;
	z-index: 0;
}

.wsfd-search-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	width: 100%;
	max-width: 100%;
}

.wsfd-search-hero__title {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	width: 100%;
	color: #fff;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	text-align: center;
}

.wsfd-search-hero__label {
	display: block;
	font-size: 64px;
	line-height: 70px;
}

.wsfd-search-hero__query {
	display: block;
	font-size: 40px;
	line-height: 46px;
}

.wsfd-search-hero__form {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 400px;
	min-width: 120px;
	padding: 12px 16px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--wsfd-protection, #371f1b);
	border-radius: 9999px;
	overflow: hidden;
}

.wsfd-search-hero__input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wsfd-conserve, #000d04);
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1;
	outline: none;
}

.wsfd-search-hero__input::placeholder {
	color: #444;
}

.wsfd-search-hero__submit {
	appearance: none;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	border-radius: 4px;
}

.wsfd-search-hero__submit img {
	display: block;
	width: 16px;
	height: 16px;
}

.wsfd-search-hero__submit:focus-visible,
.wsfd-search-hero__input:focus-visible {
	outline: 2px solid var(--wsfd-forest, #063915);
	outline-offset: 2px;
}

/* Row 117 — no persistent red ring on the search field chrome. */
.wsfd-search-hero__form:focus-within {
	outline: none;
	box-shadow: none;
	border-color: var(--wsfd-protection, #371f1b);
}

.wsfd-search-hero__input:focus,
.wsfd-search-hero__input:focus-visible {
	box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* Search results grid                                                        */
/* -------------------------------------------------------------------------- */

.wsfd-search-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	width: 100%;
	/* Match News/PG list rail — page gutter (R36). */
	padding: 48px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px)) 24px;
	box-sizing: border-box;
}

.wsfd-search-results__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
	margin: 0;
	padding: 0 0 24px;
	list-style: none;
	box-sizing: border-box;
}

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

.wsfd-search-card__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	height: 100%;
	padding: 16px;
	box-sizing: border-box;
	background: #f4ebe0;
	border: 4px solid #d2b99a;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.wsfd-search-card__link:hover .wsfd-search-card__title,
.wsfd-search-card__link:focus-visible .wsfd-search-card__title {
	text-decoration: underline;
}

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

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

.wsfd-search-card__title {
	display: block;
	width: 100%;
	color: #371f1b;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 30px;
}

.wsfd-search-card__excerpt {
	display: block;
	width: 100%;
	color: #000d04;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: normal;
	font-weight: 400;
}

.wsfd-search-results__empty {
	margin: 0;
	padding: 24px 0 48px;
	text-align: center;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	color: var(--wsfd-conserve, #000d04);
}

/* Pagination — Figma 9762:890 / 9762:870 (R37) */
.wsfd-search-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	/* Padding above pagination (R36) + bottom breathing room */
	padding: 24px 0 24px;
	width: 100%;
	box-sizing: border-box;
}

.wsfd-search-page,
.wsfd-search-page-prev,
.wsfd-search-page-next {
	appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 32px;
	padding: 8px 12px;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--wsfd-conserve, #000d04);
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, border-radius 0.2s ease, color 0.2s ease;
}

.wsfd-search-page.is-current {
	background: #063915;
	color: #fff;
	border-radius: 4px;
}

.wsfd-search-page:hover:not(.is-current),
.wsfd-search-page-prev:hover:not(.is-disabled),
.wsfd-search-page-next:hover:not(.is-disabled) {
	background: var(--wsfd-growth, #f4ebe0);
	border-color: var(--wsfd-bark, #d2b99a);
	border-radius: 4px;
}

.wsfd-search-page.is-current:hover {
	background: #448843;
	border-color: transparent;
	color: #fff;
}

.wsfd-search-page-prev.is-disabled,
.wsfd-search-page-next.is-disabled {
	background: #d9d9d9;
	color: #2c2c2c;
	opacity: 0.5;
	border-radius: 4px;
	border-color: transparent;
	cursor: not-allowed;
	pointer-events: none;
}

.wsfd-search-page:focus-visible,
.wsfd-search-page-prev:focus-visible,
.wsfd-search-page-next:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-search-page-gap {
	padding: 8px 16px;
	font-weight: 700;
	color: #000;
}

.wsfd-search-page-gap::before {
	content: '\2026'; /* … */
}

.wsfd-search-hero__submit-glyph::before {
	content: '\2315'; /* ⌕ */
}

.wsfd-search-page-prev img,
.wsfd-search-page-next img {
	display: block;
	width: 16px;
	height: 16px;
}

/* -------------------------------------------------------------------------- */
/* 404 — full-bleed hero                                                      */
/* -------------------------------------------------------------------------- */

.wsfd-404 {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	width: 100%;
	min-height: 500px;
	padding: 64px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px));
	box-sizing: border-box;
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	text-align: center;
	isolation: isolate;
}

.wsfd-404::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	pointer-events: none;
	z-index: 0;
}

.wsfd-404__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
}

.wsfd-404__copy {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	color: #fff;
	text-align: center;
}

.wsfd-404__code {
	margin: 0;
	padding: 0;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 64px;
	/* R35: tighter optical gap under the digits */
	line-height: 1;
}

/* Branding digits via CSS — no aria-hidden on visible text (EDAC). */
.wsfd-404__code::before {
	content: '404';}

.wsfd-404__title {
	margin: 0;
	/* R35: less space under "404" before "Lost in the woods?" */
	margin-top: 0;
	padding-top: 0;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 40px;
	line-height: 1.1;
	color: #fff;
}

.wsfd-404__lede {
	margin: 0;
	font-family: var(--wsfd-font-body);
	/* Regular weight — avoid EDAC "possible heading" on bold <p>. */
	font-weight: 400;
	font-size: 16px;
	line-height: normal;
	color: #fff;
}

.wsfd-404__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 6px 12px;
	box-sizing: border-box;
	background: #0f5624;
	border: 2px solid #448843;
	border-radius: 4px;
	color: #fff !important;
	font-family: 'New Science Serif', new-science-serif, var(--wsfd-font-serif, serif);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.4;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wsfd-404__cta::after {
	content: none;
	display: none;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background-color: #54150a;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M5.5 8h5M8 5.5L10.5 8 8 10.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M5.5 8h5M8 5.5L10.5 8 8 10.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.wsfd-404__cta:hover,
.wsfd-404__cta:focus-visible {
	background: #d1422a !important;
	border-color: #942c1b !important;
	filter: none;
	color: #fff !important;
	text-decoration: none !important;
}

.wsfd-404__cta:hover::after,
.wsfd-404__cta:focus-visible::after {
	content: '';
	display: inline-block;
}

.wsfd-404__cta:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 980px) {
	.wsfd-search-results {
		padding-left: var(--wsfd-page-gutter, 24px);
		padding-right: var(--wsfd-page-gutter, 24px);
	}

	.wsfd-search-results__grid {
		grid-template-columns: 1fr;
	}

	.wsfd-search-hero,
	.wsfd-404 {
		padding-left: var(--wsfd-page-gutter, 24px);
		padding-right: var(--wsfd-page-gutter, 24px);
	}

	.wsfd-search-hero__label {
		font-size: 40px;
		line-height: 46px;
	}

	.wsfd-search-hero__query {
		font-size: 28px;
		line-height: 34px;
	}

	.wsfd-404__code {
		font-size: 48px;
		line-height: 54px;
	}

	.wsfd-404__title {
		font-size: 28px;
		line-height: 34px;
	}
}
