/* Small Group Journeys: journeys listing (v2, Figma 375:2585, mobile 404:2615,
 * drawer 406:4117; card Card/ItineraryListing 380:1532; sidebar 386:1389).
 *
 * Replaces Featured journeys (the id our-journeys stays). Navy section: the
 * heading and total, then a sticky compact filter sidebar (292) beside the
 * results in three columns (two from 900 to 1199). Below 900px the sidebar becomes a full-screen drawer opened from
 * a Filters button beside the search. The cards are the live card-tour markup,
 * restyled to the v2 card: square image, a View Map toggle on every card.
 * Filters, Load More and the drawer run in assets/js/sgj/listing.js. Port this
 * file to astra-child with the section markup. */

.ot-section.g--sgj-listing {
	--sgj-line: rgba(255, 255, 255, 0.12);
	--sgj-navy-deep: #123458;
	padding: 0;
	background-color: var(--ast-global-color-1);
	color: var(--ast-global-color-4);
}

/* 70 above and below (the live container's own padding is the section
 * padding; set here so it stays 70 at every width, 55 below 900). */
.ot-section.g--sgj-listing > .ot-section__container {
	display: block;
	padding-top: 70px;
	padding-bottom: 70px;
}

/* Header: h2 Hypatia 300 36/46.8 white; the total Inter 300 16 white 70%. */
.g--sgj-listing__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 24px;
}

.g--sgj-listing__header h2 {
	margin: 0;
	color: var(--ast-global-color-4);
	font-weight: 300;
	line-height: 1.3;
}

.ot-section.g--sgj-listing .g--sgj-listing__total {
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.4;
}

/* Body: the compact sidebar (292) and the results, 40 apart. */
.g--sgj-listing__body {
	display: grid;
	grid-template-columns: 292px minmax(0, 1fr);
	align-items: start;
	gap: 40px;
	margin-top: 40px;
}

.g--sgj-listing__bar {
	display: none;
}

/* Sidebar (Filter/Sidebar, compact rev. 30 Oct): navy deep, radius 16,
 * padding 24, blocks 20 apart, no border; about 857 high, so it fits a
 * 1080-high window. Sticks 24 below the window top (the live header is not
 * sticky). If the header is made sticky, change only --sgj-sticky-top (to
 * the header height + 24). */
.g--sgj-filters {
	--sgj-sticky-top: 24px;
	position: sticky;
	top: var(--sgj-sticky-top);
	box-sizing: border-box;
	/* Taller than the window (a short laptop), it scrolls on its own. */
	max-height: calc(100vh - 2 * var(--sgj-sticky-top));
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 24px;
	border-radius: 16px;
	background-color: var(--sgj-navy-deep);
	color: var(--ast-global-color-4);
	font-family: Inter, sans-serif;
}

/* Header: "Filter Journeys" Hypatia 300 22 white; "Clear all" Inter 13 gold,
 * underlined. */
.g--sgj-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.g--sgj-filters__head h3 {
	margin: 0;
	color: var(--ast-global-color-4);
	font-size: 22px;
	font-weight: 300;
	line-height: 28.6px;
	text-transform: none;
}

.g--sgj-filters__scroll {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Text buttons: Clear all (gold, underlined) and the drawer's close. */
.g--sgj-listing .sgj-filters__clear,
.g--sgj-listing .sgj-filters__clear:hover,
.g--sgj-listing .sgj-filters__clear:focus {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--ast-global-color-0);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.g--sgj-listing .sgj-filters__clear:hover {
	color: var(--ast-global-color-4);
}

.g--sgj-listing .sgj-filters__clear:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.g--sgj-listing .sgj-filters__close,
.g--sgj-listing .sgj-filters__close:hover,
.g--sgj-listing .sgj-filters__close:focus {
	display: none;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: url("../icons/close.svg") 50% 50% / 24px no-repeat;
	box-shadow: none;
	cursor: pointer;
}

.g--sgj-filters__footer {
	display: none;
}

/* Search: 44 high (48 in the mobile bar), radius 8, white 7%, no border;
 * search icon 16 at white 70%, placeholder white 50%. */
.sgj-filter-search {
	position: relative;
}

.g--sgj-listing .sgj-filter-search input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px 0 40px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.07) url("../icons/search.svg") 14px 50% / 16px no-repeat;
	box-shadow: none;
	color: var(--ast-global-color-4);
	font-family: Inter, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
}

