/*
 * Legacy page layout: hero picture, two-column section, gray band, gallery rail.
 * Colours and type come from the Elementor kit's global variables
 * (--e-global-color-* / --e-global-typography-*), so they follow the kit.
 *
 * Classes set on the Elementor containers of the page (Advanced > CSS Classes):
 *   zlg-hero         hero container           zlg-hero__media  its [legacy_hero] widget
 *   zlg-section      two-column section       zlg-main         left column
 *   zlg-band         milestones container     zlg-rail         right column ([legacy_gallery])
 */

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

/* Height follows the picture (2400 x 1250), capped on very wide screens. */
.elementor .zlg-hero.e-con {
	--min-height: min(52.0833vw, 800px);
	overflow: hidden;
}

.zlg-hero > .e-con-inner {
	position: static;
}

.elementor .zlg-hero .zlg-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	max-width: none;
	margin: 0;
}

.zlg-hero__media .elementor-widget-container,
.zlg-hero__media .elementor-shortcode,
.zlg-hero__picture {
	display: block;
	width: 100%;
	height: 100%;
}

.zlg-hero__picture .zlg-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center 30%;
}

/* the title tab sits above the picture */
.zlg-hero .e-con.e-child {
	position: relative;
	z-index: 1;
}

@media (max-width: 767px) {
	/* phone crop is 4:3 */
	.elementor .zlg-hero.e-con {
		--min-height: 75vw;
	}

	.zlg-hero__picture .zlg-hero__img {
		object-position: center;
	}

	/* the tab hugs its title instead of covering the bottom of the picture */
	.elementor .zlg-hero .e-con.e-child {
		--width: auto;
		width: auto;
		max-width: 100%;
	}
}

/* ---------- Two columns ---------- */

.zlg-section {
	--zlg-gutter: 75px;                                  /* = the section's side padding */
	--zlg-band-bg: var(--e-global-color-1965ad6);
}

.elementor .zlg-section.e-con > .e-con-inner {
	column-gap: clamp(40px, 6vw, 90px);
}

.elementor .zlg-main.e-con {
	--width: auto;
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

.elementor .zlg-rail.e-con {
	--width: clamp(260px, 28%, 420px);
	flex: 0 0 auto;
	width: clamp(260px, 28%, 420px);
	position: relative;
	z-index: 1;                                          /* above the gray band */
}

/* Gray band: starts at the milestones, full width of the window, runs to the footer. */
.elementor .zlg-band.e-con {
	flex-grow: 1;
	background-color: var(--zlg-band-bg);
	box-shadow: 0 0 0 100vmax var(--zlg-band-bg);
	clip-path: inset(0 -100vmax);
}

/* Sticky rail (class added by legacy-page.js when the rail is the shorter column). */
.zlg-rail--sticky > .elementor-widget {
	position: sticky;
	top: var(--zlg-sticky-top, 108px);
}

/* ---------- Gallery ---------- */

.zlg {
	font-family: var(--e-global-typography-ed00615-font-family), sans-serif;
	color: var(--e-global-color-text);
}

.zlg__head {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: var(--e-global-typography-6c26703-font-weight);
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--e-global-color-secondary);
}

.zlg .zlg__title {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.zlg__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zlg__item {
	min-width: 0;
	margin: 0;
	padding: 0;
}

.zlg__item--featured,
.zlg__item--wide {
	grid-column: 1 / -1;
}

.zlg__figure {
	margin: 0;
}

.zlg__link {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background: var(--e-global-color-c72025d);
	box-shadow: 0 3px 6px color-mix(in srgb, var(--e-global-color-61f9ad1) 22%, transparent);
	cursor: zoom-in;
}

.zlg__link:focus-visible {
	outline: 3px solid var(--e-global-color-61f9ad1);
	outline-offset: 3px;
}

.zlg__item--featured .zlg__link {
	aspect-ratio: 5 / 4;
}

.zlg__item--wide .zlg__link {
	aspect-ratio: 4 / 3;
}

.zlg__link .zlg__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--zlg-focus-x, 50%) 30%;   /* --zlg-focus-x: per-image "crop focus" field */
	border-radius: 0;
}

/* full-width extras (the newspaper clipping) are cropped to their top */
.zlg__item--wide .zlg__img {
	object-position: var(--zlg-focus-x, 50%) top;
}

.zlg__caption {
	margin-top: 8px;
	font-size: 12px;
	font-style: normal;
	font-weight: var(--e-global-typography-ed00615-font-weight);
	line-height: 1.35;
	color: var(--e-global-color-text);
}

/* ---------- Tablet and phone: gallery below the milestones, as a swipe carousel ---------- */

@media (max-width: 1024px) {
	.zlg-section {
		--zlg-gutter: 50px;
	}

	.elementor .zlg-main.e-con,
	.elementor .zlg-rail.e-con {
		--width: 100%;
		flex: 0 0 auto;
		width: 100%;
	}

	/* the band carries on behind the gallery, down to the footer */
	.elementor .zlg-rail.e-con {
		background-color: var(--zlg-band-bg);
		box-shadow: 0 0 0 100vmax var(--zlg-band-bg);
		clip-path: inset(0 -100vmax);
	}

	.zlg__head {
		margin-bottom: 14px;
		font-size: 12px;
	}

	.zlg__grid {
		display: flex;
		gap: 14px;
		margin-inline: calc(var(--zlg-gutter) * -1);
		padding: 4px var(--zlg-gutter) 16px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--zlg-gutter);
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		scrollbar-color: var(--e-global-color-34124bd) transparent;
	}

	.zlg__item {
		flex: 0 0 min(72vw, 300px);
		scroll-snap-align: start;
	}

	.zlg__item .zlg__link,
	.zlg__item--featured .zlg__link,
	.zlg__item--wide .zlg__link {
		aspect-ratio: 1 / 1;
	}
}

@media (max-width: 767px) {
	.zlg-section {
		--zlg-gutter: 25px;
	}
}
