/* Egypt Vibes catalog lists: tours, transfers and packages, and their city and category pages.
   Builds on ev.css (tokens, headings, tour and package cards). */

/* ------------------------------------------------------------------ shared frame */
.sec-tight { padding-block: clamp(40px, 5vw, 80px); }
.cat-intro { padding-top: calc(var(--head-h) + clamp(96px, 9vw, 150px)); padding-bottom: clamp(32px, 4vw, 64px); }
.cat-about { margin-top: clamp(32px, 4vw, 56px); }

/* ------------------------------------------------------------------ city banner (city tour and transfer pages) */
.city-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(80svh, 780px); color: #fff; background: var(--ink); overflow: hidden; }
.city-hero-photo { position: absolute; inset: 0; z-index: -1; }
.city-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.city-hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 18, 17, .55) 0%, rgba(12, 18, 17, 0) 30%, rgba(12, 18, 17, .1) 55%, rgba(12, 18, 17, .78) 100%); }
.city-hero-in { padding-top: calc(var(--head-h) + 120px); padding-bottom: clamp(40px, 6vw, 88px); }
.city-hero .crumbs ol { color: rgba(255, 255, 255, .78); }
.city-hero .crumbs a:hover { color: var(--faience); }
.city-hero .crumbs [aria-current] { color: #fff; }
.city-hero-title { display: grid; gap: 10px; }
.city-hero-kicker { font: 500 17px/1.3 var(--text); color: var(--faience); }
.city-hero-name { font: 300 clamp(64px, 12.5vw, 210px)/.84 var(--display); letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.city-hero-credit { position: absolute; right: var(--gutter); bottom: 12px; max-width: calc(100% - var(--gutter) * 2); font-size: 12px; color: rgba(255, 255, 255, .72); text-align: right; }
.city-hero-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.city-hero-count { display: inline-flex; margin-top: 24px; padding: 6px 16px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px; font-size: 15px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .city-hero-photo img { animation: settle 1.8s var(--ease) both; }
  .city-hero-name { animation: lift 1.1s var(--ease) .1s both; }
}
@keyframes settle { from { scale: 1.08; } }
@keyframes lift { from { opacity: 0; translate: 0 .25em; } }

/* ------------------------------------------------------------------ tours: the map of Egypt and the cities down it */
.atlas { padding-bottom: clamp(72px, 8vw, 140px); }
.atlas-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.atlas-map { position: sticky; top: calc(var(--head-h) + 24px); }
.map-frame { position: relative; aspect-ratio: 662 / 600; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-land { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.map-nile, .map-lake { fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; }
.map-nile { stroke-width: 4; }
.map-delta { stroke-width: 2.4; }
.map-lake { stroke-width: 11; opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .js .map-nile { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: flow 2.4s var(--ease) .3s forwards; }
  .js .map-delta { animation-delay: 1.8s; animation-duration: 1s; }
}
@keyframes flow { to { stroke-dashoffset: 0; } }

.pin { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 10px; translate: -9px -50%; }
.pin-dot { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); transition: background-color .3s, border-color .3s, scale .4s var(--ease); }
.pin-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; scale: .5; transition: opacity .3s, scale .5s var(--ease); }
.pin-label { font: 400 clamp(16px, 1.4vw, 21px)/1 var(--display); white-space: nowrap; padding: 4px 8px; border-radius: 4px; transition: background-color .3s, color .3s; }
.pin.is-active { z-index: 1; }
.pin.is-active .pin-dot { background: var(--blue); border-color: var(--blue); scale: 1.15; }
.pin.is-active .pin-dot::after { opacity: 1; scale: 1; }
.pin.is-active .pin-label { background: var(--blue); color: #fff; }

/* The cities, north to south, strung on a line like stops on the river. */
.atlas-stops { list-style: none; margin: 0; padding: 0; position: relative; }
.atlas-stops::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px); }
.atlas-stop { position: relative; padding-left: 40px; }
.atlas-stop + .atlas-stop { margin-top: clamp(14px, 1.6vw, 22px); }
.atlas-stop::before { content: ""; position: absolute; left: 2px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--stone); border: 2px solid var(--ink-soft); transition: background-color .3s, border-color .3s; }
.atlas-stop.is-active::before { background: var(--blue); border-color: var(--blue); }
.atlas-stop-link { display: grid; grid-template-columns: clamp(110px, 11vw, 168px) minmax(0, 1fr); gap: clamp(16px, 2vw, 26px); align-items: center; padding: 10px; border-radius: 14px; transition: background-color .35s var(--ease), box-shadow .35s var(--ease); }
.atlas-stop.is-active .atlas-stop-link { background: #fff; box-shadow: 0 1px 0 rgba(20, 29, 27, .05), 0 22px 44px -34px rgba(20, 29, 27, .45); }
.atlas-stop-photo { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--paper); }
.atlas-stop-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.atlas-stop.is-active .atlas-stop-photo img { scale: 1.06; }
.atlas-stop-body { display: grid; gap: 6px; min-width: 0; padding-right: 6px; }
.atlas-stop-lat { font-size: 13.5px; color: var(--blue); font-variant-numeric: tabular-nums; }
.atlas-stop-name { font: 400 clamp(30px, 3vw, 46px)/1 var(--display); letter-spacing: var(--track-tight); }
.atlas-stop-text { font-size: 15px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.atlas-stop-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 15px; font-weight: 500; }
.atlas-stop-go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color .3s, color .3s, border-color .3s; }
.atlas-stop-go .i { width: 17px; height: 17px; transition: transform .45s var(--ease); }
.atlas-stop.is-active .atlas-stop-go { background: var(--blue); border-color: var(--blue); color: #fff; }
.atlas-stop-link:hover .atlas-stop-go .i { transform: translateX(3px); }
.atlas-stop-link:focus-visible { outline-offset: 4px; }
@media (max-width: 900px) {
  .atlas-grid { grid-template-columns: minmax(0, 1fr); }
  .atlas-map { position: relative; top: 0; max-width: 560px; }
}
@media (max-width: 520px) {
  .atlas-stop { padding-left: 30px; }
  .atlas-stop-link { grid-template-columns: 84px minmax(0, 1fr); padding: 8px; }
  .atlas-stop-text { display: none; }
  .pin-label { font-size: 14px; padding: 3px 6px; }
  .pin-dot { width: 14px; height: 14px; border-width: 2.5px; }
}

/* A city's tours: the homepage prints, all of them. */
.tour-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 52px) clamp(20px, 2.4vw, 36px); align-items: start; }
@media (max-width: 1080px) { .tour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tour-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ transfers: film strip and arrival signs */
.transfer-lead { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: start; margin-top: clamp(36px, 4vw, 64px); }
.transfer-lead > p { font: 300 clamp(20px, 1.8vw, 26px)/1.45 var(--display); text-wrap: pretty; }
.film {
  list-style: none; margin: 0; padding: 22px 12px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 10px; background-color: var(--ink);
  /* sprocket holes along both edges */
  background-image: radial-gradient(circle, var(--stone) 0 3px, transparent 3.5px), radial-gradient(circle, var(--stone) 0 3px, transparent 3.5px);
  background-size: 20px 22px; background-repeat: repeat-x; background-position: 4px 0, 4px 100%;
}
.film::-webkit-scrollbar { display: none; }
.film li { flex: 0 0 min(78%, 400px); aspect-ratio: 4 / 3; scroll-snap-align: start; border-radius: 4px; overflow: hidden; background: #26302e; }
.film img { width: 100%; height: 100%; object-fit: cover; }
.film:focus-visible { outline-offset: 4px; }

.signs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.sign-link { position: relative; display: block; aspect-ratio: 5 / 4; border-radius: 10px; overflow: hidden; background: var(--ink); }
.sign-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.4s var(--ease); }
.sign-plate {
  position: absolute; inset-inline: 14px; bottom: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 6px; background: var(--blue); color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 18px 30px -18px rgba(0, 0, 0, .7);
  transition: background-color .35s var(--ease);
}
.sign-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; background: #fff; color: var(--blue); rotate: -45deg; transition: rotate .6s var(--ease); }
.sign-text { display: grid; gap: 2px; min-width: 0; }
.sign-country { font-size: 13px; opacity: .82; }
.sign-name { font: 600 clamp(20px, 1.7vw, 25px)/1.1 var(--text); overflow-wrap: anywhere; }
.sign-count { padding: 4px 10px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 999px; font-size: 13.5px; white-space: nowrap; }
.sign-link:hover .sign-photo img, .sign-link:focus-visible .sign-photo img { scale: 1.06; }
.sign-link:hover .sign-plate, .sign-link:focus-visible .sign-plate { background: var(--blue-deep); }
.sign-link:hover .sign-arrow, .sign-link:focus-visible .sign-arrow { rotate: 0deg; }
.sign-link:focus-visible { outline-offset: 4px; }
@media (max-width: 900px) { .transfer-lead { grid-template-columns: minmax(0, 1fr); } }

/* A city's transfers: tickets with a tear-off price stub. */
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ticket {
  position: relative; display: grid; grid-template-columns: clamp(150px, 19vw, 250px) minmax(0, 1fr) clamp(190px, 17vw, 230px);
  border-radius: 14px; background: #fff; box-shadow: 0 1px 0 rgba(20, 29, 27, .05), 0 22px 44px -34px rgba(20, 29, 27, .45);
}
.js .ticket[data-reveal] { transition: translate .6s var(--ease), box-shadow .6s var(--ease), opacity .9s var(--ease), transform 1s var(--ease); }
.ticket:hover { translate: 0 -4px; box-shadow: 0 1px 0 rgba(20, 29, 27, .05), 0 30px 50px -30px rgba(20, 29, 27, .5); }
.ticket-photo { position: relative; min-height: 150px; overflow: hidden; border-radius: 14px 0 0 14px; }
.ticket-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.4s var(--ease); }
.ticket:hover .ticket-photo img { scale: 1.06; }
.ticket-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; padding: clamp(18px, 2vw, 28px) clamp(18px, 2.4vw, 34px); }
.ticket-title { font: 400 clamp(22px, 2vw, 29px)/1.15 var(--display); text-wrap: balance; }
.ticket-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14.5px; color: var(--ink-soft); }
.ticket-facts li { display: inline-flex; align-items: center; gap: 7px; }
.ticket-facts .i { width: 17px; height: 17px; }
.ticket-stub { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 22px 24px; border-left: 2px dashed rgba(20, 29, 27, .18); border-radius: 0 14px 14px 0; background: var(--paper); }
/* the notches where the stub tears off */
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--stone); }
.ticket-stub::before { top: -12px; }
.ticket-stub::after { bottom: -12px; }
.ticket-price { display: grid; gap: 2px; }
.ticket-price span { font-size: 14px; color: var(--ink-soft); }
.ticket-price strong { font: 400 36px/1 var(--display); font-variant-numeric: tabular-nums; }
.ticket-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 18px 0 22px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 500; font-size: 15px; white-space: nowrap; transition: background-color .3s; }
.ticket-link .i { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.ticket-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.ticket:hover .ticket-link { background: var(--blue-deep); }
.ticket:hover .ticket-link .i { transform: translateX(4px); }
.ticket-link:focus-visible { outline: none; }
.ticket:has(.ticket-link:focus-visible) { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 900px) {
  .ticket { grid-template-columns: 130px minmax(0, 1fr); }
  .ticket-stub { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-left: 0; border-top: 2px dashed rgba(20, 29, 27, .18); border-radius: 0 0 14px 14px; }
  .ticket-stub::before { left: -12px; top: -13px; }
  .ticket-stub::after { left: auto; right: -12px; top: -13px; bottom: auto; }
  .ticket-photo { border-radius: 14px 0 0 0; }
}
@media (max-width: 560px) {
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-photo { aspect-ratio: 16 / 9; min-height: 0; border-radius: 14px 14px 0 0; }
  .ticket-price strong { font-size: 30px; }
}

/* ------------------------------------------------------------------ packages: a rack of brochures */
.rack-title { font: 300 clamp(32px, 3.4vw, 52px)/1 var(--display); letter-spacing: var(--track-tight); margin-bottom: clamp(28px, 3vw, 44px); }
.rack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(18px, 2vw, 30px); }
.brochure { --tilt: -1.2deg; }
.brochure:nth-child(4n + 2) { --tilt: 1deg; }
.brochure:nth-child(4n + 3) { --tilt: -.5deg; }
.brochure:nth-child(4n) { --tilt: 1.4deg; }
.brochure-link {
  display: flex; flex-direction: column; height: 100%; padding: 10px 10px 18px; border-radius: 3px; rotate: var(--tilt);
  /* a folded sheet: the crease runs down the middle */
  background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(20, 29, 27, .07) 50%, transparent calc(50% + 1px)) var(--paper);
  box-shadow: 0 1px 0 rgba(20, 29, 27, .06), 0 24px 40px -30px rgba(20, 29, 27, .5);
  transition: rotate .6s var(--ease), translate .6s var(--ease), box-shadow .6s var(--ease);
}
.brochure-photo { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; background: var(--stone); }
.brochure-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.3s var(--ease); }
.brochure-name { flex: 1; margin: 16px 6px 0; font: 400 clamp(21px, 1.8vw, 27px)/1.14 var(--display); text-wrap: balance; }
.brochure-go { display: inline-flex; align-items: center; gap: 8px; margin: 14px 6px 0; font-size: 15px; font-weight: 500; color: var(--blue); }
.brochure-go .i { width: 17px; height: 17px; transition: transform .45s var(--ease); }
.brochure-link:hover, .brochure-link:focus-visible { rotate: 0deg; translate: 0 -8px; box-shadow: 0 1px 0 rgba(20, 29, 27, .06), 0 34px 50px -30px rgba(20, 29, 27, .55); }
.brochure-link:hover .brochure-photo img, .brochure-link:focus-visible .brochure-photo img { scale: 1.05; }
.brochure-link:hover .brochure-go .i { transform: translateX(4px); }
.brochure-link:focus-visible { outline-offset: 6px; }
@media (max-width: 1080px) { .rack { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .rack { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brochure-name { font-size: 20px; } }
@media (max-width: 420px) { .rack { grid-template-columns: minmax(0, 1fr); } }

/* A category's packages: the homepage journey cards, side by side instead of stacked. */
.pkg-stack.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.is-grid .pkg { position: static; }
.is-grid .pkg-card, .is-grid .pkg-card.is-flipped { grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; padding: 10px; scale: none; filter: none; }
.is-grid .pkg-card.is-flipped .pkg-media { order: 0; }
.is-grid .pkg-media { aspect-ratio: 16 / 10; }
.is-grid .pkg-body { padding: 18px 12px 10px; }
.is-grid .pkg-days strong { font-size: clamp(72px, 7vw, 112px); }
@media (max-width: 900px) { .pkg-stack.is-grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .sign-arrow, .brochure-link, .ticket, .atlas-stop-link, .pin-dot { transition: none; }
}

/* Rhythm between the blocks of a list page: one generous gap, not two stacked ones. */
.cat-intro + .sec-tight { padding-top: 0; }
.city-about + .sec { padding-top: clamp(40px, 4vw, 72px); }
.cat-intro:has(+ .sec.pkgs) { padding-bottom: clamp(56px, 6vw, 96px); }
/* A description that is one long paragraph reads as text, set in two columns on wide screens. */
.prose:not(:has(.prose-rest)) .prose-lead { max-width: none; font: 400 clamp(18px, 1.35vw, 21px)/1.65 var(--text); color: var(--ink-soft); columns: 2 32ch; column-gap: clamp(32px, 5vw, 80px); }
@media (max-width: 560px) { .ticket-photo { aspect-ratio: 2 / 1; } }
.sec.pkgs-grid { padding-top: clamp(56px, 6vw, 96px); }
/* The map's water and neighbouring land. */
.map-frame { border-radius: 18px; overflow: hidden; background: #d5e1df; }
.map-art { overflow: hidden; }
.map-near { fill: #ecebe4; stroke: rgba(20, 29, 27, .18); stroke-width: 1; stroke-linejoin: round; }
/* Pins near the east edge put their name on the land side. */
.pin.is-west { flex-direction: row-reverse; translate: calc(-100% + 9px) -50%; }
@media (max-width: 520px) { .pin.is-west { translate: calc(-100% + 7px) -50%; } }
.pin-label { background: rgba(247, 246, 241, .88); }

/* Package grids: each card rises with at most its row partner's delay, not one step per card down a long list. */
.is-grid .pkg-card[data-reveal="rise"] { transition-delay: 0s; }
.is-grid .pkg:nth-child(even) .pkg-card[data-reveal="rise"] { transition-delay: .12s; }
