/**
 * TPO Country Tours — country landing page tour list.
 *
 * Booking-style: soft header card (title, counts, sort), horizontal tour
 * cards (image | details + dates | price + CTA), pill pagination.
 * Colors/fonts come from the Kit (var(--e-global-*)) with fallbacks.
 */

.tpo-ct {
	--tpo-ct-accent: var(--e-global-color-primary, #2563eb);
	--tpo-ct-border: color-mix(in srgb, var(--e-global-color-text, #64748b) 14%, transparent);
	--tpo-ct-muted: color-mix(in srgb, var(--e-global-color-text, #334155) 62%, transparent);
	--tpo-ct-soft: color-mix(in srgb, var(--tpo-ct-accent) 7%, #fff);
	--tpo-ct-radius: 18px;
	--tpo-ct-media-width: 300px;
	width: 100%;
	color: var(--e-global-color-text, inherit);
	font-family: var(--e-global-typography-text-font-family, inherit), sans-serif;
}

.elementor-widget-tpo-country-tours {
	width: 100%;
	max-width: 100%;
	align-self: stretch;
}

.tpo-root.tpo-ct button,
.tpo-root.tpo-ct select,
.tpo-root.tpo-ct a {
	font-family: inherit;
}

.tpo-ct__shell {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* —— Breadcrumb —— */

.tpo-ct__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--tpo-ct-muted);
}

.tpo-ct__crumb-link {
	color: inherit;
	text-decoration: none;
}

.tpo-ct__crumb-link:hover {
	color: var(--tpo-ct-accent);
}

.tpo-ct__crumb-current {
	font-weight: 700;
	color: var(--e-global-color-text, inherit);
}

.tpo-ct__crumb-sep {
	opacity: 0.4;
}

/* Microthemer forces links to width:100%/padding-top:10px at ≤390px. */
.tpo-root.tpo-ct .tpo-ct__crumbs a,
.tpo-root.tpo-ct .tpo-ct__crumbs span,
.tpo-root.tpo-ct .tpo-ct__card a:not(.tpo-ct__btn):not(.tpo-ct__pdf),
.tpo-root.tpo-ct .tpo-ct__pager a {
	width: auto !important;
	min-width: 0;
	margin-left: 0 !important;
	padding-top: 0;
}

/* CTA: even padding (the reset above used to zero its top padding, so the
   label sat high), centered label; Microthemer's link rules neutralised. */
.tpo-root.tpo-ct a.tpo-ct__btn {
	width: auto !important;
	margin-left: 0 !important;
	padding: 10px 18px;
	text-align: center;
	white-space: nowrap;
}

/* —— Search bar card (Tour Results, List design) —— */

/* Defaults match the site's TPO Tour Search on /search-tour/ (no card,
   Kit-coloured labels/fields, Primary button → Secondary on hover); every
   value stays overridable from Style → Search bar card / search styles. */
.tpo-ct__search-panel {
	margin: 0 0 24px;
	padding: 0;
}

.tpo-ct__search-panel .tpo-search {
	margin: 0;
	padding: 0;
	background: none;
	box-shadow: none;
	border: 0;
}

.tpo-ct__search-panel .tpo-search--skin-soft {
	--tpo-search-soft-accent: var(--e-global-color-secondary, #1abfc4);
	--tpo-search-soft-border: #cecece;
	--tpo-search-soft-placeholder: #71717a;
	--tpo-search-soft-text: #71717a;
	--tpo-search-soft-button: var(--e-global-color-primary, #3c84dc);
}

/* No dark focus frame on fields / the open date-range trigger (the original
   widget has none); Style → Fields → Focus border can still add one. */
.tpo-ct__search-panel .tpo-search__field input:focus,
.tpo-ct__search-panel .tpo-search__field select:focus,
.tpo-ct__search-panel .tpo-daterange__trigger:focus,
.tpo-ct__search-panel .tpo-daterange__trigger:focus-visible,
.tpo-ct__search-panel .is-open > .tpo-daterange__trigger,
.tpo-ct__search-panel .tpo-daterange__trigger[aria-expanded="true"] {
	outline: none;
	box-shadow: none;
	border-color: #cecece;
}

/* The trigger is a <button>: tpo-base's button reset sets
   `border-color: inherit` on :hover/:focus, which turned the frame dark. */
.tpo-root .tpo-ct__search-panel .tpo-daterange__trigger:hover,
.tpo-root .tpo-ct__search-panel .tpo-daterange__trigger:focus {
	border-color: #cecece;
	background-color: #fff;
	color: var(--e-global-color-text, #1b1b1b);
	outline: none;
	box-shadow: none;
}

.tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__label {
	font-size: 1rem;
	font-weight: 500;
	line-height: 20px;
	color: var(--e-global-color-text, #1b1b1b);
}

.tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field input,
.tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field select,
.tpo-ct__search-panel .tpo-search--skin-soft .tpo-daterange__trigger {
	font-size: 1rem;
	line-height: 24px;
}

.tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__submit {
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 500;
	color: #fff;
	--tpo-btn-icon-color: #fff;
}

.tpo-root .tpo-ct__search-panel .tpo-search__submit svg,
.tpo-root .tpo-ct__search-panel .tpo-search__submit i,
.tpo-root .tpo-ct__search-panel .tpo-search__submit .tpo-card__icon {
	color: #fff;
	fill: currentColor;
}

/* Field text + placeholders as dark as the original widget. */
.tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field input,
.tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field select,
.tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-daterange__trigger {
	color: var(--e-global-color-text, #1b1b1b);
}

.tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field input::placeholder,
.tpo-root .tpo-ct__search-panel .tpo-daterange__placeholder {
	color: var(--e-global-color-text, #1b1b1b);
	opacity: 1;
}

.elementor-widget .tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__submit:hover,
.elementor-widget .tpo-root .tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__submit:focus-visible {
	background-color: var(--e-global-color-secondary, #1abfc4);
	color: #fff;
}

@media (max-width: 767px) {
	.tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field input,
	.tpo-ct__search-panel .tpo-search--skin-soft .tpo-search__field select {
		font-size: 0.9rem;
	}
}

/* —— Header card —— */

.tpo-ct__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding: 24px 28px;
	border: 0;
	border-radius: var(--tpo-ct-radius);
	/* Kit primary → secondary (same banner as the other listing pages). */
	background:
		radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.22), transparent 42%),
		linear-gradient(135deg, var(--tpo-ct-accent), var(--e-global-color-secondary, #1abfc4));
	color: #fff;
}

.tpo-ct__head-copy {
	min-width: 0;
}

.tpo-root.tpo-ct .tpo-ct__title {
	margin: 0 0 10px;
	font-family: var(--e-global-typography-primary-font-family, inherit), sans-serif;
	font-size: 1.5rem;
	font-weight: var(--e-global-typography-primary-font-weight, 700);
	line-height: 1.3;
	color: #fff;
}

.tpo-ct__count {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.tpo-ct__count-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.45);
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.9);
}

.tpo-ct__count-chip strong {
	font-size: 1rem;
	color: #fff;
}

.tpo-ct__sort {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.tpo-ct__sort-label {
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	color: #fff;
}

.tpo-ct__select-wrap {
	position: relative;
	display: inline-flex;
}

.tpo-ct__select-wrap::after {
	content: "";
	color: var(--e-global-color-text, #1b1b1b);
	position: absolute;
	top: 50%;
	right: 14px;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
	opacity: 0.6;
}

.tpo-root.tpo-ct .tpo-ct__select {
	min-width: 190px;
	height: 44px;
	margin: 0;
	padding: 0 38px 0 14px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: var(--e-global-color-text, #1b1b1b);
	font-size: 0.9375rem;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	/* Theme adds its own chevron as a background image; we draw one already. */
	background-image: none !important;
}

.tpo-root.tpo-ct .tpo-ct__select:focus {
	outline: 2px solid color-mix(in srgb, var(--tpo-ct-accent) 40%, transparent);
	outline-offset: 1px;
	border-color: var(--tpo-ct-accent);
}

/* —— Tour cards —— */

.tpo-ct__list {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpo-ct__item {
	margin: 0;
	padding: 0;
}

.tpo-ct__card {
	display: grid;
	grid-template-columns: var(--tpo-ct-media-width) minmax(0, 1fr) var(--tpo-ct-aside-width, 280px);
	gap: 0;
	border: 1px solid var(--tpo-ct-border);
	border-radius: var(--tpo-ct-radius);
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.tpo-ct__card:hover {
	border-color: color-mix(in srgb, var(--tpo-ct-accent) 30%, transparent);
	box-shadow: 0 22px 44px -30px color-mix(in srgb, var(--e-global-color-text, #0f172a) 55%, transparent);
	transform: translateY(-2px);
}

.tpo-ct__media {
	position: relative;
	display: block;
	min-height: 100%;
	overflow: hidden;
	background: color-mix(in srgb, var(--e-global-color-text, #64748b) 8%, #fff);
}

/* Tour photo: a 1:1 square (its width); when a card's text runs taller
   than that (long title, wrapped meta) the photo grows with the card and
   crops slightly instead of leaving a gap under it. Phones: plain 1:1. */
.tpo-root.tpo-ct .tpo-ct__media {
	align-self: stretch;
	min-height: var(--tpo-ct-media-width);
	aspect-ratio: auto;
}

.tpo-root.tpo-ct .tpo-ct__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.tpo-ct__card:hover .tpo-ct__image {
	transform: scale(1.04);
}

.tpo-ct__badge {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	backdrop-filter: blur(4px);
}

.tpo-ct__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 20px 24px;
}

.tpo-ct__code {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 0.8125rem;
}

.tpo-ct__code-label {
	color: var(--tpo-ct-muted);
}

.tpo-ct__code-value {
	padding: 2px 8px;
	border-radius: 6px;
	background: var(--tpo-ct-soft);
	color: var(--tpo-ct-accent);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.tpo-root.tpo-ct .tpo-ct__card-title {
	margin: 0;
	font-family: var(--e-global-typography-primary-font-family, inherit), sans-serif;
	font-size: 1.125rem;
	font-weight: var(--e-global-typography-primary-font-weight, 700);
	line-height: 1.45;
	color: var(--e-global-color-text, inherit);
}

.tpo-root.tpo-ct .tpo-ct__card-title a {
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tpo-root.tpo-ct .tpo-ct__card-title a:hover {
	color: var(--tpo-ct-accent);
}

.tpo-ct__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.tpo-ct__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.tpo-ct__meta-item .tpo-ct__icon {
	color: var(--tpo-ct-accent);
	font-size: 1rem;
}

/* Airline badge + stars: shared .tpo-airline / .tpo-stars (tpo-base.css).
   Theme img rules (height/max-width) outrank a single class. */
.tpo-root.tpo-ct img.tpo-airline__logo {
	height: 22px;
	width: auto;
	max-width: 120px;
}

.tpo-ct__meta-item--airline {
	max-width: 100%;
}

.tpo-ct__duration {
	font-weight: 600;
	white-space: nowrap;
}

.tpo-ct__periods {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px; /* was auto — pushed the dates to the card bottom, leaving a gap under the meta row */
	padding-top: 12px;
	border-top: 1px dashed var(--tpo-ct-border);
}

.tpo-ct__periods-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tpo-ct-muted);
}

.tpo-ct__dates {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpo-ct__date {
	padding: 4px 10px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--e-global-color-text, #64748b) 5%, #fff);
	border: 1px solid var(--tpo-ct-border);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.tpo-ct__date--more {
	border-style: dashed;
	background: #fff;
}

.tpo-root.tpo-ct .tpo-ct__date--more a {
	color: var(--tpo-ct-accent);
	font-weight: 600;
	text-decoration: none;
}

.tpo-ct__aside {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 14px;
	padding: 20px 22px;
	border-left: 1px solid var(--tpo-ct-border);
	background: var(--tpo-ct-soft);
	text-align: center;
}

.tpo-ct__price {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.tpo-ct__price-label {
	font-size: 0.8125rem;
	color: var(--tpo-ct-muted);
}

.tpo-ct__price-old {
	font-size: 0.875rem;
	color: var(--tpo-ct-muted);
}

.tpo-ct__price-value {
	font-family: var(--e-global-typography-primary-font-family, inherit), sans-serif;
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--tpo-ct-accent);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.tpo-ct__price-value small {
	font-size: 0.875rem;
	font-weight: 700;
}

.tpo-root.tpo-ct .tpo-ct__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--tpo-ct-accent);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--tpo-ct-accent) 70%, transparent);
	transition: filter 0.15s ease, transform 0.15s ease;
}

.tpo-root.tpo-ct .tpo-ct__btn:hover {
	color: #fff;
	filter: brightness(1.07);
	transform: translateY(-1px);
}

.tpo-ct__btn .tpo-ct__icon {
	transition: transform 0.15s ease;
}

.tpo-ct__btn:hover .tpo-ct__icon {
	transform: translateX(3px);
}

/* —— Pager (empty message = shared .tpo-empty-state) —— */

.tpo-ct__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}

.tpo-root.tpo-ct .tpo-ct__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--tpo-ct-border);
	border-radius: 12px;
	background: #fff;
	color: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

/* The current page is a link now too (shared Ui::pager) — keep its colours. */
.tpo-root.tpo-ct a.tpo-ct__page:not(.is-current):hover {
	border-color: var(--tpo-ct-accent);
	color: var(--tpo-ct-accent);
}

.tpo-root.tpo-ct .tpo-ct__page.is-current {
	border-color: var(--tpo-ct-accent);
	background: var(--tpo-ct-accent);
	color: #fff;
}

.tpo-root.tpo-ct .tpo-ct__page--gap {
	border: 0;
	background: none;
	min-width: 20px;
	padding: 0;
}

/* —— Laptop / tablet —— */

@media (min-width: 1025px) and (max-width: 1366px) {
	.tpo-root.tpo-ct {
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media (max-width: 1024px) {
	.tpo-root.tpo-ct {
		padding-left: 16px;
		padding-right: 16px;
	}

	/* Image | details, price row across the bottom. */
	.tpo-ct__card {
		grid-template-columns: min(var(--tpo-ct-media-width), 38%) minmax(0, 1fr);
	}

	.tpo-ct__aside {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-left: 0;
		border-top: 1px solid var(--tpo-ct-border);
		padding: 14px 20px;
		text-align: left;
	}

	.tpo-ct__price {
		align-items: flex-start;
	}

	.tpo-root.tpo-ct .tpo-ct__btn {
		min-width: 180px;
	}
}

/* —— Mobile —— */

@media (max-width: 767px) {
	.tpo-ct__head {
		padding: 18px 16px;
	}

	.tpo-root.tpo-ct .tpo-ct__title {
		font-size: 1.25rem;
	}

	.tpo-ct__sort {
		width: 100%;
	}

	.tpo-ct__select-wrap,
	.tpo-root.tpo-ct .tpo-ct__select {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}

	.tpo-ct__card {
		grid-template-columns: minmax(0, 1fr);
	}

	.tpo-root.tpo-ct .tpo-ct__media {
		min-height: 0;
		aspect-ratio: 1 / 1;
	}

	.tpo-ct__body {
		padding: 16px;
	}

	.tpo-ct__aside {
		padding: 14px 16px;
		gap: 12px;
	}

	.tpo-ct__price-value {
		font-size: 1.375rem;
	}

	.tpo-root.tpo-ct .tpo-ct__btn {
		min-width: 0;
		flex: 0 0 auto;
		padding: 10px 16px;
	}

	.tpo-root.tpo-ct .tpo-ct__page--nav {
		padding: 0 10px;
	}
}

/* —— PDF button (aside, under the detail button) — secondary/outline;
   only rendered when the API sent a brochure URL. —— */
.tpo-root.tpo-ct a.tpo-ct__pdf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto !important;
	min-height: 40px;
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--tpo-ct-accent);
	border-radius: 12px;
	background: transparent;
	color: var(--tpo-ct-accent);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tpo-root.tpo-ct a.tpo-ct__pdf:hover,
.tpo-root.tpo-ct a.tpo-ct__pdf:focus-visible {
	background: var(--tpo-ct-accent);
	color: #fff;
}

@media (pointer: coarse) {
	.tpo-root.tpo-ct a.tpo-ct__pdf {
		min-height: 44px;
	}
}

/* Tablet / phone: the aside is a row (price | buttons) — with a PDF button,
   stack the two buttons in a right column instead of three across. */
@media (max-width: 1024px) {
	.tpo-ct__aside:has(.tpo-ct__docs) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 12px;
		row-gap: 8px;
	}

	.tpo-ct__aside:has(.tpo-ct__docs) .tpo-ct__price {
		grid-row: auto;
	}

	.tpo-root.tpo-ct .tpo-ct__aside a.tpo-ct__btn {
		grid-column: 2;
		margin: 0;
	}

	.tpo-root.tpo-ct .tpo-ct__aside .tpo-ct__docs {
		grid-column: 1 / -1;
		margin: 0;
	}
}

/* Phone: the Elementor container already gives the page gutter — no second
   side padding inside the widget. */
@media (max-width: 767px) {
	.tpo-root.tpo-ct {
		padding-left: 0;
		padding-right: 0;
	}
}

/* Document buttons wrapper — one file = one full-width button; several =
   one row of short buttons (PDF | Word | Banner), wrapping if needed. */
.tpo-ct__docs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: -4px;
}

.tpo-root.tpo-ct .tpo-ct__docs a.tpo-ct__pdf {
	flex: 1 1 0;
}

.tpo-root.tpo-ct .tpo-ct__docs--many a.tpo-ct__pdf .tpo-ct__icon {
	display: none;
}

.tpo-root.tpo-ct .tpo-ct__docs--many a.tpo-ct__pdf {
	min-width: 0;
	min-height: 44px;
	padding-left: 10px;
	padding-right: 10px;
	gap: 6px;
	font-size: 0.875rem;
}
