/**
 * Phase 5.11 — Subject Spotlight editorial showcase (ground-up).
 * Scoped to #nds-subject-spotlight / .nds-ss only.
 */

#nds-subject-spotlight.nds-ss {
	--ss-ink: #0a1218;
	--ss-mute: #5c656e;
	--ss-soft: #8a929a;
	--ss-accent: #0b5f69;
	--ss-line: rgba(10, 18, 24, 0.08);
	--ss-surface: #ffffff;
	--ss-wash: #f2f6f7;
	--ss-ease: cubic-bezier(0.22, 1, 0.36, 1);
	padding: 3.1rem 0 3.35rem;
	margin: 0;
	background:
		radial-gradient(80% 60% at 0% 20%, color-mix(in srgb, var(--ss-accent) 8%, transparent), transparent 55%),
		linear-gradient(180deg, #eef3f5 0%, var(--ss-wash) 48%, #ffffff 100%);
	border-top: 1px solid var(--ss-line);
	color: var(--ss-ink);
}

#nds-subject-spotlight.nds-ss[data-subject="pharmacology"] { --ss-accent: #1a5274; }
#nds-subject-spotlight.nds-ss[data-subject="medical-surgical"] { --ss-accent: #1e587a; }
#nds-subject-spotlight.nds-ss[data-subject="pathophysiology"] { --ss-accent: #3d4a6b; }
#nds-subject-spotlight.nds-ss[data-subject="pediatrics"] { --ss-accent: #2a6b5a; }
#nds-subject-spotlight.nds-ss[data-subject="fundamentals"] { --ss-accent: #0b5f69; }
#nds-subject-spotlight.nds-ss[data-subject="advanced-practice"] { --ss-accent: #124a5c; }
#nds-subject-spotlight.nds-ss[data-subject="maternity"] { --ss-accent: #6b3d55; }
#nds-subject-spotlight.nds-ss[data-subject="mental-health"] { --ss-accent: #4a3d6b; }

.nds-ss__shell {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 1.75rem 2.25rem;
	align-items: stretch;
	min-width: 0;
}

/* —— Left: subject-first editorial copy —— */
.nds-ss__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	min-width: 0;
	padding: 0.5rem 0.25rem 0.5rem 0;
}

.nds-ss__eyebrow {
	margin: 0;
	font-size: 0.68rem;
	font-weight: 750;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ss-accent);
}

.nds-ss__title {
	margin: 0;
	font-family: var(--nds-font-display);
	font-size: clamp(2rem, 3.4vw, 2.85rem);
	font-weight: 650;
	letter-spacing: -0.04em;
	line-height: 1.05;
	color: var(--ss-ink);
}

.nds-ss__lede {
	margin: 0;
	max-width: 40ch;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--ss-mute);
}

.nds-ss__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
}

.nds-ss__stat {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	padding: 0.85rem 0.95rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--ss-line);
	box-shadow:
		0 1px 2px rgba(10, 18, 24, 0.02),
		0 10px 24px rgba(10, 18, 24, 0.035);
}

.nds-ss__stat-value {
	font-size: 1.35rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: var(--ss-ink);
}

.nds-ss__stat-value--text {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.nds-ss__stat-label {
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ss-soft);
}

.nds-ss__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nds-ss__topics li {
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	color: var(--ss-accent);
	background: color-mix(in srgb, var(--ss-accent) 8%, #fff);
	border: 1px solid color-mix(in srgb, var(--ss-accent) 16%, transparent);
}

.nds-ss__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem 1.15rem;
	margin-top: 0.35rem;
}

.nds-ss__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	height: 44px;
	padding: 0 1.25rem;
	border-radius: 12px;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	color: #fff !important;
	background: var(--ss-accent);
	border: 1px solid transparent;
	box-shadow: 0 1px 2px color-mix(in srgb, var(--ss-accent) 28%, transparent);
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s var(--ss-ease);
}

.nds-ss__cta span {
	display: inline-block;
	transition: transform 0.25s var(--ss-ease);
}

.nds-ss__cta:hover,
.nds-ss__cta:focus-visible {
	background: color-mix(in srgb, var(--ss-accent) 86%, #000);
	color: #fff !important;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--ss-accent) 28%, transparent);
}

.nds-ss__cta:hover span,
.nds-ss__cta:focus-visible span {
	transform: translateX(3px);
}

.nds-ss__cta-secondary {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	height: 44px;
	padding: 0 1rem;
	border-radius: 12px;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--ss-ink);
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--ss-line);
	box-shadow: 0 1px 2px rgba(10, 18, 24, 0.03);
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nds-ss__cta-secondary span {
	display: inline-block;
	transition: transform 0.25s var(--ss-ease);
}

