/**
 * YEC Trips — cards and homepage sections.
 *
 * Layout values are measured from 57hours.com (design-reference/specs/*.md);
 * colours are YEC's Kadence palette mapped onto the reference's roles.
 * Breakpoints: 768 (tablet), 1024 (card width), 1200 (gaps, arrow offset).
 */

/* Tokens ------------------------------------------------------------------ */

.yec-section,
.yec-card {
	--yec-bg: var(--global-palette9, #fff);                 /* page background */
	--yec-text: var(--global-palette3, #1a202c);            /* primary text */
	--yec-muted: var(--global-palette5, #4a5568);           /* muted text */
	--yec-line: var(--global-palette7, #edf2f7);            /* placeholder, borders */
	--yec-surface-dark: var(--global-palette4, #2d3748);    /* dark card surfaces */
	--yec-action: var(--global-palette1, #f89c00);          /* primary action */
	--yec-action-hover: #e08c00;                            /* …pressed: a darker orange, */
	--yec-action-hover: color-mix(in srgb, var(--global-palette1, #f89c00) 85%, #000); /* never palette2, which is YEC's yellow */
	--yec-rating: var(--global-palette15, #f5a524);         /* rating star */
	--yec-on-image: var(--global-palette9, #fff);           /* text on imagery */
	/* Card image badges: 57hours' roles (priority red, soft yellow, white) in YEC hues. */
	--yec-badge-new-bg: var(--global-palette12, #1159af);   /* "New": deep blue… */
	--yec-badge-new-text: var(--global-palette2, #fed620);  /* …with gold text */
	--yec-badge-activity-bg: var(--global-palette1, #f89c00); /* activities: orange */
	--yec-badge-activity-text: var(--global-palette3, #1a202c);
	--yec-badge-soft-bg: color-mix(in srgb, var(--global-palette2, #fed620) 50%, #fff); /* partner: pale gold */
	--yec-badge-shadow: 0 0 4px rgba(0, 0, 0, .2);
	--yec-font: var(--global-body-font-family, sans-serif);
	--yec-font-heading: var(--global-heading-font-family, var(--yec-font));
	--yec-ease: cubic-bezier(.4, 0, .2, 1);
	--yec-gap: 20px;
	--yec-card-w: 227px;
	--yec-radius: 16px;
	font-family: var(--yec-font);
	color: var(--yec-text);
}

@media (min-width: 768px) {
	.yec-section,
	.yec-card {
		--yec-gap: 24px;
		--yec-card-w: 204px;
	}
}

@media (min-width: 1024px) {
	.yec-section,
	.yec-card {
		--yec-card-w: 314px;
	}
}

/* Layout ------------------------------------------------------------------ */

/* Shortcodes output the component only: width, spacing, titles and
   backgrounds come from the Kadence row they are placed in. */
.yec-section {
	margin: 0;
	padding: 0;
}

.yec-section *,
.yec-card * {
	box-sizing: border-box;
}

/* An image plugin may wrap a photo in <picture> to offer it as WebP (EWWW
   does on youngexplorersclub.ch). The wrapper takes no box of its own, so the
   photo is laid out as if it stood there alone: in a row that slides, in a
   grid, filling its frame. */
:where(.yec-trip, .yec-archive, .yec-section, .yec-card, .yec-booking, .yec-booking-bar) picture { display: contents; }
:where(.yec-trip, .yec-archive, .yec-section, .yec-card, .yec-booking, .yec-booking-bar) picture > source { display: none; }

/* Whole-tile links: never underlined, whatever Kadence's link style is
   (.link-style-* .entry-content a). */
.yec-section .yec-carousel a[class],
.yec-section .yec-destinations a[class],
.yec-card a.yec-card__link {
	text-decoration: none;
}

/* Focus: always visible, on every link and control. */
.yec-section a:focus-visible,
.yec-section button:focus-visible,
.yec-section [tabindex]:focus-visible,
.yec-card a:focus-visible {
	outline: 2px solid var(--yec-action);
	outline-offset: 2px;
}

/* Links inside the scroller are clipped by it: draw their ring inside. */
.yec-carousel__item > a:focus-visible,
.yec-carousel__item .yec-card__link:focus-visible {
	outline-offset: -2px;
	border-radius: var(--yec-radius);
}

/* Carousel (scroll-snap; arrows from carousel.js) ------------------------- */

.yec-carousel {
	--yec-item-w: var(--yec-card-w);
	--yec-arrow-top: calc(var(--yec-card-w) * 4 / 3 / 2);
	position: relative;
	/* Own formatting context: the track's negative margins stay inside, so
	   the carousel box is exactly the items' box and arrows line up with it. */
	display: flow-root;
}

/* The scroller clips its content; 8px above and 24px below leave room for
   hover shadows without moving anything. */
.yec-carousel__track {
	margin-block: -8px -24px;
	padding-block: 8px 24px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.yec-carousel__track::-webkit-scrollbar {
	display: none;
}

.yec-carousel__track:focus-visible {
	outline: 2px solid var(--yec-action);
	outline-offset: 4px;
}

.yec-section .yec-carousel__list {
	display: flex;
	gap: var(--yec-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.yec-carousel__item {
	flex: 0 0 var(--yec-item-w);
	width: var(--yec-item-w);
	margin: 0;
	scroll-snap-align: start;
}

.yec-carousel__arrow {
	position: absolute;
	top: var(--yec-arrow-top);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-top: -32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--global-palette9, #fff);
	color: var(--global-palette3, #1a202c);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
	cursor: pointer;
	transition: transform .2s var(--yec-ease), box-shadow .2s var(--yec-ease), opacity .2s var(--yec-ease);
}

.yec-carousel__arrow[hidden] {
	display: none;
}

/* Centred on the container edge at 1200+; below that the 20px gutter is too
   narrow, so the arrow stops 8px inside the viewport. */
.yec-carousel__arrow--prev {
	left: -12px;
}

.yec-carousel__arrow--next {
	right: -12px;
}

@media (min-width: 1200px) {
	.yec-carousel__arrow--prev {
		left: -32px;
	}

	.yec-carousel__arrow--next {
		right: -32px;
	}
}

.yec-carousel__arrow:hover,
.yec-carousel__arrow:focus-visible {
	background: var(--yec-action, #f89c00);
	color: var(--global-palette9, #fff);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
	transform: scale(1.05);
}

.yec-carousel__arrow:active {
	transform: scale(.96);
}

.yec-carousel__arrow:disabled {
	opacity: .4;
	cursor: default;
	transform: none;
}

/* Arrows are for pointers with room; phones swipe. */
@media (max-width: 767px), (hover: none) {
	.yec-carousel__arrow {
		display: none !important;
	}
}

/* Placeholder (no stock photos: flat box labelled [photo]) --------------- */

.yec-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--yec-line);
	color: var(--yec-muted);
	font-size: 12px;
	line-height: 16px;
}

/* Pills on images --------------------------------------------------------- */

.yec-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 16px;
	background: var(--global-palette9, #fff);
	color: var(--yec-text);
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
	white-space: nowrap;
}

/* On card images every pill lifts off the photo, as on 57hours. */
.yec-card__media .yec-pill {
	box-shadow: var(--yec-badge-shadow);
}

.yec-pill svg {
	flex: none;
}

/* Badge colours: New (strong, first), activity (orange), category (white),
   partner (soft). Contrast: 5.0:1, 7.6:1, 15:1, 13:1. */
.yec-pill--new {
	background: var(--yec-badge-new-bg);
	color: var(--yec-badge-new-text);
	text-transform: uppercase;
	letter-spacing: .6px;
}

.yec-pill--activity {
	background: var(--yec-badge-activity-bg);
	color: var(--yec-badge-activity-text);
}

.yec-pill--partner {
	background: var(--yec-badge-soft-bg);
}

/* Difficulty: one mountain and the rating, first in the row. */
.yec-pill--difficulty {
	color: var(--yec-text);
}

/* Card -------------------------------------------------------------------- */

.yec-card {
	position: relative;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--yec-line);
	border-radius: var(--yec-radius);
	background: var(--yec-bg);
	transition: box-shadow .3s var(--yec-ease), border-color .3s var(--yec-ease);
}

.yec-section .yec-card:hover {
	border-color: transparent;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.yec-card .yec-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.yec-card__media {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--yec-line);
}

/* Age, difficulty and the review score share the top of the photo; the score
   is pushed to the right. */
.yec-card__top {
	position: absolute;
	top: 16px;
	right: 16px;
	left: 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
}

/* The text under the photo, inside the frame. */
.yec-card__body {
	padding: 0 16px 16px;
}

.yec-card__body > :first-child {
	margin-top: 20px;
}

.yec-card__media .yec-card__img,
.yec-card__media .yec-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	transition: transform .3s var(--yec-ease);
}

.yec-card__link:hover .yec-card__img {
	transform: scale(1.03);
}

.yec-card__age {
	padding: 3px 10px;
	font-size: 14px;
	line-height: 20px;
}

.yec-card__rating {
	margin-left: auto;
	border-radius: 24px;
	color: var(--yec-muted);
}

.yec-card__rating svg {
	color: var(--yec-rating);
}

.yec-card__badges {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yec-card .yec-card__location {
	margin: 20px 0 0;
	font-size: 10px;
	line-height: 13px;
	font-weight: 700;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--yec-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.yec-card .yec-card__title {
	margin: 0;
	font-family: var(--yec-font-heading);
	font-size: 16px;
	line-height: 20px;
	font-weight: 500;
	letter-spacing: normal;
	text-transform: none;
	color: var(--yec-text);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

@media (min-width: 768px) {
	.yec-card .yec-card__title {
		-webkit-line-clamp: 2;
	}
}

.yec-card__link:hover .yec-card__title {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The adventure row keeps the small muted type. */
.yec-card .yec-card__scale {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 16px;
	font-weight: 500;
	color: var(--yec-muted);
}

/* Dates row: "8 Jun | 12 Jul | 9 Aug | 6 Sep | +2 more", at the price's size
   (57hours /activity/, 23 Sep 2026 reference). */
.yec-card .yec-card__next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	color: var(--yec-text);
}

/* The season tag, for trips that run all season rather than on fixed weeks. */
.yec-card__season {
	padding: 2px 10px;
	border-radius: 16px;
	background: var(--yec-line);
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
}

.yec-card__scale-marks {
	display: inline-flex;
	gap: 2px;
	color: var(--yec-text);
}

.yec-card__scale-marks .is-off {
	color: var(--yec-line);
}

.yec-card__scale-marks .is-off,
.yec-card__scale-marks .is-on {
	flex: none;
}

/* Places left sits beside the dates, quieter than them, and speaks up only
   when the next departure is nearly full. */
.yec-card__places {
	color: var(--yec-muted);
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
}

.yec-card__places.is-low {
	color: var(--yec-action);
	font-weight: 700;
}

/* One line per audience: "From CHF 1'090 / Swiss resident". */
.yec-card .yec-card__price {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 13px 0 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: var(--yec-text);
}

.yec-card__from {
	font-weight: 700;
}

.yec-card__audience {
	color: var(--yec-muted);
	font-weight: 500;
}

/* Grid layout (catalog) --------------------------------------------------- */

.yec-section .yec-grid__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px var(--yec-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.yec-section .yec-grid__list {
		grid-template-columns: repeat(min(2, var(--yec-columns, 3)), 1fr);
	}
}

@media (min-width: 1024px) {
	.yec-section .yec-grid__list {
		grid-template-columns: repeat(var(--yec-columns, 3), 1fr);
	}
}

/* Category tiles -------------------------------------------------------- */

/* One row. Tiles grow to fill the width; when they no longer fit at 201px
   the row scrolls, with the arrows. */
.yec-carousel--tiles {
	--yec-item-w: 201px;
	--yec-arrow-top: 50%;
}

.yec-carousel--tiles .yec-carousel__item {
	flex: 1 0 var(--yec-item-w);
	width: auto;
}

.yec-section .yec-tile {
	display: flex;
	align-items: center;
	height: 50px;
	overflow: hidden;
	border: 1px solid var(--yec-line);
	border-radius: 8px;
	background: var(--yec-bg);
	color: var(--yec-text);
	text-decoration: none;
	transition: box-shadow .3s var(--yec-ease);
}

.yec-tile__img {
	flex: none;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px 0 0 8px;
	transition: transform .3s var(--yec-ease);
}

.yec-tile__name {
	padding: 0 12px 0 16px;
	font-size: 14px;
	line-height: 18px;
	font-weight: 500;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

@media (min-width: 768px) {
	.yec-section .yec-tile {
		height: 58px;
	}

	.yec-tile__img {
		width: 56px;
		height: 56px;
	}
}

/* Shortcut chips (square photo tiles) ------------------------------------ */

.yec-carousel--chips {
	--yec-item-w: 144px;
	--yec-arrow-top: calc(var(--yec-item-w) / 2);
}

.yec-carousel--chips .yec-carousel__list {
	gap: 16px;
}

@media (min-width: 768px) {
	.yec-carousel--chips {
		--yec-item-w: 201px;
	}
}

@media (min-width: 1200px) {
	.yec-carousel--chips .yec-carousel__list {
		gap: 24px;
	}
}

.yec-section .yec-chip,
.yec-section .yec-dest,
.yec-section .yec-member {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--yec-radius);
	background: var(--yec-line);
	color: var(--yec-on-image);
	text-decoration: none;
}

.yec-chip {
	aspect-ratio: 1;
	transition: box-shadow .3s var(--yec-ease);
}

.yec-chip__img,
.yec-dest__media,
.yec-member__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s var(--yec-ease);
}

/* Hover (57hours): the photo zooms to 105 % over .3s; tiles and chips lift
   with a soft shadow. */
.yec-chip:hover .yec-chip__img,
.yec-tile:hover .yec-tile__img,
.yec-dest:hover .yec-dest__media,
.yec-member:hover .yec-member__img {
	transform: scale(1.05);
}

.yec-section .yec-tile:hover,
.yec-section .yec-chip:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

/* Legibility gradient over photos (57hours: transparent → 70 % black). */
.yec-chip::after,
.yec-dest::after,
.yec-member::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .7) 100%);
	pointer-events: none;
}

.yec-chip__name {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 1;
	font-family: var(--yec-font-heading);
	font-size: 16px;
	line-height: 20px;
	font-weight: 500;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

@media (min-width: 768px) {
	.yec-chip__name {
		font-size: 20px;
		line-height: 24px;
	}
}

/* Destinations ------------------------------------------------------------
   One row of equal tiles at the trip card's width, scrolled like the trip
   grid. 57hours uses a mosaic of unequal tiles here; YEC lines them up
   (deliberate divergence, specs/sections.md). */

.yec-carousel--destinations {
	--yec-arrow-top: calc(var(--yec-card-w) * 5 / 4 / 2);
}

.yec-dest {
	aspect-ratio: 4 / 5;
}

.yec-section .yec-dest:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.yec-dest__text {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yec-dest__title {
	font-family: var(--yec-font-heading);
	font-size: 20px;
	line-height: 24px;
	font-weight: 500;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.yec-dest__count,
.yec-member__line {
	font-size: 10px;
	line-height: 13px;
	font-weight: 700;
	letter-spacing: .6px;
	text-transform: uppercase;
}

@media (min-width: 1024px) {
	.yec-dest__text {
		left: 24px;
		right: 24px;
	}

	.yec-dest__title {
		font-size: 24px;
		line-height: 32px;
	}
}

/* Team row ----------------------------------------------------------------- */

.yec-carousel--team {
	--yec-arrow-top: calc(var(--yec-member-h) / 2);
	--yec-member-h: 383px;
}

@media (min-width: 1024px) {
	.yec-carousel--team {
		--yec-member-h: 476px;
	}
}

.yec-member {
	height: var(--yec-member-h, 383px);
}

.yec-section .yec-member {
	background: var(--yec-surface-dark);
}

.yec-member.yec-member::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .7) 100%);
}

.yec-member__text {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 24px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yec-member__name {
	font-family: var(--yec-font-heading);
	font-size: 20px;
	line-height: 24px;
	font-weight: 500;
}

.yec-member .yec-placeholder {
	background: var(--yec-surface-dark);
	color: var(--yec-on-image);
}

/* Catalog ------------------------------------------------------------------ */

/* Reference: 57hours activity page (specs/catalog.md). Pills 40px, radius 32,
   1px hairline border; popover radius 32 with a faint shadow; phones get a
   full-screen sheet per filter. */
.yec-catalog {
	--yec-hairline: rgba(30, 30, 30, .08);
	--yec-ink: var(--global-palette3, #1a202c);
}

.yec-filters__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--yec-hairline);
}

@media (max-width: 767px) {
	/* One scrolling row that runs to the screen edge. */
	.yec-filters__bar {
		flex-wrap: nowrap;
		margin-right: -20px;
		padding-right: 20px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.yec-filters__bar::-webkit-scrollbar {
		display: none;
	}
}

.yec-filter {
	position: relative;
	flex: none;
}

.yec-catalog .yec-filter__pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 40px;
	margin: 0;
	padding: 7px 16px;
	border: 1px solid var(--yec-hairline);
	border-radius: 32px;
	background: var(--global-palette9, #fff);
	color: var(--yec-ink);
	font-family: var(--yec-font);
	font-size: 14px;
	line-height: 24px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: border-color .2s var(--yec-ease);
}

.yec-catalog .yec-filter__pill:hover,
.yec-catalog .yec-filter.is-open .yec-filter__pill,
.yec-catalog .yec-filter.is-active .yec-filter__pill {
	border-color: var(--yec-ink);
	background: var(--global-palette9, #fff);
	color: var(--yec-ink);
}

.yec-filter__chevron {
	transition: transform .2s var(--yec-ease);
}

.yec-filter.is-open .yec-filter__chevron {
	transform: rotate(180deg);
}

.yec-filter__count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--yec-ink);
	color: var(--global-palette9, #fff);
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
}

.yec-filter__count[hidden] {
	display: none;
}

/* Desktop popover */
.yec-filter__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 20;
	width: max-content;
	min-width: 280px;
	max-width: min(420px, calc(100vw - 32px));
	max-height: 60vh;
	overflow-y: auto;
	padding: 24px;
	border: 1px solid var(--yec-hairline);
	border-radius: 32px;
	background: var(--global-palette9, #fff);
	box-shadow: 0 4px 8px rgba(0, 0, 0, .04);
}

.yec-filter__panel[hidden] {
	display: none;
}

.yec-filter__head,
.yec-filter__foot {
	display: none;
}

/* Phone: full-screen sheet with a title bar and a "Show N trips" button. */
@media (max-width: 767px) {
	.yec-filter__panel {
		position: fixed;
		inset: 0;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		width: auto;
		min-width: 0;
		max-width: none;
		max-height: none;
		padding: 0;
		overflow: hidden;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.yec-filter__panel[hidden] {
		display: none;
	}

	.yec-filter__head {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		flex: none;
		padding: 20px 20px 12px;
	}

	.yec-filter__title {
		font-size: 14px;
		line-height: 20px;
		font-weight: 500;
	}

	.yec-catalog .yec-filter__close {
		position: absolute;
		top: 16px;
		right: 20px;
		display: grid;
		place-items: center;
		width: 32px;
		height: 32px;
		padding: 0;
		border: 0;
		border-radius: 4px;
		background: transparent;
		color: var(--yec-ink);
		cursor: pointer;
	}

	.yec-filter__body {
		flex: 1;
		overflow-y: auto;
		padding: 12px 24px;
	}

	.yec-filter__foot {
		display: block;
		flex: none;
		padding: 12px 20px 20px;
		border-top: 1px solid var(--yec-hairline);
	}

	.yec-sheet-open,
	.yec-sheet-open body {
		overflow: hidden;
	}
}

/* Buttons: black pills (57hours f-btn--primary). */
.yec-catalog .yec-filter__show,
.yec-catalog .yec-catalog__load,
.yec-catalog .yec-catalog__reset,
.yec-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	margin: 0;
	padding: 7px 16px;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 32px;
	background: var(--yec-ink, #1a202c);
	color: var(--global-palette9, #fff);
	font-family: var(--yec-font);
	font-size: 14px;
	line-height: 24px;
	font-weight: 500;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: background-color .2s var(--yec-ease), transform .2s var(--yec-ease);
}

.yec-catalog .yec-filter__show {
	width: 100%;
	height: 48px;
	font-size: 16px;
}

.yec-catalog .yec-catalog__load:hover,
.yec-catalog .yec-catalog__reset:hover,
.yec-catalog .yec-filter__show:hover,
.yec-button:hover {
	background: var(--global-palette4, #2d3748);
	color: var(--global-palette9, #fff);
}

.yec-catalog .yec-catalog__load:active,
.yec-button:active {
	transform: scale(.97);
}

.yec-catalog .yec-catalog__load:disabled {
	opacity: .6;
	cursor: progress;
}

.yec-button--primary {
	border-color: transparent;
	background: var(--global-palette1, #f89c00);
}

.yec-button--primary:hover {
	background: var(--yec-action-hover, #e08c00);
}

/* FacetWP choices: checkbox rows 16/28 with a count pill. */
.yec-catalog .facetwp-facet {
	margin: 0;
}

.yec-catalog .facetwp-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0;
	background: none;
	color: var(--yec-ink);
	font-size: 16px;
	line-height: 28px;
	cursor: pointer;
}

.yec-catalog .facetwp-checkbox:last-child {
	margin-bottom: 0;
}

.yec-catalog .facetwp-checkbox::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	margin-right: 8px;
	border: 1px solid var(--yec-muted);
	border-radius: 3px;
	background: var(--global-palette9, #fff) center / 12px no-repeat;
}

.yec-catalog .facetwp-checkbox.checked::before {
	border-color: var(--yec-ink);
	background-color: var(--yec-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E");
}

/* FacetWP paints its own checkbox (and a spinner while loading) as a
   background image on the row; ours is the ::before box. */
.yec-catalog .facetwp-checkbox,
.yec-catalog .facetwp-checkbox.checked,
.yec-catalog .facetwp-checkbox.facetwp-loading {
	background-image: none;
}

.yec-catalog .facetwp-checkbox.facetwp-loading {
	opacity: .6;
}

/* Regions are always shown under their country: no collapse toggle. */
.yec-catalog .facetwp-expand {
	display: none;
}

.yec-catalog .facetwp-checkbox.disabled {
	opacity: .4;
	cursor: default;
}

.yec-catalog .facetwp-checkbox:focus-visible {
	outline: 2px solid var(--yec-action);
	outline-offset: 2px;
	border-radius: 4px;
}

.yec-catalog .facetwp-counter {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 18px;
	padding: 0 4px;
	border: 1px solid var(--yec-line);
	border-radius: 999px;
	background: var(--global-palette8, #f7fafc);
	color: var(--yec-muted);
	font-size: 12px;
	line-height: 16px;
}

.yec-catalog .facetwp-depth {
	padding-left: 24px;
}

.yec-catalog .facetwp-depth.visible {
	margin-top: 16px;
}

/* Price slider */
.yec-catalog .facetwp-type-slider {
	min-width: 280px;
	padding: 8px 8px 0;
}

.yec-catalog .noUi-target {
	height: 4px;
	border: 0;
	border-radius: 2px;
	background: var(--yec-line);
	box-shadow: none;
}

.yec-catalog .noUi-connect {
	background: var(--yec-ink);
}

.yec-catalog .noUi-horizontal .noUi-handle {
	top: -9px;
	right: -11px;
	width: 22px;
	height: 22px;
	border: 1px solid var(--yec-ink);
	border-radius: 50%;
	background: var(--global-palette9, #fff);
	box-shadow: none;
	cursor: grab;
}

.yec-catalog .noUi-handle::before,
.yec-catalog .noUi-handle::after {
	display: none;
}

.yec-catalog .facetwp-slider-label {
	display: block;
	margin-top: 20px;
	font-size: 14px;
	line-height: 20px;
}

.yec-catalog .facetwp-type-slider .facetwp-slider-reset {
	display: block;
	height: auto;
	margin-top: 12px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	line-height: 20px;
	color: var(--yec-ink);
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

/* Result count: 16 below the divider, 24 above the grid (reference). */
.yec-catalog__meta {
	margin: 16px 0 24px;
}

.yec-catalog .yec-catalog__count {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	color: var(--yec-ink);
}

/* Search and sort close the filter bar, pushed right on wide screens. */
.yec-filters__tools {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.yec-catalog .facetwp-input-wrap {
	position: relative;
	display: block;
}

.yec-catalog .facetwp-search,
.yec-catalog .facetwp-type-sort select {
	height: 40px;
	margin: 0;
	padding: 7px 16px;
	border: 1px solid var(--yec-hairline);
	border-radius: 32px;
	background-color: var(--global-palette9, #fff);
	color: var(--yec-ink);
	font-family: var(--yec-font);
	font-size: 14px;
	line-height: 24px;
	box-shadow: none;
}

.yec-catalog .facetwp-search {
	width: 220px;
	padding-right: 40px;
}

.yec-catalog .facetwp-type-sort select {
	padding-right: 36px;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a202c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 18px;
	cursor: pointer;
}

.yec-catalog .facetwp-search:focus,
.yec-catalog .facetwp-type-sort select:focus-visible {
	border-color: var(--yec-ink);
	outline: 2px solid var(--yec-action);
	outline-offset: 2px;
}

.yec-catalog .facetwp-icon {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

@media (max-width: 767px) {
	.yec-filters__tools {
		margin-left: 0;
	}

	.yec-catalog .facetwp-search {
		width: 180px;
	}
}

/* Grid: 3 / 2 / 1 columns (CLAUDE.md §8), gaps as the reference (64 / 24). */
.yec-section .yec-catalog__grid {
	row-gap: 24px;
	transition: opacity .2s var(--yec-ease);
}

@media (min-width: 768px) {
	.yec-section .yec-catalog__grid {
		row-gap: 64px;
		column-gap: 24px;
	}
}

.yec-sheet-host {
	position: static;
}

.yec-catalog.is-loading .yec-catalog__grid {
	opacity: .5;
}

.yec-catalog__empty {
	grid-column: 1 / -1;
	padding: 64px 16px;
	text-align: center;
	font-size: 16px;
	line-height: 24px;
}

.yec-catalog .yec-catalog__empty p {
	margin: 0 0 8px;
}

.yec-catalog .yec-catalog__empty .yec-catalog__empty-title {
	font-family: var(--yec-font-heading);
	font-size: 20px;
	line-height: 24px;
	font-weight: 500;
}

.yec-catalog__empty .yec-catalog__reset {
	margin-top: 16px;
}

/* Load more: progress line, "Showing X of Y", black pill. */
.yec-catalog__more {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 64px;
	text-align: center;
}

.yec-catalog__more[hidden] {
	display: none;
}

.yec-catalog__progress {
	width: 335px;
	max-width: 100%;
	height: 4px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--yec-line);
}

.yec-catalog__progress span {
	display: block;
	height: 100%;
	background: var(--yec-ink);
	transition: width .3s var(--yec-ease);
}

.yec-catalog .yec-catalog__showing {
	margin: 16px 0;
	font-size: 16px;
	line-height: 24px;
}

.yec-catalog .facetwp-load-more.facetwp-hidden {
	display: none;
}

/* Catalog: "Squares" ------------------------------------------------------- */

/* Chosen by Guillem on 1 Oct 2026 (design-archive/mockups/all-trips-paper/
   photos-01-squares.html): the trip page's warm paper and its boxes headed by
   their count. The first box holds the filter - ages and dates as chips,
   activities and destinations as square photos, each row opening with its
   "All ..." choice - the second the camps. FacetWP draws and runs every
   choice; YEC_Catalog::facet_html() gives them this markup. */
.yec-catalog--squares {
	--yec-paper: #f4efe5;
	--yec-card: #fffdf9;
	--yec-edge: #e0d8c8;
	--yec-chip-edge: #d9d2c3;
	--yec-deep: #0c2137;
	--yec-subtle: var(--global-palette4, #2d3748);
	--yec-font-button: "Roboto Condensed", var(--yec-font);
	--yec-gap-box: 28px;
	display: grid;
	gap: var(--yec-gap-box);
	padding: var(--yec-gap-box) 0 0;
	font-size: 16px;
	line-height: 1.5;
}

/* On a full-width page the paper reaches the edges of the screen, and the
   boxes keep to the site's content width with a gutter of their own. */
.yec-catalog--paper {
	padding: var(--yec-gap-box) 24px 96px;
	background: var(--yec-paper);
	box-shadow: 0 0 0 100vmax var(--yec-paper);
	clip-path: inset(0 -100vmax);
}

.yec-catalog--paper > * {
	width: 100%;
	max-width: var(--global-content-width, 1290px);
	margin-right: auto;
	margin-left: auto;
}

.yec-catalog--squares [hidden] { display: none !important; }

.yec-catalog__box {
	min-width: 0;
	padding: 40px;
	border: 1px solid var(--yec-edge);
	border-radius: 16px;
	background: var(--yec-card);
}

.yec-catalog--squares .yec-catalog__step {
	margin: 0;
	color: var(--yec-subtle);
	font-family: var(--yec-font-button);
	font-size: 13px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.yec-catalog--squares .yec-catalog__step b { color: var(--yec-action); font-weight: 700; }

.yec-catalog--squares .yec-catalog__title {
	margin: 12px 0 0;
	color: var(--yec-text);
	font-family: var(--yec-font-heading);
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.yec-catalog--squares h1.yec-catalog__title { font-size: 30px; line-height: 1.15; }

.yec-catalog--squares .yec-catalog__lead {
	max-width: 72ch;
	margin: 10px 0 0;
	color: var(--yec-text);
	font-size: 16px;
	line-height: 1.6;
}

/* The filter: a row per facet, its name on the left. */
.yec-catalog__rows {
	display: grid;
	gap: 14px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--yec-edge);
}

.yec-catalog__row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
}

.yec-catalog__row--squares { align-items: start; }
.yec-catalog__row--squares .yec-catalog__label { padding-top: 12px; }

.yec-catalog__label {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--yec-subtle);
	font-family: var(--yec-font-button);
	font-size: 12px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.yec-catalog__label svg { color: var(--yec-action); }

.yec-catalog__choices { min-width: 0; }

.yec-catalog--squares .facetwp-facet { margin: 0; }

/* Chips: the ages and the dates. */
.yec-catalog__row--chips .facetwp-facet {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox,
.yec-catalog--squares .yec-chip-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--yec-chip-edge);
	border-radius: 32px;
	background: #fff;
	color: var(--yec-text);
	font-family: var(--yec-font);
	font-size: 14px;
	line-height: 1.2;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s var(--yec-ease), border-color .2s var(--yec-ease), transform .2s var(--yec-ease);
}

.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox::before { content: none; }
.yec-catalog--squares .yec-catalog__row--chips .facetwp-counter { display: none; }
.yec-catalog--squares .yec-catalog__row--chips .facetwp-depth { display: contents; }

.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox:hover,
.yec-catalog--squares .yec-chip-all:hover { border-color: var(--yec-action); }

.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox.checked,
.yec-catalog--squares .yec-chip-all[aria-pressed="true"] {
	border-color: var(--yec-action);
	background: var(--yec-action);
	color: var(--yec-text);
}

.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox.disabled { opacity: .45; cursor: default; }
.yec-catalog--squares .yec-catalog__row--chips .facetwp-checkbox:active,
.yec-catalog--squares .yec-chip-all:active { transform: scale(.98); }

/* Squares: the activities and the destinations, a photo each. */
.yec-catalog__row--squares .facetwp-facet {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 12px;
	padding: 4px;
}

.yec-catalog__row--squares .facetwp-facet-yec_place { grid-template-columns: repeat(auto-fill, minmax(96px, 120px)); }

.yec-catalog--squares .yec-sq {
	position: relative;
	display: block;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.yec-catalog--squares .yec-sq::before { content: none; }

.yec-sq__ph {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 12px;
	background: var(--yec-line);
	transition: outline-color .2s var(--yec-ease);
}

.yec-sq__ph::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .7));
	pointer-events: none;
}

.yec-catalog--squares .yec-sq__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .3s var(--yec-ease);
}

.yec-sq:hover .yec-sq__img { transform: scale(1.06); }

.yec-sq--all .yec-sq__ph {
	display: grid;
	place-items: center;
	background: var(--yec-deep);
	color: var(--yec-action);
}

.yec-sq--all .yec-sq__ph::after { display: none; }
.yec-sq--all .yec-sq__ph svg { margin-bottom: 22px; }

.yec-sq__t {
	position: absolute;
	right: 8px;
	bottom: 8px;
	left: 10px;
	z-index: 2;
	display: grid;
	gap: 2px;
	pointer-events: none;
}

.yec-catalog--squares .yec-sq__t b {
	color: #fff;
	font-size: 13px;
	line-height: 16px;
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
	overflow-wrap: anywhere;
}

.yec-catalog--squares .yec-sq__t small {
	color: rgba(255, 255, 255, .88);
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
}

.yec-sq__ok {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	display: none;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--yec-action);
	color: var(--yec-text);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.yec-sq.checked .yec-sq__ok,
.yec-sq[aria-pressed="true"] .yec-sq__ok { display: grid; }

.yec-sq.checked .yec-sq__ph,
.yec-sq[aria-pressed="true"] .yec-sq__ph {
	outline: 3px solid var(--yec-action);
	outline-offset: 2px;
}

.yec-catalog--squares .yec-sq.disabled { opacity: .45; cursor: default; }
.yec-catalog--squares .yec-sq:active .yec-sq__ph { transform: scale(.98); }

.yec-catalog--squares .yec-sq:focus-visible { outline: none; }
.yec-catalog--squares .yec-sq:focus-visible .yec-sq__ph { outline: 3px solid var(--yec-text); outline-offset: 2px; }
.yec-catalog--squares .facetwp-checkbox:focus-visible,
.yec-catalog--squares .yec-chip-all:focus-visible { outline: 2px solid var(--yec-text); outline-offset: 2px; }

/* The camps' box: its count as the heading, the sort beside it. */
.yec-catalog__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 28px;
}

.yec-catalog__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.yec-catalog--squares .yec-catalog__clear {
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--yec-text);
	font-family: var(--yec-font);
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.yec-catalog--squares .yec-catalog__clear:hover { color: var(--yec-action-hover); }
.yec-catalog--squares .yec-catalog__more { margin-top: 48px; }
.yec-catalog--squares.is-loading .yec-catalog__choices { opacity: .7; transition: opacity .2s var(--yec-ease); }

/* A laptop: the squares slide sideways, the next one cut at the edge. */
@media (max-width: 1199px) {
	.yec-catalog__row--squares .facetwp-facet,
	.yec-catalog__row--squares .facetwp-facet-yec_place {
		display: flex;
		overflow-x: auto;
		margin-right: -40px;
		padding-right: 40px;
		scrollbar-width: none;
	}

	.yec-catalog__row--squares .facetwp-facet::-webkit-scrollbar { display: none; }
	.yec-catalog--squares .yec-sq { flex: 0 0 112px; }
}

/* A tablet: each row stacks under its name, and the chips slide too. */
@media (max-width: 1023px) {
	.yec-catalog__box { padding: 28px 24px; }
	.yec-catalog__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.yec-catalog__row--squares .yec-catalog__label { padding-top: 0; }

	.yec-catalog__row--squares .facetwp-facet,
	.yec-catalog__row--squares .facetwp-facet-yec_place { margin-right: -24px; padding-right: 24px; }

	.yec-catalog__row--chips .facetwp-facet {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-right: -24px;
		padding: 2px 24px 2px 2px;
		scrollbar-width: none;
	}

	.yec-catalog__row--chips .facetwp-facet::-webkit-scrollbar { display: none; }
}

@media (max-width: 767px) {
	.yec-catalog--squares { --yec-gap-box: 20px; }
	.yec-catalog--paper { padding-right: 16px; padding-left: 16px; padding-bottom: 64px; }
	.yec-catalog__box { padding: 24px 16px; }
	.yec-catalog--squares .yec-catalog__title,
	.yec-catalog--squares h1.yec-catalog__title { font-size: 20px; }
	.yec-catalog--squares .yec-catalog__lead { font-size: 14px; }

	.yec-catalog__row--squares .facetwp-facet,
	.yec-catalog__row--squares .facetwp-facet-yec_place,
	.yec-catalog__row--chips .facetwp-facet { margin-right: -16px; padding-right: 16px; }

	.yec-catalog--squares .yec-sq { flex-basis: 100px; }
}

@media (prefers-reduced-motion: reduce) {
	.yec-catalog--squares *,
	.yec-catalog--squares *::after { transition: none !important; }
}

/* Archive hero (57hours activity hero) ------------------------------------ */

.yec-archive {
	padding-top: 32px;
}

.yec-hero {
	position: relative;
	display: flex;
	align-items: flex-start;
	height: 500px;
	overflow: hidden;
	padding: 16px;
	border-radius: var(--yec-radius);
	background: var(--global-palette4, #2d3748);
	color: var(--global-palette9, #fff);
}

.yec-hero .yec-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yec-hero .yec-placeholder.yec-hero__img {
	background: var(--global-palette4, #2d3748);
	color: var(--global-palette9, #fff);
}

.yec-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}

.yec-hero__text {
	position: relative;
	z-index: 1;
	max-width: 774px;
}

.yec-hero .yec-hero__title {
	margin: 0;
	color: inherit;
	font-family: var(--yec-font-heading);
	font-size: 40px;
	line-height: 44px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}

.yec-hero__intro {
	margin-top: 16px;
	font-size: 14px;
	line-height: 20px;
}

.yec-hero__intro p {
	margin: 0 0 8px;
}

.yec-hero .yec-button {
	margin-top: 16px;
}

.yec-archive .yec-archive__heading {
	margin: 48px 0 32px;
	font-family: var(--yec-font-heading);
	font-size: 20px;
	line-height: 24px;
	font-weight: 500;
	letter-spacing: normal;
	text-transform: none;
}

@media (min-width: 768px) {
	.yec-hero {
		padding: 32px;
	}

	.yec-hero .yec-hero__title {
		font-size: 50px;
		line-height: 50px;
	}

	.yec-hero__intro {
		margin-top: 24px;
		font-size: 16px;
		line-height: 24px;
	}

	.yec-hero .yec-button {
		margin-top: 24px;
	}
}

@media (min-width: 1024px) {
	.yec-archive .yec-archive__heading {
		font-size: 24px;
		line-height: 32px;
	}
}

/* Motion ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.yec-carousel__track {
		scroll-behavior: auto;
	}

	.yec-catalog *,
	.yec-hero * {
		transition: none !important;
	}

	.yec-section *,
	.yec-card * {
		transition: none !important;
		animation: none !important;
	}

	.yec-card__link:hover .yec-card__img,
	.yec-chip:hover .yec-chip__img,
	.yec-tile:hover .yec-tile__img,
	.yec-dest:hover .yec-dest__media,
	.yec-member:hover .yec-member__img {
		transform: none;
	}
}
