/* ============================================================
   Destination Sub-Page Styles
   Used by destinations/*/index.html
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────── */
.dest-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
}

.dest-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0);
}

.dest-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--coral);
  opacity: 0.65;
}

.dest-hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  width: 100%;
  color: var(--white);
}

.dest-hero-content .eyebrow {
  color: rgba(255,255,255,0.7);
}

.dest-hero-content h1 {
  font-family: var(--font-display);
  font-weight: normal;
  letter-spacing: 0.01em;
  color: var(--white);
  font-size: clamp(2.9rem, 6vw, 4.5rem);
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .dest-hero { min-height: 180px; }
  .dest-hero-content { padding: 2rem 0; }
  .dest-hero-content h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }
}

/* ── Layout ─────────────────────────────────────────────── */
.dest-body {
  padding: 3rem 0 5rem;
  background: var(--white);
  position: relative;
  z-index: 1;
}

.dest-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .dest-layout {
    grid-template-columns: 1fr;
  }
  .dest-facts {
    position: static;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .dest-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
    align-items: start;
  }
  .dest-facts h3 {
    grid-column: 1 / -1;
  }
  .dest-fact-flag {
    grid-row: 2 / 4;
  }
}

/* ── Quick facts sidebar ────────────────────────────────── */
.dest-facts {
  background: var(--white);
  border: 2px solid var(--coral);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.dest-facts h3 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 3rem;
  letter-spacing: 0.04em;
  color: var(--coral);
  margin-bottom: 1.25rem;
  text-align: center;
}

.dest-facts h3 .epic-emdash {
  font-size: 1.2rem;
  color: var(--ink);
  position: relative;
  top: -1px;
}

.dest-fact-flag {
  margin-bottom: calc(1.25rem + 10px);
  text-align: center;
}

.dest-fact-flag img {
  display: block;
  width: 80%;
  max-width: 250px;
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
}

.dest-fact {
  margin-bottom: 1rem;
}

.dest-fact:last-child {
  margin-bottom: 0;
}

.dest-fact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.2rem;
}

.dest-fact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

/* ── Related posts ──────────────────────────────────────── */
.dest-section {
  margin-bottom: 3.5rem;
}

.dest-section:last-child {
  margin-bottom: 0;
}

.dest-section h2 {
  margin-bottom: 1.5rem;
}

.dest-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .dest-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Post cards in destination grids use shared .post-card from style.css.
   Minor overrides for tighter spacing in destination context: */
.dest-posts-grid .post-card-body { padding: 1.25rem; }
.dest-posts-grid .post-card-tag { font-size: 0.7rem; letter-spacing: 0.18em; }
.dest-posts-grid .post-card-title { font-size: 1rem; margin-bottom: 0.4rem; }
.dest-posts-grid .post-card-excerpt { font-size: 0.85rem; line-height: 1.5; }

/* ── Placeholder sections ───────────────────────────────── */
.dest-placeholder {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  text-align: center;
  position: relative;
}

.dest-placeholder p {
  color: var(--ink-light);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Back link ──────────────────────────────────────────── */
.dest-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
  margin-bottom: 2rem;
}

.dest-back:hover {
  text-decoration: underline;
}

.dest-next {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
  margin-bottom: 2rem;
}

.dest-next:hover {
  text-decoration: underline;
}

/* ── Photo gallery lightbox ────────────────────────────── */
.dest-section [style*="grid-template-columns"] > img {
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.dest-section [style*="grid-template-columns"] > img:hover {
  opacity: 0.85;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-nav[disabled] { opacity: 0.25; pointer-events: none; }

.lightbox-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.1rem; }
}
