/* ==========================================================================
   SkyTrade Aviation — Tours Page (upgraded)
   Loaded only on template-tours.php, after booking.css.
   Structure inspired by voyage.qodeinteractive.com/home-2 (hero banner,
   image-forward cards, sort toolbar) reworked in SkyTrade's navy/gold system.
   ========================================================================== */

.tours-page-wrap {
	overflow-x: hidden;
}

/* ---------------------------------------------------------------------- */
/* Widen the page — booking.css defaults .booking-page to 640px for simple
   forms; the tours page needs full grid width. Detail/form content inside
   stays readable at 640px.                                               */
/* ---------------------------------------------------------------------- */

.booking-page.tours-page {
	max-width: var(--st-max-width);
}

.tours-page .tour-detail-inner,
.tours-page #tours-form,
.tours-page .booking-confirmation {
	max-width: 640px;
}

/* ---------------------------------------------------------------------- */
/* Plane icon placeholder (replaces emoji)                                 */
/* ---------------------------------------------------------------------- */

.tours-plane-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(201, 168, 76, 0.35);
	line-height: 1;
}

.tours-plane-icon svg {
	width: 1em;
	height: 1em;
	stroke: currentColor;
	fill: none;
}

/* ---------------------------------------------------------------------- */
/* Hero banner                                                             */
/* ---------------------------------------------------------------------- */

.tours-hero {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	height: 48vh;
	min-height: 380px;
	max-height: 560px;
	overflow: hidden;
	margin-bottom: var(--st-space-2xl);
	background: linear-gradient(135deg, var(--st-navy-light) 0%, var(--st-navy) 100%);
}

.tours-hero__media {
	position: absolute;
	inset: 0;
}

.tours-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Shown only when no Featured Image has been set — replace via
   Elementor / the WordPress editor by setting the page's Featured Image. */
.tours-hero__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tours-hero__placeholder .tours-plane-icon {
	font-size: 96px;
	color: rgba(201, 168, 76, 0.28);
}

.tours-hero__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, var(--st-navy) 0%, rgba(10, 22, 40, 0.15) 55%, rgba(10, 22, 40, 0.55) 100%);
}

.tours-hero__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--st-space-2xl);
	z-index: 1;
}

.tours-hero__content .eyebrow {
	color: var(--st-gold);
	font-size: 11px;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	margin-bottom: var(--st-space-sm);
}

.tours-hero__content h1 {
	font-family: var(--st-font-display);
	color: var(--st-white);
	font-size: clamp(32px, 5vw, 52px);
	font-weight: 600;
	line-height: 1.1;
	max-width: 720px;
	margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Toolbar                                                                  */
/* ---------------------------------------------------------------------- */

.tours-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--st-space-md);
	margin-bottom: var(--st-space-lg);
	flex-wrap: wrap;
}

.tours-toolbar__count {
	color: var(--st-white-60);
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.tours-sort-select {
	background-color: var(--st-input-bg);
	border: 1px solid var(--st-navy-mid);
	border-radius: var(--st-radius-input);
	color: var(--st-white-90);
	font-size: 12px;
	padding: 10px 14px;
	cursor: pointer;
}

.tours-sort-select:focus {
	outline: none;
	border-color: var(--st-gold);
}

/* ---------------------------------------------------------------------- */
/* Country group + grid                                                    */
/* ---------------------------------------------------------------------- */

.tour-country-group {
	margin-bottom: var(--st-space-2xl);
}

.tour-country-group__heading {
	color: var(--st-white-60);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: var(--st-space-md);
	display: flex;
	align-items: center;
	gap: var(--st-space-sm);
}

.tour-country-group__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: var(--st-navy-mid);
}

.tour-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
	gap: var(--st-space-lg);
}

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

.tour-card {
	display: flex;
	flex-direction: column;
	background-color: var(--st-navy-light);
	border: 1px solid var(--st-navy-mid);
	border-radius: var(--st-radius-card);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tour-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.tour-card.is-selected {
	border-color: var(--st-gold);
	box-shadow: 0 0 0 1px var(--st-gold);
}

.tour-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--st-navy-light) 0%, var(--st-navy) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* Real photo, only rendered when the tour record has an image_url —
   the API doesn't provide one yet, so this stays empty for now. */
