/* ==========================================================================
   1517 - featured resource
   Left: heading + search + description  |  Right: "Browse by" card
   Bottom (toggle): Browse Categories
   ========================================================================== */

.sr-featured-resource {
	--lib-divider: rgba(0, 0, 0, 0.12);
	--lib-cream: #F6F0E6;
	--lib-text: #1c1917;
	--lib-text-muted: #57534c;
	--lib-text-body: #44403c;
	--lib-border: #E6DED3;
	--lib-intro-bg: #FFFFFF;
	--lib-highlight-bg: rgba(224, 69, 58, 0.14);
	--lib-highlight-text: #c2410c;
	/* --ai-toggle-size: 14px;
	--ai-toggle-off: #efefef;
	--ai-toggle-on: var(--primary, #CA4D39); */
}

/* === Eyebrow (used left + in browse card) === */
.sr-featured-resource__eyebrow {
	color: var(--primary);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 1px;
	margin-bottom: 5px;
	text-transform: uppercase;
	display: block;
}

.sr-featured-resource__desc {
	max-width: 52ch;
	margin-top: 1.25rem;
}
.sr-featured-resource__desc p { margin: 0; }

/* === Search === */
.sr-featured-resource__searchWrap {
	margin-top: 1.75rem;
	max-width: 460px;
}

.sr-featured-resource__search-field {
	align-items: center;
	display: flex;
	width: 100%;
	border-radius: 62px;
	border: 1px solid #E6DED3;
	background: #FFF;
	padding: 6px 7px 6px 25px;
}

.sr-featured-resource__search-input {
	flex: 1;
	background: transparent;
}

