:root {
  --ink: #17223a;
  --muted: #5f6b80;
  --line: #e2e7f0;
  --blue: #4285f4;
  --blue-dark: #2f5fc4;
  --green: #34a853;
  --yellow: #fbbc04;
  --red: #ea4335;
  --font-display: "Baloo 2", ui-rounded, "Nunito", sans-serif;
  --font-body: "Nunito", ui-rounded, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 16px;
  --glass: 0 20px 46px -24px rgba(23, 34, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 100% -6%, rgba(66, 133, 244, 0.1), transparent 58%),
    radial-gradient(820px 560px at 0% 104%, rgba(52, 168, 83, 0.08), transparent 58%),
    linear-gradient(180deg, #fbfcff 0%, #f3f6fc 60%, #eef2fa 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
}

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; line-height: 1.05; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Хедър ---------- */
.site-top {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  transition: background 240ms var(--ease-out), border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}

/* Хедърът се "уплътнява" чак когато страницата тръгне — иначе стои прозрачен. */
.site-top.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px -22px rgba(23, 34, 58, 0.5);
}

.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #5b9bff, var(--blue) 60%, var(--blue-dark));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 0 10px 22px -10px rgba(66, 133, 244, 0.8);
}

.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }

.language-switcher { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms var(--ease-out), color 180ms var(--ease-out);
}
.language-switcher a:hover,
.language-switcher a:focus-visible { color: var(--blue-dark); outline: none; }
.language-switcher a:focus-visible { box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.22); }
.language-switcher a.is-active { background: linear-gradient(135deg, #5b9bff, var(--blue)); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 26px; }
.hero-copy { max-width: 52ch; margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.5; }

.live-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.live-stat {
  min-width: 132px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--glass);
}

.live-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  /* смяната на числото се "подпечатва", за да личи че е живо */
  animation: statPop 320ms var(--ease-bounce);
}

.live-stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.live-stat.is-open strong { color: var(--green); }

@keyframes statPop { from { transform: scale(0.82); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }

/* ---------- Explorer ---------- */
.explorer { padding: 10px 0 60px; }

.explorer-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

.only-open {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.only-open:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.16); }
.only-open input { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }

.explorer-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* ---------- Карта ---------- */
.map-wrap {
  position: sticky;
  top: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--glass);
  backdrop-filter: blur(14px);
}

.map-canvas { position: relative; overflow: hidden; border-radius: 18px; background: #eef3fb; }
.map-image { display: block; width: 100%; height: auto; }
.map-pins { position: absolute; inset: 0; }

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b9bff, var(--blue) 60%, var(--blue-dark));
  color: #fff;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(23, 34, 58, 0.55), 0 0 0 3px rgba(255, 255, 255, 0.9);
  transition: transform 220ms var(--ease-bounce), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out);
}

.map-pin:hover,
.map-pin:focus-visible { transform: translate(-50%, -50%) scale(1.18); z-index: 3; outline: none; }

