/**
 * Tour Filter — Showcase.
 *
 * Bento grid of full-bleed trip cards. Each card's text sits on a frosted
 * panel pinned to its foot; on hover the photo drifts in, the panel lifts and
 * the arrow turns. The filter bar is a pill track whose highlight slides to
 * the active destination.
 */

.gx-tf {
	--gx-tf-primary: var(--color-primary, #1273C4);
	--gx-tf-accent: var(--color-accent, #F0A93B);
	--gx-tf-ink: var(--color-black, #0C2338);
	--gx-tf-muted: #5b6b7c;
	--gx-tf-cols: 3;
	--gx-tf-row: 340px;
	--gx-tf-gap: 22px;
	--gx-tf-radius: 24px;
	--gx-tf-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--gx-tf-font: var(--font-title, "Sora", "Plus Jakarta Sans", sans-serif);

	padding-block: clamp(64px, 9vw, 120px);
	color: var(--gx-tf-ink);
}

.gx-tf *,
.gx-tf *::before,
.gx-tf *::after {
	box-sizing: border-box;
}

.gx-tf__inner {
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: 16px;
}

/* ------------------------------------------------------------------ head */

.gx-tf__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px 40px;
	margin-bottom: clamp(32px, 4vw, 52px);
}

.gx-tf__heading {
	max-width: 620px;
}

.gx-tf__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-family: var(--gx-tf-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gx-tf-primary);
}

.gx-tf__eyebrow img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.gx-tf__eyebrow-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--gx-tf-accent);
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--gx-tf-accent) 22%, transparent);
}

.gx-tf__title {
	margin: 0;
	font-family: var(--gx-tf-font);
	font-size: clamp(2rem, 3.6vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--gx-tf-ink);
	text-wrap: balance;
}

/* --------------------------------------------------------------- filters */

.gx-tf__filters {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 6px;
	border: 1px solid color-mix(in srgb, var(--gx-tf-ink) 8%, transparent);
	border-radius: 999px;
	background-color: #fff;
	box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--gx-tf-ink) 40%, transparent);
}

/* The sliding highlight. Positioned by the script; hidden until then so the
   active button's own background carries the state without it. */
.gx-tf__pill {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	border-radius: 999px;
	background-color: var(--gx-tf-primary);
	box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--gx-tf-primary) 80%, transparent);
	opacity: 0;
	transition: transform 0.5s var(--gx-tf-ease), width 0.5s var(--gx-tf-ease), height 0.5s var(--gx-tf-ease), opacity 0.2s;
	pointer-events: none;
}

.gx-tf.is-ready .gx-tf__pill {
	opacity: 1;
}

.gx-tf__filter {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	font-family: var(--gx-tf-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--gx-tf-muted);
	cursor: pointer;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.gx-tf__filter:hover {
	color: var(--gx-tf-ink);
	background: color-mix(in srgb, var(--gx-tf-ink) 5%, transparent);
}

.gx-tf__filter.is-active,
.gx-tf__filter.is-active:hover {
	color: #fff;
	background: transparent;
}

.gx-tf:not(.is-ready) .gx-tf__filter.is-active {
	background-color: var(--gx-tf-primary);
}

.gx-tf__filter:focus-visible {
	outline: 2px solid var(--gx-tf-primary);
	outline-offset: 2px;
}

.gx-tf__count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding-inline: 6px;
	border-radius: 999px;
	background-color: color-mix(in srgb, var(--gx-tf-ink) 7%, transparent);
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.gx-tf__filter.is-active .gx-tf__count {
	background-color: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* ------------------------------------------------------------------ grid */

.gx-tf__grid {
	display: grid;
	grid-template-columns: repeat(var(--gx-tf-cols), minmax(0, 1fr));
	grid-auto-rows: var(--gx-tf-row);
	grid-auto-flow: dense;
	gap: var(--gx-tf-gap);
}

.gx-tf--bento .gx-tf__card.is-big {
	grid-column: span 2;
	grid-row: span 2;
}

.gx-tf__card[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ card */

.gx-tf__card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-width: 0;
	border-radius: var(--gx-tf-radius);
	background-color: var(--gx-tf-ink);
	color: #fff;
	box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--gx-tf-ink) 70%, transparent);
	transform: translateZ(0);
}

.gx-tf__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.gx-tf__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transform: scale(1.02);
	transition: transform 1.2s var(--gx-tf-ease);
}

.gx-tf__card:hover .gx-tf__media img,
.gx-tf__card:focus-within .gx-tf__media img {
	transform: scale(1.1);
}

.gx-tf__shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(6, 18, 31, 0.35) 0%, transparent 28%),
		linear-gradient(0deg, rgba(6, 18, 31, 0.85) 0%, rgba(6, 18, 31, 0.25) 45%, transparent 70%);
}

.gx-tf__top {
	position: absolute;
	top: 16px;
	left: 16px;
	right: 16px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	pointer-events: none;
}

.gx-tf__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.gx-tf__badge,
.gx-tf__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	font-family: var(--gx-tf-font);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.gx-tf__badge {
	background-color: #fff;
	color: var(--gx-tf-ink);
}

.gx-tf__badge--sale {
	background-color: var(--gx-tf-accent);
	color: var(--gx-tf-ink);
}

