/*
 * Tour pages in the old site's layout (requested by the owner, Nov 2026):
 * /tours/ location cards, location tour lists, and the tabbed tour page.
 * Tokens only, logical properties only (Arabic flips automatically).
 */

/* ---------- Breadcrumb band + list titles ---------- */
.crumbs { background: var(--surface-2); border-block-end: 1px solid var(--line); }
.crumbs .breadcrumb { margin-block: 0; padding-block: var(--s-3); color: var(--text-muted); flex-wrap: wrap; }
.crumbs .breadcrumb a { color: var(--text-muted); text-decoration: none; }
.crumbs .breadcrumb a:hover { color: var(--accent-strong); }
.crumbs .breadcrumb span:last-child { color: var(--text); }
.crumbs + .section { padding-block-start: var(--s-7); }

.list-title { font-family: var(--font-body); font-size: var(--fs-lg); font-weight: 700; text-transform: uppercase; color: var(--accent-strong); margin-block-end: var(--s-5); }
.list-intro { max-inline-size: 80ch; margin-block-end: var(--s-6); color: var(--text-muted); }

/* ---------- Shared check-list (orange ticks) ---------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.check-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2); align-items: start; }
.check-list .ph { color: var(--accent); font-size: 1.15em; margin-block-start: 0.15em; }
.check-list--text { gap: var(--s-4); }
.check-list--text p { margin: 0; }

/* ---------- /tours/: one photo card per location ---------- */
.location-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.location-card { position: relative; isolation: isolate; min-block-size: 380px; display: flex; align-items: flex-end; overflow: hidden; color: var(--n-0); background: var(--navy-900); }
.location-card__media { position: absolute; inset: 0; z-index: -2; }
.location-card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.location-card:hover .location-card__media img { transform: scale(1.06); }
.location-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to top, oklch(0.2 0.08 265 / 0.85), oklch(0.2 0.08 265 / 0) 70%); }
.location-card__text { position: relative; margin: 0 var(--s-6) var(--s-7) calc(var(--s-6) + var(--s-4)); padding-inline-start: var(--s-4); border-inline-start: 2px solid var(--n-0); inline-size: 100%; }
.location-card h2 { font-size: clamp(2rem, 2vw + 1rem, 2.75rem); line-height: var(--lh-tight); }
.location-card h2 a { color: inherit; text-decoration: none; }
.location-card__tagline { margin: var(--s-1) 0 0; font-size: var(--fs-base); }
.location-card__tours { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); font-size: var(--fs-sm); }
.location-card__tours a { color: var(--n-0); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.location-card__tours a:hover { color: var(--orange-100); text-decoration: underline; }
@media (max-width: 900px) {
  .location-grid { grid-template-columns: 1fr; }
  .location-card { min-block-size: 320px; }
}
@media (max-width: 560px) {
  .location-card__text { margin-inline: var(--s-4); margin-block-end: var(--s-5); }
  .location-card__tours { grid-template-columns: 1fr; gap: var(--s-1); }
}

/* ---------- Location page: tour cards with ticks and price ---------- */
.tour-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
.list-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--n-0); transition: box-shadow var(--t-base) var(--ease-out); }
.list-card:hover { box-shadow: var(--shadow-2); }
.list-card__media img { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.list-card__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); }
.list-card__title { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.list-card__title a { color: var(--text); text-decoration: none; }
.list-card__title a:hover { color: var(--accent-strong); }
.list-card__route { margin: 0; padding-block-end: var(--s-3); border-block-end: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-sm); }
.list-card .check-list { font-size: var(--fs-sm); flex: 1; }
.list-card__price { margin: 0; padding: var(--s-3) var(--s-4); background: var(--surface-2); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.list-card__price strong { color: var(--accent-strong); font-weight: 600; }

/* ---------- Tour page: banner, tab bar, panels ---------- */
.tour-banner { position: relative; isolation: isolate; min-block-size: 380px; display: flex; align-items: flex-end; color: var(--n-0); background: var(--navy-900); }
.tour-banner > img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; z-index: -2; }
.tour-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(0.2 0.08 265 / 0.8), oklch(0.2 0.08 265 / 0.1) 65%); }
.tour-banner__inner { padding-block: var(--s-8) var(--s-5); }
.tour-banner h1 { font-family: var(--font-body); font-weight: 700; font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); line-height: 1.2; max-inline-size: 24ch; }
.tour-banner__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-3) 0 0; }
.tour-banner__meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.tour-banner__price strong { font-weight: 700; }
.tour-banner__social { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: flex; gap: var(--s-2); }
.tour-banner__social a { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--n-0); color: var(--navy-900); text-decoration: none; }

