/*
 * [bd_pregnancy_timeline] — trimester-grouped visual timeline for the
 * "Month to Month Diary" hub page. Loads on top of kdtc-shared.css and
 * reuses its color tokens, but this is a full-bleed hub layout rather
 * than a boxed calculator card, so it overrides the base .kdtc-calc
 * chrome (border, shadow, max-width, overflow) the same way
 * kd-download.css and kd-names.css do for their own full-width modules.
 */

.kdtc-preg-timeline {
	max-width: 100%;
	width: 100%;
	margin: 0 auto;
	padding: 0;
	border: none;
	box-shadow: none;
	background: transparent;
	/* The timeline dots sit slightly outside each card (see
	   .kdtc-preg-timeline__card::before below) — kdtc-shared.css hides
	   overflow on .kdtc-calc by default, which would clip them. */
	overflow: visible;

	/* Per-trimester accent pairs (soft pill background + line color),
	   matching the approved mockup's blue / teal / gold / rose scheme. */
	--kdtc-t1: var(--kdtc-accent-soft);
	--kdtc-t1-line: var(--kdtc-accent);
	--kdtc-t2: #eaf7f2;
	--kdtc-t2-line: #2f9e77;
	--kdtc-t3: #fff5e6;
	--kdtc-t3-line: #d68a2c;
	--kdtc-t4: #fdeef2;
	--kdtc-t4-line: #c05a7c;
}

/* ---------- Hero ---------- */

.kdtc-preg-timeline__hero {
	text-align: center;
	margin-bottom: 2.5em;
}

.kdtc-preg-timeline__title {
	font-size: 2em;
	line-height: 1.25;
	margin: 0 0 0.3em;
	color: var(--kdtc-accent-dark);
}

.kdtc-preg-timeline__subtitle {
	color: var(--kdtc-muted);
	font-size: 1.05em;
	max-width: 560px;
	margin: 0 auto 1.4em;
}

.kdtc-preg-timeline__cta-row {
	display: flex;
	gap: 0.8em;
	justify-content: center;
	flex-wrap: wrap;
}

.kdtc-preg-timeline__cta {
	display: inline-block;
	padding: 0.7em 1.4em;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.95em;
	line-height: 1.3;
}

.kdtc-preg-timeline__cta--primary {
	background: var(--kdtc-accent);
	/* !important because the site theme's own link-color rules otherwise
	   win the cascade here and leave the button text the same blue as its
	   background (see the same fix on .kdtc-calc__title in kdtc-shared.css). */
	color: #fff !important;
}

.kdtc-preg-timeline__cta--primary:hover,
.kdtc-preg-timeline__cta--primary:focus-visible,
.kdtc-preg-timeline__cta--primary:visited {
	background: var(--kdtc-accent-dark);
	color: #fff !important;
}

/* ---------- Trimester groups ---------- */

.kdtc-preg-timeline__group {
	margin-bottom: 3em;
}

.kdtc-preg-timeline__group:last-child {
	margin-bottom: 0;
}

.kdtc-preg-timeline__group-label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6em;
	font-size: 0.8em;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--kdtc-muted);
	margin: 0 0 1.2em;
}

.kdtc-preg-timeline__pill {
	padding: 0.3em 0.9em;
	border-radius: 999px;
	font-size: 1em;
}

.kdtc-preg-timeline__group--t1 .kdtc-preg-timeline__pill {
	background: var(--kdtc-t1);
	color: var(--kdtc-t1-line);
}

.kdtc-preg-timeline__group--t2 .kdtc-preg-timeline__pill {
	background: var(--kdtc-t2);
	color: var(--kdtc-t2-line);
}

.kdtc-preg-timeline__group--t3 .kdtc-preg-timeline__pill {
	background: var(--kdtc-t3);
	color: var(--kdtc-t3-line);
}

.kdtc-preg-timeline__group--t4 .kdtc-preg-timeline__pill {
	background: var(--kdtc-t4);
	color: var(--kdtc-t4-line);
}

/* ---------- Rail + cards ---------- */

.kdtc-preg-timeline__rail {
	position: relative;
	padding-left: 2.4em;
}

.kdtc-preg-timeline__rail::before {
	content: "";
	position: absolute;
	left: 0.95em;
	top: 0.4em;
	bottom: 0.4em;
	width: 3px;
	border-radius: 3px;
	opacity: 0.35;
}

.kdtc-preg-timeline__group--t1 .kdtc-preg-timeline__rail::before { background: var(--kdtc-t1-line); }
.kdtc-preg-timeline__group--t2 .kdtc-preg-timeline__rail::before { background: var(--kdtc-t2-line); }
.kdtc-preg-timeline__group--t3 .kdtc-preg-timeline__rail::before { background: var(--kdtc-t3-line); }
.kdtc-preg-timeline__group--t4 .kdtc-preg-timeline__rail::before { background: var(--kdtc-t4-line); }

