/* ============================================================
   Vin în Vrancea — Custom CSS
   Cinematic & moody, editorial travel
   ============================================================ */

/* ============================================================
   THEME TOKENS — pure B&W palette (no warm hues)
   "gold"  = primary accent → near-white in dark / near-black in light
   "moss"  = secondary muted gray
   "clay"  = CTA background → flips per theme so text-canvas reads on it
   ============================================================ */
:root,
[data-theme="dark"] {
  --c-base-rgb: 12 18 32;
  --c-elevated-rgb: 22 30 48;
  --c-overlay-rgb: 34 44 66;
  --c-primary-rgb: 240 244 250;
  --c-muted-rgb: 158 168 188;
  --c-gold-rgb: 220 226 240;
  --c-moss-rgb: 145 155 175;
  --c-clay-rgb: 232 238 250;

  --bg-base: rgb(12 18 32);
  --bg-elevated: rgb(22 30 48);
  --bg-overlay: rgb(34 44 66);
  --text-primary: rgb(240 244 250);
  --text-muted: rgb(158 168 188);
  --accent-gold: rgb(220 226 240);
  --accent-moss: rgb(145 155 175);
  --accent-clay: rgb(232 238 250);
  --border-subtle: rgba(220, 226, 240, 0.12);
  --header-bg: rgba(12, 18, 32, 0.88);

  color-scheme: dark;
}

[data-theme="light"] {
  --c-base-rgb: 252 252 252;
  --c-elevated-rgb: 255 255 255;
  --c-overlay-rgb: 238 238 238;
  --c-primary-rgb: 10 10 10;
  --c-muted-rgb: 95 95 95;
  --c-gold-rgb: 20 20 20;
  --c-moss-rgb: 115 115 115;
  --c-clay-rgb: 12 18 32;

  --bg-base: rgb(252 252 252);
  --bg-elevated: rgb(255 255 255);
  --bg-overlay: rgb(238 238 238);
  --text-primary: rgb(10 10 10);
  --text-muted: rgb(95 95 95);
  --accent-gold: rgb(20 20 20);
  --accent-moss: rgb(115 115 115);
  --accent-clay: rgb(12 18 32);
  --border-subtle: rgba(10, 10, 10, 0.14);
  --header-bg: rgba(252, 252, 252, 0.92);

  color-scheme: light;
}

