/* Egypt Vibes detail pages: a tour, a package or a transfer. Builds on ev.css (tokens, pills, fields, crumbs,
   inquiry form, tour cards). */

.dossier-head .crumbs ol { margin-bottom: clamp(24px, 2.6vw, 36px); }

/* ------------------------------------------------------------------ head: name, facts, contact sheet */
.dossier-head { padding-top: calc(var(--head-h) + clamp(72px, 7vw, 120px)); }
.dossier-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead lead" "title facts"; align-items: end; gap: 0 clamp(24px, 4vw, 64px); }
.dossier-intro .head-lead { grid-area: lead; }
.dossier-title { grid-area: title; font: 300 clamp(40px, 5.4vw, 88px)/.98 var(--display); letter-spacing: var(--track-tight); text-wrap: balance; max-width: 18ch; }
.facts { grid-area: facts; display: flex; margin: 0; padding-bottom: 8px; }
.fact { display: grid; grid-template-columns: auto auto; grid-template-areas: "icon label" "icon value"; column-gap: 12px; align-items: center; padding-inline: clamp(14px, 1.6vw, 26px); }
.fact + .fact { border-inline-start: 1px solid var(--line); }
.fact:first-child { padding-inline-start: 0; }
.fact .i { grid-area: icon; width: 26px; height: 26px; color: var(--blue); }
.fact dt { grid-area: label; font-size: 13.5px; color: var(--ink-soft); }
.fact dd { grid-area: value; margin: 0; font-weight: 600; white-space: nowrap; }

.sheet { margin-top: clamp(32px, 4vw, 56px); }
.sheet-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; height: clamp(300px, 40vw, 560px);
  grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.sheet-cell { min-width: 0; min-height: 0; }
.sheet-cell:first-child { grid-column: span 2; grid-row: span 2; }
.sheet-grid[data-count="1"] .sheet-cell:first-child { grid-column: 1 / -1; }
.sheet-grid[data-count="2"] .sheet-cell { grid-column: span 2; grid-row: span 2; }
.sheet-grid[data-count="3"] .sheet-cell:not(:first-child) { grid-column: span 2; }
.sheet-grid[data-count="4"] .sheet-cell:last-child { grid-column: span 2; }
.sheet-open { position: relative; display: block; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: var(--paper); }
.sheet-open img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease), filter .4s; }
.sheet-open:hover img { scale: 1.04; }
.sheet-open:focus-visible { outline-offset: 3px; }
.sheet-credit { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); text-align: right; }
.sheet-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.sheet-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12, 18, 17, .55); color: #fff; font: 300 clamp(32px, 3vw, 48px)/1 var(--display); }
@media (max-width: 760px) {
  .dossier-intro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "title" "facts"; }
  .facts { margin-top: 24px; flex-wrap: wrap; row-gap: 14px; }
  .sheet-grid { display: flex; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .sheet-grid::-webkit-scrollbar { display: none; }
  .sheet-cell, .sheet-cell:first-child { flex: 0 0 86%; aspect-ratio: 4 / 3; scroll-snap-align: center; }
  .sheet-more { display: none; }
}

/* ------------------------------------------------------------------ body and booking panel */
.dossier { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(40px, 6vw, 104px); align-items: start; padding-block: clamp(56px, 6vw, 96px); }
.dossier-block + .dossier-block { margin-top: clamp(48px, 5vw, 80px); padding-top: clamp(48px, 5vw, 80px); border-top: 1px solid var(--line); }
.block-title { font: 300 clamp(32px, 3.2vw, 48px)/1 var(--display); letter-spacing: var(--track-tight); margin-bottom: clamp(20px, 2.2vw, 32px); }
.block-note { margin: -12px 0 20px; color: var(--ink-soft); font-size: 15px; }

.rich { color: var(--ink-soft); line-height: 1.75; max-width: 70ch; overflow-wrap: break-word; }
.rich > * + * { margin-top: 1em; }
.rich h2, .rich h3, .rich h4 { font: 400 24px/1.2 var(--display); color: var(--ink); margin-top: 1.4em; }
.rich ul, .rich ol { padding-inline-start: 1.3em; }
.rich strong, .rich b { color: var(--ink); }
.rich a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.highlights { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.highlights li { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--paper); font-weight: 500; font-size: 15px; }
.highlights .i { width: 17px; height: 17px; color: var(--ochre); }

