/* ============================================================
   Best Expedition Cruises — ranking.css
   Page-specific layout for index.html (main ranking page).
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--stack-md);
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { min-height: 600px; padding-bottom: var(--stack-lg); }
}
.hero-media {
  position: absolute;
  inset: 0;
  background: var(--primary-container);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Homepage hero: the photo runs at full natural brightness higher up, with a
   tighter, stronger fade concentrated right behind the text zone at the bottom
   so the heading stays legible without darkening the whole photo. */
.hero-media .gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 21, 36, 0.92) 0%, rgba(0, 21, 36, 0.72) 18%, rgba(0, 21, 36, 0.35) 35%, rgba(0, 21, 36, 0.1) 50%, transparent 62%);
}
/* Operator sub-page heroes: slightly stronger since the subhead sits closer
   to mid-photo, but still much lighter than the old near-opaque overlay. */
.hero--page .gradient {
  background: linear-gradient(to top, rgba(0, 21, 36, 0.55), rgba(0, 21, 36, 0.1) 55%, transparent);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: var(--stack-lg) var(--margin-mobile) 0;
}
@media (min-width: 768px) {
  .hero-content { padding: var(--stack-lg) var(--margin-desktop) 0; }
}
.hero-content .eyebrow { margin-bottom: var(--stack-sm); color: var(--surface-bright); }
.hero-content h1 { margin-bottom: var(--stack-md); max-width: 46ch; }
.hero-content .hero-subhead {
  font-size: var(--body-lg-size);
  line-height: var(--body-lg-line);
  color: var(--surface-variant);
  max-width: 52ch;
}
.hero-updated {
  display: inline-block;
  margin-top: var(--stack-md);
  font-size: 13px;
  color: var(--tertiary-fixed-dim);
  font-family: var(--font-sans);
}

/* ---------- Operator sub-page hero (shorter variant) ---------- */
.hero--page { min-height: 320px; padding-bottom: var(--stack-lg); }
@media (min-width: 768px) { .hero--page { min-height: 400px; } }
.hero--page h1 { max-width: 40ch; }

.breadcrumb {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-bottom: var(--stack-lg);
}
.breadcrumb a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.entity-facts {
  display: grid;
  gap: var(--stack-md);
  margin: var(--stack-lg) 0;
}
@media (min-width: 768px) {
  .entity-facts { grid-template-columns: repeat(3, 1fr); }
}
.entity-facts .fact {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  padding: var(--stack-md);
}
.entity-facts .fact .label { display: block; margin-bottom: 4px; }
.entity-facts .fact .value { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--primary); }

/* ---------- Intro / definitional text blocks ----------
   Full container width by design decision (revision 05) — every text block on the
   page runs the same width as the header, except the hero H1/subhead above. */
.text-block { max-width: none; }
.text-block > p + p { margin-top: var(--stack-md); }

/* Alternating paragraph accent — breaks up long prose into visually distinct
   blocks instead of one unbroken wall of text. Scoped to .text-block only:
   NOT operator cards, NOT region text (removed per feedback). */
.text-block > p:nth-of-type(odd) {
  background: rgba(100, 151, 177, 0.1);
  border-left: 3px solid var(--glacier-teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--stack-sm) var(--stack-md);
}

/* ---------- Comparison anchor strip (secondary nav) ---------- */
.anchor-strip {
  background: var(--surface-container-lowest);
  border-bottom: 1px solid var(--surface-variant);
  position: sticky;
  top: 64px;
  z-index: 40;
  display: none;
}
@media (min-width: 768px) {
  .anchor-strip { display: block; }
}
.anchor-strip .container { padding-top: var(--stack-sm); padding-bottom: var(--stack-sm); display: flex; align-items: center; justify-content: space-between; }
.anchor-strip ul { display: flex; gap: var(--stack-md); }
.anchor-strip a {
  font-family: var(--font-sans);
  font-size: var(--label-caps-size);
  font-weight: var(--label-caps-weight);
  letter-spacing: var(--label-caps-tracking);
  text-transform: uppercase;
  color: var(--primary);
}
.anchor-strip a:hover { color: var(--on-tertiary-container); }

