/* ───────────────────────────────────────────────────────────────────────────
   Ann&Palm — Itinerary detail pages (/destinations/<dest>/itineraries/<slug>/)
   Reuses tokens from styles.css + destination.css. Page-specific layout only.
   ─────────────────────────────────────────────────────────────────────────── */

.itin-body {
  background: var(--ivory);
}

/* ── HERO (video) ─────────────────────────────────────────────────────────── */
.itin-hero {
  position: relative;
  height: min(82vh, 820px);
  min-height: 520px;
  overflow: hidden;
  background: var(--navy);
  color: var(--ivory);
}
.itin-hero-media {
  position: absolute;
  inset: 0;
}
.itin-hero-media video,
.itin-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.itin-hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 20% 10%, #2c3a55 0%, transparent 55%),
    radial-gradient(90% 70% at 85% 25%, #6b5a45 0%, transparent 50%),
    linear-gradient(180deg, #0b1430 0%, #050a1c 100%);
}
.itin-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 18% 88%, rgba(0, 4, 18, 0.66) 0%, transparent 60%),
    linear-gradient(180deg, rgba(1, 11, 64, 0.28) 0%, rgba(1, 11, 64, 0.12) 42%, rgba(0, 4, 18, 0.74) 100%);
}
.itin-hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 120px);
  right: clamp(24px, 7vw, 120px);
  bottom: clamp(48px, 9vh, 96px);
  z-index: 1;
  max-width: 980px;
}
.itin-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.86);
  margin-bottom: 18px;
}
.itin-hero-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
}
.itin-hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.itin-hero-title em {
  font-style: italic;
  color: var(--gold);
}
.itin-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.82);
}
.itin-hero-meta span {
  position: relative;
  padding-left: 16px;
}
.itin-hero-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

/* ── INTRO ────────────────────────────────────────────────────────────────── */
.itin-intro {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) clamp(24px, 6vw, 40px);
  text-align: center;
}
.itin-intro-lead {
  margin: 0 0 22px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.5;
  color: var(--ink);
}
.itin-intro-body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.8;
  color: rgba(14, 19, 34, 0.7);
}
.itin-intro-actions {
  margin-top: clamp(28px, 3vw, 40px);
  display: flex;
  justify-content: center;
}

