/*
 * GetnDrive Regional Routing 0.3.15 — country-root orientation page layout (ADR-213, ADR-217).
 * 0.3.42 — orientation copy blocks: category intro, tile descriptions, destination captions and
 * the closing note (text only; no new link, focus stop, image or motion).
 * 0.3.46 — a taller desktop image band; the category intro and closing note on the full content
 * rail; a shorter run-out before the shared footer (layout only; copy and markup unchanged).
 *
 * Enqueued only on a live country root (`/{lang}/{country}/`). Every selector is scoped under
 * `.gnd-country-root`, so no other page is affected. Order: decorative hero → two category
 * doors → the destination atlas. All artwork is decorative; nothing here adds text, links,
 * focus stops, motion or JavaScript. Missing artwork falls back to the text-only layout.
 */

.gnd-country-root {
	--gnd-cr-navy: #0b1f3a;
	--gnd-cr-ink: #102033;
	--gnd-cr-muted: #536273;
	--gnd-cr-teal-deep: #0d7f77;
	--gnd-cr-lime: #a8e063;
	--gnd-cr-surface: #f4f8f8;
	--gnd-cr-card: #ffffff;
	--gnd-cr-line: rgba(11, 31, 58, 0.12);
	--gnd-cr-media-bg: #dfe8ea;
	--gnd-cr-rail: var(--gnd-public-content, calc(100% - 32px));

	display: block;
	width: 100%;
	box-sizing: border-box;
	background: var(--gnd-cr-surface);
	color: var(--gnd-cr-ink);
}

.gnd-country-root *,
.gnd-country-root *::before,
.gnd-country-root *::after {
	box-sizing: border-box;
}

.gnd-country-root img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
}

.gnd-country-root__inner {
	width: var(--gnd-cr-rail);
	max-width: 1180px;
	margin: 0 auto;
	/* 0.3.46: a shorter run-out after the closing note, so the page meets the shared footer (was up to 88px). */
	padding: clamp(32px, 6vw, 72px) 0 clamp(32px, 4vw, 48px);
}

/* ---- Intro: text-only fallback (0.3.14 layout) ---- */

.gnd-country-root__intro {
	max-width: 760px;
	margin: 0 0 clamp(28px, 5vw, 48px);
}

.gnd-country-root__title {
	margin: 0 0 16px;
	color: var(--gnd-cr-navy);
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

.gnd-country-root__lead,
.gnd-country-root__intro-text {
	margin: 0;
	color: var(--gnd-cr-muted);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	line-height: 1.6;
}

/* ---- Hero: phones split the photograph from the copy (no text over the image) ---- */

.gnd-country-root__intro--media {
	position: relative;
	display: flex;
	flex-direction: column;
	max-width: none;
	margin: 0;
	background: var(--gnd-cr-navy);
	color: #ffffff;
}

.gnd-country-root__hero-media {
	position: relative;
	display: block;
	width: 100%;
	height: clamp(220px, 68vw, 440px);
	overflow: hidden;
	background: var(--gnd-cr-navy);
}

.gnd-country-root__hero-media::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 34%;
	background: linear-gradient(180deg, rgba(11, 31, 58, 0) 0%, rgba(11, 31, 58, 0.55) 62%, rgba(11, 31, 58, 1) 100%);
	pointer-events: none;
}

.gnd-country-root__hero-image {
	position: absolute;
	inset: 0;
	object-position: 50% 58%;
}

.gnd-country-root__hero-copy {
	position: relative;
	z-index: 1;
	width: var(--gnd-cr-rail);
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 0 clamp(28px, 7vw, 40px);
}

.gnd-country-root__intro--media .gnd-country-root__title {
	color: #ffffff;
}

.gnd-country-root__intro--media .gnd-country-root__title::after {
	content: "";
	display: block;
	width: 24px;
	height: 3px;
	margin-top: 16px;
	background: var(--gnd-cr-lime);
}

.gnd-country-root__intro--media .gnd-country-root__lead {
	max-width: 34rem;
	color: rgba(255, 255, 255, 0.88);
}

/* ---- Sections ---- */

.gnd-country-root__section + .gnd-country-root__section {
	margin-top: clamp(32px, 6vw, 56px);
}

.gnd-country-root__heading {
	margin: 0 0 16px;
	color: var(--gnd-cr-navy);
	font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
}

.gnd-country-root__intro-text {
	/* 0.3.46: the full content rail (no 760px cap); it wraps naturally where the rail is narrower than the sentence. */
	margin-bottom: 20px;
}

.gnd-country-root__category-list,
.gnd-country-root__destination-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gnd-country-root__category,
.gnd-country-root__destination {
	min-width: 0;
	margin: 0;
}

/* ---- Category doors: one anchor each; the media is its first, decorative child ---- */

/* 0.3.42: the card frame belongs to the list item, which holds the anchor and the tile
   description after it; the anchor itself is unchanged in markup. The hover/focus cue is
   drawn by the anchor's own ::after (a top bar) and an underlined kind label, both inside
   the anchor, so the description, which is not a link, never lights up. */
.gnd-country-root__category {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--gnd-cr-line);
	border-radius: 14px;
	background: var(--gnd-cr-card);
}

.gnd-country-root__category-link {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 24px;
	color: var(--gnd-cr-navy);
	text-decoration: none;
}

.gnd-country-root__category-media {
	display: block;
	width: calc(100% + 48px);
	margin: -22px -24px 14px;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	border-radius: 13px 13px 0 0;
	background: var(--gnd-cr-media-bg);
}

.gnd-country-root__category-media img {
	object-position: 72% 62%;
}

