/* PTE Growth Timeline — vertical zig-zag matching the Figma comp.
   Milestones alternate side to side, threaded by a swooshing lime wave drawn
   through the dots by script.js. Bands are floating rounded panels (white /
   teal / green / dark-blue). Photos are inset rounded cards, except a couple of
   full-bleed edge photos. Partner cards bleed off the page edge. */

.pte-growth {
	--edge: clamp(1.25rem, 9.8vw, 140px);    /* page gutter — 140px at the 1440 canvas */
	--inner: clamp(0.75rem, 1.4vw, 20px);    /* gap toward the centre line (~20px) */
	--radius: clamp(28px, 4vw, 56px);        /* band + card corner radius */
	/* Faint cityscape behind the top (2001) region; the coloured bands are
	   opaque and sit on top, so it shows through their rounded corners too. */
	background:
		linear-gradient(rgba(242, 244, 238, .9), rgba(242, 244, 238, .9)),
		url('../../assets/img/milestone-2001.jpg') center top / 1440px auto no-repeat,
		#f2f4ee;
	color: var(--pte-ink, #251e20);
}
.pte-growth__track { position: relative; }

/* ------------------------------------------------------------------ rows */
.pte-growth__row {
	position: relative;
	display: flex;
	align-items: flex-start;             /* content anchored to the top, as in the comp */
	min-height: clamp(420px, 47vw, 680px);
	scroll-margin-top: 90px;
	overflow: hidden;
}
.pte-growth__row--photo-right { flex-direction: row-reverse; }
/* Per-section heights to match the comp's vertical rhythm (1440 canvas). The
   card sections carry more whitespace than their content alone would give. */
#milestone-2007 { min-height: 860px; }
#milestone-2009-2010 { min-height: 980px; }
#milestone-2012-2016 { min-height: 1055px; }
#milestone-2020 { min-height: 930px; }
@media (max-width: 1200px) {
	#milestone-2007, #milestone-2009-2010, #milestone-2012-2016, #milestone-2020 { min-height: 0; }
}

/* Floating coloured bands (white rows stay transparent over the page bg). */
.pte-growth__row--band-teal  { background: #95e0e9; border-radius: var(--radius); }
.pte-growth__row--band-green { background: #00a94f; border-radius: var(--radius); }
.pte-growth__row--band-blue  { background: #0d5ba8; border-radius: var(--radius); color: #fff; }

/* Extra breathing room above the first milestone (banner → 2001 gap). */
#milestone-2001 { padding-top: clamp(56px, 6.5vw, 104px); }

/* --------------------------------------------------------------- media */
.pte-growth__media { flex: 1 1 50%; align-self: stretch; display: flex; position: relative; z-index: 3; }
.pte-growth__media--none { align-self: auto; }

/* Full-bleed edge photo — absolutely positioned within the media column so its
   natural image height cannot propagate up through the flex chain and inflate
   the section. The media column's height comes from align-self:stretch on the
   row, not from the photo. */
.pte-growth__media--bleed .pte-growth__img {
	position: absolute; inset: 0; overflow: hidden; background: #e8f3ee;
}
.pte-growth__row--photo-left  .pte-growth__media--bleed .pte-growth__img { border-radius: 0 var(--radius) var(--radius) 0; }
.pte-growth__row--photo-right .pte-growth__media--bleed .pte-growth__img { border-radius: var(--radius) 0 0 var(--radius); }

/* Inset rounded card — a floating photo with a page-gutter margin on its
   outer side and generous whitespace top/bottom. */
.pte-growth__media--card { align-items: flex-start; padding-top: clamp(1.5rem, 3.4vw, 3rem); }
/* Cards display each photo at its natural (Figma) dimensions, capped to the column. */
.pte-growth__media--card .pte-growth__img {
	width: auto; max-width: 100%;
	overflow: hidden; border-radius: 24px; background: #e8f3ee;
	box-shadow: 0 22px 55px rgba(0, 40, 60, .18);
}
.pte-growth__media--card .pte-growth__img img { width: auto; height: auto; max-width: 100%; }
.pte-growth__row--photo-left  .pte-growth__media--card { padding-left: var(--edge);  padding-right: var(--inner); justify-content: flex-start; }
.pte-growth__row--photo-right .pte-growth__media--card { padding-right: var(--edge); padding-left: var(--inner);  justify-content: flex-end; }

.pte-growth__img { display: block; }
.pte-growth__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --------------------------------------------------------------- content */
.pte-growth__content {
	flex: 1 1 50%; position: relative; z-index: 2;
	padding-block: clamp(3rem, 6.6vw, 6rem);
}
.pte-growth__row--photo-left  .pte-growth__content { padding-left: var(--inner); padding-right: var(--edge); }
.pte-growth__row--photo-right .pte-growth__content { padding-right: var(--inner); padding-left: var(--edge); }

.pte-growth__year { display: block; font-weight: 700; font-size: clamp(2.5rem, 3.9vw, 3.5rem); line-height: 1; margin-bottom: .35rem; }
.pte-growth__year--blue  { color: var(--pte-blue, #006db9); }
.pte-growth__year--green { color: var(--pte-green, #006d33); }
.pte-growth__year--ink   { color: var(--pte-ink, #251e20); }
.pte-growth__year--white { color: #fff; }
.pte-growth__title { font-size: clamp(1.6rem, 2.3vw, 2rem); font-weight: 400; margin: 0 0 .85rem; line-height: 1.15; color: inherit; max-width: 420px; }
.pte-growth__desc  { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.5; margin: 0; max-width: 540px; color: inherit; }

/* ---------------------------------------------------------- partner card */
.pte-growth__partner {
	position: relative; z-index: 2;
	margin-top: clamp(1rem, 2vw, 1.5rem);
	padding: clamp(1.5rem, 2.5vw, 2rem);
	border-radius: 24px;
}
/* Bleed the card off the page edge on the text side, keeping its copy aligned
   to the page gutter. */
.pte-growth__row--photo-right .pte-growth__partner { margin-left: calc(-1 * var(--edge)); margin-right: calc(-1 * clamp(0.25rem, 4vw, 56px)); padding-left: var(--edge); border-radius: 0 24px 24px 0; }
.pte-growth__row--photo-left  .pte-growth__partner { margin-right: calc(-1 * var(--edge)); margin-left: calc(-1 * clamp(0.25rem, 4vw, 56px)); padding-right: var(--edge); border-radius: 24px 0 0 24px; }
/* No-photo rows have room to run the card well past the centre, as in the comp. */
.pte-growth__row--photo-right:has(.pte-growth__media--none) .pte-growth__partner { margin-right: calc(-1 * clamp(1rem, 16vw, 240px)); }
.pte-growth__row--photo-left:has(.pte-growth__media--none)  .pte-growth__partner { margin-left: calc(-1 * clamp(1rem, 16vw, 240px)); }

/* 2022's Matapédia card sits in the gap above the 2022 heading, as in the comp. */
#milestone-2022 .pte-growth__content { display: flex; flex-direction: column; }
#milestone-2022 .pte-growth__partner { order: -1; margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); }

.pte-growth__partner--green { background: #00a94f; color: var(--pte-ink, #251e20); }
.pte-growth__partner--teal  { background: #95e0e9; color: var(--pte-ink, #251e20); }
.pte-growth__partner--blue  { background: #0d5ba8; color: #fff; }

.pte-growth__partner-badge {
	display: inline-flex; align-items: center; gap: .45rem;
	background: var(--pte-ink, #251e20); color: #fff;
	font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
	padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1rem;
}
.pte-growth__partner-badge span { color: var(--pte-lime, #c3df6c); font-size: 1rem; line-height: 0; }
.pte-growth__partner-title { font-size: clamp(1.05rem, 1.3vw, 1.1875rem); font-weight: 800; margin: 0 0 .15rem; color: inherit; }
.pte-growth__partner-name  { font-size: .875rem; font-weight: 800; margin: 0 0 .8rem; color: inherit; }
.pte-growth__partner-desc  { font-size: 1rem; line-height: 1.55; margin: 0 0 1.15rem; color: inherit; }
.pte-growth__partner-more  {
	display: inline-flex; align-items: center; gap: .5rem;
	color: inherit; font-weight: 800; text-decoration: none; padding: .25rem 0;
}
.pte-growth__partner-more span { transition: transform .15s; }
.pte-growth__partner-more:hover span { transform: translateX(4px); }

/* ------------------------------------------------------------------ wave */
.pte-growth__wave { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.pte-growth__wave path { fill: none; stroke: url(#pte-growth-grad); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ dots */
/* Dual marker on the text side near the year: a filled dot + a hollow ring
   offset diagonally, colour keyed to the band. */
.pte-growth__dot, .pte-growth__ring {
	position: absolute; width: 20px; height: 20px; border-radius: 50%; z-index: 4;
}
.pte-growth__ring { background: transparent; }
/* Horizontal: markers sit at the text-side outer margin. */
.pte-growth__row--photo-right .pte-growth__dot,
.pte-growth__row--photo-right .pte-growth__ring { left: clamp(20px, 6vw, 96px); }
.pte-growth__row--photo-left  .pte-growth__dot,
.pte-growth__row--photo-left  .pte-growth__ring { right: clamp(20px, 6vw, 96px); }
/* A top marker near the row top (incoming segment ends) and a bottom marker near
   the row bottom (outgoing segment starts); ring stacked above the filled dot. */
.pte-growth__dot--top     { top: clamp(1.25rem, 2.6vw, 2.1rem); }
.pte-growth__ring--top    { top: calc(clamp(1.25rem, 2.6vw, 2.1rem) - 26px); }
.pte-growth__dot--bottom  { bottom: clamp(1.5rem, 3vw, 2.5rem); }
.pte-growth__ring--bottom { bottom: calc(clamp(1.5rem, 3vw, 2.5rem) + 26px); }
/* First row has no incoming segment; last row has no outgoing one. */
#milestone-2001 .pte-growth__dot--top, #milestone-2001 .pte-growth__ring--top,
#milestone-today .pte-growth__dot--bottom, #milestone-today .pte-growth__ring--bottom { display: none; }

.pte-growth__row--band-white .pte-growth__dot  { background: var(--pte-blue, #006db9); }
.pte-growth__row--band-white .pte-growth__ring { border: 4px solid var(--pte-blue, #006db9); }
.pte-growth__row--band-teal  .pte-growth__dot  { background: var(--pte-blue-dark, #005474); }
.pte-growth__row--band-teal  .pte-growth__ring { border: 4px solid var(--pte-blue-dark, #005474); }
.pte-growth__row--band-green .pte-growth__dot  { background: var(--pte-blue-dark, #0d5ba8); }
.pte-growth__row--band-green .pte-growth__ring { border: 4px solid var(--pte-blue-dark, #0d5ba8); }
.pte-growth__row--band-blue  .pte-growth__dot  { background: var(--pte-ink, #251e20); }
.pte-growth__row--band-blue  .pte-growth__ring { border: 4px solid var(--pte-lime, #c3df6c); }
/* Per-section dot colours that don't follow the band rule (per the comp). */
#milestone-2001 .pte-growth__dot, #milestone-2017 .pte-growth__dot { background: var(--pte-green, #00a576); }
#milestone-2001 .pte-growth__ring, #milestone-2017 .pte-growth__ring { border-color: var(--pte-green, #00a576); }

/* ---------------------------------------------------------------- map overlay */
/* Map-only media column: stretches to row height just like a bleed photo. */
.pte-growth__media--map { align-self: stretch; }

/* Deco background: lime or teal rounded inset card behind the map, like a photo card. */
.pte-growth__media--deco-lime::before,
.pte-growth__media--deco-teal::before {
	content: '';
	position: absolute;
	inset: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
	border-radius: var(--radius);
	z-index: 0;
}
.pte-growth__media--deco-lime::before { background: #c3df6c; }
.pte-growth__media--deco-teal::before { background: #8fd7e0; }

/* The map image: absolutely fills the media column (or the deco card area). */
.pte-growth__map-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	z-index: 4;
	pointer-events: none;
}
/* When there's a deco card, shrink map to fit within it. */
.pte-growth__media--deco-lime .pte-growth__map-overlay,
.pte-growth__media--deco-teal .pte-growth__map-overlay {
	inset: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
	width: calc(100% - 2 * clamp(1rem, 3vw, 2.5rem));
	height: calc(100% - 2 * clamp(1.5rem, 4vw, 3.5rem));
}

/* --------------------------------------------------------------- mobile */
@media (max-width: 820px) {
	.pte-growth__wave { display: none; }
	.pte-growth__dot, .pte-growth__ring { display: none; }
	.pte-growth__row, .pte-growth__row--photo-right { flex-direction: column; align-items: stretch; min-height: 0; }
	.pte-growth__media--none { display: none; }
	.pte-growth__media { align-self: stretch; }
	.pte-growth__media--card { padding: 0 !important; justify-content: stretch; }
	.pte-growth__media--card .pte-growth__img { max-width: none; border-radius: 0; aspect-ratio: 16 / 10; }
	.pte-growth__media--bleed .pte-growth__img { border-radius: 0 !important; aspect-ratio: 16 / 10; align-self: auto; }
	.pte-growth__content { padding: clamp(1.5rem, 6vw, 2rem) !important; }
	.pte-growth__partner { margin: clamp(1.25rem, 4vw, 2rem) 0 0 !important; padding: clamp(1.25rem, 5vw, 1.75rem) !important; border-radius: 20px !important; }
	.pte-growth__desc { max-width: none; }
}