.nds-ss__cta-secondary:hover,
.nds-ss__cta-secondary:focus-visible {
	color: var(--ss-accent);
	border-color: color-mix(in srgb, var(--ss-accent) 35%, var(--ss-line));
	box-shadow: 0 6px 16px rgba(10, 18, 24, 0.06);
}

.nds-ss__cta-secondary:hover span,
.nds-ss__cta-secondary:focus-visible span {
	transform: translateX(3px);
}

.nds-ss__cta-tertiary {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--ss-accent);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.nds-ss__cta-tertiary span {
	display: inline-block;
	transition: transform 0.25s var(--ss-ease);
}

.nds-ss__cta-tertiary:hover,
.nds-ss__cta-tertiary:focus-visible {
	color: var(--ss-ink);
	border-bottom-color: currentColor;
}

.nds-ss__cta-tertiary:hover span,
.nds-ss__cta-tertiary:focus-visible span {
	transform: translateX(3px);
}

.nds-ss__cta:focus-visible,
.nds-ss__cta-secondary:focus-visible,
.nds-ss__cta-tertiary:focus-visible,
.nds-ss__float:focus-visible,
.nds-ss-feature__title a:focus-visible,
.nds-ss-feature__details:focus-visible,
.nds-ss-feature__media:focus-visible {
	outline: 2px solid var(--ss-accent);
	outline-offset: 3px;
}