.tour-tabs { background: var(--surface-2); border-block-end: 1px solid var(--line); }
.tour-tabs__list { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; }
.tour-tabs__list[hidden] { display: none; }
.tour-tabs button { flex-shrink: 0; min-block-size: 56px; padding-inline: var(--s-5); border: 0; border-block-end: 3px solid transparent; background: none; font: 700 var(--fs-base) var(--font-body); text-transform: uppercase; color: var(--text); cursor: pointer; }
.tour-tabs button:hover { color: var(--accent-strong); }
.tour-tabs button[aria-selected="true"] { border-block-end-color: var(--accent); color: var(--accent-strong); }
.tour-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.tour-page .tour-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); padding-block: var(--s-7) var(--s-9); }
.tour-page .tour-main { display: flex; flex-direction: column; gap: var(--s-8); } /* hidden tabs leave no gap */
.tour-panel[hidden] { display: none; }
.tour-panel > * + * { margin-block-start: var(--s-5); }
.panel-title { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; text-transform: uppercase; color: var(--accent-strong); }
.tour-panel > .panel-title:not(:first-child) { margin-block-start: var(--s-7); }
.tour-map { display: grid; gap: var(--s-4); }
.tour-map img { inline-size: 100%; border-radius: var(--r-md); }
.tour-map ol { margin: 0; padding-inline-start: var(--s-5); display: grid; gap: var(--s-2); }
.tour-map ol li::marker { color: var(--accent); font-weight: 700; }
.cancel-table caption { text-align: start; font-weight: 700; padding-block-end: var(--s-2); }

/* Itinerary days: orange framed boxes with a map pin, like the old site */
.tour-days .wp-block-details { border: 1px solid var(--accent); border-radius: var(--r-md); padding-inline: var(--s-4); }
.tour-days .wp-block-details + .wp-block-details { margin-block-start: var(--s-4); }
.tour-days .wp-block-details summary { justify-content: flex-start; padding-block: var(--s-4); font-weight: 500; }
.tour-days .wp-block-details summary::before { content: "\e316"; font-family: "Phosphor"; color: var(--accent); font-size: 1.2em; flex-shrink: 0; }
.tour-days .wp-block-details summary::after { margin-inline-start: auto; }
.tour-days .wp-block-details > :not(summary) { color: var(--text); padding-block-end: var(--s-2); }
/* Photos inside tour text (overview and days), whatever size they were uploaded at:
   one size everywhere (half the column, 3:2), two side by side, a single photo centred.
   Album galleries and the route map have their own rules and are not touched. */
.tour-panel .entry-content:not(.tour-album) img { display: inline-block; inline-size: calc(50% - var(--s-2)); block-size: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: var(--s-1); border-radius: var(--r-sm); vertical-align: top; }
.tour-panel .entry-content:not(.tour-album) img:only-of-type { display: block; margin: var(--s-3) auto; }
@media (max-width: 480px) {
  .tour-panel .entry-content:not(.tour-album) img { display: block; inline-size: 100%; margin: var(--s-3) 0; }
}
.tour-panel .ptv-caption { display: block; margin-block: var(--s-1) var(--s-4); text-align: center; font-size: var(--fs-sm); font-style: italic; color: var(--text-muted); }

