/**
 * Self-Guided Tours page
 * Location: HHRespChild/assets/css/hh-self-guided-tours.css
 * Everything is scoped under .hh-sgt so Salient's globals stay out of the way.
 */

.hh-sgt {
	/* Set these three to the real brand hex values. */
	--hh-sgt-ink: #16233a;
	--hh-sgt-accent: #b0873c;
	--hh-sgt-surface: #f6f4f0;

	--hh-sgt-ink-soft: #56617a;
	--hh-sgt-line: rgba(22, 35, 58, 0.14);
	--hh-sgt-gutter: clamp(1.25rem, 5vw, 4rem);
	--hh-sgt-measure: 1180px;

	color: var(--hh-sgt-ink);
}

.hh-sgt *,
.hh-sgt *::before,
.hh-sgt *::after {
	box-sizing: border-box;
}

/* Salient adds container padding we don't want on full-bleed sections. */
.hh-sgt-wrap .main-content > .hh-sgt {
	padding: 0;
	margin: 0;
	width: 100%;
}

.hh-sgt-eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.hh-sgt .hh-sgt-h2 {
	margin: 0 0 0.6rem;
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
	line-height: 1.15;
	color: var(--hh-sgt-ink);
}

.hh-sgt .hh-sgt-sub {
	margin: 0 auto;
	max-width: 62ch;
	font-size: clamp(1rem, 1.6vw, 1.125rem);
	line-height: 1.6;
	color: var(--hh-sgt-ink-soft);
}

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

.hh-sgt-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(420px, 68vh, 720px);
	padding: var(--hh-sgt-gutter);
	overflow: hidden;
	isolation: isolate;
	background-color: var(--hh-sgt-ink);
}

.hh-sgt-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
}

/*
 * !important is load-bearing here: WordPress prints width/height attributes on the
 * featured image and Salient's global `img { height: auto }` would otherwise win,
 * collapsing the image to its intrinsic ratio instead of filling the hero.
 * object-position is the crop knob - lower the second value to keep more sky.
 */
.hh-sgt .hh-sgt-hero__img,
.hh-sgt-hero__media img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

.hh-sgt-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(10, 17, 30, 0.86) 0%,
		rgba(10, 17, 30, 0.5) 42%,
		rgba(10, 17, 30, 0.12) 78%
	);
}

.hh-sgt-hero__inner {
	position: relative;
	width: 100%;
	max-width: var(--hh-sgt-measure);
	margin: 0 auto;
	color: #fff;
}

.hh-sgt-hero__inner .hh-sgt-eyebrow {
	color: rgba(255, 255, 255, 0.78);
}

.hh-sgt .hh-sgt-hero__title {
	margin: 0 0 0.6rem;
	font-size: clamp(2.4rem, 7vw, 4.5rem);
	line-height: 1.02;
	color: #fff;
}

.hh-sgt .hh-sgt-hero__lede {
	margin: 0;
	max-width: 34ch;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.92);
}

.hh-sgt-poweredby {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	max-width: 22rem;
}

.hh-sgt-poweredby__label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
	white-space: nowrap;
}

/* Logo is 193.753 x 45.664 (ratio 4.243), so 34px tall = 144px wide. */
.hh-sgt-poweredby__logo {
	display: block;
	width: auto;
	height: 34px;
}

/* --------------------------------------------------------- How it works ---- */

.hh-sgt-how {
	padding: clamp(3rem, 8vw, 6rem) var(--hh-sgt-gutter);
	background: #fff;
}

.hh-sgt-how__head,
.hh-sgt-listings__head {
	max-width: var(--hh-sgt-measure);
	margin: 0 auto clamp(2rem, 4vw, 3rem);
	text-align: center;
}

.hh-sgt-video {
	position: relative;
	max-width: 940px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	border-radius: 4px;
	overflow: hidden;
	background: var(--hh-sgt-ink);
}

.hh-sgt-video__frame,
.hh-sgt-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.hh-sgt-video__facade {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	margin: 0;
	background: none;
	cursor: pointer;
}

.hh-sgt-video__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hh-sgt-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.hh-sgt-video__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 13px 0 13px 21px;
	border-color: transparent transparent transparent var(--hh-sgt-ink);
}

.hh-sgt-video__facade:hover .hh-sgt-video__play,
.hh-sgt-video__facade:focus-visible .hh-sgt-video__play {
	transform: translate(-50%, -50%) scale(1.08);
	background: #fff;
}

.hh-sgt-video__facade:focus-visible {
	outline: 3px solid var(--hh-sgt-accent);
	outline-offset: 3px;
}

/* -------------------------------------------------------------- Steps ---- */

.hh-sgt .hh-sgt-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	max-width: var(--hh-sgt-measure);
	margin: clamp(2.5rem, 5vw, 4rem) auto 0;
	padding: 0;
	list-style: none;
}

.hh-sgt .hh-sgt-step {
	position: relative;
	margin: 0;
	padding-top: 1.75rem;
	border-top: 1px solid var(--hh-sgt-line);
	list-style: none;
}

.hh-sgt-step__num {
	position: absolute;
	top: -0.85rem;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--hh-sgt-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
}

.hh-sgt .hh-sgt-step__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.05rem, 1.8vw, 1.25rem);
	line-height: 1.25;
}

.hh-sgt .hh-sgt-step__body {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--hh-sgt-ink-soft);
}

/* ----------------------------------------------------------- Listings ---- */

.hh-sgt-listings {
	/* Tighter side gutter than the other sections so the embed gets more room. */
	padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 2.5vw, 2.5rem);
	background: var(--hh-sgt-surface);
}

.hh-sgt-embed {
	max-width: 1520px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--hh-sgt-line);
	border-radius: 4px;
	overflow: hidden;
	-webkit-overflow-scrolling: touch;
}

/*
 * Full viewport height, per NterNow's own snippet. The embed is a React app that
 * scrolls internally and cross-origin auto-resize isn't possible, so the height is
 * fixed by hand. dvh keeps mobile browser chrome from pushing it past the viewport;
 * the vh line above it is the fallback for older browsers.
 */
.hh-sgt-embed__frame {
	display: block;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	min-height: 640px;
	border: 0;
}

.hh-sgt-embed__fallback {
	max-width: var(--hh-sgt-measure);
	margin: 1.25rem auto 0;
	text-align: center;
	font-size: 0.95rem;
	color: var(--hh-sgt-ink-soft);
}

.hh-sgt-embed__fallback a {
	color: var(--hh-sgt-accent);
	text-decoration: underline;
}

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

@media (max-width: 999px) {
	.hh-sgt .hh-sgt-steps {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

@media (max-width: 690px) {
	.hh-sgt-hero {
		min-height: 76vh;
	}

	.hh-sgt-poweredby {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.6rem;
	}

	.hh-sgt-video__play {
		width: 58px;
		height: 58px;
	}

	.hh-sgt-video__play::before {
		border-width: 10px 0 10px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hh-sgt * {
		transition: none !important;
	}
}