.g--sgj-listing .sgj-filter-search input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.5);
	opacity: 1;
}

.g--sgj-listing .sgj-filter-search input[type="search"]:focus {
	outline: none;
	box-shadow: inset 0 0 0 1px var(--ast-global-color-0);
}

.g--sgj-listing .sgj-filter-search input[type="search"]:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

/* Groups: a 1px white 10% rule, 14 above the header (Inter 600 12, uppercase,
 * 1.2px tracking, gold), then the options 12 below. Destination and Themes
 * collapse from a chevron button (both open by default). */
.sgj-filter-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.sgj-filter-group__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 14px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--ast-global-color-0);
	font-family: Inter, sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 15px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.g--sgj-listing .sgj-filter-group__toggle,
.g--sgj-listing .sgj-filter-group__toggle:hover,
.g--sgj-listing .sgj-filter-group__toggle:focus {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	text-transform: inherit;
	cursor: pointer;
}

.sgj-filter-group__toggle::after {
	content: "";
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	background: url("../icons/chevron-up.svg") 50% 50% / 14px no-repeat;
	transition: transform 200ms ease-out;
}

.sgj-filter-group__toggle[aria-expanded="false"]::after {
	transform: rotate(180deg);
}

.g--sgj-listing .sgj-filter-group__toggle:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 4px;
}

.sgj-filter-group [hidden] {
	display: none;
}

/* Destination: rows about 30 high (6 / 8, radius 6, 2 apart), radio 16, label
 * Inter 15 (selected Regular white on a white 6% row; others Light white
 * 85%), count Inter 13 at the right (selected gold, others white 50%). */
.sgj-filter-radios {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sgj-filter-radio {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	font-weight: 300;
	line-height: 18px;
	cursor: pointer;
}

.sgj-filter-radio:hover {
	background-color: rgba(255, 255, 255, 0.04);
}

.sgj-filter-radio input {
	box-sizing: border-box;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/* Selected: a gold ring round a navy-deep centre. */
.sgj-filter-radio input:checked {
	border: 5px solid var(--ast-global-color-0);
	background-color: var(--sgj-navy-deep);
}

.sgj-filter-radio input:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.sgj-filter-radio__label {
	flex: 1;
	min-width: 0;
}

.sgj-filter-radio:has(input:checked) {
	background-color: rgba(255, 255, 255, 0.06);
	color: var(--ast-global-color-4);
	font-weight: 400;
}

.sgj-filter-radio .sgj-filter-count {
	flex-shrink: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
}

.sgj-filter-radio:has(input:checked) .sgj-filter-count {
	color: var(--ast-global-color-0);
}

/* No result with the other filters: dimmed, still clickable. */
.sgj-filter-radio.is-empty,
.g--sgj-listing .sgj-filter-chip.is-empty {
	opacity: 0.4;
}

/* Region: 44 high, radius 8, chevron 14. Disabled ("Choose a destination
 * first" or "No regions for this destination", white 40% on white 4%) until a
 * destination with tagged regions is chosen; then white 7%, "All regions in
 * <Destination>", and a gold border while the menu is open. From 900 a custom
 * listbox (rev. 4 Nov, 426:3092); in the drawer and without JavaScript the
 * native select. */
.g--sgj-listing .sgj-filter-group select,
.g--sgj-listing .sgj-region__button,
.g--sgj-listing .sgj-region__button:hover,
.g--sgj-listing .sgj-region__button:focus {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 38px 0 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.07) url("../icons/chevron-down.svg") right 14px center / 14px no-repeat;
	box-shadow: none;
	color: rgba(255, 255, 255, 0.9);
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 42px;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.g--sgj-listing .sgj-filter-group select:disabled,
.g--sgj-listing .sgj-region__button:disabled {
	background-color: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.4);
	cursor: not-allowed;
}

.g--sgj-listing .sgj-region__button[aria-expanded="true"] {
	border-color: var(--ast-global-color-0);
	background-image: url("../icons/chevron-up.svg");
}

.g--sgj-listing .sgj-filter-group select:focus-visible,
.g--sgj-listing .sgj-region__button:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.g--sgj-listing .sgj-filter-group select option {
	background-color: var(--sgj-navy-deep);
	color: var(--ast-global-color-4);
}

/* Native select by default; the custom listbox once listing.js runs, from
 * 900. */
.sgj-region__custom {
	display: none;
}

@media (min-width: 900px) {
	.sgj-region.is-enhanced .sgj-region__native {
		display: none;
	}

	.sgj-region.is-enhanced .sgj-region__custom {
		display: block;
	}
}

/* Menu: white, radius 8, padding 6, shadow; rows 8 / 10, radius 6, Inter 14
 * ink with an Inter 12 muted count; selected cream with navy 500 text, the
 * active (hovered or arrow-key) row light grey. Fixed under the button so
 * the sidebar's own scroll never clips it. */
.sgj-region__menu {
	position: fixed;
	z-index: 1001;
	box-sizing: border-box;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 8px;
	background-color: var(--ast-global-color-4);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
	list-style: none;
	font-family: Inter, sans-serif;
}

.sgj-region__menu[hidden] {
	display: none;
}

.sgj-region__menu:focus {
	outline: none;
}

.sgj-region__menu:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.sgj-region__option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 10px;
	border-radius: 6px;
	color: var(--ast-global-color-2);
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	cursor: pointer;
}