/* Albums: even photo grid */
.tour-album .wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.tour-album .wp-block-gallery.has-nested-images figure.wp-block-image { inline-size: auto; margin: 0; }
.tour-album .wp-block-gallery img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 560px) { .tour-album .wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Tour sidebar: Rate card + contact boxes ---------- */
.tour-page .tour-aside { display: grid; gap: var(--s-5); align-content: start; }
.rate-card { background: var(--n-0); box-shadow: var(--shadow-2); }
.rate-card__head { margin: 0; padding: var(--s-3); background: var(--accent); color: var(--n-0); font: 700 var(--fs-md) var(--font-body); text-transform: uppercase; text-align: center; }
.rate-card__price { margin: 0; padding: var(--s-3); background: var(--surface-2); text-align: center; font-size: var(--fs-sm); }
.rate-card__price strong { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 400; margin-inline: var(--s-1); }
.rate-card__basis { margin: 0; padding: var(--s-2) var(--s-4) 0; font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }
.rate-card__form { padding: var(--s-5); display: grid; gap: var(--s-4); }
.side-box { background: var(--n-0); box-shadow: var(--shadow-1); padding: var(--s-5); display: grid; gap: var(--s-3); font-size: var(--fs-sm); }
.side-box h2 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
.side-box p { margin: 0; }
.side-box p > .ph { color: var(--accent); margin-inline-end: var(--s-2); }
.side-box a { color: inherit; overflow-wrap: anywhere; }

/* Desktop: the Rate card rises over the banner and the tab bar, as on the old site */
@media (min-width: 1024px) {
  .tour-page .tour-aside { margin-block-start: -220px; position: relative; z-index: 2; }
  .tour-banner__inner, .tour-tabs__list { padding-inline-end: calc(340px + var(--s-7)); }
  .tour-banner__price { display: none !important; }
}
@media (max-width: 1023px) {
  .tour-page .tour-layout { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: all four tabs fit on one line instead of hiding "Albums" off screen */
@media (max-width: 560px) {
  .tour-tabs__list { gap: 0; padding-inline: 0; justify-content: space-between; }
  .tour-tabs button { padding-inline: var(--s-2); font-size: 0.8125rem; min-block-size: 48px; }
}

/* ---------- Search results ---------- */
.search-page__form .search-form { max-inline-size: 640px; }
.search-page__group { margin-block: var(--s-7) var(--s-5); }
.search-chips { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.search-chips a { display: inline-flex; align-items: center; gap: var(--s-1); min-block-size: 44px; padding-inline: var(--s-4); border: 1px solid var(--line); border-radius: 999px; background: var(--n-0); text-decoration: none; font-weight: 500; }
.search-chips a:hover { border-color: var(--accent); color: var(--accent-strong); }
.search-chips .ph { color: var(--accent); }
.search-empty { display: grid; gap: var(--s-5); justify-items: start; margin-block-start: var(--s-6); }
.search-empty p { margin: 0; max-inline-size: 60ch; }

/* Album: core gallery CSS sets width:auto on the photos, so size them here */
.tour-album .wp-block-gallery.has-nested-images figure.wp-block-image img { inline-size: 100% !important; block-size: auto !important; aspect-ratio: 4 / 3; object-fit: cover; }
.tour-album .wp-block-gallery.has-nested-images figure.wp-block-image { inline-size: 100% !important; max-inline-size: none; display: block; }

/* Plain day list of transfer packages (Itinerary tab) */
.tour-days .ptv-days { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.tour-days .ptv-days li { border: 1px solid var(--accent); border-radius: var(--r-md); padding: var(--s-4); color: var(--text); }

/* Tables inside destination intros and tour text (weather table etc.) */
.entry-content table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.entry-content table td, .entry-content table th { border: 1px solid var(--line); padding: var(--s-2) var(--s-3); text-align: start; }
.entry-content table tr:first-child td, .entry-content table th { background: var(--surface-2, rgba(0,0,0,.04)); font-weight: 700; }
.list-intro h2 { color: var(--accent); margin-block: var(--s-6) var(--s-3); }
.list-guide { margin-block: var(--s-8) 0; padding-block-start: var(--s-6); border-block-start: 1px solid var(--line); color: var(--text); }
.list-guide img { max-inline-size: 100%; block-size: auto; }