.gnd-country-root__category-kind {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
}

.gnd-country-root__category-label {
	color: var(--gnd-cr-muted);
	font-size: 0.95rem;
	line-height: 1.4;
}

.gnd-country-root__category-text {
	margin: -8px 24px 22px;
	color: var(--gnd-cr-ink);
	font-size: 0.95rem;
	line-height: 1.5;
}

.gnd-country-root__category-link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 13px 13px 0 0;
	pointer-events: none;
}

.gnd-country-root__category-link:hover::after,
.gnd-country-root__category-link:focus-visible::after {
	box-shadow: inset 0 3px 0 var(--gnd-cr-teal-deep);
}

.gnd-country-root__category-link:hover .gnd-country-root__category-kind {
	text-decoration: underline;
}

.gnd-country-root__category-link:focus-visible {
	outline-offset: -4px;
}

/* ---- Destination atlas: media outside both links ---- */

.gnd-country-root__destination {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	align-content: center;
	padding: 12px;
	border: 1px solid var(--gnd-cr-line);
	border-radius: 14px;
	background: var(--gnd-cr-card);
}

.gnd-country-root__destination-media {
	display: block;
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 112px;
	margin-right: 14px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: var(--gnd-cr-media-bg);
}

.gnd-country-root__destination-media img {
	object-position: var(--gnd-cr-media-position, 50% 50%);
}

.gnd-country-root__destination-name {
	grid-column: 2;
	margin: 0 0 8px;
	color: var(--gnd-cr-navy);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

/* 0.3.42: up to three text rows (name, optional caption, links) beside the phone thumbnail. */
.gnd-country-root__destination .gnd-country-root__destination-media {
	grid-row: 1 / span 3;
}

.gnd-country-root__destination-caption {
	grid-column: 2;
	margin: -4px 0 10px;
	color: var(--gnd-cr-muted);
	font-size: 0.9rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.gnd-country-root__destination-links {
	display: flex;
	flex-wrap: wrap;
	grid-column: 2;
	gap: 8px;
	margin: 0;
}

.gnd-country-root__note {
	/* 0.3.46: the full content rail (no 760px cap), like the category intro. */
	margin: clamp(20px, 4vw, 28px) 0 0;
	color: var(--gnd-cr-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

.gnd-country-root__destination-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid var(--gnd-cr-line);
	border-radius: 999px;
	background: var(--gnd-cr-card);
	color: var(--gnd-cr-teal-deep);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: border-color 150ms ease, color 150ms ease;
}

.gnd-country-root__destination-link:hover,
.gnd-country-root__destination-link:focus-visible {
	border-color: var(--gnd-cr-teal-deep);
	text-decoration: underline;
}

.gnd-country-root a:focus-visible {
	outline: 2px solid var(--gnd-cr-teal-deep);
	outline-offset: 2px;
}

/* ---- ≥600px: tiles with the full 16:9 frame on top ---- */

@media (min-width: 600px) {
	.gnd-country-root__destination-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.gnd-country-root__destination {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		padding: 0;
	}

	.gnd-country-root__destination-media {
		width: 100%;
		margin: 0;
		aspect-ratio: 16 / 9;
		border-radius: 13px 13px 0 0;
	}

	.gnd-country-root__destination-media img {
		object-position: 50% 50%;
	}

	.gnd-country-root__destination-name {
		margin: 16px 20px 12px;
	}

	.gnd-country-root__destination-links {
		margin: 0 20px 18px;
	}

	.gnd-country-root__destination-caption {
		margin: -6px 20px 14px;
	}

	/* Captions differ in length; the link row keeps one baseline across a grid row. */
	.gnd-country-root__destination-links {
		margin-top: auto;
	}
}

/* ---- ≥768px: image-backed hero with a navy scrim; two category columns ---- */

@media (min-width: 768px) {
	.gnd-country-root__intro--media {
		justify-content: center;
		/* 0.3.46: a taller image band on desktop (about a quarter taller than 0.3.45's clamp(300px, 27vw, 560px)). */
		min-height: clamp(360px, 35vw, 640px);
	}

	.gnd-country-root__hero-media {
		position: absolute;
		inset: 0;
		height: auto;
	}

	.gnd-country-root__hero-media::after {
		top: 0;
		height: auto;
		background: linear-gradient(90deg, rgba(11, 31, 58, 0.94) 0%, rgba(11, 31, 58, 0.9) 40%, rgba(11, 31, 58, 0.8) 62%, rgba(11, 31, 58, 0.34) 78%, rgba(11, 31, 58, 0) 90%);
	}

	.gnd-country-root__hero-image {
		object-position: 50% 62%;
	}

	.gnd-country-root__hero-copy {
		padding: clamp(40px, 5vw, 72px) 0;
	}

	.gnd-country-root__hero-copy > * {
		max-width: min(60%, 520px);
	}

	.gnd-country-root__category-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (min-width: 768px) {
	.gnd-country-root__destination-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.gnd-country-root__hero-media::after {
		background: linear-gradient(90deg, rgba(11, 31, 58, 0.94) 0%, rgba(11, 31, 58, 0.9) 34%, rgba(11, 31, 58, 0.78) 48%, rgba(11, 31, 58, 0.34) 62%, rgba(11, 31, 58, 0) 76%);
	}

	.gnd-country-root__hero-copy > * {
		max-width: 560px;
	}

	.gnd-country-root__destination-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.gnd-country-root a {
		transition: none;
	}
}

@media (forced-colors: active) {
	.gnd-country-root a:focus-visible {
		outline-color: Highlight;
	}
}
