/**
 * Custom Process Timeline – Frontend Styles
 *
 * Animation:
 *  .cpt-item-instant  → visible immediately (first 2 cards)
 *  .cpt-item-hidden   → starts invisible/offset, revealed by JS adding .cpt-item-visible
 *
 * @package CustomProcessTimeline
 */

 @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..900;1,9..40,100..900&display=swap');


:root {
	--cpt-primary:       #0D72B8;
	--cpt-primary-light: #ffffff;
	--cpt-accent:        #21759B;
	--cpt-line-bg:       #e2e8f0;
	--cpt-text:          #1e293b;
	--cpt-text-muted:    #64748b;
	--cpt-border:        #e2e8f0;
	--cpt-card-bg:       #ffffff;
	--cpt-card-shadow:   0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
	--cpt-card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.06);
	--cpt-radius:        16px;
	--cpt-line-width:    3px;
	--cpt-dot-size:      20px;
	--cpt-dot-inner:     10px;
	--cpt-gap:           44px;
}

/* ─── Wrapper ────────────────────────────────────────────────────────────── */
.cpt-timeline-wrapper {
	width: 100%;
	font-family: "DM Sans", sans-serif;
}

.cpt-timeline {
	position: relative;
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 0 60px;
	font-family: inherit;
}

/* ─── Centre line ────────────────────────────────────────────────────────── */
.cpt-timeline__track {
	position: absolute;
	top: 0; bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: var(--cpt-line-width);
	background: var(--cpt-line-bg);
	border-radius: 9999px;
	z-index: 0;
	overflow: hidden;
}

.cpt-timeline__track-fill {
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 0%;
	background: linear-gradient( to bottom, var(--cpt-primary), var(--cpt-accent) );
	border-radius: 9999px;
	transition: height .25s linear;
}

/* ─── Items ──────────────────────────────────────────────────────────────── */
.cpt-timeline__item {
	position: relative;
	display: flex;
	align-items: flex-start;
	margin-bottom: var(--cpt-gap);
	z-index: 1;
}

.cpt-timeline__item--left  { justify-content: flex-start; padding-right: calc(50% + 30px); }
.cpt-timeline__item--right { justify-content: flex-end;   padding-left:  calc(50% + 30px); }

/* ── Animation states ── */

/* First 2 cards: fully visible immediately, no transition needed */
.cpt-item-instant {
	opacity: 1;
	transform: translateY(0);
}

/* Cards 3+: start hidden below */
.cpt-item-hidden {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1);
}

/* JS adds this class when card enters viewport */
.cpt-item-hidden.cpt-item-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ─── Dot ────────────────────────────────────────────────────────────────── */
.cpt-timeline__dot {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	width:  var(--cpt-dot-size);
	height: var(--cpt-dot-size);
	background: #fff;
	border: var(--cpt-line-width) solid var(--cpt-primary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 5px var(--cpt-primary-light);
	z-index: 2;
	transition: box-shadow .3s ease, transform .3s ease;
}

.cpt-timeline__item:hover .cpt-timeline__dot {
	box-shadow: 0 0 0 8px var(--cpt-primary-light);
	transform: translateX(-50%) scale(1.18);
}

.cpt-timeline__dot-inner {
	display: block;
	width:  var(--cpt-dot-inner);
	height: var(--cpt-dot-inner);
	background: var(--cpt-primary);
	border-radius: 50%;
	transition: background .3s ease;
}

.cpt-timeline__item:hover .cpt-timeline__dot-inner {
	background: var(--cpt-accent);
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.cpt-timeline__card {
	position: relative;
	background: var(--cpt-card-bg);
	border: 1px solid var(--cpt-border);
	border-radius: var(--cpt-radius);
	box-shadow: var(--cpt-card-shadow);
	padding: 22px 26px;
	width: 100%;
	max-width: 450px;
	overflow: hidden;
	transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}

.cpt-timeline__card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--cpt-primary), var(--cpt-accent));
	border-radius: var(--cpt-radius) var(--cpt-radius) 0 0;
	opacity: 0;
	transition: opacity .3s ease;
}

.cpt-timeline__item:hover .cpt-timeline__card {
	box-shadow: var(--cpt-card-shadow-hover);
	transform: translateY(-4px);
	border-color: #bfdbfe;
}
.cpt-timeline__item:hover .cpt-timeline__card::before { opacity: 1; }

/* ─── Arrow ──────────────────────────────────────────────────────────────── */
.cpt-timeline__arrow {
	position: absolute;
	top: 24px;
	width: 14px; height: 14px;
	background: var(--cpt-card-bg);
	border: 1px solid var(--cpt-border);
	transform: rotate(45deg);
}
.cpt-timeline__item--left  .cpt-timeline__arrow { right: -7px; border-top-color: transparent;    border-left-color: transparent;  }
.cpt-timeline__item--right .cpt-timeline__arrow { left:  -7px; border-bottom-color: transparent; border-right-color: transparent; }

/* ─── Card header ────────────────────────────────────────────────────────── */
.cpt-timeline__card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}

.cpt-timeline__icon {
	flex-shrink: 0;
	width: 48px; height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0px;
	transition: background .3s ease;
}

.cpt-timeline__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    box-shadow: 0 10px 25.6px 0 rgba(13, 114, 184, 0.77);
    border-radius: 100px;
}

.cpt-timeline__meta    { flex: 1; min-width: 0; }

.cpt-timeline__step-number {
    display: inline-block;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: 9999px;
    margin-bottom: 0px;
    color: rgba(13, 114, 184, 0.20);
}

.cpt-timeline__title {
    font-size: 20px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    color: #000F3A;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* ─── Description ────────────────────────────────────────────────────────── */
.cpt-timeline__description {
	font-size: 16px;
	color:#333333;
	line-height: 1.65;
	margin-bottom: 14px;
}
.cpt-timeline__description p        { margin: 0 0 .5em; }
.cpt-timeline__description p:last-child { margin-bottom: 0; }

/* ─── Duration ───────────────────────────────────────────────────────────── */
.cpt-timeline__footer { padding-top: 12px; }

.cpt-timeline__duration {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #0D72B8;
    background: #eff6ff;
    padding: 8px 12px;
    border-radius: 9999px;
    transition: background .3s ease;
}
.cpt-timeline__item:hover .cpt-timeline__duration { background: #dbeafe; }

/* ─── Empty ──────────────────────────────────────────────────────────────── */
.cpt-empty {
	text-align: center; padding: 60px 20px;
	color: var(--cpt-text-muted); font-size: 1rem;
}

/* ─── Tablet ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.cpt-timeline__item--left  { padding-right: calc(50% + 22px); }
	.cpt-timeline__item--right { padding-left:  calc(50% + 22px); }
	.cpt-timeline__card { max-width: none; padding: 18px 20px; }
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.cpt-timeline__track { left: 10px; transform: none; }

	.cpt-timeline__item--left,
	.cpt-timeline__item--right {
		justify-content: flex-start;
		padding-left: 32px;
		padding-right: 0;
		margin-bottom: 24px;
	}

	.cpt-timeline__dot { left: 10px; top: 18px; }
	.cpt-timeline__item:hover .cpt-timeline__dot { transform: translateX(-50%) scale(1.15); }
	.cpt-timeline__arrow { display: none; }
	.cpt-timeline__card  { max-width: none; padding: 16px 14px; }

	/* On mobile all cards visible immediately — no fade needed */
	.cpt-item-hidden {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.cpt-item-hidden {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.cpt-timeline__card,
	.cpt-timeline__dot { transition: none !important; }
}
