/* LOPL Library Stories — matches the eLibrary styling (Elementor global kit colors). */
.lopl-stories,
.lopl-story-nav,
.lopl-story-banner,
.lopl-story__meta,
.lopl-stories__pager {
	--ls-primary: var(--e-global-color-primary, #003B5C);
	--ls-secondary: var(--e-global-color-secondary, #006152);
	--ls-accent: var(--e-global-color-accent, #428226);
	--ls-text: var(--e-global-color-text, #2E2E2E);
	--ls-muted: #5f6b68;
	--ls-panel: #eef3f1;
	--ls-border: #d5dedb;
	--ls-radius: 6px;
}

/* ---------- Card grid ---------- */
.lopl-stories {
	display: grid;
	grid-template-columns: repeat(var(--lopl-cols, 2), minmax(0, 1fr));
	gap: 32px 28px;
	margin: 0 0 24px;
}
.lopl-story-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: var(--ls-text);
}
.lopl-story-card__img {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ls-radius);
	background: var(--ls-panel);
}
.lopl-story-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%; /* portraits: keep faces in frame */
	transition: transform .3s ease;
}
.lopl-story-card:hover .lopl-story-card__img img { transform: scale(1.03); }
.lopl-story-card__body { display: flex; flex-direction: column; flex: 1; padding-top: 14px; }

.lopl-stories .lopl-story-card__title {
	margin: 0 0 6px;
	padding: 0;
	font-family: "Oswald", sans-serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--ls-primary);
}
.lopl-stories .lopl-story-card__title a {
	font: inherit;
	color: inherit;
	text-decoration: none;
}
.lopl-stories .lopl-story-card__title a:hover,
.lopl-stories .lopl-story-card__title a:focus {
	color: var(--ls-secondary);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

/* Topic line (cards + single) */
.lopl-story-topics {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ls-muted);
}
.lopl-story-topics a {
	color: var(--ls-accent);
	text-decoration: none;
}
.lopl-story-topics a:hover,
.lopl-story-topics a:focus { color: var(--ls-primary); text-decoration: underline; }

