/* ────────────────────────────────────────────────────────────────────────
 * Insights Child — term-dates.css
 *
 * Styles for the Term Dates page template (page-templates/template-term-dates.php).
 * Loaded only on that template.
 *
 * All rules scoped under .term-dates-main so the `.term-card` / `.term-header`
 * / `.where-next` class names can't collide with other templates.
 *
 * Lifted from insights-term-dates-v1.html. Brand tokens are inherited from
 * the site-wide stylesheets.
 * ───────────────────────────────────────────────────────────────────── */

/* Break out of Astra's max-width:1240px content wrapper so the slim header
 * + accordion can span the full viewport (with internal 1320px centering). */
body.page-template-template-term-dates #content.site-content,
body.page-template-template-term-dates #content.site-content > .ast-container {
	display: block !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
body.page-template-template-term-dates #main-content.term-dates-main {
	width: 100%;
	max-width: none;
}
body.page-template-template-term-dates #secondary {
	display: none !important;
}

.term-dates-main {
	--paper:     #FAFAFA;
	--text-mute: rgba(26, 26, 26, 0.5);
	--text-dim:  rgba(26, 26, 26, 0.68);
	--line:      rgba(26, 26, 26, 0.08);
	--line-hi:   rgba(26, 26, 26, 0.14);

	font-family: 'Jost', sans-serif;
	color: var(--ink);
	line-height: 1.6;
}

.term-dates-main .container {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 32px;
}

@keyframes tdFadeUp {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────
 * 1. SLIM HEADER — text only, no photo
 * ────────────────────────────────────────────────────────────── */
.term-dates-main .slim-header {
	padding: 88px 0 80px;
	text-align: center;
	border-bottom: 1px solid var(--line);
}
.term-dates-main .slim-header .sh-eyebrow {
	font-size: 11px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--crimson);
	font-weight: 700;
	margin-bottom: 22px;
	opacity: 0;
	transform: translateY(16px);
	animation: tdFadeUp 0.8s ease 0.2s forwards;
}
.term-dates-main .slim-header .sh-eyebrow::before {
	content: "";
	display: block;
	width: 48px;
	height: 2px;
	background: var(--crimson-bright);
	margin: 0 auto 18px;
}
.term-dates-main .slim-header h1 {
	font-family: 'Jost', sans-serif;
	font-size: clamp(36px, 5vw, 72px);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.04;
	color: var(--ink);
	margin: 0 0 18px;
	opacity: 0;
	transform: translateY(24px);
	animation: tdFadeUp 0.9s ease 0.4s forwards;
}
.term-dates-main .slim-header h1 em {
	font-style: italic;
	color: var(--crimson);
	font-weight: 400;
}

/* ──────────────────────────────────────────────────────────────
 * 2. TERM ACCORDION
 * ────────────────────────────────────────────────────────────── */
.term-dates-main .terms {
	padding: 96px 0 112px;
}
.term-dates-main .term-card {
	max-width: 880px;
	margin: 0 auto;
	border-top: 1px solid var(--line);
}
.term-dates-main .term-card:last-of-type {
	border-bottom: 1px solid var(--line);
}

.term-dates-main .term-header {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 32px;
	padding: 36px 32px;
	background: transparent;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: background 0.3s ease;
}
.term-dates-main .term-header:hover {
	background: var(--paper);
}
.term-dates-main .term-header:focus-visible {
	outline: 2px solid var(--crimson);
	outline-offset: -4px;
}
.term-dates-main .term-header h2 {
	font-family: 'Jost', sans-serif;
	font-size: clamp(26px, 2.6vw, 34px);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.04;
	color: var(--ink);
	margin: 0;
}
.term-dates-main .term-header h2 em {
	font-style: italic;
	color: var(--crimson);
	font-weight: 400;
}
.term-dates-main .term-range {
	font-family: 'Jost', sans-serif;
	font-style: italic;
	font-size: 15px;
	color: var(--text-dim);
	line-height: 1.4;
	white-space: nowrap;
}

/* Chevron — + when collapsed, × when open */
.term-dates-main .term-chevron {
	width: 22px;
	height: 22px;
	position: relative;
	transition: transform 0.4s cubic-bezier(0.65, 0, 0.25, 1);
	flex-shrink: 0;
}
.term-dates-main .term-chevron::before,
.term-dates-main .term-chevron::after {
	content: "";
	position: absolute;
	background: var(--crimson);
	border-radius: 1px;
}
.term-dates-main .term-chevron::before {
	top: 50%; left: 0; right: 0;
	height: 2px;
	transform: translateY(-50%);
}
.term-dates-main .term-chevron::after {
	left: 50%; top: 0; bottom: 0;
	width: 2px;
	transform: translateX(-50%);
	transition: transform 0.3s ease, opacity 0.3s ease;
}
.term-dates-main .term-card.open .term-chevron {
	transform: rotate(45deg);
}
.term-dates-main .term-card.open .term-chevron::after {
	transform: translateX(-50%) scaleY(0);
	opacity: 0;
}

.term-dates-main .term-body {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s cubic-bezier(0.65, 0, 0.25, 1);
}
.term-dates-main .term-card.open .term-body {
	max-height: 1200px;
}
.term-dates-main .term-body-inner {
	padding: 0 32px 40px;
}

