/* Journey: map where the boat sails each route on its own. Used by includes/components/tour-journey.php */
.journey { position: relative; background: var(--color-surface); }
.journey__inner { display: grid; gap: 2rem; }
.jmap { position: relative; border-radius: 32px; background: var(--color-sea); box-shadow: inset 0 0 0 1px var(--color-line); overflow: hidden; }
.jmap svg { display: block; width: 100%; height: 100%; }
.jmap .sea { fill: var(--color-sea); }
.jmap .land { fill: var(--color-land); stroke: rgb(var(--rgb-muted) / 0.3); stroke-width: 0.8; stroke-linejoin: round; }
.jmap .isle { font-family: var(--font-display); font-size: var(--isle, 11px); font-weight: 700; letter-spacing: 0.24em; fill: rgb(var(--rgb-muted) / 0.7); }
.map-note { position: absolute; right: 0.75rem; bottom: 0.75rem; max-width: calc(100% - 1.5rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; padding: 0.3rem 0.6rem; border-radius: 8px; background: rgb(255 255 255 / 0.85); font-size: 0.7rem; line-height: 1.35; color: var(--color-muted); text-align: right; }
.jmap .label { font-family: var(--font-text); font-size: var(--lab, 13px); font-weight: 650; fill: var(--color-primary); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; transition: opacity 0.4s; }
.jmap .ghost { fill: none; stroke: rgb(var(--rgb-muted) / 0.45); stroke-width: 1.6; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.8; }
.jmap .route { fill: none; stroke: var(--color-accent-strong); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.jmap .stop { fill: #fff; stroke: rgb(var(--rgb-muted) / 0.7); stroke-width: 1.6; transition: fill 0.35s, stroke 0.35s; }
.jmap .stop.is-reached { fill: var(--color-accent-strong); stroke: #fff; stroke-width: 2.5; }
.jmap .home { fill: var(--color-primary); stroke: #fff; stroke-width: 3; }
.jmap .boat { transition: opacity 0.3s; }
.jmap .boat .hull { fill: var(--color-primary); stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.jmap .boat .cabin { fill: var(--color-accent); }
.jday { display: grid; gap: 1.25rem; }
.jday__photo { overflow: hidden; border-radius: 24px; aspect-ratio: 16 / 10; background: var(--color-surface); }
.jday__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jday__photo img { object-position: var(--jpos, 50% 50%); }
.jday .stops li { position: relative; padding: 0.35rem 0 0.35rem 1.4rem; color: var(--color-muted); transition: color 0.3s; }
.jday .stops li::before { content: ""; position: absolute; left: 0; top: 0.85rem; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgb(var(--rgb-muted) / 0.6); background: #fff; transition: background-color 0.3s, border-color 0.3s; }
.jday .stops li.is-reached { color: var(--color-primary); }
.jday .stops li.is-reached::before { background: var(--color-accent-strong); border-color: var(--color-accent-strong); }
.now { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 650; color: var(--color-accent-strong); }
.now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 0 rgb(var(--rgb-accent) / 0.6); animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(var(--rgb-accent) / 0.6); } 100% { box-shadow: 0 0 0 10px rgb(var(--rgb-accent) / 0); } }
.jrail { display: grid; grid-template-columns: repeat(var(--days, 3), 1fr); gap: 0.6rem; }
.jrail a { display: grid; gap: 0.45rem; font-weight: 650; font-size: 0.875rem; color: var(--color-muted); text-decoration: none; }
.jrail a .bar { height: 3px; border-radius: 3px; background: var(--color-line); overflow: hidden; }
.jrail a .bar i { display: block; height: 100%; background: var(--color-accent-strong); transform-origin: left; transform: scaleX(0); }
.jrail a.is-active { color: var(--color-primary); }

/* static fallback: every day stacked, every route drawn */
.journey:not(.is-pinned) .journey__inner { padding-block: 5rem; }
.journey:not(.is-pinned) .jdays { display: grid; gap: 3rem; }
.journey:not(.is-pinned) .jmap { aspect-ratio: 560 / 640; max-width: 34rem; }
.journey:not(.is-pinned) .boat, .journey:not(.is-pinned) .jrail, .journey:not(.is-pinned) .now { display: none; }
.journey:not(.is-pinned) .jday .stops li { color: var(--color-primary); }

/* animated mode (class name kept from the scroll-pinned version): one screen tall, the voyage plays on its own (assets/js/journey.js) and the page scrolls past like any other section */
.journey.is-pinned .journey__sticky { height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); max-height: 46rem; }
.journey.is-pinned .journey__inner { height: 100%; padding-block: 1.75rem; grid-template-rows: auto 1fr; }
.journey.is-pinned .jbody { display: grid; gap: 2rem; min-height: 0; }
.journey.is-pinned .jmap { min-height: 0; height: 100%; }
.journey.is-pinned .jdays { position: relative; min-height: 0; }
.journey.is-pinned .jday { position: absolute; inset: 0; align-content: start; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s linear 0.6s; }
.journey.is-pinned .jday.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s; }
.journey.is-pinned .jday__photo { clip-path: inset(0 0 100% 0 round 24px); transition: clip-path 1s var(--ease-io); }
.journey.is-pinned .jday.is-active .jday__photo { clip-path: inset(0 0 0 0 round 24px); }
.journey.is-pinned .jday__photo { aspect-ratio: auto; height: min(24vh, 15rem); }
.journey.is-pinned .jday { gap: 1rem; }
.journey.is-pinned .jhead h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.journey.is-pinned .jhead p { margin-top: 0.4rem; font-size: 0.975rem; }
@media (min-width: 1100px) { .journey.is-pinned .jday .stops { columns: 2; column-gap: 1.5rem; } .journey.is-pinned .jday .stops li { break-inside: avoid; padding-block: 0.2rem; } .journey.is-pinned .jday .stops li::before { top: 0.65rem; } }
@media (min-width: 700px) {
  .journey.is-pinned .jbody { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}
@media (max-width: 699px) {
  .journey.is-pinned .journey__inner { padding-block: 0.9rem; gap: 0.75rem; }
  .journey.is-pinned .jhead p { display: none; }
  .journey.is-pinned .jhead h2 { font-size: 1.6rem; }
  .journey.is-pinned .jbody { grid-template-rows: minmax(0, 0.62fr) minmax(0, 1fr); gap: 0.75rem; }
  .journey.is-pinned .jmap > p { display: none; }
  .journey.is-pinned .jday .display.num { font-size: 1.4rem; white-space: nowrap; }
  .journey.is-pinned .jday .btn { min-height: 2.6rem; padding: 0.55rem 1.1rem; font-size: 0.9375rem; }
  .journey.is-pinned .jday > div:last-child { padding-top: 0.6rem; flex-wrap: nowrap; }
  .journey.is-pinned .jday > div:last-child .text-sm { font-size: 0.75rem; }
  /* phones: the photo goes last and takes whatever height is left down to the bottom of the screen,
     so tall phones get a bigger photo and the floating WhatsApp button sits on the photo, not on the buttons */
  .journey.is-pinned .jdays { container-type: size; }
  .journey.is-pinned .jday { align-content: stretch; grid-template-rows: auto auto auto minmax(0, 1fr); }
  .journey.is-pinned .jday__photo { order: 5; height: auto; min-height: 4.5rem; border-radius: 16px; }
  .journey.is-pinned .jday__photo img { height: 100%; }
  .journey.is-pinned .jday { gap: 0.6rem; }
  .journey.is-pinned .jday h3 { font-size: 1.35rem; }
  .journey.is-pinned .jday .stops { columns: 2; column-gap: 1rem; font-size: 0.875rem; }
  .journey.is-pinned .jday .stops li { padding-block: 0.15rem; break-inside: avoid; }
  .journey.is-pinned .jday .stops li::before { top: 0.6rem; }
}
/* a short panel (phone with the browser toolbars showing): the hours line goes and the photo shrinks to a
   thin strip, because the stop list and the "now near" line carry the information */
@container (max-height: 24rem) {
  .journey.is-pinned .jday__meta { display: none; }
  .journey.is-pinned .jday { gap: 0.4rem; }
  .journey.is-pinned .jday h3 { font-size: 1.2rem; line-height: 1.15; }
  .journey.is-pinned .jday .now { margin-top: 0.4rem; }
  .journey.is-pinned .jday .stops li { padding-block: 0.05rem; }
  .journey.is-pinned .jday .stops li::before { top: 0.5rem; }
  .journey.is-pinned .jday > div:last-child { padding-top: 0.4rem; }
  .journey.is-pinned .jday__photo { min-height: 0; }
}
/* no room even for a strip: the photo goes */
@container (max-height: 17.5rem) {
  .journey.is-pinned .jday { grid-template-rows: auto; }
  .journey.is-pinned .jday__photo { display: none; }
}
/* only when the panel is really short the stop list gives way (the stops are labelled on the map anyway) */
@container (max-height: 16rem) {
  .journey.is-pinned .jday .stops { display: none; }
}
/* very short phones: the live "now near" line goes too, so the price and button still fit */
@container (max-height: 12rem) {
  .journey.is-pinned .jday .now { display: none; }
}
