/* ============================================================
   WedPlan app tour (added 30-11-2026). Loaded only on /tour.php
   and /tour/*.php, after style.css.
   ============================================================ */

.tour-sample { margin: 1.1rem 0 0; font-size: .86rem; color: var(--gold-soft); opacity: .85; max-width: 70ch; }
.tour-hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

/* ---- Jump list of screens on a page ---- */
.tour-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.tour-jump a {
  font-size: .86rem; padding: .42rem .9rem; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); color: var(--wine); transition: border-color var(--ease), background var(--ease);
}
.tour-jump a:hover { border-color: var(--gold); background: var(--ivory); }

/* ---- One screenshot with its notes ---- */
.tour-shot {
  display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  align-items: center; margin: 0 0 clamp(3rem, 6vw, 5rem); scroll-margin-top: 96px;
}
.tour-frame {
  display: block; position: relative; z-index: 1; background: #fff; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
  transform: rotate(-.7deg); transition: transform var(--ease), box-shadow var(--ease);
  cursor: zoom-in;
}
.tour-frame:hover, .tour-frame:focus-visible { transform: rotate(0) translateY(-3px); box-shadow: var(--shadow-lg); }
.tour-frame picture, .tour-frame img { display: block; width: 100%; height: auto; border-radius: 9px; }
.tour-enlarge {
  position: absolute; right: 16px; bottom: 16px; font-size: .78rem; font-weight: 600;
  padding: .32rem .75rem; border-radius: 999px; background: rgba(74, 14, 24, .86); color: #fff;
  opacity: 0; transition: opacity var(--ease);
}
.tour-frame:hover .tour-enlarge, .tour-frame:focus-visible .tour-enlarge { opacity: 1; }

/* Notes card overlaps the screenshot a little on wide screens */
.tour-notes {
  position: relative; z-index: 2; margin-left: -2.6rem; margin-top: 3.2rem;
  background: var(--ivory); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--r-md); padding: 1.4rem 1.5rem 1.3rem; box-shadow: var(--shadow-sm);
}
.tour-notes h2 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); color: var(--wine-deep); margin: 0 0 .55rem; line-height: 1.25; }
.tour-notes p { margin: 0; color: var(--ink); font-size: .98rem; line-height: 1.65; }

/* Every second screen swaps sides and tilts the other way */
.tour-shot:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); }
.tour-shot:nth-of-type(even) .tour-frame { order: 2; transform: rotate(.7deg); }
.tour-shot:nth-of-type(even) .tour-frame:hover,
.tour-shot:nth-of-type(even) .tour-frame:focus-visible { transform: rotate(0) translateY(-3px); }
.tour-shot:nth-of-type(even) .tour-notes { order: 1; margin-left: 0; margin-right: -2.6rem; margin-top: -3.2rem; border-left-width: 1px; border-right: 4px solid var(--gold); }

/* Single shot on the hub: full width with notes below */
.tour-body .container > .tour-shot:only-child { grid-template-columns: 1fr; max-width: 1040px; margin-inline: auto; }
.tour-body .container > .tour-shot:only-child .tour-notes { margin: -2.2rem 6% 0 auto; max-width: 620px; }

@media (max-width: 900px) {
  .tour-shot, .tour-shot:nth-of-type(even) { grid-template-columns: 1fr; }
  .tour-shot .tour-frame, .tour-shot:nth-of-type(even) .tour-frame { order: 0; transform: none; }
  .tour-shot .tour-notes, .tour-shot:nth-of-type(even) .tour-notes,
  .tour-body .container > .tour-shot:only-child .tour-notes {
    order: 1; margin: -1.2rem .8rem 0; max-width: none;
    border-left: 4px solid var(--gold); border-right: 1px solid var(--line);
  }
  .tour-enlarge { opacity: 1; right: 12px; bottom: 12px; }
}
@media (max-width: 520px) {
  .tour-frame { padding: 4px; border-radius: 10px; }
  .tour-notes, .tour-shot:nth-of-type(even) .tour-notes { margin: -.8rem .3rem 0; padding: 1.1rem 1.1rem 1rem; }
  .tour-jump a { font-size: .82rem; padding: .38rem .75rem; }
}

/* ---- Cards to the tour pages ---- */
.tour-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 2.5rem; }
.tour-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.tour-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); color: var(--ink); }
.tour-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ivory-2); border-bottom: 1px solid var(--line); }
.tour-card-img picture, .tour-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.tour-card-body { display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem 1.3rem 1.3rem; flex: 1; }
.tour-card h3 { font-size: 1.2rem; color: var(--wine-deep); margin: 0; }
.tour-card-text { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.tour-card-count { margin-top: auto; padding-top: .4rem; font-size: .88rem; font-weight: 600; color: var(--marigold-dk); }
/* First and last card run wider, so seven cards sit as 2+1, 3, 1+2 */
.tour-cards > .tour-card:first-child:nth-last-child(7),
.tour-cards > .tour-card:nth-child(7):last-child { grid-column: span 2; }
.tour-cards > .tour-card:first-child:nth-last-child(7) .tour-card-img,
.tour-cards > .tour-card:nth-child(7):last-child .tour-card-img { aspect-ratio: 21 / 9; }
@media (max-width: 960px) {
  .tour-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-cards > .tour-card:nth-child(7):last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .tour-cards { grid-template-columns: 1fr; }
  .tour-cards > .tour-card { grid-column: auto !important; }
  .tour-cards > .tour-card .tour-card-img { aspect-ratio: 16 / 9 !important; }
}

/* ---- Screenshot viewer ---- */
.tour-box {
  width: min(1480px, 96vw); max-width: none; max-height: 96vh; padding: 0; border: 0;
  border-radius: 14px; background: var(--ink); color: #fff; overflow: hidden;
}
.tour-box::backdrop { background: rgba(20, 8, 10, .82); }
.tour-box[open] { display: flex; flex-direction: column; }
.tour-box-bar { display: flex; justify-content: space-between; align-items: center; padding: .55rem .7rem .55rem 1.1rem; }
.tour-box-count { font-size: .85rem; color: var(--gold-soft); }
.tour-box-close, .tour-box-nav {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: #fff; border: 0; cursor: pointer;
}
.tour-box-close:hover, .tour-box-nav:hover { background: rgba(255, 255, 255, .22); }
.tour-box-close svg, .tour-box-nav svg { width: 22px; height: 22px; }
.tour-box-fig { margin: 0; padding: 0 1rem 1rem; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tour-box-fig img { display: block; width: 100%; height: auto; max-height: calc(96vh - 9rem); object-fit: contain; border-radius: 8px; background: #fff; }
.tour-box-fig figcaption { padding: .8rem .2rem 0; font-size: .95rem; color: var(--gold-soft); }
.tour-box-fig figcaption strong { color: #fff; font-family: var(--font-display); font-weight: 600; margin-right: .4rem; }
.tour-box-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(42, 23, 26, .7); }
.tour-box-prev { left: .8rem; }
.tour-box-prev svg { transform: rotate(90deg); }
.tour-box-next { right: .8rem; }
.tour-box-next svg { transform: rotate(-90deg); }
.tour-box-nav[hidden] { display: none; }
@media (max-width: 600px) {
  .tour-box { width: 100vw; max-height: 100vh; border-radius: 0; }
  .tour-box-fig { padding: 0 .5rem 4.2rem; }
  .tour-box-nav { top: auto; bottom: .7rem; transform: none; }
  .tour-box-prev { left: auto; right: 4.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-frame, .tour-shot:nth-of-type(even) .tour-frame { transform: none !important; transition: none; }
}
