/* ═══════════════════════════════════════════════════════════
   BackpackWithUs — Compactness overrides + Lightbox
   Add-on to the original style. Loaded last so it overrides.
   ═══════════════════════════════════════════════════════════ */

/* ── COMPACTNESS: smaller paddings & gaps everywhere ─────── */

/* Section spacing — was 100px, now 40px (60% smaller) */
.section            { padding: 40px 5vw !important; }
.hero               { padding: 24px 5vw 18px !important; min-height: 0 !important; }
.next               { padding: 36px 5vw !important; }
.footer             { padding: 36px 5vw 22px !important; }

/* Hero text titles - MUCH smaller. Cap at 56px instead of 110px. */
.hero-title         { font-size: clamp(32px, 5vw, 56px) !important; line-height: 1.05 !important; margin-bottom: 0 !important; }
.hero-title br      { display: none !important; }
.hero-sub           { margin-top: 12px !important; font-size: clamp(14px, 1.1vw, 16px) !important; max-width: 640px !important; }
.hero-cta           { margin-top: 18px !important; }
.hero-tag           { margin-bottom: 12px !important; font-size: 11px !important; }
.hero-tag-pill      { font-size: 10px !important; padding: 3px 9px !important; }

/* Hero photo banner — much shorter */
.hero-photo         { height: clamp(220px, 36vh, 380px) !important; margin-top: 12px !important; border-radius: 16px !important; }
.hero-photo-content { padding: 20px 24px !important; }
.hero-photo-title   { font-size: clamp(40px, 6.5vw, 90px) !important; }
.hero-photo-meta    { margin-top: 10px !important; gap: 14px !important; font-size: 12px !important; }
.hero-photo-meta span + span::before { margin-right: 14px !important; }

/* Stats panel — much tighter */
.stats              { margin: 28px 5vw 0 !important; padding: 24px 28px !important; border-radius: 16px !important; }
.stat               { padding-right: 20px !important; }
.stat-num           { font-size: clamp(28px, 3.8vw, 48px) !important; margin-bottom: 4px !important; }
.stat-label         { font-size: 11px !important; }

/* Section headers - tighter */
.section-head       { margin-bottom: 22px !important; }
.section-title      { font-size: clamp(22px, 3vw, 36px) !important; }
.section-eyebrow    { margin-bottom: 8px !important; font-size: 12px !important; }

/* Continent cards — much shorter */
.continent-grid     { grid-template-rows: 200px 200px !important; gap: 10px !important; }
.continent          { border-radius: 14px !important; }
.continent-inner    { padding: 18px !important; }
.continent-name     { font-size: clamp(22px, 2.6vw, 36px) !important; margin-bottom: 8px !important; }
.continent-info     { font-size: 12px !important; }

/* Country cards — much denser */
.country-grid       { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; gap: 10px !important; }
.country-card       { padding: 14px 16px !important; border-radius: 10px !important; }
.country-card-name  { font-size: 17px !important; margin-bottom: 2px !important; }
.country-card-dates { font-size: 11px !important; margin-bottom: 8px !important; }
.country-card-foot  { padding-top: 8px !important; font-size: 10px !important; }
.country-card-arrow { width: 22px !important; height: 22px !important; font-size: 12px !important; }
.country-card-num   { font-size: 11px !important; }

/* Photo gallery — 6 columns instead of 4, tiny gap */
.gallery-grid       { grid-template-columns: repeat(6, 1fr) !important; gap: 6px !important; }
.photo              { border-radius: 8px !important; aspect-ratio: 4/3 !important; }
.photo-overlay      { padding: 10px !important; }
.photo-title        { font-size: 13px !important; line-height: 1.15 !important; }
.photo-loc          { font-size: 10px !important; margin-bottom: 2px !important; }
.photo-date         { font-size: 10px !important; }

/* Place cards */
.places-grid        { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 10px !important; }
.place              { padding: 14px 16px !important; gap: 8px !important; border-radius: 10px !important; }
.place-name         { font-size: 17px !important; }
.place-desc         { font-size: 13px !important; line-height: 1.5 !important; }
.place-tags         { padding-top: 8px !important; }

/* Quick facts row */
.facts-grid         { border-radius: 12px !important; }
.fact               { padding: 14px 14px !important; }
.fact-value         { font-size: 16px !important; }
.fact-label         { font-size: 10px !important; margin-bottom: 4px !important; }

/* Intro grid — text + photo */
.intro              { gap: 32px !important; }
.intro-title        { font-size: clamp(22px, 2.6vw, 32px) !important; margin-bottom: 14px !important; }
.intro-body         { font-size: 14px !important; line-height: 1.55 !important; }
.intro-body p       { margin-bottom: 12px !important; }
.intro-quote        { padding: 14px 18px !important; font-size: 15px !important; margin-top: 18px !important; border-radius: 0 10px 10px 0 !important; }
.intro-photo        { border-radius: 12px !important; }

