/* ═══════════════════════════════════════════
   ANVIR SAFARIS — SINGLE ACCOMMODATION PAGE
   Loaded only on single-accommodation.php, alongside accommodations.css
   (shared .acc-card/.acc-grid/.acc-wrap/.acc-library/.acc-title rules used
   by the "Related accommodations" section — see functions.php). The
   .pagehero-prefixed / .hgal-prefixed hero below (built by
   anvir_photo_hero_html() in includes/accommodations-data.php) is ALSO
   loaded on single-destination.php for the exact same looping-photo hero on
   both page types — see functions.php.
═══════════════════════════════════════════ */

/* ── HERO (shared full-bleed looping photo background + centered title
   block overlay — single-accommodation.php's .accd-hero and
   single-destination.php's .destd-hero both wrap this, so the two detail
   pages share the exact same hero treatment) ── */
.pagehero { position: relative; }
.pagehero .hgal,
.pagehero .hgal-empty { height: 100vh; min-height: 700px; }

.hgal { position: relative; width: 100%; height: 100%; overflow: hidden; cursor: zoom-in; background: #0d1a14; }
.hgal-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hgal-slide.is-active { opacity: 1; z-index: 1; }
.hgal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hgal-viewall {
  position: absolute; right: 20px; bottom: 20px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--white); background: rgba(13,26,20,.72); backdrop-filter: blur(4px);
  padding: 10px 16px; display: inline-flex; align-items: center; gap: 8px;
}
.hgal-empty {
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: default;
  background: linear-gradient(135deg, #1f3a2d, #0f2018);
}
.hgal-empty span { font-family: var(--serif); font-style: italic; font-size: 28px; color: rgba(248,244,238,.35); }

.pagehero-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(160deg, rgba(10,24,16,.72) 0%, rgba(27,58,45,.58) 50%, rgba(10,24,16,.75) 100%);
}
.pagehero-info {
  position: absolute; inset: 0; z-index: 3; color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.pagehero-info-wrap { max-width: 860px; width: 100%; pointer-events: auto; }

/* ── DETAILS (text styling only now — position/background/centering come
   from .pagehero-info above) ── */
.accd-info { color: var(--cream); }

.accd-breadcrumb {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(248,244,238,.5); margin-bottom: 26px;
}
.accd-breadcrumb a { color: rgba(248,244,238,.7); transition: color .2s; }
.accd-breadcrumb a:hover { color: var(--gold); }
.accd-breadcrumb span[aria-hidden] { margin: 0 8px; opacity: .4; }

.accd-meta {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(248,244,238,.55); margin-bottom: 16px; line-height: 1.8;
}
.accd-meta span + span::before { content: '·'; margin: 0 10px; color: rgba(248,244,238,.35); }
.accd-meta-tier { color: var(--gold); }
.accd-meta-flag { color: var(--green-deep); background: var(--gold-light, #f5edd8); padding: 3px 9px; border-radius: 2px; }

.accd-title {
  font-family: var(--serif); font-weight: 400; color: var(--white);
  font-size: clamp(34px, 4.6vw, 58px); line-height: 1.08; margin-bottom: 14px;
  text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.accd-stars { color: var(--gold); font-size: 13px; letter-spacing: 4px; margin-bottom: 26px; }

.accd-cta { display: inline-flex; align-items: center; gap: 10px; }

/* ── ABOUT (plain section below the hero — reuses .destd-prose-style text
   coloring for a light background, unlike the hero's light-on-dark text) ── */
.accd-about { padding: 72px 0; background: var(--white); }
.accd-about-wrap { max-width: 760px; }
.accd-description {
  font-family: var(--sans); font-size: 16px; font-weight: 300; line-height: 1.9; color: var(--text-mid);
}
.accd-description p { margin: 0 0 1.3em; }
.accd-description p:last-child { margin-bottom: 0; }

/* ── RELATED ── */
.accd-related { padding-top: 76px; }
.accd-related .acc-title { font-size: clamp(28px, 3.4vw, 40px); }

/* ── SLIDESHOW (moved here from accommodations.css — this is the only page
   that still opens a photo-by-photo lightbox; grid cards now just link
   straight here) ── */
.acc-lb {
  position: fixed; inset: 0; z-index: 10000; background: #12100d;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); color: var(--white);
  animation: accdFade .25s ease;
}
.acc-lb[hidden] { display: none; }
@keyframes accdFade { from { opacity: 0; } to { opacity: 1; } }
body.acc-lb-open { overflow: hidden; }

.acc-lb-top { display: flex; align-items: center; gap: 20px; padding: 18px 24px; min-width: 0; }
.acc-lb-count { font-family: var(--sans); font-size: 14px; letter-spacing: .12em; color: rgba(255,255,255,.75); min-width: 64px; }
.acc-lb-title { flex: 1; text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: rgba(255,255,255,.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acc-lb-close { flex-shrink: 0; background: none; border: 0; color: var(--white); font-size: 26px; width: 48px; height: 48px; cursor: pointer; opacity: .85; }
.acc-lb-close:hover { opacity: 1; color: var(--gold); }

.acc-lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 0 96px; touch-action: pan-y; }
.acc-lb-figure { margin: 0; height: 100%; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.acc-lb-figure img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; user-select: none; transition: opacity .25s; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.acc-lb-figure img.is-loading { opacity: 0; }
.acc-lb-figure figcaption { font-family: var(--sans); font-size: 14px; color: rgba(255,255,255,.7); padding-top: 14px; min-height: 30px; text-align: center; }
.acc-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
  background: rgba(0,0,0,.25); color: var(--white); font-size: 20px; cursor: pointer; transition: background .2s, border-color .2s;
}
.acc-lb-nav:hover { background: var(--gold); border-color: var(--gold); }
.acc-lb-prev { left: 24px; }
.acc-lb-next { right: 24px; }
.acc-lb-nav[hidden] { display: none; }

.acc-lb-thumbs { display: flex; justify-content: center; gap: 10px; padding: 16px 24px 22px; overflow-x: auto; scrollbar-width: thin; }
.acc-lb-thumbs button { flex: 0 0 auto; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.acc-lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-lb-thumbs button:hover { opacity: .85; }
.acc-lb-thumbs button.is-active { opacity: 1; border-color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1099px) {
  .acc-wrap.accd-info-wrap { padding: 0 28px; }
}
@media (max-width: 767px) {
  .pagehero .hgal,
  .pagehero .hgal-empty { height: 100vh; min-height: 100svh; }
  .acc-wrap.accd-info-wrap { padding: 0 20px; }
  .accd-title { margin-bottom: 10px; }
  .accd-about { padding: 48px 0; }
  .accd-related { padding-top: 56px; }
  .acc-lb-top { padding: 10px 12px; }
  .acc-lb-title { font-size: 17px; }
  .acc-lb-stage { padding: 0 8px; }
  .acc-lb-nav { width: 44px; height: 44px; font-size: 16px; background: rgba(0,0,0,.45); }
  .acc-lb-prev { left: 10px; }
  .acc-lb-next { right: 10px; }
  .acc-lb-thumbs { justify-content: flex-start; }
  .acc-lb-thumbs button { width: 64px; height: 46px; }
}