.kdtc-preg-timeline__card {
	position: relative;
	background: var(--kdtc-panel-bg);
	border: 1px solid var(--kdtc-border);
	border-radius: var(--kdtc-radius);
	padding: 1.1em 1.3em;
	margin-bottom: 1em;
	display: flex;
	gap: 1em;
	align-items: flex-start;
	text-decoration: none;
	color: inherit;
	transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

/*
 * The text-decoration/color rule above is a single class, specificity
 * (0,1,0), which loses the cascade to Elementor's site-wide global colors
 * kit rule ".elementor-kit-2271 a" (0,1,1) regardless of load order — the
 * same bug already found and fixed on the month nav bar (see the comment
 * at the top of kd-month-nav.css). Without this override the card title
 * and teaser render as the theme's default blue underlined link color
 * instead of the intended dark ink. Nesting under the wrapper class gives
 * this rule two classes worth of specificity, which beats the kit rule
 * outright. Do not remove this thinking it duplicates the rule above.
 */
.kdtc-preg-timeline .kdtc-preg-timeline__card {
	color: inherit;
	text-decoration: none;
}

.kdtc-preg-timeline__rail .kdtc-preg-timeline__card:last-child {
	margin-bottom: 0;
}

.kdtc-preg-timeline__card:hover,
.kdtc-preg-timeline__card:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(20, 30, 50, 0.12);
	border-color: var(--kdtc-accent);
}

.kdtc-preg-timeline__card:focus-visible {
	outline: 2px solid var(--kdtc-accent);
	outline-offset: 2px;
}

.kdtc-preg-timeline__card::before {
	content: "";
	position: absolute;
	left: -2.05em;
	top: 1.35em;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 3px solid var(--kdtc-bg, #fff);
	box-shadow: 0 0 0 2px currentColor;
}

.kdtc-preg-timeline__group--t1 .kdtc-preg-timeline__card::before { color: var(--kdtc-t1-line); }
.kdtc-preg-timeline__group--t2 .kdtc-preg-timeline__card::before { color: var(--kdtc-t2-line); }
.kdtc-preg-timeline__group--t3 .kdtc-preg-timeline__card::before { color: var(--kdtc-t3-line); }
.kdtc-preg-timeline__group--t4 .kdtc-preg-timeline__card::before { color: var(--kdtc-t4-line); }

.kdtc-preg-timeline__num {
	flex: 0 0 auto;
	width: 3em;
	height: 3em;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.1em;
	color: #fff;
}

.kdtc-preg-timeline__group--t1 .kdtc-preg-timeline__num { background: var(--kdtc-t1-line); }
.kdtc-preg-timeline__group--t2 .kdtc-preg-timeline__num { background: var(--kdtc-t2-line); }
.kdtc-preg-timeline__group--t3 .kdtc-preg-timeline__num { background: var(--kdtc-t3-line); }
.kdtc-preg-timeline__group--t4 .kdtc-preg-timeline__num { background: var(--kdtc-t4-line); }

.kdtc-preg-timeline__body {
	flex: 1;
	min-width: 0;
}

.kdtc-preg-timeline__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6em;
	flex-wrap: wrap;
}

.kdtc-preg-timeline__month-title {
	font-size: 1.15em;
	font-weight: 700;
}

.kdtc-preg-timeline__weeks {
	font-size: 0.8em;
	color: var(--kdtc-muted);
	white-space: nowrap;
}

.kdtc-preg-timeline__teaser {
	display: block;
	margin: 0.4em 0 0.6em;
	color: var(--kdtc-muted);
	font-size: 0.95em;
}

.kdtc-preg-timeline__size {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.82em;
	font-weight: 700;
	padding: 0.25em 0.7em;
	border-radius: 999px;
	background: var(--kdtc-bg, #fff);
	border: 1px solid var(--kdtc-border);
}

.kdtc-preg-timeline__group--t1 .kdtc-preg-timeline__size { color: var(--kdtc-t1-line); }
.kdtc-preg-timeline__group--t2 .kdtc-preg-timeline__size { color: var(--kdtc-t2-line); }
.kdtc-preg-timeline__group--t3 .kdtc-preg-timeline__size { color: var(--kdtc-t3-line); }
.kdtc-preg-timeline__group--t4 .kdtc-preg-timeline__size { color: var(--kdtc-t4-line); }

.kdtc-preg-timeline__read {
	flex: 0 0 auto;
	align-self: center;
	font-size: 0.85em;
	font-weight: 700;
	color: var(--kdtc-accent-dark);
	white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
	.kdtc-preg-timeline__card {
		flex-wrap: wrap;
	}
	.kdtc-preg-timeline__read {
		display: none;
	}
	.kdtc-preg-timeline__num {
		width: 2.5em;
		height: 2.5em;
		font-size: 1em;
	}
	.kdtc-preg-timeline__title {
		font-size: 1.6em;
	}
}

/* ---------- Dark mode (matches kdtc-auto-dark used elsewhere) ---------- */

@media (prefers-color-scheme: dark) {
	.kdtc-preg-timeline.kdtc-auto-dark {
		--kdtc-ink: #e7ebf1;
		--kdtc-muted: #a3adba;
		--kdtc-border: #333c49;
		--kdtc-bg: #1b2330;
		--kdtc-panel-bg: #232c3b;
		--kdtc-accent-soft: #24334a;
	}
}