/* ---------- Operator cards (revision 05: image+intro row, full-width body below) ----------
   Fixes empty space under a short image next to tall text: the image only pairs with
   a short intro paragraph (align-items: start, aspect-ratio image), everything else
   runs full .container width underneath, same as the rest of the page. */
.rating-rail {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap-mobile);
  position: relative;
  counter-reset: rank;
}
@media (min-width: 768px) {
  .rating-rail { gap: var(--section-gap); padding-left: 56px; }
}
/* connecting line only where there is a reserved gutter to hold it (desktop) */
@media (min-width: 768px) {
  .rating-rail::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--glacier-teal);
    opacity: 0.35;
  }
}

.operator-card {
  position: relative;
  counter-increment: rank;
  display: flex;
  flex-direction: column;
  gap: var(--stack-lg);
}
/* mobile: rank badge overlays the image corner so card content still aligns
   flush with every other section (no reserved left gutter to cause drift) */
.operator-card::before {
  content: counter(rank);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--glacier-teal);
  color: var(--on-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 21, 36, 0.35);
}
@media (min-width: 768px) {
  .operator-card::before {
    left: -56px;
    top: 0;
    width: 36px;
    height: 36px;
    font-size: 15px;
    box-shadow: 0 0 0 4px var(--surface);
  }
}

/* Photo runs full card width (same width as the header/.container), text follows
   below as one flow with a single consistent gap between every paragraph. */
.operator-card__image {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 767px) {
  .operator-card__image { aspect-ratio: 16 / 10; }
}
.operator-card__image img { width: 100%; height: 100%; object-fit: cover; }

.operator-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}
.operator-card__heading {
  display: flex;
  flex-direction: column;
  gap: var(--stack-sm);
}
.operator-card__content > p { color: var(--on-surface-variant); font-size: var(--body-md-size); }

.operator-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}
.operator-card__body p { color: var(--on-surface-variant); }

.verdict-box {
  background: var(--surface-container-lowest);
  border: 3px solid var(--glacier-teal);
  border-radius: var(--radius);
  padding: var(--stack-md);
}
.verdict-box h4 {
  font-family: var(--font-sans);
  font-size: var(--label-caps-size);
  font-weight: var(--label-caps-weight);
  letter-spacing: var(--label-caps-tracking);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--stack-sm);
}
.verdict-box p { font-size: 15px; color: var(--on-surface-variant); }
.operator-card__link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--stack-md);
}

/* ---------- Best by Region ----------
   DOM order is photo, text, photo, text, photo, text — so mobile (plain stacking,
   no grid override) naturally pairs each photo with its own text right below it.
   Desktop uses grid-auto-flow: column to lay the same 6 items into 3 columns of
   2 rows (photo on top, text below) without needing a different DOM order. */
.region-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}
@media (min-width: 768px) {
  .region-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 320px auto;
    grid-auto-flow: column;
    gap: var(--gutter);
    row-gap: var(--stack-md);
  }
}
.region-text p { font-size: var(--body-md-size); color: var(--on-surface-variant); }
.region-text p + p { margin-top: var(--stack-md); }

.region-card {
  position: relative;
  height: 320px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-tinted);
}
@media (min-width: 768px) {
  .region-card { height: 100%; }
}
.region-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.region-card:hover img, .region-card:focus-within img { transform: scale(1.05); }
.region-card .gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 21, 36, 0.92), transparent 60%);
}
.region-card .region-card__label {
  position: absolute; bottom: 0; left: 0;
  padding: var(--stack-md);
}
.region-card h3 { color: var(--surface-bright); margin-bottom: 4px; }
.region-card .region-teaser {
  /* fixed to 2 lines' worth of height regardless of actual text length, so the
     h3 above always sits at the same distance from the card's bottom edge across
     all 3 cards (labels are bottom-anchored, so a shorter teaser text would
     otherwise leave a shorter label and shift the heading up). */
  min-height: 2.8em;
  font-size: 14px;
  line-height: 1.4;
  color: var(--surface-variant);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms ease, transform 240ms ease;
}
.region-card:hover .region-teaser, .region-card:focus-within .region-teaser {
  opacity: 1;
  transform: translateY(0);
}


