/* =========================================================
   PORTLOGICS — Timeline section [plx_timeline]
   Cột thời gian dọc, responsive, không phụ thuộc framework.
   Brand colors: Portlogics Navy #0A2540, Cyan accent #00B6FF.
   ========================================================= */

.plx-timeline-section {
	--plx-tl-line:        #e2e8f0;
	--plx-tl-line-active: #00b6ff;
	--plx-tl-bg:          #f8fafc;
	--plx-tl-card-bg:     #ffffff;
	--plx-tl-card-border: #e5e7eb;
	--plx-tl-navy:        #0a2540;
	--plx-tl-cyan:        #00b6ff;
	--plx-tl-cyan-soft:   rgba(0, 182, 255, 0.12);
	--plx-tl-text:        #1f2937;
	--plx-tl-muted:       #64748b;
	--plx-tl-shadow:      0 4px 12px rgba(10, 37, 64, 0.06);
	--plx-tl-shadow-h:    0 12px 28px rgba(10, 37, 64, 0.12);

	padding: 80px 20px;
	background: linear-gradient(180deg, #ffffff 0%, var(--plx-tl-bg) 100%);
	color: var(--plx-tl-text);
	font-family: inherit;
}

.plx-timeline-container {
	max-width: 1100px;
	margin: 0 auto;
}

/* Header */
.plx-timeline-header {
	text-align: center;
	margin-bottom: 64px;
}

.plx-timeline-kicker {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--plx-tl-cyan);
	background: var(--plx-tl-cyan-soft);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 16px;
}

.plx-timeline-title {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--plx-tl-navy);
	margin: 0 0 12px;
}

.plx-timeline-subtitle {
	font-size: 16px;
	line-height: 1.65;
	color: var(--plx-tl-muted);
	max-width: 720px;
	margin: 0 auto;
}

/* Timeline list — vertical line */
.plx-timeline-list {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}

.plx-timeline-list::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: var(--plx-tl-line);
	transform: translateX(-50%);
}

/* Item */
.plx-timeline-item {
	position: relative;
	padding: 24px 0;
	display: grid;
	grid-template-columns: 1fr 60px 1fr;
	align-items: flex-start;
	gap: 0;
}

.plx-timeline-item .plx-timeline-card {
	background: var(--plx-tl-card-bg);
	border: 1px solid var(--plx-tl-card-border);
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: var(--plx-tl-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	position: relative;
}

.plx-timeline-item .plx-timeline-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--plx-tl-shadow-h);
	border-color: var(--plx-tl-cyan);
}

/* Card placement: alternate left/right */
.plx-side-left .plx-timeline-card {
	grid-column: 1 / 2;
	margin-right: 28px;
	text-align: right;
}

.plx-side-right .plx-timeline-card {
	grid-column: 3 / 4;
	margin-left: 28px;
	text-align: left;
}

.plx-side-left .plx-timeline-tag,
.plx-side-left .plx-timeline-year {
	margin-left: auto;
}

/* Card arrow pointing to the line */
.plx-side-left .plx-timeline-card::after,
.plx-side-right .plx-timeline-card::after {
	content: '';
	position: absolute;
	top: 26px;
	width: 14px;
	height: 14px;
	background: var(--plx-tl-card-bg);
	border-top: 1px solid var(--plx-tl-card-border);
	border-right: 1px solid var(--plx-tl-card-border);
}

.plx-side-left .plx-timeline-card::after {
	right: -8px;
	transform: rotate(45deg);
}

.plx-side-right .plx-timeline-card::after {
	left: -8px;
	transform: rotate(-135deg);
}

/* Marker (dot trên line) */
.plx-timeline-marker {
	grid-column: 2 / 3;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 22px;
	position: relative;
	z-index: 2;
}

.plx-timeline-dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid var(--plx-tl-cyan);
	box-shadow: 0 0 0 4px rgba(0, 182, 255, 0.16);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.plx-timeline-item:hover .plx-timeline-dot {
	transform: scale(1.15);
	box-shadow: 0 0 0 6px rgba(0, 182, 255, 0.24);
}

/* Current marker — pulsing */
.plx-timeline-item.is-current .plx-timeline-dot {
	background: var(--plx-tl-cyan);
	border-color: var(--plx-tl-cyan);
	box-shadow: 0 0 0 6px rgba(0, 182, 255, 0.24);
	animation: plx-tl-pulse 2.4s ease-in-out infinite;
}

