/*
 * Regional Routing 0.3.66 — the three category pages (`/{lang}/cars/`, `/{lang}/motorbikes/`, `/{lang}/boats/`).
 * A thin layer over the shared first screen (country-first-screen.css) and the country / preparing styles (cards,
 * groups, FAQ, onward links): only what the general pages add — a heading whose country line may wrap, and one row per
 * country (status and link beside its destination cards) that stays balanced whatever the number of cards.
 */

/* The country line of these headings is longer than one country ("в Грузии, Таиланде и Турции"): it may wrap. */
.gnd-category .gnd-cfs__title .gnd-cfs__line + .gnd-cfs__line {
	white-space: normal;
}

.gnd-category .gnd-cfs__title {
	max-width: 24ch;
}

/* Destinations: one row per country, in the fixed order. */
.gnd-category .gnd-category__groups {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(20px, 3vw, 32px);
}

.gnd-category .gnd-category__group {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	padding-top: clamp(16px, 2.4vw, 24px);
	border-top: 1px solid #d7e0ea;
	scroll-margin-top: 110px;
}

.gnd-category .gnd-category__group-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.gnd-category .gnd-category__country {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.gnd-category .gnd-category__status {
	max-width: 62ch;
	margin: 0;
	color: #3b4c61;
	line-height: 1.55;
}

.gnd-category .gnd-category__country-link {
	margin: 2px 0 0;
}

.gnd-category .gnd-category__country-link a {
	color: #0f6f68;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gnd-category .gnd-category__country-link a:focus-visible {
	outline: 3px solid #10243f;
	outline-offset: 2px;
}

@media (min-width: 1025px) {
	.gnd-category .gnd-category__group {
		grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
		gap: clamp(20px, 2.4vw, 36px);
	}

	/* A country without destination cards (Turkey on the boats page) keeps its status on one full row. */
	.gnd-category .gnd-category__group--empty {
		grid-template-columns: minmax(0, 1fr);
	}

	@supports (position: sticky) {
		.gnd-category .gnd-category__group-head {
			position: sticky;
			top: calc(var(--gnd-pin-top, 90px) + 96px);
		}
	}
}

/* Phones: two compact cards per row, so twenty-odd destinations stay a short list. */
@media (max-width: 559px) {
	.gnd-category .gnd-category__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.gnd-category .gnd-category__cards .gnd-preparing__card-body {
		padding: 10px 0 10px 10px;
	}

	.gnd-category .gnd-category__cards .gnd-preparing__name {
		font-size: 0.9375rem;
	}

	.gnd-category .gnd-category__cards .gnd-preparing__item-status {
		font-size: 0.75rem;
		line-height: 1.35;
	}

	.gnd-category .gnd-category__cards .gnd-preparing__arrow {
		padding: 0 10px 10px 0;
	}
}