.sgj-region__option span:first-child {
	flex: 1;
	min-width: 0;
}

.sgj-region__option .sgj-filter-count {
	flex-shrink: 0;
	color: #a7a9ac;
	font-size: 12px;
	line-height: 15px;
}

.sgj-region__option.is-active {
	background-color: #f5f5f5;
}

.sgj-region__option[aria-selected="true"] {
	background-color: #f1ede6;
	color: var(--ast-global-color-1);
	font-weight: 500;
}

.sgj-region__option.is-empty {
	opacity: 0.4;
}

/* Themes: chips white 8%, no border, radius 100, 6 / 11, 6 apart; label
 * Inter 13 white 90%, count 11 white 50%. Pressed: gold, navy text. */
.sgj-filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.g--sgj-listing .sgj-filter-chip,
.g--sgj-listing .sgj-filter-chip:hover,
.g--sgj-listing .sgj-filter-chip:focus {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 11px;
	border: 0;
	border-radius: 100px;
	background-color: rgba(255, 255, 255, 0.08);
	box-shadow: none;
	color: rgba(255, 255, 255, 0.9);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	cursor: pointer;
}

.g--sgj-listing .sgj-filter-chip:hover {
	background-color: rgba(255, 255, 255, 0.14);
}

.g--sgj-listing .sgj-filter-chip:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.sgj-filter-chip .sgj-filter-count {
	color: rgba(255, 255, 255, 0.5);
	font-size: 11px;
	line-height: 13px;
}

.g--sgj-listing .sgj-filter-chip[aria-pressed="true"] {
	background-color: var(--ast-global-color-0);
	color: var(--ast-global-color-1);
}

.sgj-filter-chip[aria-pressed="true"] .sgj-filter-count {
	color: var(--ast-global-color-1);
}

/* Results: three columns 24 apart both ways (cards 340 at 1920). */
.g--sgj-listing .post-results {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-results__item {
	display: flex;
	min-width: 0;
}

.post-results__item[hidden] {
	display: none;
}

.post-results__item:focus {
	outline: none;
}

.post-results__item:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 4px;
	border-radius: var(--card-border-radius);
}

/* Card (Card/ItineraryListing): the live card-tour at the v2 sizes. */
.g--sgj-listing .card-tour {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	color: var(--ast-global-color-2);
}

.g--sgj-listing .card-tour .card__bg-image {
	position: relative;
	height: auto;
	aspect-ratio: 1;
	overflow: hidden;
}

.g--sgj-listing .card-tour .card__bg-image picture {
	position: absolute;
	inset: 0;
}

