/**
 * Mega menu, version 3 ("C · Service cards").
 * Figma: Mega menu · Redesign — desktop 4378:3086 (1440x900), mobile 4419:791 (393x852).
 * Markup: assets/partials/mega-menu.php, via the [tangerine_mega_menu] shortcode.
 */

/* The Off-Canvas widget's own close button is replaced by the one in the menu. */
.tg-off-canvas .tg-menu-close {
	display: none;
}

.tgm3 {
	--tgm3-bg: #0c0a08;
	--tgm3-heading: #f5f2ed;
	--tgm3-hi: #fff;
	--tgm3-card: #1f1d1b;
	--tgm3-line: rgb(255 255 255 / 7%);
	--tgm3-onimage: #ded9d1;
	--tgm3-orange: #ff5a1e;
	--tgm3-gold: #dfbe61;
	--tgm3-muted: #6a645c;

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	min-height: 640px;
	padding: 30px 56px 40px;
	overflow: hidden auto;
	background: var(--tgm3-bg);
	color: var(--tgm3-heading);
	font-family: var(--tg-font-body, "Hanken Grotesk", sans-serif);
}

.tgm3 *,
.tgm3 *::before,
.tgm3 *::after {
	box-sizing: border-box;
}

.tgm3 a {
	text-decoration: none;
}

.tgm3 p {
	margin: 0;
}

/* ── Top bar ── */
.tgm3__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
}

.tgm3__logo img {
	display: block;
	width: 71px;
	height: 53px;
	object-fit: contain;
}

.tgm3__close {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--tgm3-hi);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tgm3__close-x {
	position: relative;
	width: 18px;
	height: 18px;
}

.tgm3__close-x::before,
.tgm3__close-x::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.6px;
	background: currentcolor;
	border-radius: 1px;
}

.tgm3__close-x::before {
	transform: rotate(45deg);
}

.tgm3__close-x::after {
	transform: rotate(-45deg);
}

.tgm3__close:hover .tgm3__close-label {
	color: var(--tgm3-orange);
}

/* ── Body: head + cards (+ mobile links) ── */
.tgm3__body {
	display: flex;
	flex-direction: column;
	gap: 60px;
	flex: 0 0 auto;
}

.tgm3__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding-inline: 44px;
}

.tgm3__eyebrow {
	position: relative;
	flex: 0 0 auto;
	padding-bottom: 10px;
}

.tgm3__eyebrow::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 64px;
	height: 2px;
	background: linear-gradient(90deg, #b38842, #d5b25a);
}

.tgm3__eyebrow-label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
	line-height: 19px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tgm3-heading);
}

.tgm3__eyebrow-chev {
	width: 10px;
	height: 10px;
	background: var(--tgm3-orange);
	clip-path: polygon(0 0, 30% 0, 100% 50%, 30% 100%, 0 100%, 70% 50%);
}

.tgm3__title {
	margin: 0;
	font-size: 46px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.92px;
	color: var(--tgm3-heading);
}

/* ── Cards ── */
.tgm3__cards {
	display: flex;
	gap: 16px;
	padding-inline: 44px;
	height: 420px;
}

.tgm3__card {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 22px 22px 24px;
	overflow: hidden;
	border-radius: 18px;
	background: var(--tgm3-card);
	color: var(--tgm3-heading);
}

/* The border is its own overlay: an inset box-shadow on the card is painted
   beneath the photo, so it never showed. Figma: 1px white 7%, active 2px orange, inside. */
.tgm3__card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border: 1px solid rgb(255 255 255 / 7%);
	border-radius: inherit;
	pointer-events: none;
	transition: border-color 0.2s ease;
}

/* !important: the theme's and Elementor's global `img { height: auto; max-width: 100% }`
   otherwise leave a landscape photo at its natural height, covering only the top
   of the card. Figma: the photo fills the whole card, 20px wider each side. */
.tgm3 .tgm3__card-img {
	position: absolute;
	top: 0;
	left: -20px;
	width: calc(100% + 40px) !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: cover;
	opacity: 0.8;
	transition: opacity 0.25s ease, transform 0.4s ease;
}

.tgm3__card-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgb(10 9 8 / 45%) 0%,
		rgb(10 9 8 / 0%) 18%,
		rgb(10 9 8 / 20%) 38%,
		rgb(10 9 8 / 80%) 55%,
		rgb(10 9 8 / 93%) 68%,
		rgb(10 9 8 / 97%) 100%
	);
}

.tgm3__card-num,
.tgm3__card-copy {
	position: relative;
	z-index: 1;
}

.tgm3__card-num {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 1.2px;
	color: var(--tgm3-gold);
}