/* ----- Light theme component overrides ----- */
[data-theme="light"] .bg-elevated\/30,
[data-theme="light"] .bg-elevated\/40 {
  background-color: rgb(var(--c-overlay-rgb) / 0.55) !important;
}
[data-theme="light"] .surface {
  box-shadow: 0 1px 0 rgba(24, 30, 24, 0.03);
}
/* Within .on-dark scope, force surface back to dark elevated even in light theme */
.on-dark .surface { background: rgb(26 31 26); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
[data-theme="light"] .ticket-date {
  background: rgba(24, 30, 24, 0.03);
  border-color: rgba(24, 30, 24, 0.16);
}
[data-theme="light"] .site-header.is-scrolled {
  border-bottom-color: rgba(24, 30, 24, 0.12);
  box-shadow: 0 1px 0 rgba(24, 30, 24, 0.04);
}
[data-theme="light"] .pullquote { border-left-color: rgb(152 108 56); }
[data-theme="light"] .chip:hover { color: rgb(24 30 24); border-color: rgba(24, 30, 24, 0.3); }
[data-theme="light"] .filter-toggle:hover {
  background: rgb(var(--c-gold-rgb) / 0.08);
  border-color: rgb(var(--c-gold-rgb) / 0.4);
}
[data-theme="light"] .filter-toggle.is-active {
  background: rgb(var(--c-gold-rgb) / 0.12);
  border-color: var(--accent-gold);
}
[data-theme="light"] .back-to-top {
  background: rgb(255 252 245);
  box-shadow: 0 6px 18px rgba(24, 30, 24, 0.12);
}
[data-theme="light"] .leaflet-control-attribution {
  background: rgb(var(--c-elevated-rgb) / 0.92) !important;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.6;
}

/* Brand mark — the italic "în" sitting between "Vin" and "Vrancea"
   uses a fixed warm honey gold so it pops in both themes. */
.brand-i {
  color: rgb(214 178 110);
  font-style: italic;
  font-weight: 300;
}

::selection { background: var(--accent-gold); color: var(--bg-base); }

.font-serif { font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif; font-feature-settings: "ss01"; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Heading rhythm */
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.tight { letter-spacing: -0.03em; }

/* Variable-axis settings on Fraunces for huge sizes */
.opsz-display { font-variation-settings: "opsz" 144, "SOFT" 50; }
.opsz-title   { font-variation-settings: "opsz" 72,  "SOFT" 40; }

/* ============================================================
   Drop cap
   ============================================================ */
.dropcap::first-letter {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 5.2em;
  line-height: 0.85;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--accent-gold);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* ============================================================
   Editorial link underline
   ============================================================ */
.link-editorial {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: var(--text-primary);
}
.link-editorial::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.link-editorial:hover::after { transform: scaleX(0.4); }

/* ============================================================
   Gradient overlays for full-bleed hero imagery
   ============================================================ */
.overlay-bottom {
  background: linear-gradient(to top,
    rgba(15, 20, 16, 0.95) 0%,
    rgba(15, 20, 16, 0.7) 30%,
    rgba(15, 20, 16, 0.2) 65%,
    rgba(15, 20, 16, 0.05) 100%);
}
.overlay-full {
  background: linear-gradient(to top,
    rgba(15, 20, 16, 0.95) 0%,
    rgba(15, 20, 16, 0.5) 50%,
    rgba(15, 20, 16, 0.65) 100%);
}
.overlay-card {
  background: linear-gradient(to top,
    rgba(15, 20, 16, 0.92) 0%,
    rgba(15, 20, 16, 0.45) 40%,
    rgba(15, 20, 16, 0.0) 75%);
}
.overlay-vignette {
  box-shadow: inset 0 0 200px rgba(0,0,0,0.6);
}

/* ============================================================
   Slow zoom on image hover
   ============================================================ */
.zoom-hover img,
.zoom-hover .zoom-target {
  transition: transform 1200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.zoom-hover:hover img,
.zoom-hover:hover .zoom-target { transform: scale(1.06); }

.ken-burns { animation: kenBurns 18s ease-in-out infinite alternate; }
@keyframes kenBurns {
  0%   { transform: scale(1.0) translate(0,0); }
  100% { transform: scale(1.08) translate(-1%, -1.5%); }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1000ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 1000ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 900ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 90ms; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 270ms; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 360ms; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 450ms; }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 400ms ease, border-color 400ms ease, backdrop-filter 400ms ease;
}
/* Until the user scrolls, the header sits on top of a dark hero image —
   force its tokens to the dark palette so logo/nav/toggle are always cream. */
.site-header:not(.is-scrolled) {
  --c-primary-rgb: 245 241 232;
  --c-muted-rgb: 200 205 195;
  --c-gold-rgb: 212 165 116;
  --text-primary: rgb(245 241 232);
  --text-muted: rgb(200 205 195);
  --accent-gold: rgb(212 165 116);
  --border-subtle: rgba(255, 255, 255, 0.18);
  color: rgb(245 241 232);
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-link {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  opacity: 0.85;
  padding: 8px 2px;
  transition: opacity 200ms ease;
}
.nav-link:hover { opacity: 1; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.deemph { opacity: 0.5; font-size: 12px; }

/* Active page: persistent gold underline + full opacity */
.nav-link.text-gold,
.site-header .nav-link.text-gold {
  opacity: 1;
  color: var(--accent-gold);
  font-weight: 500;
}
.nav-link.text-gold::after { transform: scaleX(1); }

/* Mega-menu */
.has-mega { position: relative; }
/* Invisible bridge so mouse can cross the gap from trigger → dropdown
   without losing hover (the previous 18px gap killed the hover state). */
.has-mega::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -16px;
  right: -16px;
  height: 30px;
  z-index: 49;
}
.mega {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(880px, 92vw);
  background: rgb(var(--c-elevated-rgb) / 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ============================================================
   CTA pill
   ============================================================ */
.btn-clay {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-clay);
  color: rgb(var(--c-base-rgb));
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: background 200ms ease, transform 200ms ease, opacity 200ms ease;
}
.btn-clay:hover {
  background: var(--accent-clay);
  color: rgb(var(--c-base-rgb));
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(245, 241, 232, 0.4);
  color: var(--text-primary);
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: border-color 200ms ease, background 200ms ease;
}
.btn-outline:hover { border-color: var(--accent-gold); background: rgb(var(--c-gold-rgb) / 0.08); }

/* ============================================================
   Eyebrow label
   ============================================================ */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 500;
}

.divider-mark {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.divider-mark::before, .divider-mark::after {
  content: '';
  flex: 1; height: 1px; min-width: 36px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
  opacity: 0.5;
}

/* ============================================================
   Ticket-style date
   ============================================================ */
.ticket-date {
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--border-subtle);
  background: rgb(var(--c-primary-rgb) / 0.04);
  padding: 14px 18px;
  min-width: 88px;
}
.ticket-date .day {
  font-family: 'Fraunces', serif;
  font-size: 40px; line-height: 1;
  font-weight: 400;
  color: var(--text-primary);
  font-variation-settings: "opsz" 72;
}
.ticket-date .month {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  margin-top: 6px;
  color: var(--accent-gold);
}

/* ============================================================
   Chips / filter pills
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  min-height: 40px;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.chip:hover { color: var(--text-primary); border-color: rgba(245, 241, 232, 0.25); }
.chip.is-active {
  color: rgb(var(--c-base-rgb));
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* ============================================================
   Card hover surface
   ============================================================ */
.surface { background: var(--bg-elevated); border: 1px solid var(--border-subtle); }
.surface-hover { transition: border-color 300ms ease, background 300ms ease; }
.surface-hover:hover { border-color: rgba(212, 165, 116, 0.35); background: var(--bg-overlay); }

/* ============================================================
   Topo texture (used in hero and map background)
   ============================================================ */
.topo-bg {
  background-image:
    radial-gradient(circle at 20% 30%, rgb(var(--c-gold-rgb) / 0.05), transparent 50%),
    radial-gradient(circle at 80% 70%, rgb(var(--c-moss-rgb) / 0.06), transparent 50%);
}

/* ============================================================
   Mobile drawer
   ============================================================ */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgb(var(--c-base-rgb) / 0.98);
  backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none;
  transition: opacity 400ms ease;
}
.mobile-drawer.is-open { opacity: 1; pointer-events: auto; }
.mobile-drawer .drawer-item {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 300;
  color: var(--text-primary);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: block;
  letter-spacing: -0.01em;
}
.mobile-drawer .drawer-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  margin: 24px 24px 0;
  background: var(--accent-clay);
  color: rgb(245 241 232);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  justify-content: center;
}

/* ============================================================
   Mobile polish — touch targets, safe areas
   ============================================================ */
@media (max-width: 767px) {
  .nav-link { font-size: 14px; padding: 12px 0; }
  .theme-toggle { width: 44px; height: 44px; }
  .back-to-top { width: 48px; height: 48px; bottom: max(20px, env(safe-area-inset-bottom)); right: 16px; }
  .ticket-date { min-width: 76px; padding: 12px 14px; }
  .ticket-date .day { font-size: 32px; }
  .dropcap::first-letter { font-size: 4.4em; }
  .pullquote { padding-left: 20px; font-size: 20px; }
  .mega { display: none; }
  /* Soften hero overlays slightly on mobile so dark images still feel cinematic */
  .overlay-full { background: linear-gradient(to top, rgba(15,20,16,0.98) 0%, rgba(15,20,16,0.6) 50%, rgba(15,20,16,0.7) 100%); }
  /* Newsletter inputs scaled up to >=44px tap height */
  input[type="email"] { font-size: 16px; min-height: 44px; }
  /* Avoid horizontal scroll from hard-coded widths */
  .max-w-\[1440px\], .max-w-\[1280px\] { max-width: 100% !important; }
}

/* ============================================================
   Pull quote
   ============================================================ */
.pullquote {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.35;
  color: var(--text-primary);
  border-left: 1px solid var(--accent-gold);
  padding: 8px 0 8px 28px;
  margin: 28px 0;
}

/* ============================================================
   Map pin pulse
   ============================================================ */
@keyframes pinPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0;   }
}
.pin-pulse {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  animation: pinPulse 2.4s ease-out infinite;
}

