/* =====================================================================
   Shared styles for: hero media carousel, homepage gallery + lightbox,
   countries-travelled belt, news & events grid, dropdown nav, floating
   WhatsApp button. Loaded after style.css on every public page that needs
   it (all use the same design tokens defined in style.css's :root).
   ===================================================================== */

/* ---------- Hero media (JS-driven mixed photo/video carousel) ---------- */
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media-item {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  filter: saturate(1.05) brightness(0.92);
  transition: opacity 1.6s var(--ease), transform 7s linear;
}
.hero-media-item.active { opacity: 1; transform: scale(1); }

/* ---------- Homepage gallery: "Modern Bento Box Neon Glow" layout,
   adapted from a reference the client supplied -- asymmetric column spans
   (every 3rd and 8th tile runs wider) plus a glowing border on hover,
   recolored to the site's own gold accent instead of the reference's neon
   cyan. Fixed row height (rather than a per-tile aspect-ratio) is what
   makes the wide tiles land as a clean landscape rectangle instead of a
   stretched square. ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 18px;
}
@media (max-width: 1180px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; } }

/* Repeats the wide-tile rhythm every 8 tiles so it holds up no matter how
   many albums get added. */
.gallery-tile:nth-child(8n+3),
.gallery-tile:nth-child(8n+8) { grid-column: span 2; }
@media (max-width: 760px) {
  .gallery-tile:nth-child(8n+3),
  .gallery-tile:nth-child(8n+8) { grid-column: span 1; }
}

.gallery-tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-raised);
  border: 2px solid transparent;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.gallery-tile:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 0 28px rgba(230, 190, 109, 0.45);
  transform: translateY(-3px);
}
.gallery-tile img, .gallery-tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-tile:hover img, .gallery-tile:hover video { transform: scale(1.08); }
.gallery-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(16,32,28,0.82) 100%);
  opacity: 0.55;
  transition: opacity 0.35s var(--ease);
}
.gallery-tile:hover::after { opacity: 0.85; }
.gallery-tile .gallery-tile-title {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 14px;
  color: #F4EFE3;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  z-index: 1;
  transform: translateY(6px);
  transition: transform 0.35s var(--ease);
}
.gallery-tile:hover .gallery-tile-title { transform: translateY(0); }
.gallery-tile .gallery-tile-count {
  position: absolute; top: 10px; inset-inline-end: 10px;
  background: rgba(16,32,28,0.7);
  color: #F4EFE3;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 20px;
  z-index: 1;
}
.gallery-tile .gallery-tile-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(244,239,227,0.92);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  opacity: 0.9;
  transition: transform 0.35s var(--ease);
}
.gallery-tile:hover .gallery-tile-play { transform: translate(-50%, -50%) scale(1); }
.gallery-tile .gallery-tile-play svg { width: 16px; height: 16px; margin-inline-start: 2px; }

