/* ================================================================
   CBC Timeline — timeline.css  v2.1
   Left: sticky panel + year nav  |  Right: scrollable timeline
   ================================================================ */

/* ── Wrapper: fixed viewport height so right col can scroll ────── */
.cbc-tl-wrap {
	display: flex;
	align-items: stretch;
	height: 100vh;          /* fixed height — essential for right-col scroll */
	width: 100%;
	position: relative;
	background: #1a1a2e;
	font-family: inherit;
	box-sizing: border-box;
	overflow: hidden;       /* clip anything that bleeds */
}

.cbc-tl-wrap *,
.cbc-tl-wrap *::before,
.cbc-tl-wrap *::after {
	box-sizing: border-box;
}

/* ── Left Column ───────────────────────────────────────────────── */
.cbc-tl-left {
	width: 35%;
	flex-shrink: 0;
	height: 100%;
	display: flex;
	align-items: center;
	padding: 60px 48px;
	background: inherit;
	z-index: 10;
	overflow: hidden;
}

.cbc-tl-left-inner {
	width: 100%;
}

.cbc-tl-panel-title {
	margin: 0 0 20px;
	font-size: clamp(26px, 2.8vw, 44px);
	font-weight: 700;
	line-height: 1.15;
	color: #ffffff;
	letter-spacing: -0.02em;
}

.cbc-tl-panel-body {
	margin: 0 0 36px;
	font-size: 15px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.72);
}

/* ── Year Nav ──────────────────────────────────────────────────── */
.cbc-tl-year-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cbc-tl-year-nav li {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.38);
	cursor: pointer;
	padding: 7px 0 9px;          /* extra bottom padding gives room for underline */
	position: relative;
	transition: color 0.22s ease;
	user-select: none;
	line-height: 1;
}

/* Full-width underline via ::after — hidden by default */
.cbc-tl-year-nav li::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;                    /* animates to 100% on active */
	height: 2px;
	background: #c8a96e;
	transition: width 0.25s ease;
}

.cbc-tl-year-nav li:hover {
	color: rgba(255, 255, 255, 0.7);
}

.cbc-tl-year-nav li.active {
	color: #c8a96e;
}

.cbc-tl-year-nav li.active::after {
	width: 100%;
}

.cbc-tl-year-nav li:focus-visible {
	outline: 2px solid #c8a96e;
	outline-offset: 3px;
	border-radius: 2px;
}

/* ── Right Column: the actual scroll container ─────────────────── */
.cbc-tl-right {
	flex: 1;
	height: 100%;
	overflow-y: scroll;     /* always show scroll track space; hides via ::-webkit-scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.cbc-tl-right::-webkit-scrollbar {
	display: none;
}

.cbc-tl-right-inner {
	position: relative;
	padding: 60px 56px 140px;
}

/* ── Centre vertical line ──────────────────────────────────────── */
.cbc-tl-line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 2px;
	background: rgba(200, 169, 110, 0.25);
	pointer-events: none;
}

/* ── Timeline Entry ────────────────────────────────────────────── */
.cbc-tl-entry {
	display: grid;
	grid-template-columns: 1fr 24px 1fr;  /* image | dot-col | text (or reversed) */
	align-items: start;                    /* top-align image, dot, and text */
	gap: 0 28px;
	margin-bottom: 90px;
	position: relative;
	/* entrance animation — starts invisible */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.cbc-tl-entry.cbc-tl-visible {
	opacity: 1;
	transform: translateY(0);
}

/* image-left layout:  [image] [dot] [text] */
.cbc-tl-entry--left .cbc-tl-entry-image { grid-column: 1; grid-row: 1; justify-self: end;   align-self: start; }
.cbc-tl-entry--left .cbc-tl-dot-col     { grid-column: 2; grid-row: 1; align-self: start; }
.cbc-tl-entry--left .cbc-tl-entry-text  { grid-column: 3; grid-row: 1; justify-self: start; align-self: start; text-align: left; }

/* image-right layout: [text] [dot] [image] */
.cbc-tl-entry--right .cbc-tl-entry-text  { grid-column: 1; grid-row: 1; justify-self: end;   align-self: start; text-align: right; }
.cbc-tl-entry--right .cbc-tl-dot-col     { grid-column: 2; grid-row: 1; align-self: start; }
.cbc-tl-entry--right .cbc-tl-entry-image { grid-column: 3; grid-row: 1; justify-self: start; align-self: start; }

/* ── Dot column — sits at the top, nudged down to align with year text ── */
.cbc-tl-dot-col {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 6px;       /* visually aligns dot with the top of the year label */
	height: 100%;
}

.cbc-tl-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #c8a96e;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cbc-tl-entry.cbc-tl-active .cbc-tl-dot {
	transform: scale(1.6);
	box-shadow: 0 0 0 5px rgba(200, 169, 110, 0.22);
}

/* ── Entry Image ───────────────────────────────────────────────── */
.cbc-tl-entry-image {
	width: 100%;
}