/* ── BESPOKE EXPERIENCES ──────────────────────────────────────────────────── */
.itin-bespoke {
  background: var(--navy);
  color: var(--ivory);
  padding: clamp(64px, 9vw, 120px) clamp(24px, 6vw, 80px);
}
.itin-bespoke-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.itin-bespoke-head {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.itin-bespoke-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.7);
  margin-bottom: 18px;
}
.itin-bespoke-eyebrow::before,
.itin-bespoke-eyebrow::after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.itin-bespoke-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}
.itin-bespoke-title em {
  font-style: italic;
  color: var(--gold);
}
.itin-bespoke-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 40px;
}
.itin-bespoke-list li {
  position: relative;
  padding-left: 30px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(244, 239, 229, 0.8);
}
.itin-bespoke-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* ── DAY-BY-DAY ITINERARY ─────────────────────────────────────────────────── */
.itin-days {
  padding: clamp(64px, 9vw, 120px) clamp(24px, 6vw, 80px);
}
.itin-days-head {
  max-width: 1180px;
  margin: 0 auto clamp(40px, 5vw, 72px);
  text-align: center;
}
.itin-days-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(14, 19, 34, 0.55);
  margin-bottom: 16px;
}
.itin-days-eyebrow::before,
.itin-days-eyebrow::after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.itin-days-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  color: var(--ink);
}
.itin-days-title em {
  font-style: italic;
  color: var(--gold);
}
.itin-days-scroller {
  max-width: 1180px;
  margin: 0 auto;
}
.itin-days-list {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 88px);
}
/* Default / mobile fallback: image on top, text below, one block per day. */
.itin-day {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

/* ── CARD-STACK MODE (desktop, enabled by itinerary.js) ───────────────────────
   Each day is a card that sticks to the top of the viewport as you scroll,
   so the next card slides up and stacks over the previous one — the image
   "rotates" day by day without ever expanding. */
.itin-days-scroller.is-stack {
  display: block;
}
.itin-days-scroller.is-stack .itin-days-list {
  display: block;
}
.itin-days-scroller.is-stack .itin-day {
  position: sticky;
  top: calc(var(--nav-height, 96px) + 20px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: stretch;
  margin: 0 0 clamp(56px, 8vh, 120px);
  padding: clamp(20px, 2.4vw, 34px);
  border-radius: 18px;
  background: var(--ivory);
  border: 1px solid var(--hairline);
  box-shadow: 0 -12px 24px -18px rgba(1, 11, 64, 0.18);
  transform-origin: center top;
}
/* Give the stacked cards a subtle telescoping feel. */
.itin-days-scroller.is-stack .itin-day:last-child {
  margin-bottom: 0;
}
.itin-days-scroller.is-stack .itin-day .itin-day-media {
  aspect-ratio: auto;
  min-height: clamp(320px, 52vh, 560px);
}
.itin-days-scroller.is-stack .itin-day .itin-day-text {
  align-self: center;
  max-width: 520px;
}
.itin-day-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink-soft);
}
.itin-day-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.itin-day:hover .itin-day-media img {
  transform: scale(1.04);
}
.itin-day-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.itin-day-title {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.itin-day-body {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.78;
  color: rgba(14, 19, 34, 0.72);
}
.itin-day-body:last-child {
  margin-bottom: 0;
}
.itin-day-stay {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(14, 19, 34, 0.5);
}

/* ── JOURNEY BEGINS / CTA ─────────────────────────────────────────────────── */
.itin-cta {
  position: relative;
  padding: clamp(72px, 11vw, 150px) clamp(24px, 6vw, 80px);
  text-align: center;
  background: var(--navy);
  color: var(--ivory);
  overflow: hidden;
}
.itin-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.itin-cta h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.06;
}
.itin-cta h2 em {
  color: var(--gold);
  font-style: italic;
}
.itin-cta p {
  margin: 0 0 36px;
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
  color: rgba(244, 239, 229, 0.78);
}
.itin-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ── OTHER INSPIRATIONAL JOURNEYS ─────────────────────────────────────────── */
.itin-others {
  padding: clamp(64px, 9vw, 120px) clamp(24px, 6vw, 80px);
}
.itin-others-head {
  max-width: 1180px;
  margin: 0 auto clamp(36px, 4vw, 56px);
  text-align: center;
}
.itin-others-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(14, 19, 34, 0.55);
  margin-bottom: 14px;
}
.itin-others-eyebrow::before,
.itin-others-eyebrow::after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.itin-others-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 44px);
  color: var(--ink);
}
.itin-others-title em {
  font-style: italic;
  color: var(--gold);
}
.itin-others-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 376px));
  justify-content: center;
  gap: 28px;
  align-items: stretch;
}
.itin-other-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
}
.itin-other-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-soft);
  margin-bottom: 18px;
}
.itin-other-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.itin-other-card:hover .itin-other-media img {
  transform: scale(1.05);
}
.itin-other-card h3 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.2;
}
.itin-other-cta {
  /* Keep a clear, deliberate separation from the title without allowing
     flexbox to create an oversized empty band on tablet-width cards. */
  margin-top: 18px;
  margin-left: auto;
  padding-top: 16px;
  align-self: flex-end;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .itin-bespoke-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .itin-day {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .itin-day-media {
    aspect-ratio: 16 / 10;
  }
  .itin-others-grid {
    grid-template-columns: repeat(2, minmax(0, 376px));
    gap: 34px 22px;
  }
  .itin-other-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, 376px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .itin-others-grid {
    grid-template-columns: minmax(0, 420px);
  }
  .itin-other-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }
}