.g--sgj-listing .card-tour .card__map {
	opacity: 0;
	transition: opacity 300ms ease-out;
}

/* Badges: top right, 16 in, 8 apart. On Port Series cards they start clear of
 * the 80px logo (16 + 80 + 8). */
.g--sgj-listing .card-tour .terms-holder {
	box-sizing: border-box;
	top: 0;
	right: 0;
	gap: 8px;
	padding: 16px;
	transition: opacity 300ms ease-out;
}

.g--sgj-listing .card-tour--port-series .terms-holder {
	padding-left: 104px;
}

.g--sgj-listing .card-tour .post-terms {
	letter-spacing: -0.5px;
	line-height: 1;
}

.g--sgj-listing .card-tour .card__bg-image img.ot-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	width: 80px;
	height: 80px;
	object-fit: contain;
	transition: opacity 300ms ease-out;
}

/* Content: 28 / 24, 16 apart. */
.g--sgj-listing .card-tour .card__content {
	flex: 1;
	gap: 16px;
	padding: 28px 24px;
}

.g--sgj-listing .card-tour .card__content h3 {
	margin: 0;
	color: var(--ast-global-color-2);
	font-size: 24px;
	line-height: 1.3;
}

.g--sgj-listing .card-tour .card__days {
	align-items: baseline;
	gap: 4px;
	font-size: 19.2px;
	line-height: 1;
}

.g--sgj-listing .card-tour .card__days b {
	font-size: 45px;
	font-weight: 300;
	line-height: 1;
}

.g--sgj-listing .card-tour .card__categories,
.g--sgj-listing .card-tour .card__date {
	font-size: 16px;
	line-height: 1;
}

/* Stats: a hairline above and below, 20 in; icon 25, 4 apart; the value
 * 16/22.4 and the label 13.3/18.7, navy. */
.g--sgj-listing .card-tour .card__price-pax {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	margin-top: 0;
	padding: 20px 0;
	border-top: 1px solid #eaeaea;
	border-bottom: 1px solid #eaeaea;
	font-size: 16px;
	line-height: 22.4px;
}

.g--sgj-listing .card-tour .card__meta {
	gap: 4px;
	line-height: 22.4px;
}

.g--sgj-listing .card-tour .card__meta .icon {
	margin-bottom: 0;
}

.g--sgj-listing .card-tour .card__meta span {
	font-size: 13.3px;
	line-height: 18.7px;
}

.ot-section.g--sgj-listing .card-tour p.product-short-description {
	max-width: none;
	margin: 0;
	color: var(--ast-global-color-2);
	font-size: 16px;
	font-weight: 300;
	line-height: 28px;
}

.g--sgj-listing .card-tour .card__link {
	position: relative;
	z-index: 2;
	transition: background-color 300ms ease-out;
}

.g--sgj-listing .card-tour .card__link:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: -6px;
	box-shadow: inset 0 0 0 4px var(--ast-global-color-4);
}

/* Card hover (rev. 4 Nov: State=Hover) only turns Learn More navy, as the
 * live button does; the map is the toggle's. */
@media (hover: hover) {
	.g--sgj-listing .card-tour:hover .card__link {
		background-color: var(--ast-global-color-1);
	}

	.g--sgj-listing .card-tour:hover .card__link::after {
		transform: translateX(5px);
	}
}

/* Map toggle (Card/ItineraryListing "Map toggle", State=Map 408:2939; rev. 4
 * Nov: every device). A pill 16 in from the image's bottom-right corner;
 * clicked or tapped, the map fades in over the photo, the badges and logo
 * fade out and the pill turns navy ("View Photo"). Learn More stays gold
 * unless the card is hovered. It sits outside the card's links and above the
 * whole-card link (z-index 3). Rendered hidden; listing.js shows it, so there
 * is no dead button without JavaScript. */
.g--sgj-listing .card-tour .card__map-toggle[hidden] {
	display: none;
}