.sr-featured-resource__search-input:focus {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.sr-featured-resource__search-input::placeholder { color: #9b9b9b; }

/* Remove native search input decorations */
.sr-featured-resource__search-input::-webkit-search-decoration,
.sr-featured-resource__search-input::-webkit-search-cancel-button,
.sr-featured-resource__search-input::-webkit-search-results-button,
.sr-featured-resource__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.sr-featured-resource__search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border: 0;
	border-radius: 50%;
	background: var(--primary);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.sr-featured-resource__search-btn:hover { background: #d6322c; }
.sr-featured-resource__search-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* === Browse "card" (right) === */
.sr-featured-resource__browse-card {
	background: #FFFFFF;
	border-radius: 16px;
	padding:40px;
}

.sr-featured-resource__browse-heading {
	line-height: 1.1;
	margin: 0 0 24px;
	color: var(--heading);
}

.sr-featured-resource__browse-subtext {
	font-size: 18px;
	color: #57534c;
	margin: 0 0 28px;
}

.sr-featured-resource__action { margin: 0; }
.sr-featured-resource__action .cta-button {
	width: 100%;
	text-align: center;
	justify-content: center;
	font-weight:600;
}

/* === Categories (bottom, when enabled) === */
.sr-featured-resource__categories {
	text-align: center;
	margin-top: 3.5rem;
}
.sr-featured-resource__cat {
	padding: 40px 1.25rem;
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	align-items: center;
	height: 100%;
	justify-content: space-between;
}
.sr-featured-resource__cat-title {
	font-size: 20px;
	margin: 0 0 10px 0;
	text-transform: uppercase;
}
.sr-featured-resource__cat-desc {
	font-size: 16px;
	line-height: 1.62;
	margin: 0 0 10px 0;
}
.sr-featured-resource__cat-btn { margin: 0; display: inline-flex; }

/* === Inline search results (Figma: node 4463-1622) === */
.sr-featured-resource__resultsWrap {
	margin-top: 3.5rem;
}

.sr-featured-resource__results-intro {
	font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0;
    padding: 28px 32px;
    border-radius: 16px;
    border: 1px solid #E6DED3;
    background: #F5F1ED;
	color: #5E5E5E;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 26px; /* 162.5% */
}

.sr-featured-resource__results-intro p {
	margin: 0;
}

.sr-featured-resource__results-intro em,
.sr-featured-resource__results-intro a {
	color: var(--primary);
	font-style: normal;
	font-weight: 600;
	text-decoration: none;
}

.sr-featured-resource__results-intro a:hover {
	text-decoration: underline;
}

.sr-featured-resource__results-panel {
	margin-top: 2.5rem;
}

/* === AI Overview (above results heading) — commented out ===
.sr-featured-resource__ai-overview {
	background: #F5F1ED;
	border: 1px solid #E6DED3;
	border-radius: 16px;
	margin-bottom: 2rem;
	padding: 24px 28px;
}

.sr-featured-resource__ai-overview[hidden] {
	display: none !important;
}

.sr-featured-resource__ai-header {
	margin-bottom: 16px;
}

.sr-featured-resource__ai-header-bar {
	align-items: center;
	background: var(--lib-highlight-bg);
	border-radius: 999px;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	padding: 10px 12px 10px 20px;
}

.sr-featured-resource__ai-label {
	color: var(--primary);
	font-family: "ABC Ginto Normal", sans-serif;
	font-size: 1rem;
	font-weight: 700;
}

.sr-featured-resource__ai-toggle {
	cursor: pointer;
	display: inline-flex;
	flex-shrink: 0;
}

/* From Uiverse.io by cuzpq — adapted to 1517 theme / color-mode */
.sr-featured-resource__ai-toggle-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: linear-gradient(to right, var(--ai-toggle-off) 50%, var(--ai-toggle-on) 50%) no-repeat;
	background-position: 0;
	background-size: 205%;
	border-radius: 99em;
	cursor: pointer;
	font-size: var(--ai-toggle-size);
	height: 3.125em;
	position: relative;
	transition: 0.4s;
	width: 6.25em;
}

.sr-featured-resource__ai-toggle-input::before {
	background: linear-gradient(to right, var(--ai-toggle-off) 50%, var(--ai-toggle-on) 50%) no-repeat;
	background-position: 100%;
	background-size: 205%;
	border-radius: 50%;
	content: "";
	height: 2.25em;
	left: 0.438em;
	position: absolute;
	top: 0.438em;
	transition: 0.4s;
	width: 2.25em;
}

.sr-featured-resource__ai-toggle-input:checked {
	background-position: 100%;
}

.sr-featured-resource__ai-toggle-input:checked::before {
	background-position: 0;
	left: calc(100% - 2.25em - 0.438em);
}

:root[color-mode=dark] .sr-featured-resource {
	--ai-toggle-off: #3d3939;
	--ai-toggle-on: var(--primary, #CA4D39);
}

:root[color-mode=dark] .sr-featured-resource__ai-header-bar {
	background: rgba(202, 77, 57, 0.18);
}

:root[color-mode=dark] .sr-featured-resource__ai-overview {
	background: #2a2726;
	border-color: #4a4545;
}

.sr-featured-resource__ai-body:not(.switch3-checked) .sr-featured-resource__ai-grid,
.sr-featured-resource__ai-body:not(.switch3-checked) .sr-featured-resource__ai-loader {
	display: none !important;
}

.sr-featured-resource__ai-loader {
	align-items: center;
	color: #57534c;
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	min-height: 100px;
}

.sr-featured-resource__ai-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: 1.15fr 0.85fr;
}

.sr-featured-resource__ai-summary {
	color: #5E5E5E;
	font-family: "ABC Ginto Normal", sans-serif;
	font-size: 16px;
	line-height: 26px;
	margin: 0;
}

.sr-featured-resource__ai-suggestions {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sr-featured-resource__ai-suggestion {
	border-bottom: 1px solid #E6DED3;
	padding: 0 0 16px;
	margin-bottom: 16px;
}

.sr-featured-resource__ai-suggestion:last-child {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0;
}

.sr-featured-resource__ai-suggestion-title {
	align-items: flex-start;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 8px;
}

.sr-featured-resource__ai-suggestion-title a {
	color: var(--primary);
	font-family: "ABC Ginto Normal", sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.sr-featured-resource__ai-suggestion-title a:hover {
	text-decoration: underline;
}

.sr-featured-resource__ai-suggestion-arrow {
	color: var(--primary);
	flex-shrink: 0;
	font-weight: 700;
}

.sr-featured-resource__ai-suggestion-desc {
	color: #5E5E5E;
	font-family: "ABC Ginto Normal", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	margin: 0;
}
*/

.sr-featured-resource__results-panel[hidden] {
	display: none !important;
}

.sr-featured-resource__results-header {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 2rem;
	justify-content: space-between;
	margin-bottom: 0;
}

.sr-featured-resource__results-heading {
	color: var(--primary);
	font-family: var(--heading-font, Georgia, "Times New Roman", serif);
	font-size: clamp(2rem, 3.2vw, 2.875rem);
	font-weight: 700;
	line-height: 1.08;
	margin: 0;
	font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.sr-featured-resource__results-action {
	flex-shrink: 0;
	margin: 0;
}

.sr-featured-resource__results-action .cta-button {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	min-width: 0;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	border-radius: 4px;
	border: 1px solid #CC4D39;
	padding: 8px 16px;
    min-height: auto;
	color: #CA4D39;
	font-style: normal;
	line-height: normal;
	text-transform: capitalize;
}

.sr-featured-resource__results-list {
	border-top: 1px solid var(--lib-border);
	display: flex;
	flex-direction: column;
	margin-top: 1.75rem;
}

.sr-featured-resource__result {
	border-bottom: 1px solid var(--lib-border);
	display: flex;
	gap: 1.125rem;
	padding: 1.75rem 0;
}

.sr-featured-resource__result:first-child {
	padding-top: 1.75rem;
}

.sr-featured-resource__result-icon {
	align-items: center;
	color: #E0A65A;
	display: flex;
	flex-shrink: 0;
	height: 44px;
	justify-content: center;
	margin-top: 2px;
	width: 44px;
}

.sr-featured-resource__result-icon svg {
	height: 24px;
	width: 24px;
}

.sr-featured-resource__result-icon svg {
	fill: none;
}

.sr-featured-resource__result-body {
	min-width: 0;
}

.sr-featured-resource__result-title {
	color: #3D3939;
	font-size: 24px;
	font-style: normal;
	font-weight: 400;
	line-height: 130%; /* 31.2px */
}

.sr-featured-resource__result-title a {
	color: #3D3939;
	text-decoration: none;
}

.sr-featured-resource__result-title a:hover {
	color: var(--primary);
}

/* .sr-featured-resource__result-title .hs-search-highlight,
.sr-featured-resource__result-title .hs-highlight-title {
	background: var(--lib-highlight-bg);
	border-radius: 3px;
	color: var(--lib-highlight-text);
	font-weight: 700;
	padding: 0.05em 0.3em;
} */

.sr-featured-resource__result-meta {
	color: #000;
	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: 175%; /* 21px */
}

.sr-featured-resource__result-desc {
	color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

/* .sr-featured-resource__result-desc .hs-search-highlight,
.sr-featured-resource__result-desc .hs-highlight-html {
	background: var(--lib-highlight-bg);
	border-radius: 3px;
	color: var(--lib-highlight-text);
	font-weight: 600;
	padding: 0.08em 0.35em;
} */

/* .sr-featured-resource__result-desc .hs-search-highlight:first-of-type,
.sr-featured-resource__result-desc .hs-highlight-html:first-of-type {
	background: var(--primary);
	border-radius: 4px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	margin-right: 0.35rem;
	padding: 0.2em 0.55em;
	text-transform: capitalize;
	vertical-align: baseline;
} */

.sr-featured-resource__results-loader {
	align-items: center;
	color: #57534c;
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	min-height: 120px;
	padding: 2rem 0;
}

.sr-featured-resource__results-loader-spinner {
	animation: sr-featured-resource-spin 0.8s linear infinite;
	border: 2px solid #E6DED3;
	border-radius: 50%;
	border-top-color: var(--primary);
	display: inline-block;
	height: 28px;
	width: 28px;
}

.sr-featured-resource__results-loader-text {
	font-size: 0.9375rem;
}

@keyframes sr-featured-resource-spin {
	to { transform: rotate(360deg); }
}

.sr-featured-resource__results-empty {
	color: var(--lib-text-muted);
	margin: 0;
	min-height: 80px;
	padding: 1.5rem 0;
	text-align: center;
}

.sr-featured-resource__pagination-nav {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2rem;
}

.sr-featured-resource__pagination-btn {
	background: #fff;
	border: 1px solid var(--lib-border);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1;
	min-width: 2.5rem;
	padding: 0.65rem 0.95rem;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.sr-featured-resource__pagination-btn:hover:not(:disabled) {
	border-color: var(--primary);
	color: var(--primary);
}

.sr-featured-resource__pagination-btn.is-active {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.sr-featured-resource__pagination-btn:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.sr-featured-resource__pagination-ellipsis {
	color: #57534c;
	padding: 0 0.25rem;
}

.sr-featured-resource__results.is-loading .sr-featured-resource__results-list,
.sr-featured-resource__results.is-loading .sr-featured-resource__results-pagination {
	display: none;
}

/* Dividers between categories (desktop) */
@media (min-width: 992px) {
	.sr-featured-resource.has-dividers .sr-featured-resource__cat-col + .sr-featured-resource__cat-col .sr-featured-resource__cat {
		border-left: 1px solid var(--lib-divider);
	}
}

/* === Responsive === */
@media (max-width: 991.98px) {
	.sr-featured-resource__browse-col { margin-top: 2rem; }
	.sr-featured-resource__searchWrap { max-width: 100%; }
	.sr-featured-resource__cat-col { margin-bottom: 2rem; }
	.sr-featured-resource.has-dividers .sr-featured-resource__cat-col:nth-child(even) .sr-featured-resource__cat {
		border-left: 1px solid var(--lib-divider);
	}
}

@media (max-width: 767px) {
	.sr-featured-resource__browse-card { padding: 30px 26px; }
	.sr-featured-resource__browse-heading { font-size: 32px; }
	.sr-featured-resource.has-dividers .sr-featured-resource__cat-col .sr-featured-resource__cat {
		border-left: 0 !important;
	}
	.sr-featured-resource__cat { padding: 20px 0; }
	.sr-featured-resource__resultsWrap { margin-top: 2.5rem; }
	.sr-featured-resource__results-intro { padding: 22px 20px; }
	.sr-featured-resource__results-panel { margin-top: 2rem; }
	.sr-featured-resource__results-header { align-items: flex-start; flex-direction: column; }
	.sr-featured-resource__results-action { width: 100%; }
	.sr-featured-resource__results-action .cta-button { width: 100%; }
	/* .sr-featured-resource__ai-grid { grid-template-columns: 1fr; }
	.sr-featured-resource__ai-overview { padding: 20px; } */
	.sr-featured-resource__result { gap: 0.875rem; padding: 1.35rem 0; }
	a.cta-button.sr-featured-resource__results-library-link{
		justify-content: center;
	}
}