/* ---------- Numbered / bulleted rule lists ---------- */
.rule-list { counter-reset: step; display: flex; flex-direction: column; gap: var(--stack-md); }
.rule-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--stack-sm);
  padding-bottom: var(--stack-md);
  border-bottom: 1px solid rgba(0, 21, 36, 0.1);
}
.rule-list li:last-child { border-bottom: none; padding-bottom: 0; }
.rule-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--on-tertiary-container);
}
.rule-list h4 { font-family: var(--font-sans); font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.rule-list p { color: var(--on-surface-variant); font-size: var(--body-md-size); }

.check-list { display: flex; flex-direction: column; gap: var(--stack-sm); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: var(--stack-sm);
  border-bottom: 1px solid rgba(0, 21, 36, 0.08);
}
.check-list li:last-child { border-bottom: none; }
.check-list .icon { color: var(--on-tertiary-container); flex-shrink: 0; margin-top: 3px; }

/* ---------- Conclusion ---------- */
.conclusion {
  background: var(--primary-container);
  border-radius: var(--radius);
  padding: var(--stack-lg);
  color: var(--surface-bright);
}
@media (min-width: 768px) {
  .conclusion { padding: var(--stack-lg) 64px; }
}
.conclusion h2 { color: var(--surface-bright); margin-bottom: var(--stack-md); }
.conclusion p { color: var(--surface-variant); }

/* ---------- Comparison tiles (replaces the comparison table) ---------- */
.compare-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .compare-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .compare-grid { grid-template-columns: repeat(4, 1fr); }
}
.compare-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tinted);
  padding: var(--stack-md);
  display: flex;
  flex-direction: column;
  gap: var(--stack-sm);
}
.compare-card__heading {
  display: flex;
  align-items: center;
  gap: var(--stack-sm);
}
.compare-card__rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--glacier-teal);
  color: var(--on-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-card__facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--on-surface);
  padding: var(--stack-sm) 0;
  border-top: 1px solid var(--surface-variant);
  border-bottom: 1px solid var(--surface-variant);
}
.compare-card__facts .label {
  display: inline-block;
  min-width: 52px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-tertiary-container);
  margin-right: 6px;
}
.compare-card__diff {
  font-size: 14px;
  color: var(--on-surface-variant);
}

/* ---------- Price tiles (replaces the price comparison table) ---------- */
.price-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .price-grid { grid-template-columns: repeat(4, 1fr); }
}
.price-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-variant);
  border-top: 5px solid var(--tier-color, var(--glacier-teal));
  border-radius: var(--radius);
  box-shadow: var(--shadow-tinted);
  padding: var(--stack-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-card--1 { --tier-color: #001524; }
.price-card--2 { --tier-color: #2c6c8c; }
.price-card--3 { --tier-color: #6497b1; }
.price-card--4 { --tier-color: #b0c9e2; }
.price-card__tier {
  font-family: var(--font-sans);
  font-size: var(--label-caps-size);
  font-weight: var(--label-caps-weight);
  letter-spacing: var(--label-caps-tracking);
  text-transform: uppercase;
  color: var(--tier-color, var(--primary));
}
.price-card__price {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
}
.price-card__line { font-size: 13px; font-weight: 600; color: var(--on-surface); }
.price-card__desc { font-size: 14px; color: var(--on-surface-variant); padding-top: 4px; border-top: 1px solid var(--surface-variant); }