.g--sgj-listing .card-tour .card__map-toggle:not([hidden]),
.g--sgj-listing .card-tour .card__map-toggle:not([hidden]):hover,
.g--sgj-listing .card-tour .card__map-toggle:not([hidden]):focus {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 14px 8px 12px;
	border: 0;
	border-radius: 100px;
	background-color: rgba(255, 255, 255, 0.94);
	box-shadow: 0 4px 12px rgba(0, 52, 90, 0.18);
	color: var(--ast-global-color-1);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 16px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 300ms ease-out, color 300ms ease-out;
}

/* The pill is 32 high: a 44px hit area round it. */
.g--sgj-listing .card-tour .card__map-toggle::before {
	content: "";
	position: absolute;
	inset: -6px -4px;
}

.g--sgj-listing .card-tour .card__map-toggle svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.g--sgj-listing .card-tour .card__map-toggle:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.g--sgj-listing .card-tour .card__map-toggle[aria-pressed="true"]:not([hidden]),
.g--sgj-listing .card-tour .card__map-toggle[aria-pressed="true"]:not([hidden]):hover,
.g--sgj-listing .card-tour .card__map-toggle[aria-pressed="true"]:not([hidden]):focus {
	background-color: var(--ast-global-color-1);
	color: var(--ast-global-color-4);
}

.g--sgj-listing .card-tour.is-map .card__map {
	opacity: 1;
}

.g--sgj-listing .card-tour.is-map .terms-holder,
.g--sgj-listing .card-tour.is-map .ot-badge {
	opacity: 0;
}

/* Empty state. */
.g--sgj-listing__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	padding: 48px 20px;
	border: 1px solid var(--sgj-line);
	border-radius: var(--card-border-radius);
	text-align: center;
}

.g--sgj-listing__empty[hidden] {
	display: none;
}

.ot-section.g--sgj-listing .g--sgj-listing__empty p {
	max-width: none;
	margin: 0;
	color: var(--ast-global-color-4);
	font-size: 18px;
	font-weight: 300;
}

/* Load More: "Showing X of Y", a 240 x 3 bar, then the button. */
.g--sgj-listing__more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 40px;
	padding-top: 24px;
}

.g--sgj-listing__more[hidden] {
	display: none;
}

.ot-section.g--sgj-listing .g--sgj-listing__showing {
	max-width: none;
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 16px;
	font-weight: 300;
	line-height: 28px;
}

.g--sgj-listing__progress {
	width: 240px;
	height: 3px;
	overflow: hidden;
	border-radius: 2px;
	background-color: rgba(255, 255, 255, 0.15);
}

.g--sgj-listing__progress span {
	display: block;
	width: var(--sgj-shown, 100%);
	height: 100%;
	background-color: var(--ast-global-color-0);
	transition: width 300ms ease-out;
}

.g--sgj-listing .g--sgj-listing__load {
	margin-top: 8px;
}

.g--sgj-listing .g--sgj-listing__load[hidden] {
	display: none;
}

