/* ==========================================================================
   bosnia-tours.css
   /bosnia-tours/ — the /vehicles/ panel accordion ROTATED 90°.

   Same mechanic, vertical: tours are full-width horizontal bars stacked
   top-to-bottom. Default = equal rows showing number + name. Click a row and
   it grows in HEIGHT to ~66% while the rest tuck into thin strips; one row is
   always open. Pure-black void, hairline strokes, one canary accent.
   ========================================================================== */

/* Vendored display face for the brand wordmark (mirrors the homepage logo). */
@font-face {
  font-family: 'Plaster';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/plaster.woff2') format('woff2');
}

:root {
  --accent: #e5ff00;
  --strip-min: 56px;
  --panel-line: var(--color-line, rgba(0, 0, 0, 0.14));
  /* keep in sync with PANEL.FLEX_DURATION / PANEL.FLEX_EASE in bosnia-tours.js */
  --flex-duration: 0.8s;
  --flex-ease: cubic-bezier(0.25, 1, 0.5, 1);

  /* LIGHT SURFACE OVERRIDE (page-scoped): this stylesheet loads after
     tokens.css, so re-pointing the neutral tokens here flips ONLY
     /bosnia-tours/ to a warm off-white (#f3f1ed) background with dark text. The
     canary-yellow accent stays. Global dark tokens are untouched. */
  --color-bg: #f3f1ed;
  --color-text: #0d0d0d;
  --color-text-muted: #4a4a4a;
  --color-text-faint: #8a8a8a;
  --color-line: rgba(0, 0, 0, 0.14);
  --color-bg-raised: rgba(0, 0, 0, 0.05);
}

.tours {
  margin: 0;
  background: var(--color-bg, #000);
  color: var(--color-text, #f4f5f7);
  font-family: var(--font-sans);
  height: 100svh;
  overflow: hidden;                 /* fixed-viewport console */
  display: flex;
  flex-direction: column;
}

/* Keyboard skip target. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* ------------------------------------------------------------- top bar ----- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  /* STANDARD BAR (site-wide): one exact size on every light page —
     --header-h (4.5rem) tall, --container-pad inline gutter; content
     centers inside the fixed band. box-sizing is pinned here because some of
     these pages set a global border-box reset and others don't — without it
     the same min-height + padding renders 72px on one page and 96px on
     another. Keep this block in sync across
     vehicles / bosnia-tours / vip-transport / faqs / about-listing. */
  box-sizing: border-box;
  min-height: var(--header-h);
  padding: var(--space-sm) var(--container-pad);
}

/* Exact mirror of the homepage HUD logo: Plaster "Listing" mark + accent bold
   "Rent A Car" sub, on one baseline row. */
.topbar__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55ch;
  line-height: 1;
  text-decoration: none;
  color: var(--color-text, #f4f5f7);
  font-family: var(--font-display);
  letter-spacing: var(--tracking-tight, -0.01em);
  white-space: nowrap;
}
.topbar__brand strong {
  font-family: 'Plaster', var(--font-display, sans-serif);
  font-weight: 400; /* Plaster is single-weight */
  font-size: calc(var(--fs-400) * 1.2);
  text-transform: uppercase;
}
.topbar__brand span {
  font-size: calc(var(--fs-100) * 1.35);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps, 0.12em);
  text-transform: uppercase;
  /* Tiger-flame (the intro orange) instead of canary: on the light page
     background the canary sub-line has almost no contrast. */
  color: var(--color-accent-hi);
}

/* ------------------------------------------------- category pill --------- */
/* iOS-segmented-control-style filter: equal ICON segments on a bordered pill
   track; a canary thumb glides behind the active one on an Apple spring-ish
   curve (the same family as the panels' --flex-ease). A live status label in
   the topbar-eyebrow type style names the active category beside the pill.
   DOM is built by the page JS (renderFilter); the JS only writes the thumb's
   width/translateX — ALL motion lives here.
   KEEP IN SYNC with the identical block in vehicles.css. */
.filterbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.catpill__status {
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-text-faint, #777);
  white-space: nowrap;
}
.catpill {
  position: relative;                /* thumb offsets resolve against this */
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--color-line, rgba(0, 0, 0, 0.14));
  border-radius: var(--radius-pill, 999px);
  background: var(--color-bg-raised, rgba(0, 0, 0, 0.05));
}
.catpill__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;                           /* JS: translateX(activeBtn.offsetLeft) */
  width: 0;                          /* JS: activeBtn.offsetWidth */
  border-radius: var(--radius-pill, 999px);
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(13, 13, 13, 0.18);
  will-change: transform;
  transition:
    transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
    width     0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.catpill__seg {
  position: relative;
  z-index: 1;                        /* icons ride above the thumb */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;                    /* equal segments — thumb math is exact */
  height: 2.25rem;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: var(--radius-pill, 999px);
  color: var(--color-text-faint, #777);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease, transform 0.18s ease;
}
.catpill__seg:hover { color: var(--color-text, #0d0d0d); }
.catpill__seg:active { transform: scale(0.92); }   /* Apple press-shrink */
.catpill__seg.is-active { color: #0d0d0d; }        /* glyph on the canary thumb */
.catpill__seg:focus-visible {
  outline: 2px solid var(--color-accent-hi, #ff5a1f);
  outline-offset: 2px;
}
.catpill__icon {
  width: 1.3rem;
  height: 1.3rem;
  display: block;
}

/* -------------------------------------------------------- panel column ----- */
/* The vehicles .panels row flipped to a column: rows stack and scroll on Y. */
.panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;          /* only scrolls if min-heights genuinely overflow */
  overflow-x: hidden;
  scrollbar-width: none;
}
.panels::-webkit-scrollbar { display: none; }

/* A panel: equal row by default; grows via flex-grow (in HEIGHT) when open. */
.panel {
  position: relative;
  flex: 1 1 0;
  min-height: var(--strip-min);
  min-width: 0;
  display: block;
  overflow: hidden;
  border-top: 1px solid var(--panel-line);
  cursor: pointer;
  /* Animate flex-grow, not height. Fast-out, decelerate-in premium glide. */
  transition: flex-grow var(--flex-duration) var(--flex-ease);
}
.panel:first-child { border-top: 0; }

.panel.is-expanded { cursor: default; }

/* Horizontal label (number + name + cue), shown in equal + compressed rows. */
.panel__label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0 clamp(1.1rem, 3.5vw, 3rem);
  width: 100%;
  height: 100%;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.panel__num {
  font-family: "Raleway", var(--font-display, var(--font-sans));
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  letter-spacing: 0.06em;
  color: var(--color-text-faint, #777);
  transition: color 0.2s ease;
}
.panel__title {
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted, #b3b3b3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* A chevron cue pinned to the right edge of a collapsed row. */
.panel__cue {
  margin-left: auto;
  color: var(--color-text-faint, #777);
  font-size: 1.1em;
  line-height: 1;
  transition: color 0.2s ease, transform 0.25s ease;
}
/* Hover on a non-expanded row lifts its number/title/cue to the accent. */
.panel:not(.is-expanded):hover .panel__num { color: var(--accent); }
.panel:not(.is-expanded):hover .panel__title { color: var(--color-text, #f4f5f7); }
.panel:not(.is-expanded):hover .panel__cue { color: var(--accent); transform: translateX(3px); }
.panel__label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -6px;
}
/* On expand the label fades out as the inner content comes in. */
.panel.is-expanded .panel__label {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* --------------------------------------------------- expanded inner -------- */
.panel__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: clamp(1.2rem, 3vw, 3rem);
  padding: clamp(1.4rem, 3.2vw, 3rem) clamp(1.4rem, 3.5vw, 3.4rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.panel.is-expanded .panel__inner {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* LEFT: the bordered PREVIEW frame with accent corner ticks. */
.preview {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-line);
  overflow: hidden;
}
.preview::before {
  content: "";
  position: absolute;
  inset: 14px;
  background:
    linear-gradient(var(--accent), var(--accent)) left top,
    linear-gradient(var(--accent), var(--accent)) left top,
    linear-gradient(var(--accent), var(--accent)) right top,
    linear-gradient(var(--accent), var(--accent)) right top,
    linear-gradient(var(--accent), var(--accent)) left bottom,
    linear-gradient(var(--accent), var(--accent)) left bottom,
    linear-gradient(var(--accent), var(--accent)) right bottom,
    linear-gradient(var(--accent), var(--accent)) right bottom;
  background-repeat: no-repeat;
  background-size: 14px 1px, 1px 14px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 3;
}
.preview__cap {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-text-faint, #777);
  transition: opacity 0.3s ease;
}
/* The tour photo fills the frame and fades in once loaded. */
.preview__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.preview.is-live .preview__photo { opacity: 1; }
.preview.is-live .preview__cap { opacity: 0; }

/* Masonry gallery variant: two staggered columns of rounded tiles, sitting
   inside the framed corner ticks. Each tile is a placeholder until its image
   is supplied in the data. */
.preview--grid {
  display: block;
  place-items: initial;
  padding: clamp(10px, 1.4vw, 16px);
}
.preview__grid {
  display: flex;
  gap: clamp(8px, 1vw, 12px);
  width: 100%;
  height: 100%;
}
.preview__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vw, 12px);
}
.preview__tile {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--panel-line);
}
/* Stagger the two tiles per column so the collage reads as masonry. */
.preview__col--a .preview__tile:first-child { flex-grow: 0.72; }
.preview__col--a .preview__tile:last-child  { flex-grow: 1.28; }
.preview__col--b .preview__tile:first-child { flex-grow: 1.28; }
.preview__col--b .preview__tile:last-child  { flex-grow: 0.72; }
.preview__tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview__tile-cap {
  padding: 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-faint, #777);
}

/* RIGHT: tour name, lede, body, price, divider, meta. */
.panel__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
  min-width: 0;
  max-width: 46rem;
}
.panel__name {
  margin: 0;
  font-family: "Raleway", var(--font-display, var(--font-sans));
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.panel__lede {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--color-text, #f4f5f7);
}
.panel__body {
  margin: 0;
  max-width: 44ch;
  color: var(--color-text-muted, #b3b3b3);
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.6;
}
.panel__price {
  margin: clamp(0.4rem, 1.2vw, 0.9rem) 0 0;
  font-family: "Raleway", var(--font-display, var(--font-sans));
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1;
}
.panel__price[data-on-request] {
  color: var(--color-text-muted, #b3b3b3);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}
.panel__divider {
  width: 100%;
  height: 0;
  margin: clamp(0.4rem, 1vw, 0.8rem) 0;
  border: 0;
  border-top: 1px solid var(--panel-line);
}
.panel__specs {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted, #b3b3b3);
}
.panel__specs .dot { color: var(--accent); margin: 0 0.55em; }

.noscript-note {
  margin: 0;
  padding: 1rem clamp(1.1rem, 3.5vw, 3rem);
  color: var(--color-text-muted, #b3b3b3);
}

/* ============================================================= MOBILE ===== */
/* Still a vertical accordion — just stack the inner grid and give the open row
   room to breathe. No separate mobile machinery: the layout is already
   vertical, so the same panels work on a phone. */
@media (max-width: 56rem) {
  .panels { overflow-y: auto; }

  .panel__inner {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(9rem, 40%) auto;
    gap: 1.1rem;
    padding: clamp(1rem, 5vw, 1.6rem);
  }
  .panel__text { max-width: none; justify-content: flex-start; }
  .panel__body { max-width: none; }

  /* Thumb-size the pill segments on touch layouts. */
  .catpill__seg { height: 2.75rem; }
}

/* Stack the bar for the whole staggered-menu band (its fixed toggle reserves
   7.5rem on the right — side-by-side brand + pill would overflow there). */
@media (max-width: 48rem) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

@media (max-width: 36rem) {
  .catpill__status { display: none; }   /* pill alone on the narrowest rows */
}

/* --------------------------------------------------- reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel__label,
  .panel__cue,
  .preview__photo,
  .preview__cap,
  .catpill__thumb,
  .catpill__seg {
    transition: none;
  }
  .catpill__seg:active { transform: none; }
}
