/* IWTMYW Locations: hero (banner, intro/details, video, CTA) and collage gallery.
 * Loaded on single location pages only. */

.iwtmyw-hero {
	--iwtmyw-purple: #4c3773;
	--iwtmyw-purple-dark: #3d2a5e;
	--iwtmyw-text: #3d3d3d;
	--iwtmyw-focus: #3fbdc9;
	/* Same blue as the notification bar above the site header. */
	--iwtmyw-blue: #0073aa;
	--iwtmyw-blue-dark: #005f8d;
}

/* Banner ----------------------------------------------------------------
 * The banner takes the photo's own proportions (--iwtmyw-banner-ratio, printed
 * on the section from the image's width and height), so the whole photo shows
 * whatever size was uploaded. The sizer (::before) and the text share one grid
 * cell: the cell is as tall as the photo, or as tall as the text where the text
 * needs more room (long titles on phones), and only then is the photo cropped. */
.iwtmyw-banner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	justify-items: center;
	min-height: 300px;
	overflow: hidden;
	background: #3d3d3d;
	text-align: center;
	isolation: isolate;
}

.iwtmyw-banner.iwtmyw-banner--ratio {
	min-height: 0;
}

.iwtmyw-banner--ratio::before {
	content: "";
	grid-area: 1 / 1;
	width: 100%;
	aspect-ratio: var(--iwtmyw-banner-ratio);
}

.iwtmyw-banner .iwtmyw-banner__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.iwtmyw-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, 0.28);
}

.iwtmyw-banner__inner {
	grid-area: 1 / 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 1160px;
	padding: 56px 20px;
}

.iwtmyw-banner .iwtmyw-banner__back {
	display: inline-block;
	margin-bottom: 12px;
	color: #fff;
	font-family: "Quicksand", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 0, 0, 0.55);
}

.iwtmyw-banner .iwtmyw-banner__back:hover,
.iwtmyw-banner .iwtmyw-banner__back:focus-visible {
	color: #fff;
	text-decoration: underline;
}

.iwtmyw-banner .iwtmyw-banner__title {
	margin: 0;
	color: #fff;
	/* Same typography as the old hand-built hero H1 (Elementor widget settings). */
	font-family: "Oswald", sans-serif;
	font-size: 54px;
	font-weight: 500;
	line-height: 76px;
	letter-spacing: 7px;
	text-transform: uppercase;
	text-shadow: 0 0.03em 0.11em #000;
}