.tour-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tour-card__media .tours-plane-icon {
	font-size: 34px;
}

.tour-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 9px;
	background-color: var(--st-gold);
	color: var(--st-navy);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 3px;
}

.tour-card__body {
	padding: var(--st-space-md);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.tour-card__route {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--st-white-60);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.tour-card__route-arrow {
	color: var(--st-gold);
}

.tour-card__name {
	color: var(--st-white);
	font-family: var(--st-font-display);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 8px;
	min-height: 45px;
}

.tour-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--st-white-60);
	font-size: 11px;
	margin-bottom: var(--st-space-md);
}

.tour-card__meta-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background-color: var(--st-white-20);
}

.tour-card__footer {
	margin-top: auto;
	padding-top: var(--st-space-sm);
	border-top: 1px solid var(--st-navy-mid);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
}

.tour-card__price-label {
	display: block;
	color: var(--st-white-60);
	font-size: 9px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 2px;
}

.tour-card__price {
	font-family: monospace;
	color: var(--st-gold);
	font-size: 16px;
	font-weight: 700;
}

.tour-card__price small {
	font-size: 10px;
	font-weight: 400;
	color: var(--st-white-60);
}

.tours-empty {
	color: var(--st-white-60);
	font-size: 13px;
	padding: var(--st-space-lg);
	text-align: center;
	border: 1px dashed var(--st-navy-mid);
	border-radius: var(--st-radius-card);
}

/* ---------------------------------------------------------------------- */
/* Detail view — media banner + fixed route card                           */
/* ---------------------------------------------------------------------- */

.tour-detail-media {
	position: relative;
	height: 240px;
	border-radius: var(--st-radius-card);
	overflow: hidden;
	margin-bottom: var(--st-space-lg);
	background: linear-gradient(135deg, var(--st-navy-light) 0%, var(--st-navy) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tour-detail-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tour-detail-media .tours-plane-icon {
	font-size: 56px;
	color: rgba(201, 168, 76, 0.3);
}

.route-card {
	padding: var(--st-space-lg);
	background: linear-gradient(135deg, var(--st-navy-light) 0%, var(--st-navy) 100%);
	border: 1px solid rgba(201, 168, 76, 0.3);
	border-radius: var(--st-radius-card);
}

.route-card__badge {
	display: inline-block;
	padding: 3px 8px;
	background-color: rgba(201, 168, 76, 0.15);
	border: 1px solid rgba(201, 168, 76, 0.5);
	border-radius: 2px;
	color: var(--st-gold);
	font-size: 8px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-bottom: var(--st-space-md);
}

.route-card__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--st-space-md);
}

.route-card__point {
	flex: 1;
}

.route-card__point--right {
	text-align: right;
}

.route-card__point-label {
	display: block;
	color: var(--st-white-60);
	font-size: 8px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-bottom: 2px;
}

.route-card__point-value {
	color: var(--st-white);
	font-size: 14px;
	font-weight: 600;
}

.route-card__mid {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--st-gold);
	padding: 0 var(--st-space-sm);
}

.route-card__mid .tours-plane-icon {
	font-size: 18px;
	color: var(--st-gold);
}

.route-card__duration {
	font-size: 10px;
	white-space: nowrap;
}

.route-card__waypoints {
	margin-top: var(--st-space-md);
	padding-top: var(--st-space-md);
	border-top: 1px solid var(--st-navy-mid);
}

.route-card__waypoints-label {
	display: block;
	color: var(--st-white-60);
	font-size: 8px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.route-chip {
	display: inline-block;
	padding: 4px 9px;
	margin: 0 6px 6px 0;
	background-color: rgba(255, 255, 255, 0.04);
	border-radius: 3px;
	color: var(--st-white-60);
	font-size: 11px;
}

@media (max-width: 640px) {
	.tours-hero {
		height: 40vh;
		min-height: 300px;
	}

	.tour-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.tour-card:hover {
		transform: none;
	}
}