.lopl-story-card__quote {
	position: relative;
	margin: 0 0 14px;
	padding-left: 14px;
	font-size: 16px;
	font-style: italic;
	line-height: 1.55;
	border-left: 3px solid var(--ls-accent);
}
.lopl-stories .lopl-story-card__more {
	margin-top: auto;
	align-self: flex-start;
	font-size: 14px;
	font-weight: 700;
	color: var(--ls-secondary);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.lopl-stories .lopl-story-card__more::after { content: " \2192"; }
.lopl-stories .lopl-story-card__more:hover { color: var(--ls-primary); }

/* ---------- Pagination ---------- */
.lopl-stories__pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 32px; }
.lopl-stories__pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 10px;
	font-size: 14px; font-weight: 600;
	color: var(--ls-primary); text-decoration: none;
	border: 1px solid var(--ls-border); border-radius: 4px; background: #fff;
}
.lopl-stories__pager .page-numbers:hover { border-color: var(--ls-primary); background: var(--ls-panel); }
.lopl-stories__pager .page-numbers.current { color: #fff; background: var(--ls-primary); border-color: var(--ls-primary); }
.lopl-stories__pager .page-numbers.dots { border: 0; background: none; }

/* ---------- Sidebar nav ---------- */
.lopl-story-nav { font-size: 15px; }
.lopl-story-nav .lopl-story-nav__title {
	margin: 0;
	padding: 10px 14px;
	font-family: "Oswald", sans-serif;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: #fff;
	background: var(--ls-primary);
	border-radius: var(--ls-radius) var(--ls-radius) 0 0;
}
.lopl-story-nav ul {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	background: var(--ls-panel);
}
.lopl-story-nav ul + ul { border-top: 1px solid var(--ls-border); border-radius: 0 0 var(--ls-radius) var(--ls-radius); }
.lopl-story-nav li { margin: 0; }
.lopl-story-nav a {
	display: block;
	padding: 7px 14px;
	font-weight: 600;
	color: var(--ls-primary);
	text-decoration: none;
	border-left: 3px solid transparent;
}
.lopl-story-nav a:hover,
.lopl-story-nav a:focus { color: var(--ls-secondary); background: #fff; border-left-color: var(--ls-secondary); }
.lopl-story-nav a[aria-current="page"] { color: var(--ls-secondary); background: #fff; border-left-color: var(--ls-accent); }

/* ---------- Topic banner ---------- */
.lopl-story-banner { margin: 0 0 24px; }
.lopl-story-banner .lopl-story-banner__title {
	margin: 0 0 6px;
	font-family: "Oswald", sans-serif;
	font-size: 30px;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--ls-primary);
}
.lopl-story-banner .lopl-story-banner__title a { color: inherit; text-decoration: none; }
.lopl-story-banner__tagline {
	margin: 0;
	max-width: 60ch;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--ls-accent);
}

/* ---------- Single story meta (above body) ---------- */
.lopl-story__meta { margin: 0 0 24px; }
.lopl-story__meta .lopl-story__quote {
	margin: 0;
	padding: 18px 22px;
	font-size: 20px;
	font-style: italic;
	line-height: 1.5;
	color: var(--ls-primary);
	background: var(--ls-panel);
	border: 0;
	border-left: 4px solid var(--ls-accent);
	border-radius: 0 var(--ls-radius) var(--ls-radius) 0;
}
.lopl-story__meta .lopl-story__quote p { margin: 0; }

.lopl-stories .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.lopl-stories a:focus-visible,
.lopl-story-nav a:focus-visible,
.lopl-stories__pager a:focus-visible { outline: 3px solid var(--ls-secondary); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.lopl-stories { grid-template-columns: repeat(min(var(--lopl-cols, 2), 2), minmax(0, 1fr)); gap: 28px 20px; }
}
@media (max-width: 767px) {
	.lopl-stories { grid-template-columns: 1fr; gap: 28px; }
	.lopl-stories .lopl-story-card__title { font-size: 21px; }
	.lopl-story-banner .lopl-story-banner__title { font-size: 24px; }
	.lopl-story-banner__tagline { font-size: 16px; }
	.lopl-story__meta .lopl-story__quote { font-size: 17px; padding: 14px 16px; }
}

/* =====================================================================
 * Section layout (v0.2)
 * The site's single-page template (#705) puts Post Content in a full-width
 * container, so plain page content runs edge to edge. Constrain it on the
 * Stories pages only (body class added by the plugin).
 * ===================================================================== */
.lopl-stories-section {
	--ls-primary: var(--e-global-color-primary, #003B5C);
	--ls-secondary: var(--e-global-color-secondary, #006152);
	--ls-accent: var(--e-global-color-accent, #428226);
	--ls-text: var(--e-global-color-text, #2E2E2E);
	--ls-panel: #eef3f1;
	--ls-border: #d5dedb;
	--ls-radius: 6px;
	--ls-hero-pattern: url("/wp-content/uploads/2026/04/Untitled-design-4_69eba917b2d2f_opt.webp");
}
.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container {
	box-sizing: border-box;
	max-width: 1140px;
	margin-inline: auto;
	padding: 48px 20px 72px;
}
.lopl-stories .lopl-stories__pager { margin-top: 0; }

/* Cards + sidebar side by side (landing / read) */
.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container:has(> .lopl-story-nav),
.lopl-story-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	column-gap: 48px;
	align-items: start;
}
.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container:has(> .lopl-story-nav) > * { grid-column: 1; }
.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container:has(> .lopl-story-nav) > .lopl-story-nav {
	grid-column: 2;
	grid-row: 1 / span 20;
	position: sticky;
	top: 24px;
}
.lopl-story-aside { position: sticky; top: 24px; }

/* =====================================================================
 * Single story
 * ===================================================================== */
body.single-lopl_story { overflow-x: clip; }

/* Hero band matching the site's page heroes */
.single-lopl_story .page-header {
	position: relative;
	isolation: isolate;
	margin: -8px calc(50% - 50vw) 48px;
	padding: 64px 20px 56px;
	text-align: center;
	background: linear-gradient(240deg, var(--ls-secondary) 41%, var(--ls-primary) 100%);
}
.single-lopl_story .page-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--ls-hero-pattern) 0 -320px / 980px auto repeat;
	opacity: .9;
}
.single-lopl_story .page-header .entry-title {
	max-width: 1100px;
	margin: 0 auto;
	font-size: clamp(34px, 4.4vw, 60px);
	line-height: 1.1;
	color: #EAF4F1;
}

/* Photo + topics/quote */
.lopl-story__head {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 32px;
	align-items: center;
	margin: 0 0 36px;
}
.lopl-story__head--nophoto { grid-template-columns: 1fr; }
.lopl-story__photo { margin: 0; }
.lopl-story__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center 25%;
	border-radius: var(--ls-radius);
}
.lopl-story__intro .lopl-story-topics { margin-bottom: 14px; }
.lopl-story__intro .lopl-story__quote {
	margin: 0;
	padding: 4px 0 4px 22px;
	font-size: 24px;
	font-style: italic;
	line-height: 1.45;
	color: var(--ls-primary);
	background: none;
	border: 0;
	border-left: 4px solid var(--ls-accent);
	border-radius: 0;
}
.lopl-story__intro .lopl-story__quote p { margin: 0; font-size: inherit; line-height: inherit; }

/* Body copy (LibGuides Q&A: h4 questions, paragraph answers) */
.lopl-story__body {
	max-width: 72ch;
	font-size: 17px;
	line-height: 1.7;
	color: var(--ls-text);
}
.lopl-story__body p { margin: 0 0 1em; font-size: inherit; line-height: inherit; }
.lopl-story__body h2,
.lopl-story__body h3,
.lopl-story__body h4,
.lopl-story__body h5 {
	margin: 1.6em 0 .5em;
	font-family: "Montserrat", sans-serif;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ls-primary);
}
.lopl-story__body > :first-child { margin-top: 0; }
.lopl-story__body a { color: var(--ls-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lopl-story__body blockquote {
	margin: 1.4em 0;
	padding: 4px 0 4px 20px;
	font-style: italic;
	color: var(--ls-primary);
	border-left: 4px solid var(--ls-accent);
}
.lopl-story__body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--ls-border); }
.lopl-story__body img { max-width: 100%; height: auto; border-radius: var(--ls-radius); }