/* ============================================================
   Scrollable horizontal gallery
   ============================================================ */
.scroll-x {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,165,116,0.3) transparent;
}
.scroll-x > * { scroll-snap-align: start; flex: 0 0 auto; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: rgba(212,165,116,0.3); border-radius: 3px; }

/* ============================================================
   Focus ring
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

/* ============================================================
   Skip link
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 12px;
  background: var(--accent-gold);
  color: var(--bg-base);
  padding: 10px 16px;
  z-index: 100;
  font-size: 13px;
  font-weight: 600;
  transition: top 200ms ease;
}
.skip-link:focus { top: 12px; }

/* ============================================================
   Section number marker (editorial)
   ============================================================ */
.section-number {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  font-variation-settings: "opsz" 36;
}

/* ============================================================
   Footer
   ============================================================ */
footer .col-title {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 18px;
}
footer a { color: var(--text-muted); transition: color 200ms ease; }
footer a:hover { color: var(--text-primary); }

/* ============================================================
   Theme toggle button
   ============================================================ */

/* Always-dark scope — for hero sections, event hero cards, mega-menu thumbnails:
   anything that sits on dark imagery or wants the cinematic dark palette
   regardless of the global theme. Locks ALL theme tokens to the dark palette. */
.on-dark {
  --c-base-rgb: 12 18 32;
  --c-elevated-rgb: 22 30 48;
  --c-overlay-rgb: 34 44 66;
  --c-primary-rgb: 240 244 250;
  --c-muted-rgb: 180 188 205;
  --c-gold-rgb: 220 226 240;
  --c-moss-rgb: 160 170 188;
  --c-clay-rgb: 232 238 250;
  --bg-base: rgb(12 18 32);
  --bg-elevated: rgb(22 30 48);
  --bg-overlay: rgb(34 44 66);
  --text-primary: rgb(240 244 250);
  --text-muted: rgb(180 188 205);
  --accent-gold: rgb(220 226 240);
  --accent-moss: rgb(160 170 188);
  --accent-clay: rgb(232 238 250);
  --border-subtle: rgba(220, 226, 240, 0.18);
  color: rgb(240 244 250);
}