.cbc-tl-entry-image img,
.cbc-tl-img-placeholder {
	display: block;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.07);
}

/* push image flush to the dot on each side */
.cbc-tl-entry--left  .cbc-tl-entry-image img,
.cbc-tl-entry--left  .cbc-tl-img-placeholder { margin-left: auto; margin-right: 0; }

.cbc-tl-entry--right .cbc-tl-entry-image img,
.cbc-tl-entry--right .cbc-tl-img-placeholder { margin-left: 0; margin-right: auto; }

/* ── Entry Text ────────────────────────────────────────────────── */
.cbc-tl-entry-text {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cbc-tl-entry-year {
	display: block;
	font-size: clamp(20px, 2.2vw, 34px);
	font-weight: 700;
	line-height: 1;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.cbc-tl-entry-caption {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.65);
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   Desktop  : > 1024px  — 35 / 65 columns (default styles above)
   Tablet   : 601–1024px — 25 / 75 columns, nav visible, 2-col timeline
   Mobile   : ≤ 600px   — nav hidden, full-width, 2-col timeline kept
   ================================================================ */

/* ── Tablet (601px – 1024px) ───────────────────────────────────── */
@media (min-width: 601px) and (max-width: 1024px) {

	/* Narrower left column: uses --cbc-tablet-left custom property (default 25%) */
	.cbc-tl-left {
		width: var(--cbc-tablet-left, 25%);
		padding: 40px 24px;
	}

	/* Tighten up the title & body at this size */
	.cbc-tl-panel-title {
		font-size: clamp(18px, 2.4vw, 28px);
		margin-bottom: 14px;
	}

	.cbc-tl-panel-body {
		font-size: 13px;
		margin-bottom: 28px;
	}

	/* Nav stays vertical but font shrinks */
	.cbc-tl-year-nav li {
		font-size: 11px;
		padding: 6px 0 8px;
	}

	/* Right column padding tighter */
	.cbc-tl-right-inner {
		padding: 40px 32px 100px;
	}

	/* Timeline entries: keep 2-col but tighter gap and smaller images */
	.cbc-tl-entry {
		gap: 0 16px;
		margin-bottom: 60px;
	}

	.cbc-tl-entry-image img,
	.cbc-tl-img-placeholder {
		max-width: 220px;
	}

	.cbc-tl-entry-year {
		font-size: clamp(16px, 2vw, 24px);
	}

	.cbc-tl-entry-caption {
		font-size: 13px;
	}
}

/* ── Mobile (≤ 600px) ──────────────────────────────────────────── */
@media (max-width: 600px) {

	/* Full-width single column, natural page height */
	.cbc-tl-wrap {
		flex-direction: column;
		height: auto;
		overflow: visible;
	}

	/* Left panel: full width, auto height */
	.cbc-tl-left {
		width: 100%;
		height: auto;
		padding: 36px 20px 24px;
	}

	/* Hide the year nav on mobile */
	.cbc-tl-year-nav {
		display: none;
	}

	/* Title and body copy adjust */
	.cbc-tl-panel-title {
		font-size: clamp(22px, 6vw, 32px);
		margin-bottom: 12px;
	}

	.cbc-tl-panel-body {
		font-size: 14px;
		margin-bottom: 0;
	}

	/* Right column: natural scroll on mobile */
	.cbc-tl-right {
		height: auto;
		overflow-y: visible;
	}

	.cbc-tl-right-inner {
		padding: 32px 16px 80px;
	}

	/* ── Keep the 2-col timeline grid on mobile ──────────────────── */

	/* Tighter column gap and smaller dot column */
	.cbc-tl-entry {
		grid-template-columns: 1fr 14px 1fr;
		gap: 0 10px;
		margin-bottom: 48px;
	}

	/* Shrink dot to match smaller column */
	.cbc-tl-dot {
		width: 10px;
		height: 10px;
	}

	.cbc-tl-dot-col {
		padding-top: 4px;
	}

	/* Images fill their half-column */
	.cbc-tl-entry-image img,
	.cbc-tl-img-placeholder {
		max-width: 100%;
	}

	/* Clear the desktop max-width margins so images fill the cell */
	.cbc-tl-entry--left  .cbc-tl-entry-image img,
	.cbc-tl-entry--left  .cbc-tl-img-placeholder { margin-left: auto; margin-right: 0; }
	.cbc-tl-entry--right .cbc-tl-entry-image img,
	.cbc-tl-entry--right .cbc-tl-img-placeholder { margin-left: 0; margin-right: auto; }

	/* Scale down text */
	.cbc-tl-entry-year {
		font-size: clamp(14px, 4vw, 20px);
	}

	.cbc-tl-entry-caption {
		font-size: 12px;
		line-height: 1.5;
	}

	/* Move the vertical line to true center of the dot column */
	.cbc-tl-line {
		left: 50%;
		transform: translateX(-50%);
	}
}
