/* Stories archive page styles (matches static-website/stories.html) */

.page-hero-stories::before {
	background: linear-gradient(135deg, #0B1F60f2 0%, #031D12f0 55%, #050C1Ae0 100%);
}

.search-sidebar {
	position: sticky;
	top: 90px;
}

.filter-section {
	border-bottom: 1px solid var(--border);
	padding-bottom: 20px;
	margin-bottom: 20px;
}

.filter-section:last-child {
	border-bottom: none;
}

.filter-section-title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	margin-bottom: 10px;
}

.story-hero {
	background: linear-gradient(160deg, #063A25 0%, #0B1F60 55%, #050C1A 100%);
	padding: 100px 0 60px;
	position: relative;
	overflow: hidden;
}

.story-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1600&auto=format&fit=crop&q=60') center/cover no-repeat;
	opacity: 0.18;
}

.story-hero-inner {
	position: relative;
	z-index: 1;
}

.story-breadcrumb {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 20px;
}

.story-breadcrumb a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
}

.story-breadcrumb a:hover {
	color: #fff;
}

.story-breadcrumb span {
	opacity: 0.4;
}

.story-hero h1 {
	color: #fff;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	max-width: 760px;
	margin-bottom: 1rem;
}

.story-hero-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.6);
}

.story-hero-meta .sep {
	opacity: 0.3;
}

.story-media-main {
	border-radius: var(--r-xl);
	overflow: hidden;
	height: 300px;
}

.story-media-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-media-thumb {
	border-radius: var(--r-lg);
	overflow: hidden;
	flex: 1;
	min-height: 135px;
}

.story-media-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-body-content {
	max-width: none;
	margin: 0;
}

.impact-icon {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: var(--surface-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	flex-shrink: 0;
}

.impact-icon .bi {
	line-height: 1;
	display: inline-block;
}

.impact-val {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ink);
	line-height: 1.2;
}

.impact-lbl {
	font-size: 0.72rem;
	color: var(--muted);
	margin-top: 1px;
}

.story-videos {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border);
}

.story-videos h2 {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--ink);
	letter-spacing: -0.02em;
}

.story-videos-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.story-video-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-xl);
	overflow: hidden;
	box-shadow: var(--s-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.story-video-embed,
.story-video-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #0f172a;
}

.story-video-embed iframe,
.story-video-player video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	object-fit: contain;
	background: #0f172a;
}

.story-video-caption {
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
	border-top: 1px solid var(--border);
}

.sc-story-detail .story-media-main:not(.row .story-media-main) {
	border-radius: var(--r-xl);
	overflow: hidden;
	margin-bottom: 0;
}

.sc-stories-results {
	position: relative;
	min-height: 200px;
	transition: opacity 0.2s ease;
}

/* AJAX-loaded cards must be visible immediately (reveal observer runs only on load). */
.sc-stories-results .reveal {
	opacity: 1;
	transform: none;
}

.sc-stories-results.is-loading .reveal {
	opacity: 0.6;
}

.sc-stories-results.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.sc-stories-results.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: sc-stories-spin 0.7s linear infinite;
}

@keyframes sc-stories-spin {
	to {
		transform: rotate(360deg);
	}
}

button.tag-cloud-item {
	border: none;
	background: none;
	cursor: pointer;
}

/* Difficulty / format multi-select pills — strong selected vs unselected contrast */
.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="true"] .filter-pill {
	border: 1.5px solid #d1d5db;
	color: #6b7280;
	background: #fff;
	font-weight: 500;
	box-shadow: none;
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="true"] .filter-pill:hover {
	border-color: #9ca3af;
	color: #374151;
	background: #f9fafb;
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="true"] .filter-pill.active {
	border-color: var(--blue);
	background: var(--blue);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="true"] .filter-pill.active:hover {
	border-color: #1d4ed8;
	background: #1d4ed8;
	color: #fff;
}

/* SDG single-select pills */
.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="false"] .filter-pill {
	border: 1.5px solid #d1d5db;
	color: #6b7280;
	background: #fff;
	font-weight: 500;
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="false"] .filter-pill:hover {
	border-color: #9ca3af;
	color: #374151;
	background: #f9fafb;
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="false"] .filter-pill.active {
	border-color: var(--blue);
	background: var(--blue);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

.sc-stories-archive .sc-stories-filters .filter-pill-group[data-multi="false"] .filter-pill.active:hover {
	border-color: #1d4ed8;
	background: #1d4ed8;
	color: #fff;
}

/* Clickable story card */
a.story-card-link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

a.story-card-link:hover {
	color: inherit;
}

a.story-card-link .story-card-title {
	color: var(--ink);
	transition: color var(--t1);
}

a.story-card-link:hover .story-card-title {
	color: var(--blue);
}

a.story-card-link .story-card-read {
	pointer-events: none;
}