.iwtmyw-banner .iwtmyw-banner__excerpt {
	max-width: 760px;
	margin: 10px auto 0;
	color: #fff;
	font-family: "Quicksand", sans-serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.5;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

/* Intro: H2 + description + details | video (or image) + CTA ---------------- */
.iwtmyw-intro {
	padding: 56px 20px 0;
}

.iwtmyw-intro__inner {
	display: flex;
	/* The video block sits centred against the text beside it. */
	align-items: center;
	gap: 56px;
	max-width: 1120px;
	margin: 0 auto;
}

.iwtmyw-intro__col {
	flex: 1 1 0;
	min-width: 0;
}

.iwtmyw-intro:not(.iwtmyw-intro--two) .iwtmyw-intro__inner {
	max-width: 760px;
}

.iwtmyw-details .iwtmyw-details__title {
	margin: 0 0 16px;
	color: var(--iwtmyw-text);
	/* Same font as the old Elementor heading, sized for a half-width column. */
	font-family: "Crimson Text", Georgia, serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.25;
}

.iwtmyw-details__text {
	color: var(--iwtmyw-text);
	font-family: "Quicksand", sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.7;
}

.iwtmyw-details__text p {
	margin: 0 0 16px;
}

.iwtmyw-details__text > :last-child {
	margin-bottom: 0;
}

.iwtmyw-details .iwtmyw-details__heading {
	margin: 26px 0 12px;
	padding: 0;
	color: var(--iwtmyw-purple);
	font-family: "Quicksand", sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.iwtmyw-details > .iwtmyw-details__heading:first-child {
	margin-top: 0;
}

.iwtmyw-details__list {
	margin: 0;
	padding-left: 22px;
	color: var(--iwtmyw-text);
	font-family: "Quicksand", sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

/* The theme sets its own size and font on every li. */
.iwtmyw-details .iwtmyw-details__list li {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.iwtmyw-details .iwtmyw-details__list li + li {
	margin-top: 4px;
}

.iwtmyw-details__list strong {
	font-weight: 700;
}

/* Video ------------------------------------------------------------------- */
.iwtmyw-video {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #111;
}

.iwtmyw-video__play {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.iwtmyw-video .iwtmyw-video__poster,
.iwtmyw-video iframe,
.iwtmyw-video video {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border: 0;
}

/* No video yet: the poster/banner image fills the same 16:9 spot. */
.iwtmyw-video--image {
	background: #ddd;
}

.iwtmyw-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: rgba(76, 55, 115, 0.88);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.iwtmyw-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-style: solid;
	border-width: 13px 0 13px 22px;
	border-color: transparent transparent transparent #fff;
	transform: translate(-50%, -50%);
}

.iwtmyw-video__play:hover .iwtmyw-video__icon,
.iwtmyw-video__play:focus-visible .iwtmyw-video__icon {
	background: var(--iwtmyw-purple);
	transform: translate(-50%, -50%) scale(1.08);
}

.iwtmyw-video__play:focus-visible {
	outline: 3px solid var(--iwtmyw-focus);
	outline-offset: -3px;
}

.iwtmyw-media .iwtmyw-media__cta {
	display: block;
	margin-top: 14px;
	padding: 12px 20px;
	background: var(--iwtmyw-blue);
	color: #fff;
	font-family: "Quicksand", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
}

.iwtmyw-media .iwtmyw-media__cta:hover,
.iwtmyw-media .iwtmyw-media__cta:focus-visible {
	background: var(--iwtmyw-blue-dark);
	color: #fff;
}

/* Collage gallery ----------------------------------------------------------
 * Rows of 1-3 photos. Every tile carries its photo's aspect ratio in --r and
 * takes a share of the row's width in proportion to it, so the photos in a row
 * are equally tall and none is cropped. "Feature" rows put one large photo
 * beside two stacked ones. No JS; the images carry width/height (no CLS). */
.iwtmyw-gallery {
	--g: 12px;
	display: flex;
	flex-direction: column;
	gap: var(--g);
}

.iwtmyw-gallery__row {
	display: flex;
	gap: var(--g);
}

.iwtmyw-gallery__row--feature-r {
	flex-direction: row-reverse;
}

.iwtmyw-gallery__row > * {
	flex: var(--r) 1 0;
	min-width: 0;
}

/* The large photo is one gap taller than its share (it spans two stacked
 * photos plus the gap between them); this basis makes the heights match. */
.iwtmyw-gallery__row--feature-l > .iwtmyw-gallery__item,
.iwtmyw-gallery__row--feature-r > .iwtmyw-gallery__item {
	flex-basis: calc(var(--r) * var(--g));
}

.iwtmyw-gallery__stack {
	display: flex;
	flex-direction: column;
	gap: var(--g);
}

.iwtmyw-gallery__item {
	position: relative;
	display: block;
	aspect-ratio: var(--r);
	overflow: hidden;
	background: #ececec;
}

.iwtmyw-gallery .iwtmyw-gallery__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.iwtmyw-gallery__item:hover .iwtmyw-gallery__img,
.iwtmyw-gallery__item:focus-visible .iwtmyw-gallery__img {
	transform: scale(1.03);
}

.iwtmyw-gallery__item:focus-visible {
	outline: 3px solid #3fbdc9;
	outline-offset: -3px;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
	.iwtmyw-banner {
		min-height: 240px;
	}
	/* Less padding over a photo, so the banner stays close to the photo's shape. */
	.iwtmyw-banner--ratio .iwtmyw-banner__inner {
		padding: 24px 20px;
	}
	.iwtmyw-banner .iwtmyw-banner__title {
		font-size: 42px;
		line-height: 60px;
		letter-spacing: 5px;
	}
}

@media (max-width: 767px) {
	.iwtmyw-banner {
		min-height: 200px;
	}
	.iwtmyw-banner__inner {
		padding: 40px 16px;
	}
	.iwtmyw-banner--ratio .iwtmyw-banner__inner {
		padding: 16px;
	}
	.iwtmyw-banner .iwtmyw-banner__title {
		/* Old hero's mobile values: 23px / 32px. */
		font-size: 23px;
		line-height: 32px;
		letter-spacing: 3px;
	}
	.iwtmyw-banner .iwtmyw-banner__back {
		font-size: 11px;
		letter-spacing: 1.5px;
	}
	.iwtmyw-banner .iwtmyw-banner__excerpt {
		margin-top: 8px;
		font-size: 14px;
	}
	.iwtmyw-intro {
		padding: 36px 20px 0;
	}
	.iwtmyw-intro__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
	}
	.iwtmyw-intro__col {
		flex: 0 0 auto;
	}
	.iwtmyw-details .iwtmyw-details__title {
		font-size: 25px;
		line-height: 1.3;
	}
	.iwtmyw-details__text {
		font-size: 16px;
	}
	.iwtmyw-gallery {
		--g: 8px;
	}
	/* Three across is too small on a phone: one wide photo above two. */
	.iwtmyw-gallery__row--trio {
		flex-wrap: wrap;
	}
	.iwtmyw-gallery__row--trio > .iwtmyw-gallery__item:first-child {
		flex: 0 0 100%;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.iwtmyw-intro__inner {
		gap: 36px;
	}
	.iwtmyw-details .iwtmyw-details__title {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iwtmyw-gallery__img,
	.iwtmyw-video__icon {
		transition: none;
	}
}