.tgm3__card-copy {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tgm3__card-title {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.24px;
	color: var(--tgm3-heading);
}

.tgm3__card-text {
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--tgm3-onimage);
}

.tgm3__card-cta {
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.56px;
	color: var(--tgm3-hi);
}

/* Active = hovered, keyboard-focused, or the page being viewed. */
.tgm3__card:hover,
.tgm3__card:focus-visible,
.tgm3__card.is-current {
	outline: none;
}

.tgm3__card:hover::after,
.tgm3__card:focus-visible::after,
.tgm3__card.is-current::after {
	border-width: 2px;
	border-color: var(--tgm3-orange);
}

.tgm3__card:hover .tgm3__card-img,
.tgm3__card:focus-visible .tgm3__card-img,
.tgm3__card.is-current .tgm3__card-img {
	opacity: 1;
}

.tgm3__card:hover .tgm3__card-title,
.tgm3__card:hover .tgm3__card-text,
.tgm3__card:focus-visible .tgm3__card-title,
.tgm3__card:focus-visible .tgm3__card-text,
.tgm3__card.is-current .tgm3__card-title,
.tgm3__card.is-current .tgm3__card-text {
	color: var(--tgm3-hi);
}

.tgm3__card:hover .tgm3__card-num,
.tgm3__card:focus-visible .tgm3__card-num,
.tgm3__card.is-current .tgm3__card-num {
	color: #808080; /* Figma's active card greys its number */
}

.tgm3__card:hover .tgm3__card-cta,
.tgm3__card:focus-visible .tgm3__card-cta,
.tgm3__card.is-current .tgm3__card-cta {
	color: var(--tgm3-orange);
}

/* ── Bottom rail (desktop) ── */
.tgm3__rail {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
	flex: 0 0 auto;
	padding: 24px 44px 0;
	border-top: 1px solid var(--tgm3-line);
}

.tgm3__links {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 32px;
}

.tgm3__links a {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.38;
	letter-spacing: -0.085px;
	color: var(--tgm3-heading);
	transition: color 0.18s ease;
}

.tgm3__links a:hover {
	color: var(--tgm3-orange);
}

.tgm3__phone {
	margin-left: auto;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.38;
	letter-spacing: -0.095px;
	color: var(--tgm3-heading);
}

.tgm3__phone:hover {
	color: var(--tgm3-orange);
}

/* ── Buttons ── */
.tgm3-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 48px;
	border-radius: 100px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.56px;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter 0.2s ease, border-color 0.2s ease;
}