/* The day as a route: a blue line with a stop for each place. */
.itin-note { color: var(--ink-soft); line-height: 1.7; max-width: 70ch; }
.itin { list-style: none; margin: 24px 0; padding: 0; position: relative; }
.itin::before { content: ""; position: absolute; inset-inline-start: 7px; top: 12px; bottom: 12px; width: 2px; background: var(--blue); border-radius: 2px; }
.itin-stop { position: relative; padding-inline-start: 40px; }
.itin-stop + .itin-stop { margin-top: 26px; }
.itin-stop::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--stone); border: 3px solid var(--blue); box-sizing: border-box; }
.itin-stop:first-child::before, .itin-stop:last-child::before { background: var(--blue); }
.itin-name { font: 400 clamp(21px, 1.8vw, 26px)/1.2 var(--display); }
.itin-stop p { margin-top: 6px; color: var(--ink-soft); line-height: 1.7; max-width: 66ch; }

.inclusions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.inc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inc li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.55; }
.inc .i { width: 26px; height: 26px; padding: 5px; border-radius: 50%; box-sizing: border-box; }
.inc.is-in .i { background: #dff3ec; color: #0b6b55; }
.inc.is-out .i { background: #fbe9e4; color: #a3341a; }
.inc.is-out li span { color: var(--ink-soft); }

/* Tour prices: the per-person price for each group size, as bars against the single traveller's price. */
.ladder { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ladder thead th { padding-bottom: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); text-align: start; }
.ladder thead th:last-child { text-align: end; }
.ladder tbody tr { border-top: 1px solid var(--line); }
.ladder tbody th { width: 5.5em; padding: 12px 0; font: 400 22px/1 var(--display); text-align: start; }
.ladder td { position: relative; padding: 12px 7em 12px 0; white-space: nowrap; }
.ladder-bar { display: block; height: 10px; width: calc(100% * var(--w)); border-radius: 0 5px 5px 0; background: linear-gradient(90deg, var(--blue), #4a67e6); transform-origin: left; }
.ladder td strong { position: absolute; inset-inline-end: 0; top: 50%; translate: 0 -50%; font: 400 24px/1 var(--display); }
.ladder tbody tr:hover .ladder-bar { background: var(--blue-deep); }
@media (prefers-reduced-motion: no-preference) {
  .js .ladder-bar { animation: grow 1s var(--ease) both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
}
@keyframes grow { from { transform: scaleX(0); } }

/* Package days, each folding open, beside the route map. */
.days-wrap.has-map { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.days { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.days > li { border-bottom: 1px solid var(--line); }
.day summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.day-name { font: 400 clamp(19px, 1.6vw, 23px)/1.25 var(--display); }
.day summary .i { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%; border: 1.5px solid var(--line); box-sizing: border-box; transition: rotate .4s var(--ease), background-color .3s, color .3s; }
.day[open] summary .i { rotate: 45deg; background: var(--blue); border-color: var(--blue); color: #fff; }
.day summary:hover .day-name { color: var(--blue); }
.day p { padding: 0 0 22px; color: var(--ink-soft); line-height: 1.7; }
.route-map { position: sticky; top: calc(var(--head-h) + 24px); margin: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 22px 44px -34px rgba(20, 29, 27, .45); }
.route-map img { width: 100%; height: auto; }

/* Package prices: one card per hotel level, each opening its price sheet. */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tier { width: 100%; min-height: 150px; display: grid; grid-template-rows: auto 1fr auto; justify-items: start; gap: 10px; padding: 18px; border-radius: 14px; text-align: start; transition: translate .5s var(--ease), box-shadow .5s var(--ease); }
.tier:hover, .tier:focus-visible { translate: 0 -4px; box-shadow: 0 26px 40px -28px rgba(20, 29, 27, .55); }
.tier-stars { display: flex; gap: 2px; }
.tier-stars .i { width: 15px; height: 15px; }
.tier-name { align-self: end; font: 400 clamp(22px, 1.9vw, 28px)/1 var(--display); }
.tier > .i { width: 20px; height: 20px; transition: transform .45s var(--ease); }
.tier:hover > .i { transform: translateX(4px); }
.tier-budget { background: #fff; }
.tier-silver { background: linear-gradient(150deg, #f3f4f5, #d9dcdf); }
.tier-gold { background: linear-gradient(150deg, #f8e5c3, #eec47e); }
.tier-platinum { background: linear-gradient(150deg, #2a3532, var(--ink)); color: var(--paper); }
.tier-stars .i { color: var(--ochre); }
.tier-gold .tier-stars .i { color: #8a5a10; }
@media (max-width: 900px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Transfer prices: an arrivals board. */
.board { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 14px; overflow: hidden; background: var(--ink); color: var(--paper); font-variant-numeric: tabular-nums; }
.board thead th { padding: 16px 22px 10px; font-size: 13px; font-weight: 500; color: var(--faience); text-align: start; }
.board thead th:last-child, .board td { text-align: end; }
.board tbody tr + tr th, .board tbody tr + tr td { border-top: 1px dashed rgba(247, 246, 241, .16); }
.board tbody th { padding: 18px 22px; font-weight: 500; font-size: 17px; text-align: start; }
.board td { padding: 18px 22px; font: 400 34px/1 var(--display); color: #fff; }

.booking { position: sticky; top: calc(var(--head-h) + 24px); }
.booking-card { padding: clamp(22px, 2.2vw, 32px); border-radius: 18px; background: #fff; box-shadow: 0 1px 0 rgba(20, 29, 27, .05), 0 30px 60px -40px rgba(20, 29, 27, .5); }
.booking-from { display: grid; gap: 4px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.booking-from span { font-size: 14px; color: var(--ink-soft); }
.booking-from strong { font: 400 clamp(44px, 4vw, 60px)/.9 var(--display); letter-spacing: -.02em; }
.booking-title { font: 400 24px/1.1 var(--display); margin-bottom: 16px; }
.booking-links { list-style: none; margin: 0; padding: 0; }
.booking-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; border-bottom: 1px solid var(--line); font-weight: 500; text-align: start; transition: color .25s; }
.booking-link:hover { color: var(--blue); }
.booking-link { justify-content: space-between; }
.booking-link .i { width: 16px; height: 16px; rotate: -90deg; }
.booking-sub { margin: 24px 0 4px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.booking-review { margin-top: 22px; }

@media (max-width: 1000px) {
  .dossier { grid-template-columns: minmax(0, 1fr); }
  .booking { position: static; }
  .days-wrap.has-map { grid-template-columns: minmax(0, 1fr); }
  .route-map { position: static; max-width: 560px; }
}
@media (max-width: 640px) {
  .inclusions { grid-template-columns: minmax(0, 1fr); }
  .ladder tbody th { font-size: 19px; width: 4.2em; }
  .ladder td { padding-inline-end: 5em; }
  .ladder td strong { font-size: 20px; }
  .board thead th, .board tbody th, .board td { padding-inline: 16px; }
  .board td { font-size: 26px; }
}

/* ------------------------------------------------------------------ dialogs: policies, price sheets, photos */
dialog.note { width: min(640px, 100% - 32px); max-height: min(86svh, 900px); padding: clamp(24px, 3vw, 40px); border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .6); }
dialog.note-wide { width: min(980px, 100% - 32px); }
dialog.note::backdrop, .lightbox::backdrop { background: rgba(12, 18, 17, .6); }
.note-close { float: inline-end; margin: -8px -8px 8px 16px; }
.note-title { font: 400 clamp(26px, 2.6vw, 36px)/1.1 var(--display); margin-bottom: 18px; }
.note-text { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
dialog.note img { width: 100%; height: auto; border-radius: 10px; }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: pop .4s var(--ease); }
}
@keyframes pop { from { opacity: 0; translate: 0 16px; } }

.lightbox { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 18, 17, .94); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lb-stage { margin: 0; display: grid; justify-items: center; gap: 14px; }
.lb-stage img { max-width: min(92vw, 1400px); max-height: 82svh; width: auto; height: auto; border-radius: 6px; }
.lb-count { font-size: 14px; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.lightbox .ring-btn { position: fixed; color: #fff; border-color: rgba(255, 255, 255, .4); }
.lightbox .ring-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: 20px; top: 50%; translate: 0 -50%; }
.lb-next { inset-inline-end: 20px; top: 50%; translate: 0 -50%; }

.related { background: var(--stone); }
