/**
 * Destination cards adapted from the client's destination-cards.html.
 *
 * Original visual language retained: editorial typography, image-led
 * cards, deep green overlays, red/green statistic capsules, rounded
 * frame, hover sweep and scroll reveal. Uses site-owned destination
 * images, real WordPress links and dynamic WP Travel Engine counts.
 *
 * Component styles are scoped under .dest to avoid theme collisions.
 */
.dest {
	--dest-red: #c8102e;
	--dest-red-bright: #d7193a;
	--dest-red-deep: #9b0c23;
	--dest-green: #0e4d3a;
	--dest-green-deep: #07261c;
	--dest-green-mid: #1f8a5b;
	--dest-green-bright: #24a06a;
	--dest-white: #fff;
	--dest-ink: #0b2a21;
	--dest-muted: #4a6159;
	--dest-radius: 26px;
	--dest-gap: clamp(22px, 3vw, 32px);
	--dest-ease: cubic-bezier(.22, 1, .36, 1);
	--dest-font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--dest-font-body: var(--jeepa-font, "Plus Jakarta Sans", system-ui, sans-serif);

	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(64px, 9vw, 120px) 20px;
	background: var(--dest-white);
	color: var(--dest-ink);
	font-family: var(--dest-font-body);
	-webkit-font-smoothing: antialiased;
}
.dest *,
.dest *::before,
.dest *::after {
	box-sizing: border-box;
}

/* Soft background glow as in the supplied client component. */
.dest::before,
.dest::after {
	position: absolute;
	z-index: -1;
	width: 520px;
	height: 520px;
	border-radius: 50%;
	pointer-events: none;
	content: "";
}
.dest::before {
	top: -180px;
	left: -160px;
	background: radial-gradient(circle, rgb(200 16 46 / 10%), transparent 65%);
}
.dest::after {
	right: -180px;
	bottom: -200px;
	background: radial-gradient(circle, rgb(31 138 91 / 12%), transparent 65%);
}
.dest__inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* Existing Jeepa section text, displayed in the client heading design. */
.dest__head {
	max-width: 660px;
	margin: 0 auto clamp(40px, 6vw, 64px);
	text-align: center;
}
.dest__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: var(--dest-red);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .2em;
	line-height: 1.5;
	text-transform: uppercase;
}
.dest__eyebrow::before,
.dest__eyebrow::after {
	width: 28px;
	height: 2px;
	flex: 0 0 28px;
	border-radius: 2px;
	background: currentColor;
	content: "";
}
.dest__title {
	margin: 0 0 16px;
	color: var(--dest-ink);
	font-family: var(--dest-font-display);
	font-size: clamp(2rem, 4.6vw, 3.25rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -.02em;
	overflow-wrap: anywhere;
}
.dest__lead {
	margin: 0;
	color: var(--dest-muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

/* One centred column up to 1023px, three columns from 1024px. */
.dest__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--dest-gap);
	max-width: 560px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}
.dest__item {
	display: flex;
	min-width: 0;
}
@media (min-width: 1024px) {
	.dest__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		max-width: none;
	}
}

/* Tall photograph cards with layered, readable white copy. */
.dest-card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: 100%;
	min-height: 520px;
	overflow: hidden;
	border-radius: var(--dest-radius);
	background: var(--dest-green-deep);
	color: var(--dest-white);
	box-shadow: 0 24px 50px -24px rgb(7 38 28 / 55%);
	transition: transform .6s var(--dest-ease), box-shadow .6s var(--dest-ease);
}
@media (min-width: 640px) and (max-width: 1023px) {
	.dest-card { min-height: 640px; }
}
@media (hover: hover) {
	.dest-card:hover {
		transform: translateY(-8px);
		box-shadow: 0 40px 70px -28px rgb(7 38 28 / 65%);
	}
}
.dest-card:focus-within {
	outline: 3px solid var(--dest-red);
	outline-offset: 4px;
}
.dest-card::before {
	position: absolute;
	inset: 12px;
	z-index: 1;
	border: 1px solid rgb(255 255 255 / 0%);
	border-radius: calc(var(--dest-radius) - 10px);
	pointer-events: none;
	content: "";
	transition: border-color .6s ease, inset .6s var(--dest-ease);
}
@media (hover: hover) {
	.dest-card:hover::before {
		inset: 10px;
		border-color: rgb(255 255 255 / 45%);
	}
}
.dest-card__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}
.dest-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 1.4s var(--dest-ease);
}
@media (hover: hover) {
	.dest-card:hover .dest-card__img {
		transform: scale(1.07);
	}
}
.dest-card__media::after {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgb(7 38 28 / 25%) 0%, transparent 18%),
		linear-gradient(180deg, transparent 34%, rgb(7 38 28 / 60%) 56%, rgb(7 38 28 / 94%) 100%);
	pointer-events: none;
	content: "";
}
.dest-card__content {
	position: relative;
	padding: 0 28px 28px;
}

/* Location, destination title and description. */
.dest-card__region {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	color: rgb(255 255 255 / 88%);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .18em;
	line-height: 1.5;
	text-transform: uppercase;
}
.dest-card__region-dot {
	display: grid;
	place-items: center;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--dest-red);
}
.dest-card__region-dot svg {
	width: 12px;
	height: 12px;
}
.dest-card__title {
	margin: 0 0 10px;
	color: var(--dest-white);
	font-family: var(--dest-font-display);
	font-size: clamp(2.4rem, 3.6vw, 3rem);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -.02em;
}
.dest-card__text {
	max-width: 34ch;
	margin: 0 0 20px;
	color: rgb(255 255 255 / 84%);
	font-size: .97rem;
	line-height: 1.6;
}