/* Mega-menu sits on its own backdrop (not on hero image), so it should follow
   the GLOBAL theme tokens even though it lives inside the dark-locked header. */
[data-theme="light"] .mega {
  --c-base-rgb: 248 244 234;
  --c-elevated-rgb: 255 252 245;
  --c-overlay-rgb: 232 222 200;
  --c-primary-rgb: 24 30 24;
  --c-muted-rgb: 95 105 92;
  --c-gold-rgb: 152 108 56;
  --c-moss-rgb: 78 94 64;
  --c-clay-rgb: 158 58 38;
  --bg-base: rgb(248 244 234);
  --bg-elevated: rgb(255 252 245);
  --bg-overlay: rgb(232 222 200);
  --text-primary: rgb(24 30 24);
  --text-muted: rgb(95 105 92);
  --accent-gold: rgb(152 108 56);
  --border-subtle: rgba(24, 30, 24, 0.14);
  color: rgb(24 30 24);
}
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.theme-toggle:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.theme-toggle svg { width: 14px; height: 14px; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun  { display: none; }

/* ============================================================
   Floating map CTA — hide when footer enters viewport
   ============================================================ */
.float-map {
  transition: opacity 320ms ease, transform 320ms ease, background 200ms ease;
}
.float-map.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

/* ============================================================
   Back to top button
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 39;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-gold);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease, border-color 200ms ease, background 200ms ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent-gold); background: var(--bg-overlay); }
.back-to-top svg { width: 16px; height: 16px; }
@media (min-width: 768px) {
  .back-to-top { bottom: 32px; right: 32px; }
}

/* On pages with the floating "Vezi pe hartă" CTA, stack back-to-top ABOVE it
   so they don't overlap in the bottom-right corner. */
body:has(.float-map) .back-to-top { bottom: 96px; }
@media (min-width: 768px) {
  body:has(.float-map) .back-to-top { bottom: 100px; }
}

/* ============================================================
   Leaflet map overrides — match brand
   ============================================================ */
.leaflet-container {
  background: var(--bg-base) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  isolation: isolate;
  z-index: 0;
}

/* Mini-map preview (index.html) — contain stacking so Leaflet's internal
   z-index 200–700 panes don't punch through the fixed header (z-50). */
#miniMap {
  isolation: isolate;
  z-index: 0;
}
.leaflet-control-attribution {
  background: rgb(var(--c-base-rgb) / 0.85) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
  border-top: 1px solid var(--border-subtle) !important;
  border-left: 1px solid var(--border-subtle) !important;
  padding: 3px 8px !important;
  backdrop-filter: blur(8px);
}
.leaflet-control-attribution a { color: var(--accent-gold) !important; }
.leaflet-control-zoom a {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 0 !important;
  font-weight: 300 !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 34px !important;
  font-size: 18px !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg-overlay) !important;
  color: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
}
.leaflet-control-zoom a:first-child { border-bottom: none !important; }
.leaflet-bar { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important; }