@keyframes plx-tl-pulse {
	0%, 100% { box-shadow: 0 0 0 6px rgba(0, 182, 255, 0.18); }
	50%      { box-shadow: 0 0 0 12px rgba(0, 182, 255, 0.04); }
}

/* Card content */
.plx-timeline-year {
	font-size: 28px;
	font-weight: 800;
	color: var(--plx-tl-cyan);
	letter-spacing: -0.5px;
	line-height: 1;
	margin-bottom: 8px;
	display: inline-block;
}

.plx-timeline-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--plx-tl-navy);
	background: var(--plx-tl-cyan-soft);
	padding: 4px 10px;
	border-radius: 999px;
	margin-bottom: 10px;
	margin-left: 10px;
}

.plx-side-left .plx-timeline-tag {
	margin-left: 0;
	margin-right: 10px;
}

.plx-timeline-event-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--plx-tl-navy);
	margin: 0 0 8px;
}

.plx-timeline-desc {
	font-size: 14px;
	line-height: 1.65;
	color: var(--plx-tl-muted);
	margin: 0;
}

/* Current item subtle highlight */
.plx-timeline-item.is-current .plx-timeline-card {
	border-color: var(--plx-tl-cyan);
	background: linear-gradient(180deg, #ffffff 0%, rgba(0, 182, 255, 0.03) 100%);
}

/* Reveal animation on scroll (CSS only, prefers-reduced-motion safe) */
@media (prefers-reduced-motion: no-preference) {
	.plx-timeline-item {
		opacity: 0;
		transform: translateY(20px);
		animation: plx-tl-rise 0.6s ease forwards;
	}
	.plx-timeline-item:nth-child(1) { animation-delay: 0.05s; }
	.plx-timeline-item:nth-child(2) { animation-delay: 0.10s; }
	.plx-timeline-item:nth-child(3) { animation-delay: 0.15s; }
	.plx-timeline-item:nth-child(4) { animation-delay: 0.20s; }
	.plx-timeline-item:nth-child(5) { animation-delay: 0.25s; }
	.plx-timeline-item:nth-child(6) { animation-delay: 0.30s; }
	.plx-timeline-item:nth-child(7) { animation-delay: 0.35s; }
	.plx-timeline-item:nth-child(8) { animation-delay: 0.40s; }
	.plx-timeline-item:nth-child(9) { animation-delay: 0.45s; }
	@keyframes plx-tl-rise {
		to { opacity: 1; transform: translateY(0); }
	}
}

/* ─────────────────────────────────────────────────
   Responsive — mobile / tablet
   ───────────────────────────────────────────────── */
@media (max-width: 768px) {
	.plx-timeline-section {
		padding: 56px 16px;
	}

	.plx-timeline-header {
		margin-bottom: 40px;
	}

	.plx-timeline-list::before {
		left: 24px;
		transform: none;
	}

	.plx-timeline-item {
		grid-template-columns: 48px 1fr;
		padding: 14px 0;
	}

	.plx-timeline-marker {
		grid-column: 1 / 2;
		justify-content: flex-start;
		padding-top: 22px;
	}

	.plx-side-left .plx-timeline-card,
	.plx-side-right .plx-timeline-card {
		grid-column: 2 / 3;
		text-align: left;
		margin-left: 16px;
		margin-right: 0;
	}

	.plx-side-left .plx-timeline-card::after,
	.plx-side-right .plx-timeline-card::after {
		left: -8px;
		right: auto;
		transform: rotate(-135deg);
	}

	.plx-side-left .plx-timeline-tag,
	.plx-side-left .plx-timeline-year {
		margin-left: 0;
	}

	.plx-side-left .plx-timeline-tag {
		margin-left: 10px;
		margin-right: 0;
	}

	.plx-timeline-year {
		font-size: 22px;
	}

	.plx-timeline-event-title {
		font-size: 16px;
	}

	.plx-timeline-desc {
		font-size: 13px;
	}
}

/* Dark mode (nếu site sau này có chế độ tối) */
@media (prefers-color-scheme: dark) {
	.plx-timeline-section[data-theme="auto"] {
		--plx-tl-bg:          #0f172a;
		--plx-tl-card-bg:     #1e293b;
		--plx-tl-card-border: #334155;
		--plx-tl-text:        #e2e8f0;
		--plx-tl-muted:       #94a3b8;
		--plx-tl-line:        #334155;
		background: linear-gradient(180deg, #0a2540 0%, #0f172a 100%);
	}
}