/* LibGuides bodies end with their own "Share Your Library Story!" link — redundant next to the CTA */
.lopl-story-main:has(.lopl-story__cta) .lopl-story__body > p:last-child:has(> a[href*="/stories/share"]:only-child) { display: none; }

/* Share CTA */
.lopl-story__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 40px 0;
	padding: 22px 24px;
	background: var(--ls-panel);
	border-radius: var(--ls-radius);
}
.lopl-story__cta p { margin: 0; font-size: 17px; color: var(--ls-primary); }
.lopl-story__cta .lopl-story__cta-btn {
	display: inline-block;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	background: var(--ls-primary);
	border-radius: 4px;
}
.lopl-story__cta .lopl-story__cta-btn:hover,
.lopl-story__cta .lopl-story__cta-btn:focus { color: #fff; background: var(--ls-secondary); }

/* Related */
.lopl-story__related { margin-top: 48px; padding-top: 28px; border-top: 2px solid var(--ls-primary); }
.lopl-story__related .lopl-story__related-title {
	margin: 0 0 20px;
	font-family: "Oswald", sans-serif;
	font-size: 26px;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--ls-primary);
}

/* =====================================================================
 * Share + Watch pages (plain LibGuides content)
 * ===================================================================== */
.lopl-stories-section--share .elementor-widget-theme-post-content > .elementor-widget-container,
.lopl-stories-section--watch .elementor-widget-theme-post-content > .elementor-widget-container {
	max-width: 860px;
	font-size: 17px;
	line-height: 1.65;
}
.lopl-stories-section--share .elementor-widget-container > p,
.lopl-stories-section--watch .elementor-widget-container > p { font-size: inherit; line-height: inherit; }
.lopl-stories-section--share .elementor-widget-container img { max-width: 100%; height: auto; border-radius: var(--ls-radius); }