/* Popup */
.leaflet-popup-content-wrapper {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 0 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 280px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}
.leaflet-popup-tip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}
.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 18px !important;
  padding: 8px 10px !important;
  font-weight: 300 !important;
}
.leaflet-popup-close-button:hover { color: var(--accent-gold) !important; }

/* Custom map markers */
.vrancea-pin {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 0 4px rgb(var(--c-base-rgb) / 0.6);
  position: relative;
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 200ms ease;
}
.vrancea-pin:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 0 4px rgb(var(--c-gold-rgb) / 0.2);
  z-index: 1000;
}
.vrancea-pin svg { width: 22px; height: 22px; fill: none; stroke-width: 1.5; }
.vrancea-pin.cat-natura { border-color: var(--accent-moss); }
.vrancea-pin.cat-natura svg { stroke: var(--accent-moss); }
.vrancea-pin.cat-cascada { border-color: rgb(120 170 200); }
.vrancea-pin.cat-cascada svg { stroke: rgb(120 170 200); }
.vrancea-pin.cat-crama { background: rgb(var(--c-gold-rgb) / 0.18); border-color: var(--accent-gold); }
.vrancea-pin.cat-crama svg { stroke: var(--accent-gold); }
.vrancea-pin.cat-eveniment { border-color: var(--accent-clay); }
.vrancea-pin.cat-eveniment svg { stroke: var(--accent-clay); }
.vrancea-pin.cat-patrimoniu svg { stroke: var(--accent-gold); }
.vrancea-pin.cat-religios { border-color: var(--text-primary); }
.vrancea-pin.cat-religios svg { stroke: var(--text-primary); }
.vrancea-pin.cat-muzeu { background: rgb(var(--c-primary-rgb) / 0.08); }
.vrancea-pin.cat-muzeu svg { stroke: var(--text-primary); }

.vrancea-pin .pin-pulse-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0;
  pointer-events: none;
}
.vrancea-pin.is-featured .pin-pulse-ring { animation: pinPulseRing 2.4s ease-out infinite; }
@keyframes pinPulseRing {
  0%   { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* City label (no pin) */
.vrancea-city-label {
  background: transparent;
  border: none;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--text-primary);
  text-shadow: 0 0 12px rgb(var(--c-base-rgb)), 0 0 4px rgb(var(--c-base-rgb));
  white-space: nowrap;
  pointer-events: none;
}
[data-theme="light"] .vrancea-city-label {
  text-shadow: 0 0 12px rgb(var(--c-base-rgb)), 0 0 4px rgb(var(--c-base-rgb)), 0 1px 2px rgba(255,255,255,0.8);
}

/* Popup inner styling */
.popup-card { padding: 0; }
.popup-card .popup-img {
  width: 100%; height: 140px; object-fit: cover; display: block;
}
.popup-card .popup-body { padding: 14px 16px; }
.popup-card .popup-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}
.popup-card .popup-title {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.popup-card .popup-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.popup-card .popup-cta {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  text-decoration: none;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}
.popup-card .popup-cta:hover { color: var(--text-primary); }

/* Tile filter — keep tiles visually integrated */
[data-theme="dark"] .leaflet-tile-pane { filter: saturate(0.7) brightness(0.95); }
[data-theme="light"] .leaflet-tile-pane { filter: saturate(0.85) brightness(1.02); }