.gx-tf__chip {
	border: 1px solid rgba(255, 255, 255, 0.3);
	background-color: rgba(255, 255, 255, 0.14);
	color: #fff;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

/* Frosted panel pinned to the foot of the card. */
.gx-tf__panel {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	padding: 18px 18px 16px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: calc(var(--gx-tf-radius) - 8px);
	background-color: rgba(10, 24, 40, 0.38);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	transition: transform 0.6s var(--gx-tf-ease), background-color 0.4s ease;
}

.gx-tf__card:hover .gx-tf__panel,
.gx-tf__card:focus-within .gx-tf__panel {
	transform: translateY(-4px);
	background-color: rgba(10, 24, 40, 0.55);
}

.gx-tf__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.82);
}

.gx-tf__place,
.gx-tf__rating {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.gx-tf__rating {
	font-weight: 600;
	color: #fff;
}

.gx-tf__rating svg {
	color: var(--gx-tf-accent);
}

.gx-tf__rating-count {
	font-weight: 400;
	color: rgba(255, 255, 255, 0.7);
}

.gx-tf__name {
	margin: 0;
	font-family: var(--gx-tf-font);
	font-size: clamp(1.05rem, 1.35vw, 1.3rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: #fff;
}

.gx-tf__link,
.gx-tf__link:hover,
.gx-tf__link:focus {
	color: inherit;
	text-decoration: none;
}

/* The title link covers the whole card, so the card is one tab stop and one
   announcement, and still clickable anywhere. */
.gx-tf__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.gx-tf__card:has(.gx-tf__link:focus-visible) {
	outline: 3px solid var(--gx-tf-accent);
	outline-offset: 3px;
}

.gx-tf__link:focus-visible {
	outline: none;
}

.gx-tf__excerpt {
	display: none;
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gx-tf__card:not(.is-big) .gx-tf__excerpt,
.gx-tf--even .gx-tf__excerpt {
	display: none;
}

.gx-tf__foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.gx-tf__price {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.1;
}

.gx-tf__from {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.gx-tf__amount {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	font-family: var(--gx-tf-font);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--gx-tf-accent);
}

.gx-tf__amount del {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.55);
}

.gx-tf__go {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #fff;
	color: var(--gx-tf-ink);
	transition: transform 0.5s var(--gx-tf-ease), background-color 0.3s ease, color 0.3s ease;
}

.gx-tf__card:hover .gx-tf__go,
.gx-tf__card:focus-within .gx-tf__go {
	transform: rotate(45deg);
	background-color: var(--gx-tf-accent);
}

/* Large card: bigger type, room for the excerpt. */
.gx-tf__card.is-big .gx-tf__panel {
	left: 18px;
	right: 18px;
	bottom: 18px;
	padding: 24px 24px 20px;
}

.gx-tf--bento .gx-tf__card.is-big .gx-tf__name {
	font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.gx-tf--bento .gx-tf__card.is-big .gx-tf__amount {
	font-size: 28px;
}

.gx-tf--bento .gx-tf__card.is-big .gx-tf__go {
	width: 52px;
	height: 52px;
}

/* ----------------------------------------------------------------- more */

.gx-tf__more {
	display: flex;
	justify-content: center;
	margin-top: clamp(32px, 4vw, 48px);
}

.gx-tf__all {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 28px;
	border: 1.5px solid var(--gx-tf-ink);
	border-radius: 999px;
	font-family: var(--gx-tf-font);
	font-size: 15px;
	font-weight: 600;
	color: var(--gx-tf-ink);
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.gx-tf__all:hover,
.gx-tf__all:focus-visible {
	border-color: var(--gx-tf-primary);
	background-color: var(--gx-tf-primary);
	color: #fff;
}

.gx-tf__all svg {
	transition: transform 0.4s var(--gx-tf-ease);
}

.gx-tf__all:hover svg {
	transform: rotate(45deg);
}

/* --------------------------------------------------------------- motion */

/* Cards rise in once the grid scrolls into view. Only after the script has
   marked the section, so no card is ever stuck invisible without it. */
.gx-tf.is-ready:not(.is-in) .gx-tf__card {
	opacity: 0;
	transform: translateY(36px);
}

.gx-tf.is-in .gx-tf__card {
	transition: opacity 0.8s ease, transform 0.9s var(--gx-tf-ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}

/* Filtering: cards leaving fade out, cards arriving scale in. */
.gx-tf__card.is-entering {
	animation: gx-tf-in 0.6s var(--gx-tf-ease) both;
	animation-delay: calc(var(--n, 0) * 50ms);
}

@keyframes gx-tf-in {
	from { opacity: 0; transform: translateY(18px) scale(0.96); }
	to   { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1024px) {
	.gx-tf {
		--gx-tf-cols: 2;
	}
}

@media (max-width: 767px) {
	.gx-tf {
		--gx-tf-cols: 1;
		--gx-tf-row: 360px;
		--gx-tf-gap: 16px;
	}

	.gx-tf--bento .gx-tf__card.is-big {
		grid-column: auto;
		grid-row: span 1;
	}

	.gx-tf__head {
		align-items: flex-start;
	}

	.gx-tf__filters {
		flex-wrap: nowrap;
		max-width: 100%;
		overflow-x: auto;
		scrollbar-width: none;
		border-radius: 18px;
	}

	.gx-tf__filters::-webkit-scrollbar {
		display: none;
	}

	.gx-tf__filter {
		flex: 0 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gx-tf .gx-tf__card,
	.gx-tf__media img,
	.gx-tf__panel,
	.gx-tf__go,
	.gx-tf__pill {
		transition: none !important;
		animation: none !important;
	}

	.gx-tf.is-ready:not(.is-in) .gx-tf__card {
		opacity: 1;
		transform: none;
	}
}