/* —— Right: premium visual stage —— */
.nds-ss__stage {
	position: relative;
	display: grid;
	align-content: end;
	min-height: 34rem;
	min-width: 0;
	padding: 1.5rem 1.35rem 1.35rem;
	overflow: hidden;
	border-radius: 22px;
	background:
		linear-gradient(160deg, color-mix(in srgb, var(--ss-accent) 12%, #f7fafb) 0%, #eef3f5 42%, #e4ecf0 100%);
	border: 1px solid var(--ss-line);
	box-shadow:
		0 1px 2px rgba(10, 18, 24, 0.03),
		0 22px 48px rgba(10, 18, 24, 0.07);
}

.nds-ss__atmosphere {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.nds-ss__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(28px);
}

.nds-ss__glow--a {
	top: -12%;
	right: -8%;
	width: 58%;
	height: 48%;
	background: color-mix(in srgb, var(--ss-accent) 28%, transparent);
}

.nds-ss__glow--b {
	bottom: 18%;
	left: -16%;
	width: 55%;
	height: 45%;
	background: rgba(255, 255, 255, 0.55);
}

.nds-ss__grid {
	position: absolute;
	inset: 0;
	opacity: 0.22;
	background-image:
		linear-gradient(rgba(10, 18, 24, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(10, 18, 24, 0.05) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: radial-gradient(80% 70% at 60% 40%, #000 20%, transparent 75%);
}

.nds-ss__mark {
	position: absolute;
	color: color-mix(in srgb, var(--ss-accent) 55%, #fff);
	opacity: 0.28;
}

.nds-ss__mark--cross {
	top: 1.35rem;
	left: 1.35rem;
	width: 3.5rem;
	height: 3.5rem;
}

.nds-ss__mark--pulse {
	top: 2.4rem;
	right: 1.5rem;
	width: 7.5rem;
	height: 2.5rem;
	opacity: 0.22;
}

.nds-ss__stack {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.nds-ss__stack-item {
	position: absolute;
	margin: 0;
	width: 6.5rem;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow:
		0 8px 20px rgba(10, 18, 24, 0.12),
		0 2px 4px rgba(10, 18, 24, 0.06);
	transform-origin: center bottom;
}

.nds-ss__stack-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.nds-ss__stack-item--1 {
	top: 18%;
	left: 8%;
	transform: rotate(-11deg) translateY(0);
	opacity: 0.92;
}

.nds-ss__stack-item--2 {
	top: 14%;
	right: 10%;
	width: 5.75rem;
	transform: rotate(9deg);
	opacity: 0.88;
}

.nds-ss__float {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: center;
	align-self: center;
	width: min(15rem, 58%);
	margin: 0.5rem auto 7.5rem;
	text-decoration: none;
	filter: drop-shadow(0 22px 36px rgba(10, 18, 24, 0.28));
	transition: transform 0.4s var(--ss-ease), filter 0.4s ease;
}

.nds-ss__float img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.nds-ss__float:hover,
.nds-ss__float:focus-visible {
	transform: translateY(-6px) scale(1.02);
	filter: drop-shadow(0 28px 40px rgba(10, 18, 24, 0.32));
}

/* —— Featured editorial resource card —— */
.nds-ss-feature {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: 4.75rem minmax(0, 1fr);
	gap: 0.9rem 1rem;
	align-items: center;
	width: 100%;
	margin-top: auto;
	padding: 0.95rem 1rem;
	border-radius: 16px;
	background:
		linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, #f7fafb 100%);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow:
		0 1px 2px rgba(10, 18, 24, 0.04),
		0 16px 36px rgba(10, 18, 24, 0.12);
	backdrop-filter: blur(10px);
	transition:
		transform 0.3s var(--ss-ease),
		box-shadow 0.3s ease;
}

.nds-ss-feature__media {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	width: 4.75rem;
	min-height: 6.25rem;
	text-decoration: none;
	border-radius: 8px;
	overflow: hidden;
	background: #eef3f5;
	box-shadow: 0 6px 14px rgba(10, 18, 24, 0.1);
}

.nds-ss-feature__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nds-ss-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 6rem;
	font-size: 0.7rem;
	color: var(--ss-soft);
}

.nds-ss-feature__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.nds-ss-feature__subject {
	margin: 0;
	font-size: 0.66rem;
	font-weight: 750;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ss-accent);
}

.nds-ss-feature__title {
	margin: 0;
	font-family: var(--nds-font-display);
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.25;
}

.nds-ss-feature__title a {
	color: var(--ss-ink);
	text-decoration: none;
}

.nds-ss-feature__rec {
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.4;
	color: var(--ss-mute);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nds-ss-feature__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.nds-ss-feature__price {
	font-size: 1.05rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: var(--ss-ink);
}

.nds-ss-feature__details {
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	font-size: 0.86rem;
	font-weight: 650;
	color: var(--ss-accent);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.nds-ss-feature__details span {
	display: inline-block;
	transition: transform 0.25s var(--ss-ease);
}

.nds-ss-feature__details:hover,
.nds-ss-feature__details:focus-visible {
	color: var(--ss-ink);
	border-bottom-color: currentColor;
}

.nds-ss-feature__details:hover span,
.nds-ss-feature__details:focus-visible span {
	transform: translateX(3px);
}

@media (hover: hover) and (pointer: fine) {
	.nds-ss-feature:hover {
		transform: translateY(-2px);
		box-shadow:
			0 1px 2px rgba(10, 18, 24, 0.04),
			0 20px 40px rgba(10, 18, 24, 0.14);
	}
}

/* —— Responsive —— */
@media (max-width: 1100px) {
	.nds-ss__shell {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.nds-ss__stage {
		min-height: 30rem;
	}

	.nds-ss__float {
		margin-bottom: 7rem;
	}
}

@media (max-width: 760px) {
	#nds-subject-spotlight.nds-ss {
		padding: 2.5rem 0 2.75rem;
	}

	.nds-ss__copy {
		padding: 0;
		gap: 0.85rem;
	}

	.nds-ss__title {
		font-size: clamp(1.75rem, 8vw, 2.15rem);
	}

	.nds-ss__stats {
		grid-template-columns: 1fr 1fr;
		gap: 0.6rem;
	}

	.nds-ss__stat {
		padding: 0.75rem 0.8rem;
	}

	.nds-ss__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.nds-ss__cta,
	.nds-ss__cta-secondary {
		width: 100%;
		justify-content: center;
	}

	.nds-ss__cta-tertiary {
		justify-content: center;
	}

	.nds-ss__stage {
		min-height: 26rem;
		padding: 1.15rem 1rem 1rem;
		border-radius: 18px;
	}

	.nds-ss__stack-item--1 {
		width: 5.25rem;
		top: 14%;
		left: 6%;
	}

	.nds-ss__stack-item--2 {
		width: 4.75rem;
		top: 12%;
		right: 7%;
	}

	.nds-ss__float {
		width: min(12.5rem, 62%);
		margin: 0.25rem auto 6.75rem;
	}

	.nds-ss-feature {
		grid-template-columns: 3.85rem minmax(0, 1fr);
		gap: 0.75rem;
		padding: 0.8rem;
		border-radius: 14px;
	}

	.nds-ss-feature__media {
		width: 3.85rem;
		min-height: 5.1rem;
	}

	.nds-ss-feature__title {
		font-size: 0.95rem;
	}
}

@media (max-width: 420px) {
	.nds-ss__stage {
		min-height: 24rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nds-ss__cta,
	.nds-ss__cta span,
	.nds-ss__cta-secondary span,
	.nds-ss__cta-tertiary span,
	.nds-ss__float,
	.nds-ss-feature,
	.nds-ss-feature__details span {
		transition: none;
	}

	.nds-ss__float:hover,
	.nds-ss__float:focus-visible,
	.nds-ss-feature:hover {
		transform: none;
	}
}
