/* World Flight event content and photo galleries */
html { scroll-behavior: smooth; }
body.dialog-open { overflow: hidden; }
img { display: block; max-width: 100%; }
.card, .stage-card, .route-section, .summary-card {
  padding: clamp(18px, 3vw, 24px); background: var(--panel);
  border: 1px solid var(--line); 
}
.card h2, .stage-card h2, .route-section h2, .summary-card h2 {
  margin: 0 0 14px; font-size: clamp(21px, 2.4vw, 24px); line-height: 1.25;
}
.card h3 { margin: 25px 0 10px; font-size: 1.08rem; }
.card p:first-child, .stage-card p:first-child { margin-top: 0; }
.card p:last-child, .stage-card p:last-child { margin-bottom: 0; }
.lead { font-size: 1.08rem; }
.status-note {
  padding: 15px 17px; background: var(--panel); border-left: 4px solid var(--red);
}
.status-note strong { color: var(--red-dark); }
.hero-media {
  overflow: hidden; background: var(--panel); border: 1px solid var(--line);
}
.hero-media img { width: auto; height: auto; margin: auto; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px; margin: 18px 0 0;
}
.stat { padding: 15px; background: var(--soft); border-top: 3px solid var(--red); }
.stat strong { display: block; font-size: 1.35rem; line-height: 1.15; }
.stat span { color: var(--muted); font-size: .86rem; }
.section-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none;
}
.section-links a {
  display: block; padding: 7px 11px; color: var(--ink); background: var(--soft);
  border: 1px solid var(--line); text-decoration: none;
}
.section-links a:hover { border-color: var(--red); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.route-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .9rem; }
.route-table th, .route-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.route-table th { color: #fff; background: var(--slate); }
.route-table tbody tr:nth-child(even) { background: #f7f7f7; }
.route-table tr.cancelled { color: #72777c; background: #f2f2f2; }
.route-table .part-cell { color: var(--red-dark); font-weight: 700; }
.route-map-grid, .logo-grid, .index-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px;
}
.route-map-grid a, .logo-card, .index-card {
  display: flex; min-height: 116px; flex-direction: column; justify-content: center;
  padding: 14px; color: var(--ink); background: var(--soft);
  border: 1px solid var(--line); text-decoration: none;
}
.route-map-grid a:hover, a.logo-card:hover, .index-card:hover { border-color: var(--red); }
.route-map-grid img { width: 100%; height: 118px; object-fit: cover; }
.route-map-grid span { margin-top: 8px; font-weight: 700; }
.logo-card img { width: 100%; max-height: 76px; object-fit: contain; }
.index-card strong { font-size: 1.05rem; }
.index-card span { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.index-card.cancelled { border-style: dashed; opacity: .78; }
.part-divider {
  padding: 18px 22px; color: #fff; background: var(--slate); border-left: 5px solid var(--red);
}
.part-divider h2 { margin: 0; font-size: 1.35rem; }
.part-divider p { margin: 5px 0 0; color: #d8dbde; }
.stage-card { scroll-margin-top: 18px; }
.stage-card > h2 { padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.stage-card p { max-width: 95ch; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 9px; margin: 17px 0;
}
.gallery-item {
  position: relative; display: block; overflow: hidden; min-height: 125px;
  background: #1d2023; border: 1px solid #2c3034;
}
.gallery-item img {
  width: 100%; height: 150px; object-fit: cover; transition: transform .22s ease, opacity .22s ease;
}
.gallery-item::after {
  content: "View"; position: absolute; right: 7px; bottom: 7px; padding: 3px 7px;
  color: #fff; background: rgba(0, 0, 0, .74); font-size: .72rem; font-weight: 700;
  opacity: 0;  transition: .2s ease;
}
.gallery-item:hover img { transform: scale(1.035); opacity: .86; }
.gallery-item:hover::after { opacity: 1; transform: none; }
.media-frame { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; background: #111; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox {
  width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0;
  color: #fff; background: rgba(9, 10, 11, .96); border: 0;
}
.lightbox::backdrop { background: rgba(9, 10, 11, .96); }
.lightbox-inner { display: grid; grid-template-rows: 1fr auto; width: 100%; height: 100%; padding: 54px 70px 24px; }
.lightbox-figure { display: grid; place-items: center; min-height: 0; margin: 0; }
.lightbox-image { max-width: 100%; max-height: calc(100vh - 125px); object-fit: contain; }
.lightbox-caption { margin: 14px auto 0; max-width: 900px; color: #dfe2e5; text-align: center; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
  color: #fff; background: rgba(31, 34, 37, .88); border: 1px solid #666; cursor: pointer;
  font: 700 1.4rem/1 Arial, sans-serif;
}
.lightbox-close { top: 12px; right: 15px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox button:hover { background: var(--red); }
.flightplan-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.55fr); gap: 16px; }
.stage-menu { align-self: start; max-height: min(650px, 75svh); overflow-y: auto; padding: 18px; background: var(--panel); border: 1px solid var(--line); }
.stage-menu ul + h2 { margin-top: 14px; }
.stage-menu h2 { margin: 0 0 10px; font-size: 1.1rem; }
.stage-menu ul { margin: 0; padding: 0; list-style: none; }
.stage-menu a { display: block; padding: 7px 8px; border-bottom: 1px solid #eceeef; text-decoration: none; }
.listing-frame { width: 100%; min-height: 920px; background: #fff; border: 1px solid var(--line); }
.full-page-link { display: inline-block; margin-top: 10px; font-weight: 700; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (max-width: 760px) {
  .card, .stage-card, .route-section, .summary-card { padding: 19px 16px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item img { height: 128px; }
  .flightplan-layout { grid-template-columns: minmax(0, 1fr); }
  .stage-menu { max-height: 260px; }
  .listing-frame { min-height: 720px; }
  .lightbox-inner { padding: 54px 12px 22px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 15px; transform: none; }
  .lightbox-caption { padding: 0 52px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
*::before, *::after { transition: none !important; }
}