.tgm3-btn--primary {
	padding: 8px 8px 8px 24px;
	background: linear-gradient(90deg, #de4807, #ef8630);
	color: #fff;
}

.tgm3-btn--primary:hover {
	filter: brightness(1.08);
}

.tgm3-btn__arrow {
	flex: 0 0 auto;
}

.tgm3-btn--dark {
	flex: 1 1 0;
	min-height: 52px;
	padding: 18px 24px;
	border: 1px solid rgb(255 255 255 / 31%);
	background: var(--tgm3-bg);
	color: #ddd6ca;
	text-transform: none;
}

.tgm3-btn--dark:hover {
	border-color: var(--tgm3-orange);
}

/* Mobile-only pieces are hidden on desktop. */
.tgm3__counter,
.tgm3__actions,
.tgm3__links--mobile {
	display: none;
}

/* ── Tablet: keep the five cards usable ── */
@media (max-width: 1100px) {
	.tgm3 {
		padding-inline: 32px;
	}

	.tgm3__head,
	.tgm3__cards,
	.tgm3__rail {
		padding-inline: 0;
	}

	.tgm3__title {
		font-size: 36px;
	}

	.tgm3__card-title {
		font-size: 20px;
	}

	.tgm3__card-text {
		font-size: 16px;
	}
}

/* ── Phones: horizontal card scroller, sticky actions ── */
@media (max-width: 767px) {
	.tgm3 {
		min-height: 0;
		padding: 0;
		overflow: hidden;
	}

	.tgm3__top {
		padding: 20px;
		min-height: 80px;
	}

	.tgm3__logo img {
		width: 54px;
		height: 40px;
	}

	.tgm3__body {
		flex: 1 1 auto;
		min-height: 0;
		gap: 22px;
		padding: 8px 0 24px;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	/* Title above the eyebrow on phones. */
	.tgm3__head {
		flex-direction: column-reverse;
		align-items: flex-start;
		gap: 22px;
		padding-inline: 20px;
	}

	.tgm3__title {
		font-size: 28px;
		letter-spacing: -0.5px;
	}

	/* The body is a column flexbox with its own scroll; without this its children
	   shrink to fit a short phone screen instead of letting the body scroll. */
	.tgm3__body > * {
		flex-shrink: 0;
	}

	.tgm3__cards {
		height: 330px;
		gap: 12px;
		padding-inline: 20px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 20px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.tgm3__cards::-webkit-scrollbar {
		display: none;
	}

	.tgm3__card {
		flex: 0 0 250px;
		scroll-snap-align: start;
	}

	.tgm3__card-img {
		opacity: 0.8;
	}

	.tgm3__counter {
		display: block;
		padding-inline: 20px;
		font-size: 15px;
		font-weight: 600;
		letter-spacing: 1.2px;
		text-transform: uppercase;
		color: var(--tgm3-muted);
	}

	.tgm3__links--mobile {
		display: flex;
		padding: 8px 20px 0;
		gap: 14px 24px;
	}

	.tgm3__rail {
		display: none;
	}

	.tgm3__actions {
		display: flex;
		flex-direction: column;
		gap: 10px;
		flex: 0 0 auto;
		padding: 16px 20px 28px;
		border-top: 1px solid var(--tgm3-line);
		background: var(--tgm3-bg);
	}

	.tgm3__actions .tgm3-btn--primary {
		width: 100%;
	}

	.tgm3__actions-row {
		display: flex;
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tgm3__card-img {
		transition: none;
	}
}

/* ── Header centre navigation (assets/partials/header-nav.php) ── */
.tg-header .e-con-inner {
	position: relative;
}

.tg-header-nav {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	gap: 36px;
	white-space: nowrap;
}

.tg-header-nav__link {
	position: relative;
	padding-block: 6px;
	font-family: var(--tg-font-body, "Hanken Grotesk", sans-serif);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #f5f2ed;
	text-decoration: none;
	transition: color 0.18s ease;
}

.tg-header-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, #b38842, #d5b25a);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.tg-header-nav__link:hover {
	color: #ff5a1e;
}

.tg-header-nav__link.is-current::after,
.tg-header-nav__link:hover::after {
	transform: scaleX(1);
}

@media (max-width: 1023px) {
	.tg-header-nav {
		display: none;
	}
}

/* The nav centres on the header's inner box, not on its own (zero-width) Elementor widget
   wrapper, which is position: relative by default. */
.tg-header .elementor-widget-shortcode,
.tg-header .elementor-widget-shortcode .elementor-widget-container,
.tg-header .elementor-widget-shortcode .elementor-shortcode {
	position: static;
}

/* ── Header "Services" dropdown ── */
.tg-header-nav__item {
	position: relative;
}

.tg-header-nav__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border: 0;
	background: none;
	cursor: pointer;
	font: inherit;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.tg-header-nav__caret {
	width: 7px;
	height: 7px;
	border-right: 1.6px solid currentcolor;
	border-bottom: 1.6px solid currentcolor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s ease;
}

.tg-header-nav__item.is-open .tg-header-nav__caret {
	transform: translateY(1px) rotate(225deg);
}

.tg-header-nav__panel {
	position: absolute;
	top: calc(100% + 14px);
	left: -24px;
	min-width: 280px;
	padding: 10px;
	border: 1px solid rgb(255 255 255 / 7%);
	border-radius: 18px;
	background: #0c0a08;
	box-shadow: 0 24px 60px rgb(0 0 0 / 55%);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

/* Bridges the gap so the pointer can travel from the label to the panel. */
.tg-header-nav__panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -16px;
	height: 16px;
}

.tg-header-nav__item.is-open .tg-header-nav__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.tg-header-nav__sub {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	font-family: var(--tg-font-body, "Hanken Grotesk", sans-serif);
	font-size: 17px;
	font-weight: 600;
	color: #f5f2ed;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tg-header-nav__sub:hover,
.tg-header-nav__sub:focus-visible,
.tg-header-nav__sub.is-current {
	background: rgb(255 255 255 / 6%);
	color: #ff5a1e;
	outline: none;
}

.tg-header-nav__sub-num {
	min-width: 20px;
	font-size: 14px;
	letter-spacing: 1.2px;
	color: #dfbe61;
}

.tg-header-nav__trigger:focus-visible {
	outline: 2px solid #ff5a1e;
	outline-offset: 4px;
}

.tg-header-nav__item.is-current .tg-header-nav__trigger::after,
.tg-header-nav__item.is-open .tg-header-nav__trigger::after {
	transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
	.tg-header-nav__panel,
	.tg-header-nav__caret {
		transition: none;
	}
}