.term-dates-main .term-dates {
	list-style: none;
	margin: 0;
	padding: 0;
}
.term-dates-main .term-dates li {
	padding: 14px 0;
	border-top: 1px solid var(--line);
	font-size: 16px;
	color: var(--ink);
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: baseline;
}
.term-dates-main .term-dates .td-label {
	font-weight: 500;
}
.term-dates-main .term-dates .td-label em {
	font-style: italic;
	color: var(--crimson);
	font-weight: 400;
}
.term-dates-main .term-dates .td-when {
	font-family: 'Jost', sans-serif;
	font-style: italic;
	font-size: 14px;
	color: var(--text-dim);
	letter-spacing: 0.01em;
	text-align: right;
	white-space: nowrap;
}
.term-dates-main .term-dates .td-when::before {
	content: "—";
	color: var(--crimson);
	margin-right: 8px;
	font-style: normal;
}

/* ──────────────────────────────────────────────────────────────
 * 3. PRINT — expand all terms, hide chrome
 * ────────────────────────────────────────────────────────────── */
@media print {
	.term-dates-main .term-body { max-height: none !important; overflow: visible !important; }
	.term-dates-main .term-chevron { display: none; }
	.topbar, .term-dates-main .where-next, .insights-footer, footer { display: none; }
}

/* ──────────────────────────────────────────────────────────────
 * 4. SCROLL-TRIGGERED REVEALS
 * ────────────────────────────────────────────────────────────── */
.term-dates-main .reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.85s cubic-bezier(0.2, 0.6, 0.2, 1),
	            transform 0.85s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.term-dates-main .reveal.in {
	opacity: 1;
	transform: translateY(0);
}
.term-dates-main .reveal.delay-1 { transition-delay: 0.10s; }
.term-dates-main .reveal.delay-2 { transition-delay: 0.20s; }
@media (prefers-reduced-motion: reduce) {
	.term-dates-main .reveal {
		opacity: 1;
		transform: none !important;
		transition: none !important;
	}
}

/* ──────────────────────────────────────────────────────────────
 * 5. WHERE NEXT — 2-card CTA grid (utility variant of Stage's)
 * ────────────────────────────────────────────────────────────── */
.term-dates-main .where-next {
	padding: 88px 0 120px;
	border-top: 1px solid var(--line);
}
.term-dates-main .where-next-head {
	max-width: 1320px;
	margin: 0 auto 48px;
	padding: 0 32px;
	text-align: center;
}
.term-dates-main .where-next-head .tag {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--crimson);
	font-weight: 700;
	margin-bottom: 18px;
}
.term-dates-main .where-next-head h2 {
	font-family: 'Jost', sans-serif;
	font-size: clamp(28px, 3.4vw, 44px);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.05;
	margin: 0;
	color: var(--ink);
}
.term-dates-main .where-next-head h2 em {
	font-style: italic;
	color: var(--crimson);
	font-weight: 400;
}
.term-dates-main .where-next-cards {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 32px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
.term-dates-main .wn-card {
	position: relative;
	aspect-ratio: 5 / 4;
	border-radius: 6px;
	overflow: hidden;
	background-color: #2D1010;
	cursor: pointer;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	color: #FFFFFF;
	text-decoration: none;
}
.term-dates-main .wn-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 56px -16px rgba(26, 26, 26, 0.25);
}
.term-dates-main .wn-card-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 1s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.term-dates-main .wn-card:nth-child(1) .wn-card-img:not([style*="url"]) {
	background-image: linear-gradient(160deg, #5C2424, #1a1a1a);
}
.term-dates-main .wn-card:nth-child(2) .wn-card-img:not([style*="url"]) {
	background-image: linear-gradient(160deg, #8B1A1A, #5C1010);
}
.term-dates-main .wn-card:hover .wn-card-img {
	transform: scale(1.05);
}
.term-dates-main .wn-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.20) 0%, transparent 50%, rgba(0, 0, 0, 0.80) 100%);
}
.term-dates-main .wn-card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 2;
	padding: 40px;
	color: #FFFFFF;
}
.term-dates-main .wn-card-content .tag {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 700;
	margin-bottom: 12px;
}
.term-dates-main .wn-card-content h3 {
	font-family: 'Jost', sans-serif;
	font-size: clamp(24px, 2.4vw, 32px);
	font-weight: 500;
	letter-spacing: -0.02em;
	color: #FFFFFF;
	margin: 0 0 12px;
	line-height: 1.05;
}
.term-dates-main .wn-card-content p {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
	max-width: 420px;
	margin: 0 0 18px;
}
.term-dates-main .wn-card-content .arrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--crimson-bright);
	transition: gap 0.3s;
}
.term-dates-main .wn-card:hover .arrow { gap: 16px; }
.term-dates-main .wn-card-content .arrow::after { content: "→"; }

/* ──────────────────────────────────────────────────────────────
 * 6. RESPONSIVE
 * ────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
	.term-dates-main .container { padding: 0 20px; }

	.term-dates-main .slim-header { padding: 56px 0 48px; }

	.term-dates-main .terms { padding: 56px 0 80px; }
	.term-dates-main .term-header {
		grid-template-columns: 1fr auto;
		padding: 24px 20px;
		gap: 16px;
	}
	/* Hide the long range string on mobile — keep name + chevron only. */
	.term-dates-main .term-range { display: none; }
	.term-dates-main .term-body-inner { padding: 0 20px 28px; }
	.term-dates-main .term-dates li {
		grid-template-columns: 1fr;
		gap: 4px;
		padding: 12px 0;
	}
	.term-dates-main .term-dates .td-when { text-align: left; }

	.term-dates-main .where-next { padding: 64px 0 88px; }
	.term-dates-main .where-next-cards {
		grid-template-columns: 1fr;
		gap: 18px;
		padding: 0 20px;
	}
	.term-dates-main .wn-card { aspect-ratio: 16 / 11; }
	.term-dates-main .wn-card-content { padding: 24px; }
}