.map-pin.is-active {
  background: linear-gradient(135deg, #46c46f, var(--green));
  box-shadow: 0 10px 22px -6px rgba(52, 168, 83, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.95);
}

/* Град без резултат при текущите филтри се смалява и избледнява,
   вместо да изчезне — така се вижда, че мястото го има, но е празно. */
.map-pin.is-empty {
  background: #b9c3d4;
  box-shadow: 0 4px 10px -4px rgba(23, 34, 58, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%) scale(0.76);
  opacity: 0.75;
}

.map-pin .pin-dot {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  animation: pinPulse 2.4s ease-out infinite;
}

@keyframes pinPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(52, 168, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
}

.map-hint { margin: 12px 4px 2px; color: var(--muted); font-size: 0.85rem; font-weight: 700; text-align: center; }

.map-tooltip {
  position: fixed;
  z-index: 60;
  max-width: 230px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(23, 34, 58, 0.95);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.map-tooltip.is-visible { opacity: 1; transform: translateY(0); }
.map-tooltip b { display: block; font-family: var(--font-display); font-size: 0.98rem; }
.map-tooltip small { display: block; margin-top: 3px; color: #a9c6ff; font-weight: 800; }

/* ---------- Странична колона ---------- */
.field { display: grid; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 0.82rem; font-weight: 800; }

.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.field input:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.16); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }

.chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  transition: transform 180ms var(--ease-bounce), border-color 180ms var(--ease-out), color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.chip:hover { transform: translateY(-2px); border-color: var(--blue); color: var(--blue-dark); }
.chip.is-active { border-color: transparent; background: linear-gradient(135deg, #5b9bff, var(--blue)); color: #fff; }
.chip .chip-count { margin-left: 6px; opacity: 0.72; font-size: 0.8em; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 10px; }
.result-head strong { font-family: var(--font-display); font-size: 1.05rem; }

.link-button {
  border: 0;
  background: none;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.is-hidden { display: none !important; }

/* ---------- Карти на заведения ---------- */
.venue-list { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }

.venue-card {
  position: relative;
  overflow: hidden;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px -20px rgba(23, 34, 58, 0.5);
  cursor: pointer;
  /* Влизането е стъпаловидно (--i се задава от JS), за да се усети
     че списъкът се е пренаредил, а не просто примигнал. */
  animation: cardIn 320ms var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 32ms);
  transition: transform 200ms var(--ease-bounce), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.venue-card:hover { transform: translateY(-3px); border-color: rgba(66, 133, 244, 0.45); box-shadow: 0 18px 34px -22px rgba(23, 34, 58, 0.6); }
.venue-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line); transition: background 200ms var(--ease-out); }
.venue-card.is-open::before { background: var(--green); }
.venue-card.is-featured::before { background: linear-gradient(180deg, var(--yellow), #f0a000); }

@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.venue-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.venue-card h3 { font-size: 1.08rem; font-weight: 800; }
.venue-meta { margin: 3px 0 0; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.venue-copy { margin: 9px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }

.venue-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f4fa;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}
.badge.open { background: rgba(52, 168, 83, 0.14); color: #1e7e39; }
.badge.closed { background: rgba(234, 67, 53, 0.1); color: var(--red); }
.badge.featured { background: rgba(251, 188, 4, 0.2); color: #8a6500; }
.badge.rating { background: rgba(66, 133, 244, 0.12); color: var(--blue-dark); }

.empty-state {
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 900px) {
  .explorer-grid { grid-template-columns: 1fr; }
  .map-wrap { position: static; }
  .venue-list { max-height: none; }
  .explorer-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Близо до мен ---------- */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.near-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 180ms var(--ease-bounce), border-color 180ms var(--ease-out), background 180ms var(--ease-out), color 180ms var(--ease-out);
}
.near-me:hover { transform: translateY(-2px); border-color: var(--blue); }
.near-me.is-active { border-color: transparent; background: linear-gradient(135deg, #5b9bff, var(--blue)); color: #fff; }
.near-me[aria-busy="true"] .near-icon { animation: spin 900ms linear infinite; }
.near-icon { font-size: 1.05rem; line-height: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.near-status { margin: 0 2px 10px; min-height: 18px; color: var(--muted); font-size: 0.84rem; font-weight: 700; }
.near-status.is-error { color: var(--red); }

/* Картата вече е бутон — трябва да изглежда като карта, не като бутон. */
.venue-card {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}
.venue-card:focus-visible { outline: 3px solid rgba(66, 133, 244, 0.4); outline-offset: 2px; }

.badge.schedule { background: rgba(251, 188, 4, 0.18); color: #8a6500; }

/* ---------- Профил на заведението ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(23, 34, 58, 0.34);
  backdrop-filter: blur(2px);
}

.venue-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  width: min(420px, 100%);
  padding: 22px;
  overflow-y: auto;
  border-left: 4px solid var(--line);
  background: #fff;
  box-shadow: -26px 0 60px -34px rgba(23, 34, 58, 0.6);
  transform: translateX(100%);
  transition: transform 240ms var(--ease-out);
}
.venue-sheet.is-visible { transform: translateX(0); }
.venue-sheet.is-open { border-left-color: var(--green); }

.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }

.sheet-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.sheet-close:hover { border-color: var(--red); color: var(--red); }

.sheet-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sheet-note { color: var(--muted); font-size: 0.88rem; font-weight: 800; }

.sheet-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 18px; }

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 180ms var(--ease-bounce), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.action-button:hover { transform: translateY(-2px); border-color: var(--blue); }
.action-button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #5b9bff, var(--blue) 60%, var(--blue-dark));
  color: #fff;
  box-shadow: 0 14px 28px -14px rgba(66, 133, 244, 0.9);
}

.sheet-hours { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-hours h4 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1rem; font-weight: 800; }

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.hours-row.is-today { background: rgba(66, 133, 244, 0.09); color: var(--ink); }
.hours-row strong { font-weight: 800; }

@media (max-width: 560px) {
  .top-inner { gap: 8px; }
  .brand-name { display: none; }
  .language-switcher { gap: 2px; padding: 3px; }
  .language-switcher a { min-height: 28px; padding: 0 8px; font-size: 0.78rem; }
  .venue-sheet { width: 100%; padding: 18px; }
  .sheet-actions { grid-template-columns: 1fr; }
  .head-actions { width: 100%; }
}
