/* ============================================================
 * Codenok Timeline Slider
 * ============================================================ */

.cnk-timeline-wrap {
	--cnk-accent: #534AB7;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.cnk-timeline-wrap *,
.cnk-timeline-wrap *::before,
.cnk-timeline-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Cabecera ---------- */
.cnk-tl-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.cnk-tl-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.cnk-tl-nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.cnk-tl-nav button {
	width: 40px;
	height: 40px;
	border: 1px solid #eee;
	background: #fff;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cnk-tl-nav button:hover {
	border-color: #534AB7;
	color: #534AB7;
}

.cnk-tl-nav button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ---------- Área de scroll ---------- */
.cnk-tl-scroll {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	cursor: grab;
	scrollbar-width: none;          /* Firefox */
	-ms-overflow-style: none;       /* IE / Edge */
	-webkit-overflow-scrolling: touch;
}

.cnk-tl-scroll::-webkit-scrollbar {
	display: none;                  /* Chrome / Safari */
	width: 0;
	height: 0;
}

.cnk-tl-scroll.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

/* ---------- Track ---------- */
.cnk-tl-track {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 24px;
	padding: 8px 4px 8px;
	min-width: min-content;
}

/* Línea horizontal de conexión, alineada con el centro de los dots */
.cnk-tl-line {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 17px; /* stem (12) + medio dot (6) - 1 */
	height: 2px;
	background: #eee;
	z-index: 0;
}

/* ---------- Item ---------- */
.cnk-tl-item {
	position: relative;
	z-index: 1;
	width: 210px;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

/* ---------- Card ---------- */
.cnk-tl-card {
	width: 100%;
	flex: 1 1 auto; /* iguala alturas dentro del item para alinear los dots */
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cnk-tl-item.active .cnk-tl-card {
	box-shadow: 0 8px 24px rgba(83, 74, 183, 0.12);
	transform: translateY(-2px);
}

.cnk-tl-date {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #534AB7;
	margin-bottom: 6px;
}

.cnk-tl-card-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1a1a;
}

.cnk-tl-card-sub {
	margin: 0 0 10px;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

.cnk-tl-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	background: #EEEDFE;
	color: #3C3489;
	line-height: 1.4;
}

/* ---------- Conector (stem + dot) ---------- */
.cnk-tl-connector {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 4px;
}

.cnk-tl-stem {
	width: 2px;
	height: 12px;
	background: #ddd;
}

.cnk-tl-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #ccc;
	transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cnk-tl-item.active .cnk-tl-dot {
	width: 18px;
	height: 18px;
	background: #534AB7;
	border-color: #534AB7;
}

/* ---------- Barra de progreso ---------- */
.cnk-tl-progress {
	position: relative;
	width: 100%;
	height: 2px;
	background: #eee;
	border-radius: 2px;
	margin-top: 20px;
	overflow: hidden;
}

.cnk-tl-progress-bar {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0;
	background: #534AB7;
	border-radius: 2px;
	transition: width 0.3s ease;
}

/* ---------- Caja de detalle ---------- */
.cnk-tl-detail {
	margin-top: 24px;
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #eee;
	border-radius: 12px;
	min-height: 60px;
}

.cnk-tl-detail:empty {
	display: none;
}

.cnk-tl-detail .cnk-tl-detail-head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.cnk-tl-detail .cnk-tl-detail-date {
	font-size: 13px;
	font-weight: 600;
	color: #534AB7;
}

.cnk-tl-detail .cnk-tl-detail-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
}

.cnk-tl-detail .cnk-tl-detail-desc {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.6;
	color: #444;
}

.cnk-tl-detail .cnk-tl-detail-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 13px;
	color: #666;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.cnk-tl-item {
		width: 160px;
	}

	.cnk-tl-title {
		font-size: 20px;
	}
}