/* Diary entries - much tighter */
.diary-entry        { padding: 14px 0 !important; gap: 20px !important; grid-template-columns: 110px 1fr auto !important; }
.diary-title        { font-size: 16px !important; }
.diary-date         { font-size: 11px !important; }

/* Crumb / breadcrumb */
.crumb              { padding: 16px 5vw 0 !important; font-size: 12px !important; }

/* Buttons - smaller */
.btn                { padding: 10px 18px !important; font-size: 13px !important; border-radius: 8px !important; }

/* Nav - slightly smaller */
.nav                { padding: 14px 5vw !important; }

/* Footer */
.foot-top           { gap: 24px !important; margin-bottom: 32px !important; }
.foot-brand         { font-size: 22px !important; }
.foot-tag           { font-size: 13px !important; margin-top: 12px !important; }
.foot-col h4        { margin-bottom: 12px !important; }
.foot-col li        { margin-bottom: 6px !important; }
.foot-col a         { font-size: 13px !important; }
.foot-bottom        { padding-top: 22px !important; font-size: 12px !important; }

/* "Next" section - smaller heading */
.next-title         { font-size: clamp(28px, 4.5vw, 56px) !important; }

/* ── RESPONSIVE COMPACTNESS for mobile ─────────────────────── */
@media (max-width: 900px) {
  .section          { padding: 28px 5vw !important; }
  .hero             { padding: 24px 5vw 18px !important; }
  .gallery-grid     { grid-template-columns: repeat(3, 1fr) !important; }
  .country-grid     { grid-template-columns: repeat(2, 1fr) !important; }
  .stats            { padding: 20px 16px !important; }
}
@media (max-width: 600px) {
  .gallery-grid     { grid-template-columns: repeat(2, 1fr) !important; }
  .country-grid     { grid-template-columns: 1fr !important; }
}

/* ── LIGHTBOX OVERLAY ──────────────────────────────────────── */

.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 12, 24, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center; justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lb-overlay.is-open { display: flex; opacity: 1; }

.lb-img-wrap {
  max-width: 92vw;
  max-height: 86vh;
  position: relative;
  cursor: default;
  display: flex; align-items: center; justify-content: center;
}
.lb-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  background: #111;
  transform: scale(0.96);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lb-img.is-loaded { opacity: 1; transform: scale(1); }

.lb-caption {
  position: absolute;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(10, 15, 30, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis;
}
.lb-caption-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 10px;
}

.lb-btn {
  position: absolute;
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: all 0.2s;
  font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}
.lb-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); transform: scale(1.05); }
.lb-btn:active { transform: scale(0.96); }
.lb-btn[disabled] { opacity: 0.25; cursor: not-allowed; }
.lb-btn[disabled]:hover { background: rgba(255,255,255,0.08); transform: none; }

.lb-close { top: 20px; right: 20px; }
.lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.05); }

.lb-loading {
  position: absolute;
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: lb-spin 0.8s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.lb-loading.is-visible { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* Make all photos visibly clickable */
.photo, .intro-photo, .hero-photo {
  cursor: zoom-in;
}

/* Hide lightbox controls on small screens */
@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 18px; }
  .lb-close { width: 40px; height: 40px; top: 14px; right: 14px; }
  .lb-caption { font-size: 12px; bottom: 14px; }
}
/* ═══════════════════════════════════════════════════════════
   Practical dropdown menu — addition to nav
   Loaded by gallery-extras.css; uses same design tokens.
   ═══════════════════════════════════════════════════════════ */

/* Make the nav-links container allow dropdown positioning */
.nav-links { position: relative; }

.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown-trigger {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-trigger::after {
  content: "▾";
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.nav-dropdown.is-open .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(10, 26, 53, 0.12);
  display: none;
  z-index: 9999;
}
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
  animation: nd-fade-in 0.18s ease;
}
@keyframes nd-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Override the default .nav-links a styling for items inside the dropdown menu */
.nav-dropdown-menu a {
  display: block !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: var(--ink-soft) !important;
  background: transparent !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
}
.nav-dropdown-menu a:hover {
  background: var(--sky-soft) !important;
  color: var(--blue) !important;
}
.nav-dropdown-menu a.active {
  background: var(--sky-soft) !important;
  color: var(--blue) !important;
}
.nav-dropdown-menu a.menu-divider {
  margin-top: 4px;
  padding-top: 12px !important;
  border-top: 1px solid var(--line-soft) !important;
}

/* On small screens, dropdown opens flush to right edge */
@media (max-width: 700px) {
  .nav-dropdown-menu {
    right: -10px;
    min-width: 180px;
  }
}