.lopl-stories-section--share .elementor-widget-container > h3,
.lopl-stories-section--watch .elementor-widget-container > h3 {
	margin: 32px 0 8px;
	font-family: "Oswald", sans-serif;
	font-size: 34px;
	font-weight: 500;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--ls-primary);
}
.lopl-stories-section--share .elementor-widget-container > h4,
.lopl-stories-section--share .elementor-widget-container > h5,
.lopl-stories-section--watch .elementor-widget-container > h4,
.lopl-stories-section--watch .elementor-widget-container > h5 {
	margin: 0 0 8px;
	font-family: "Montserrat", sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	color: var(--ls-secondary);
}
.lopl-stories-section--share .elementor-widget-container > h5 a { color: inherit; text-decoration: none; }
.lopl-stories-section--share .elementor-widget-container > h6,
.lopl-stories-section--watch .elementor-widget-container > h6 {
	margin: 16px 0 6px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ls-accent);
}

/* LibWizard form panel */
.lopl-stories-section--share [id^="form_"] {
	margin: 32px 0 0;
	padding: 24px;
	background: var(--ls-panel);
	border-radius: var(--ls-radius);
}
.lopl-stories-section--share [id^="form_"] iframe { display: block; width: 100% !important; border: 0; background: #fff; border-radius: 4px; }

/* Watch: responsive videos, caption under each, section headings */
.lopl-stories-section--watch .elementor-widget-container > p:has(> iframe) { margin: 0 0 12px; }
.lopl-stories-section--watch .elementor-widget-container iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: var(--ls-radius);
	background: #000;
}
.lopl-stories-section--watch .elementor-widget-container > p:has(> iframe) + h4 {
	margin: 0 0 4px;
	font-family: "Oswald", sans-serif;
	font-size: 21px;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--ls-primary);
}
.lopl-stories-section--watch .elementor-widget-container > hr {
	margin: 36px 0;
	border: 0;
	border-top: 1px solid var(--ls-border);
}
.lopl-stories-section--watch .elementor-widget-container > hr:has(+ h3) { margin-top: 56px; border-top: 2px solid var(--ls-primary); }
.lopl-stories-section--watch .elementor-widget-container > h3 + hr { display: none; }
.lopl-stories-section--watch .elementor-widget-container > h3:has(+ hr) { margin-bottom: 24px; }
.lopl-stories-section--watch .elementor-widget-container > blockquote {
	margin: 0 0 12px;
	padding: 18px 22px;
	font-style: italic;
	color: var(--ls-primary);
	background: var(--ls-panel);
	border-left: 4px solid var(--ls-accent);
	border-radius: 0 var(--ls-radius) var(--ls-radius) 0;
}

/* =====================================================================
 * Responsive (section)
 * ===================================================================== */
@media (max-width: 1024px) {
	.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container:has(> .lopl-story-nav),
	.lopl-story-layout { grid-template-columns: 1fr; row-gap: 40px; }
	.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container:has(> .lopl-story-nav) > .lopl-story-nav {
		grid-column: 1;
		grid-row: auto;
		position: static;
	}
	.lopl-story-aside { position: static; }
}
@media (max-width: 767px) {
	.lopl-stories-section .elementor-widget-theme-post-content > .elementor-widget-container { padding: 32px 16px 56px; }
	.single-lopl_story .page-header { padding: 44px 16px 36px; margin-bottom: 28px; }
	.lopl-story__head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
	.lopl-story__intro .lopl-story__quote { font-size: 19px; padding-left: 16px; }
	.lopl-story__body { font-size: 16px; }
	.lopl-story__cta { padding: 18px; }
	.lopl-story__cta .lopl-story__cta-btn { width: 100%; text-align: center; }
	.lopl-stories-section--share .elementor-widget-container > h3,
	.lopl-stories-section--watch .elementor-widget-container > h3 { font-size: 28px; }
	.lopl-stories-section--share [id^="form_"] { padding: 12px; margin-inline: -4px; }
}
