/* ==========================================================================
   Timeline Slider
   NOTE: Swiper ka structural CSS yahin bundled hai (scoped to .cncf-tl__slider).
   Elementor ka swiper stylesheet har setup me enqueue nahi hota - bina uske
   slides stack ho jaate hain. Scoped hone se Elementor ke apne sliders par
   koi asar nahi padta.
   ========================================================================== */

/* ---------- Swiper structural (scoped) ---------- */
.cncf-tl__slider {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
}
.cncf-tl__slider .swiper-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	height: 100%;
	box-sizing: content-box;
	transform: translate3d(0, 0, 0);
	transition-property: transform;
	transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
	margin: 0;
	padding: 0;
	list-style: none;
}
.cncf-tl__slider .swiper-slide {
	position: relative;
	flex-shrink: 0;
	width: 100%;
	height: auto;
	box-sizing: border-box;
	transition-property: transform;
}
.cncf-tl__slider.swiper-initialized { cursor: grab; }
.cncf-tl__slider.swiper-initialized:active { cursor: grabbing; }

/* ---------- Tokens ---------- */
.cncf-tl {
	--cncf-accent: #e8542a;
	--cncf-heading: #0d2c4b;
	--cncf-text: #3d4a57;
	--cncf-rail: #dfe3e8;
	--cncf-card-bg: #ffffff;
	--cncf-radius: 10px;
	--cncf-lines: 3;
	--cncf-img-ratio: 4/3;
	--cncf-line-h: 1.6;
	--cncf-step-min: 96px;
	max-width: 100%;
}
.cncf-tl *,
.cncf-tl *::before,
.cncf-tl *::after { box-sizing: border-box; }

/* ---------- Head ---------- */
.cncf-tl__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 32px;
}
.cncf-tl__intro { max-width: 640px; min-width: 0; }

.cncf-tl__title {
	margin: 0 0 12px;
	color: var(--cncf-heading);
	font-size: clamp(24px, 3.4vw, 46px);
	line-height: 1.12;
	font-weight: 800;
}
.cncf-tl__desc {
	margin: 0;
	color: var(--cncf-text);
	line-height: 1.6;
}

.cncf-tl__nav { display: flex; gap: 10px; flex: none; }
.cncf-tl__arrow {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f1ee;
	color: var(--cncf-heading);
	cursor: pointer;
	transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.cncf-tl__arrow:hover { background: var(--cncf-accent); color: #fff; }
.cncf-tl__arrow:focus-visible { outline: 2px solid var(--cncf-accent); outline-offset: 3px; }
.cncf-tl__arrow.swiper-button-disabled,
.cncf-tl__arrow[disabled] { opacity: .35; pointer-events: none; }

/* ---------- Year rail ---------- */
.cncf-tl__rail-wrap {
	position: relative;
	margin: 0 0 34px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.cncf-tl__rail-wrap::-webkit-scrollbar { display: none; }

.cncf-tl__rail {
	position: relative;
	display: flex;
	min-width: 100%;
	width: max-content;
	padding-top: 4px;
}
.cncf-tl__rail::before {
	content: "";
	position: absolute;
	left: 6px;
	right: 6px;
	top: 10px;
	height: 1px;
	background: var(--cncf-rail);
}

.cncf-tl__step {
	flex: 1 1 var(--cncf-step-min);
	min-width: var(--cncf-step-min);
	padding: 0 8px 0 0;
	border: 0;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
	position: relative;
}
.cncf-tl__step:focus-visible { outline: 2px solid var(--cncf-accent); outline-offset: 4px; }

.cncf-tl__bullet {
	position: relative;
	z-index: 1;
	display: block;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	border: 2px solid var(--cncf-rail);
	background: var(--cncf-card-bg);
	transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.cncf-tl__step-label {
	display: block;
	margin-top: 13px;
	font-size: 14px;
	font-weight: 700;
	color: #8a949e;
	white-space: nowrap;
	transition: color .25s ease;
}
.cncf-tl__step.is-active .cncf-tl__bullet {
	background: var(--cncf-accent);
	border-color: var(--cncf-accent);
	transform: scale(1.15);
}
.cncf-tl__step.is-active .cncf-tl__step-label { color: var(--cncf-accent); }

/* ---------- Card ---------- */
.cncf-tl__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--cncf-card-bg);
	padding: 10px;
    border-radius: 10px;
}
.cncf-tl__media {
	aspect-ratio: var(--cncf-img-ratio);
	border-radius: var(--cncf-radius);
	overflow: hidden;
	background: #eceef0;
}
.cncf-tl__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	max-width: none;
}
.cncf-tl--duotone .cncf-tl__media img {
	filter: grayscale(1) sepia(.35) hue-rotate(140deg) saturate(1.5) contrast(1.05);
}

.cncf-tl__year {
	margin: 20px 0 4px;
	color: var(--cncf-accent);
	font-size: clamp(24px, 2.2vw, 32px);
	font-weight: 800;
	line-height: 1.1;
}
.cncf-tl__ttl {
	margin: 0 0 10px;
	color: var(--cncf-heading);
	font-size: clamp(17px, 2.2vw, 25px);
	font-weight: 700;
	line-height: 1.3;
}

.cncf-tl__body {
	position: relative;
	overflow: hidden;
	color: var(--cncf-text);
	line-height: var(--cncf-line-h);
	max-height: calc(var(--cncf-lines) * var(--cncf-line-h) * 1em);
	transition: max-height .35s ease;
}
.cncf-tl__body > *:first-child { margin-top: 0; }
.cncf-tl__body > *:last-child { margin-bottom: 0; }
.cncf-tl__body::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 1.6em;
	background: linear-gradient(to bottom, rgba(255,255,255,0), var(--cncf-card-bg));
	transition: opacity .2s ease;
	pointer-events: none;
}
.cncf-tl__card.is-open .cncf-tl__body::after { opacity: 0; }
.cncf-tl__body.is-unclamped { max-height: none; }
.cncf-tl__body.is-unclamped::after { display: none; }

.cncf-tl__more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cncf-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.cncf-tl__more:focus-visible { outline: 2px solid var(--cncf-accent); outline-offset: 3px; }
.cncf-tl__chev { transition: transform .25s ease; flex: none; }
.cncf-tl__card.is-open .cncf-tl__chev { transform: rotate(180deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.cncf-tl { --cncf-step-min: 92px; }
	.cncf-tl__arrow { width: 42px; height: 42px; }
}

@media (max-width: 767px) {
	.cncf-tl { --cncf-step-min: 88px; }
	.cncf-tl__head {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
	}
	.cncf-tl__nav { order: 2; }
	.cncf-tl__rail-wrap { margin-bottom: 26px; }
	.cncf-tl__step-label { font-size: 13px; }
}

@media (max-width: 479px) {
	.cncf-tl { --cncf-step-min: 78px; }
	.cncf-tl__arrow { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.cncf-tl *,
	.cncf-tl *::after { transition-duration: .01ms !important; }
}