/* Red Tours and green Treks capsules. Values are from WordPress. */
.dest-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.dest-capsule {
	--dest-j: 0;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	overflow: hidden;
	padding: 4px 16px 4px 4px;
	border-radius: 999px;
	color: var(--dest-white);
	font-size: .86rem;
	font-weight: 700;
	letter-spacing: .02em;
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 24%), 0 12px 24px -12px rgb(0 0 0 / 55%);
}
.dest-capsule:nth-child(2) { --dest-j: 1; }
.dest-capsule--tours {
	background: linear-gradient(135deg, var(--dest-red-bright), var(--dest-red-deep));
}
.dest-capsule--treks {
	background: linear-gradient(135deg, var(--dest-green-bright), var(--dest-green));
}
.dest-capsule__num {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 34px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--dest-white);
	font-size: 1.05rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.dest-capsule--tours .dest-capsule__num { color: var(--dest-red-deep); }
.dest-capsule--treks .dest-capsule__num { color: var(--dest-green); }
.dest-capsule__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.dest-capsule__label svg {
	width: 15px;
	height: 15px;
}
.dest-capsule::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 45%) 50%, transparent 70%);
	transform: translateX(-120%);
	pointer-events: none;
	content: "";
}
@media (hover: hover) {
	.dest-card:hover .dest-capsule::after {
		transform: translateX(120%);
		transition: transform .9s ease calc(var(--dest-j) * 120ms);
	}
}

/* One real destination archive link overlays the entire card. */
.dest-card__link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	color: var(--dest-white);
	font-size: .95rem;
	font-weight: 700;
	text-decoration: none;
}
.dest-card__link::after {
	position: absolute;
	inset: 0;
	z-index: 2;
	content: "";
}
.dest-card__link-text {
	padding-bottom: 3px;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1.5px;
	transition: background-size .5s var(--dest-ease);
}
@media (hover: hover) {
	.dest-card:hover .dest-card__link-text {
		background-size: 100% 1.5px;
	}
}
.dest-card__arrow {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1.5px solid rgb(255 255 255 / 55%);
	border-radius: 50%;
	transition: background-color .4s ease, border-color .4s ease, transform .5s var(--dest-ease);
}
.dest-card__arrow svg {
	width: 16px;
	height: 16px;
}
@media (hover: hover) {
	.dest-card:hover .dest-card__arrow {
		border-color: var(--dest-red);
		background: var(--dest-red);
		transform: translateX(6px);
	}
}

/* Client's curtain-reveal animation, enabled by JavaScript only. */
.dest--ready .dest__item {
	opacity: 0;
	transform: translateY(60px);
}
.dest--ready .dest-card__media {
	clip-path: inset(100% 0 0 0);
	transform: scale(1.18);
}
.dest--ready .dest-card__content > * {
	opacity: 0;
	transform: translateY(18px);
}
.dest--ready .dest-capsule {
	opacity: 0;
	transform: translateY(12px) scale(.85);
}
.dest-card__content > :nth-child(1) { --dest-k: 1; }
.dest-card__content > :nth-child(2) { --dest-k: 2; }
.dest-card__content > :nth-child(3) { --dest-k: 3; }
.dest-card__content > :nth-child(4) { --dest-k: 4; }
.dest-card__content > :nth-child(5) { --dest-k: 5; }
.dest--ready .dest__item.is-in {
	opacity: 1;
	transform: none;
	transition:
		opacity .8s ease calc(var(--dest-i, 0) * 160ms),
		transform 1.1s var(--dest-ease) calc(var(--dest-i, 0) * 160ms);
}
.dest--ready .is-in .dest-card__media {
	clip-path: inset(0 0 0 0);
	transform: none;
	transition:
		clip-path 1.2s var(--dest-ease) calc(var(--dest-i, 0) * 160ms + 120ms),
		transform 1.8s var(--dest-ease) calc(var(--dest-i, 0) * 160ms + 120ms);
}
.dest--ready .is-in .dest-card__content > * {
	opacity: 1;
	transform: none;
	transition:
		opacity .7s ease calc(var(--dest-i, 0) * 160ms + 450ms + var(--dest-k, 0) * 90ms),
		transform .8s var(--dest-ease) calc(var(--dest-i, 0) * 160ms + 450ms + var(--dest-k, 0) * 90ms);
}
.dest--ready .is-in .dest-capsule {
	opacity: 1;
	transform: none;
	transition:
		opacity .6s ease calc(var(--dest-i, 0) * 160ms + 800ms + var(--dest-j) * 120ms),
		transform .7s var(--dest-ease) calc(var(--dest-i, 0) * 160ms + 800ms + var(--dest-j) * 120ms);
}

@media (max-width: 400px) {
	.dest-card { min-height: 480px; }
	.dest-card__content { padding: 0 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.dest *, .dest *::before, .dest *::after {
		transition: none !important;
		animation: none !important;
	}
	.dest-card:hover,
	.dest-card:hover .dest-card__img,
	.dest-card:hover .dest-card__arrow {
		transform: none;
	}
}
