/* =========================
   Topic Section Core
   ========================= */

.topic-section {
	min-height: 100vh;
	background-image: var(--topic-bg);
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	position: relative;

	scroll-snap-type: y mandatory;
	overflow-y: auto;
}

.topic-panel {
	scroll-snap-align: start;
	scroll-snap-stop: always;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 0 8%;
}

/* Overlay */
.topic-section-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0,0,0,.55),
		rgba(0,0,0,.75)
	);
	z-index: 0;
}

.topic-section-inner {
	position: relative;
	z-index: 1;
}

/* =========================
   Header + Intro
   ========================= */

.topic-header {
	max-width: 960px;
	padding: 8vh 8% 6vh;
}

.topic-title {
	color: var(--brand-gold);
	font-size: clamp(2.2rem, 4vw, 3.4rem);
	margin-bottom: 1rem;
}

.topic-intro {
	max-width: 720px;
	font-size: 1.05rem;
	line-height: 1.7;
	color: rgba(255,255,255,.9);
}

/* =========================
   Panels
   ========================= */

.topic-panel-inner {
	display: flex;
	align-items: center;
	gap: 6%;
	width: 100%;
}

.topic-panel.align-right .topic-panel-inner {
	flex-direction: row-reverse;
}

/* Media */
.topic-panel-media {
	flex: 1;
	max-width: 46%;
	overflow: hidden;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}

.topic-panel-media img {
	width: 100%;
	height: 120%;
	object-fit: cover;
	transform: translateY(-10%);
	transition: transform 0.6s ease-out;
}

/* Content */
.topic-panel-content {
	flex: 1;
	max-width: 560px;
	padding: 3rem;
	background: rgba(20,20,20,0.35);
	backdrop-filter: blur(4px);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	color: var(--base) !important;
}

/* =========================
   Light Variant
   ========================= */

.topic-section--light .topic-section-overlay {
	background: linear-gradient(
		to bottom,
		rgba(255,255,255,.75),
		rgba(255,255,255,.95)
	);
}

.topic-section--light .topic-title,
.topic-section--light .topic-panel h2 {
	color: var(--brand-dark);
}

.topic-section--light .topic-intro,
.topic-section--light .topic-panel-content {
	color: var(--text-body);
	background: linear-gradient(
		to bottom,
		rgba(255,255,255,.95),
		rgba(255,255,255,.95)
	);
}

/* =========================
   Animation
   ========================= */

.animate-in {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .6s ease, transform .6s ease;
}

.animate-in.is-visible {
	opacity: 1;
	transform: none;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 768px) {
	.topic-section {
		scroll-snap-type: none;
		background-attachment: scroll;
	}

	.topic-panel {
		min-height: auto;
		padding: 4rem 0;
	}

	.topic-panel-inner {
		flex-direction: column;
	}

	.topic-panel-media img {
		transform: none;
	}
}

.topic-intro {
	color: var(--base) !important;
}