.gallery-see-all {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* ---------- Lightbox (shared by homepage gallery + journey galleries) ---------- */
.dte-lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
}
.dte-lightbox.open { display: flex; }
.dte-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 16, 14, 0.92);
}
.dte-lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dte-lightbox-stage {
  width: 100%;
  max-height: 76vh;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.dte-lightbox-stage img, .dte-lightbox-stage video {
  max-width: 100%; max-height: 76vh;
  width: auto; height: auto;
  object-fit: contain;
}
.dte-lightbox-title {
  margin-top: 16px;
  color: #F4EFE3;
  font-family: var(--font-display);
  font-size: 17px;
  text-align: center;
}
.dte-lightbox-close {
  position: absolute; top: -46px; inset-inline-end: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(244,239,227,0.12);
  border: 1px solid rgba(244,239,227,0.3);
  color: #F4EFE3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.dte-lightbox-close:hover { background: rgba(244,239,227,0.24); }
.dte-lightbox-prev, .dte-lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(244,239,227,0.12);
  border: 1px solid rgba(244,239,227,0.3);
  color: #F4EFE3;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.dte-lightbox-prev:hover, .dte-lightbox-next:hover { background: rgba(244,239,227,0.24); }
.dte-lightbox-prev { inset-inline-start: -8px; }
.dte-lightbox-next { inset-inline-end: -8px; }
@media (max-width: 700px) {
  .dte-lightbox-prev { inset-inline-start: 6px; }
  .dte-lightbox-next { inset-inline-end: 6px; }
  .dte-lightbox-close { top: 10px; inset-inline-end: 10px; }
}

/* ---------- Countries travelled belt: a moving marquee of full-bleed
   flag cards (few countries just sit still in one static row -- no
   looping, nothing duplicated -- and only a longer list becomes a
   scrolling belt, which is paired with a "See all" button so every
   country is still reachable without waiting for it to cycle around). ---- */
.countries-belt-wrap {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.countries-belt-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  animation: countriesScroll 40s linear infinite;
}
.countries-belt-track.static {
  animation: none;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
.countries-belt-wrap:hover .countries-belt-track:not(.static) { animation-play-state: paused; }
@keyframes countriesScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.country-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 150px;
  height: 100px;
  padding: 0;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,0.35);
}
.country-flag {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.country-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.country-flag span {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: #1A1A1A;
  text-transform: uppercase;
}
.country-arrow {
  color: var(--gold-bright);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.country-arrow svg { width: 26px; height: 14px; }
[dir="rtl"] .country-arrow svg { transform: scaleX(-1); }

/* ---------- News & Events grid: masonry layout adapted from a reference
   "video app" design the client supplied -- item 1 runs big, item 2 runs
   wide, full-bleed media with title/date pinned in a bottom gradient
   (recolored to the site's own palette instead of the reference's neon
   pink/cyan). ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}
.news-card:nth-child(8n+1) { grid-column: span 2; grid-row: span 2; }
.news-card:nth-child(8n+2) { grid-column: span 2; }
@media (max-width: 1180px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .news-card:nth-child(8n+1) { grid-column: span 2; grid-row: span 1; }
  .news-card:nth-child(8n+2) { grid-column: span 1; }
}
@media (max-width: 480px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card:nth-child(8n+1), .news-card:nth-child(8n+2) { grid-column: span 1; }
}

.news-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border: 2px solid transparent;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-bright);
  box-shadow: 0 0 30px rgba(230, 190, 109, 0.4);
  z-index: 2;
}
.news-card-media { position: absolute; inset: 0; }
.news-card-media-placeholder { background: linear-gradient(135deg, var(--surface-raised), #000); }
.news-card-media img, .news-card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.news-card:hover .news-card-media img,
.news-card:hover .news-card-media video { transform: scale(1.08); }
.news-card-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(244,239,227,0.92);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), opacity 0.3s var(--ease);
}
.news-card:hover .news-card-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--clay-bright);
  color: #F4EFE3;
}
/* Uploaded videos silently preview-play on hover -- the play icon (there's
   nothing to click "play" on, it's already playing) fades out instead. */
.news-card:has(video):hover .news-card-play { opacity: 0; }
.news-card-play svg { width: 18px; height: 18px; margin-inline-start: 2px; }

.news-card-badge {
  position: absolute; top: 12px; inset-inline-start: 12px;
  background: var(--clay-bright);
  color: #F4EFE3;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 3;
}
.news-card-actions {
  position: absolute; top: 12px; inset-inline-end: 12px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.news-card:hover .news-card-actions { opacity: 1; }
.news-mute-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(16,32,28,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244,239,227,0.25);
  color: #F4EFE3;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.news-mute-btn:hover { background: var(--clay-bright); border-color: var(--clay-bright); }
.news-mute-btn svg { width: 16px; height: 16px; }

.news-card-overlay {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  padding: 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(8,11,17,0.55) 55%, rgba(8,11,17,0.92) 100%);
}
.news-card-date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.news-card-title {
  font-family: var(--font-display);
  color: #F4EFE3;
  font-size: 17px;
  line-height: 1.32;
}
.news-card:nth-child(8n+1) .news-card-title { font-size: 22px; }

.news-card-progress {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--clay-bright), var(--gold-bright));
  z-index: 3;
  transition: width 0.1s linear;
}

.news-see-all { display: flex; justify-content: center; margin-top: 36px; }

.news-video-modal-frame {
  width: 100%; aspect-ratio: 16/9; border: none;
}

/* ---------- Dropdown nav (admin-controlled parent/child grouping) ---------- */
.nav-item-parent { position: relative; display: flex; align-items: center; }
.nav-parent-toggle {
  background: none; border: none; font: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 0;
  font-size: 14px; font-weight: 500;
  color: var(--ivory-dim);
  transition: color 0.25s var(--ease);
}
.nav-parent-toggle:hover { color: var(--ivory); }
.nav-parent-toggle svg { width: 10px; height: 10px; transition: transform 0.25s var(--ease); }
.nav-item-parent.open .nav-parent-toggle svg,
.nav-item-parent:hover .nav-parent-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; inset-inline-start: 0;
  margin-top: 16px;
  min-width: 200px;
  background: var(--nav-glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.nav-item-parent:hover .nav-dropdown-menu,
.nav-item-parent:focus-within .nav-dropdown-menu,
.nav-item-parent.open .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--ivory-dim);
}
.nav-dropdown-menu a:hover { background: rgba(210,162,76,0.12); color: var(--ivory); }
.nav-dropdown-menu a::after { display: none; }

@media (max-width: 900px) {
  .nav-item-parent { flex-direction: column; align-items: stretch; width: 100%; }
  .nav-parent-toggle {
    width: 100%; justify-content: space-between;
    padding: 15px 32px; border-top: 1px solid var(--line);
  }
  .nav-item-parent:first-child .nav-parent-toggle { border-top: none; }
  .nav-dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: none; padding: 0; margin: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .nav-item-parent.open .nav-dropdown-menu { max-height: 400px; }
  .nav-dropdown-menu a { padding: 12px 48px; border-top: 1px solid var(--line); border-radius: 0; }
}

.nav-links-dynamic a[aria-current="page"],
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--gold-bright);
}
.nav-links-dynamic a[aria-current="page"]::after { width: 100%; }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  z-index: 500;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px -8px rgba(0,0,0,0.5);
  transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }
.whatsapp-float::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: whatsappPulse 2.2s ease-out infinite;
  z-index: -1;
}
@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (max-width: 600px) {
  .whatsapp-float { width: 50px; height: 50px; bottom: 18px; inset-inline-end: 18px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* ---------- Merged into the one-page site from journey.html / news.html --- */
.dest-slideshow { cursor: pointer; }
.dest-slideshow .dest-slide img { transition: transform 0.6s var(--ease, ease); }
.dest-slideshow:hover .dest-slide.active img { transform: scale(1.06); }