/* 900 to 1199: the sidebar beside two card columns. */
@media (min-width: 900px) and (max-width: 1199px) {
	.g--sgj-listing__body {
		gap: 32px;
	}

	.g--sgj-listing .post-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Below 900: the heading 28/36.4 with the total 8 under it; search and a gold
 * Filters button; the cards 24 apart, two columns from 600, one below. The
 * sidebar is a full-screen drawer (slides up, 300ms). */
@media (max-width: 899px) {
	.ot-section.g--sgj-listing > .ot-section__container {
		padding-top: 55px;
		padding-bottom: 55px;
	}

	.g--sgj-listing__header {
		display: block;
	}

	.ot-section.g--sgj-listing .g--sgj-listing__total {
		margin-top: 8px;
		font-size: 15px;
	}

	.g--sgj-listing__body {
		display: block;
		margin-top: 24px;
	}

	.g--sgj-listing__bar {
		display: flex;
		gap: 12px;
	}

	.g--sgj-listing__bar .sgj-filter-search {
		flex: 1;
		min-width: 0;
	}

	.g--sgj-listing .g--sgj-listing__bar .sgj-filter-search input[type="search"] {
		height: 48px;
	}

	.g--sgj-listing .sgj-filters-button,
	.g--sgj-listing .sgj-filters-button:hover,
	.g--sgj-listing .sgj-filters-button:focus {
		display: inline-flex;
		align-items: center;
		flex-shrink: 0;
		gap: 8px;
		height: 48px;
		padding: 0 16px;
		border: 0;
		border-radius: 8px;
		background-color: var(--ast-global-color-0);
		box-shadow: none;
		color: var(--ast-global-color-4);
		font-family: Inter, sans-serif;
		font-size: 16px;
		font-weight: 400;
		line-height: 1;
		cursor: pointer;
	}

	.g--sgj-listing .sgj-filters-button::before {
		content: "";
		width: 18px;
		height: 18px;
		background: url("../icons/filter.svg") 50% 50% / 18px no-repeat;
	}

	.g--sgj-listing .sgj-filters-button:hover {
		background-color: var(--ast-global-color-3, #8f7642);
	}

	.g--sgj-listing .sgj-filters-button:focus-visible {
		outline: 2px solid var(--ast-global-color-4);
		outline-offset: 2px;
	}

	.g--sgj-listing__results {
		margin-top: 24px;
	}

	.g--sgj-listing .post-results {
		gap: 24px;
	}

	.g--sgj-listing__more {
		margin-top: 24px;
		padding-top: 16px;
	}

	.g--sgj-listing__progress {
		width: 200px;
	}

	.g--sgj-listing .g--sgj-listing__load {
		width: 100%;
	}

	/* Drawer. Closed, it is off screen and hidden from focus and readers. */
	.g--sgj-filters {
		position: fixed;
		inset: 0;
		z-index: 1000;
		max-height: none;
		gap: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		overflow: hidden;
		visibility: hidden;
		transform: translateY(100%);
		transition: transform 300ms ease-out, visibility 0s linear 300ms;
	}

	.g--sgj-filters.is-open {
		visibility: visible;
		transform: none;
		transition: transform 300ms ease-out;
	}

	.g--sgj-filters__head {
		flex-shrink: 0;
		padding: 20px 20px 0;
	}

	.g--sgj-filters__head h3 {
		font-size: 22px;
	}

	.g--sgj-filters__head .sgj-filters__clear {
		display: none;
	}

	.g--sgj-listing .sgj-filters__close,
	.g--sgj-listing .sgj-filters__close:hover,
	.g--sgj-listing .sgj-filters__close:focus {
		display: block;
	}

	.g--sgj-listing .sgj-filters__close:focus-visible {
		outline: 2px solid var(--ast-global-color-0);
		outline-offset: 2px;
	}

	.g--sgj-filters__scroll {
		flex: 1;
		gap: 20px;
		padding: 20px 20px 28px;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.g--sgj-filters__search {
		display: none;
	}

	.g--sgj-filters__footer {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 16px 20px;
		background-color: var(--sgj-navy-deep);
		box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
	}

	.g--sgj-filters__footer .sgj-filters__clear,
	.g--sgj-filters__footer .sgj-filters__clear:hover,
	.g--sgj-filters__footer .sgj-filters__clear:focus {
		font-size: 14px;
	}

	.g--sgj-filters__footer .sgj-filters__show {
		margin: 0;
	}
}

@media (min-width: 600px) and (max-width: 899px) {
	.g--sgj-listing .post-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.g--sgj-listing .post-results {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Below 360 the Filters button narrows so the search keeps its room. */
@media (max-width: 359px) {
	.g--sgj-listing .sgj-filters-button,
	.g--sgj-listing .sgj-filters-button:hover,
	.g--sgj-listing .sgj-filters-button:focus {
		padding: 0 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.g--sgj-listing .sgj-filter-group__toggle::after,
	.g--sgj-listing .card-tour .card__map,
	.g--sgj-listing .card-tour .terms-holder,
	.g--sgj-listing .card-tour .ot-badge,
	.g--sgj-listing .card-tour .card__link,
	.g--sgj-listing .card-tour .card__map-toggle:not([hidden]),
	.g--sgj-listing__progress span,
	.g--sgj-filters,
	.g--sgj-filters.is-open {
		transition: none;
	}
}
