@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* ==========================================================================
   Eco-Rank — system wizualny wg makiet (makiety/5)
   Akcent akcji: indigo. Znak marki: emerald. Podłoże: slate.
   ========================================================================== */

:root {
  --indigo: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-700: #4338ca;
  --indigo-soft: #eef2ff;
  --emerald: #10b981;
  --emerald-600: #059669;
  --emerald-soft: #ecfdf5;

  --canvas: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-sunk: #f1f5f9;
  --ink: #000000;
  --ink-soft: #64748b;
  --ink-faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;

  --amber-bg: #fef3c7;
  --amber-ink: #92400e;
  --danger: #b91c1c;

  --shadow-soft: 0 4px 25px -2px rgb(0 0 0 / 4%);
  --shadow-card: 0 10px 30px -8px rgb(15 23 42 / 8%);
  --shadow-floating: 0 20px 40px -10px rgb(79 70 229 / 15%);
  --shadow-xl: 0 22px 50px -12px rgb(15 23 42 / 14%);

  --radius-xs: 12px;
  --radius-sm: 1rem;
  --radius: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 2.5rem;

  --sidebar: 300px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --indigo: #6366f1;
  --indigo-500: #818cf8;
  --indigo-700: #4f46e5;
  --indigo-soft: rgb(99 102 241 / 14%);
  --emerald: #34d399;
  --emerald-600: #10b981;
  --emerald-soft: rgb(16 185 129 / 14%);

  --canvas: #0b1121;
  --surface: #1e293b;
  --surface-2: #151f32;
  --surface-sunk: #0f172a;
  --ink: #ffffff;
  --ink-soft: #94a3b8;
  --ink-faint: #64748b;
  --line: #334155;
  --line-soft: #1e293b;

  --amber-bg: rgb(217 119 6 / 22%);
  --amber-ink: #fcd34d;
  --danger: #fca5a5;

  --shadow-soft: 0 4px 25px -2px rgb(0 0 0 / 20%);
  --shadow-card: 0 10px 30px -8px rgb(0 0 0 / 35%);
  --shadow-floating: 0 20px 40px -10px rgb(79 70 229 / 30%);
  --shadow-xl: 0 22px 50px -12px rgb(0 0 0 / 45%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; transition: font-size .3s ease; }
html.text-large { font-size: 18px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; display: block; }

.icon { width: 24px; height: 24px; flex-shrink: 0; }

h1, h2, h3, h4 { margin-top: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.5rem); font-weight: 900; line-height: 1.04; letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 900; line-height: 1.12; }
h3 { font-size: 1.35rem; font-weight: 800; line-height: 1.25; }
p { margin-top: 0; }
strong { font-weight: 800; }

::selection { background: var(--indigo); color: #fff; }
:focus-visible { outline: 3px solid var(--indigo-500); outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background-color: #475569; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 12px 18px; border-radius: var(--radius-xs); background: var(--indigo); color: #fff; font-weight: 800; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* --- Dekoracje tła (WOW factor z makiety 5) ------------------------------ */
.page-glow {
  position: fixed; z-index: 0; top: 0; left: 0; width: 100%; height: 700px;
  background: linear-gradient(to bottom, rgb(224 231 255 / 50%), rgb(248 250 252 / 10%), transparent);
  pointer-events: none;
}
html[data-theme="dark"] .page-glow { background: linear-gradient(to bottom, rgb(49 46 129 / 18%), rgb(11 17 33 / 10%), transparent); }
.page-watermark {
  position: fixed; z-index: 0; right: -70px; bottom: -110px; width: 620px; height: 620px;
  color: #0f172a; opacity: .022; pointer-events: none;
}
html[data-theme="dark"] .page-watermark { color: #fff; opacity: .015; }
.page-watermark svg { width: 100%; height: 100%; }

/* --- Sidebar ------------------------------------------------------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar);
  display: flex; flex-direction: column; gap: 26px; padding: 32px 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
html[data-theme="dark"] .sidebar { background: color-mix(in srgb, #0b1121 80%, transparent); border-right-color: rgb(30 41 59 / 60%); }

.sidebar-tools { display: flex; gap: 12px; }
.icon-button {
  flex: 1; display: grid; place-items: center; min-height: 48px; padding: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); color: var(--ink);
  font-size: 1.05rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
  transition: border-color .2s, color .2s, background .2s;
}
html[data-theme="dark"] .icon-button { background: rgb(15 23 42 / 50%); }
.icon-button:hover { border-color: var(--indigo); color: var(--indigo); }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { opacity: .82; }
.brand img { display: block; }
.brand span { display: flex; flex-direction: column; }
.brand strong { font-size: 1.5rem; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.brand small { margin-top: 6px; color: var(--emerald-600); font-size: .69rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
html[data-theme="dark"] .brand small { color: var(--emerald); }

.main-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.main-nav a {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  color: #475569; font-size: 1.05rem; font-weight: 700; text-decoration: none;
  transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
html[data-theme="dark"] .main-nav a { color: #94a3b8; }
.main-nav a svg { width: 24px; height: 24px; flex-shrink: 0; }
.main-nav a:hover:not([aria-current="page"]) {
  background: var(--indigo); color: #fff;
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgb(79 70 229 / 20%);
}
.main-nav a[aria-current="page"] {
  background: var(--indigo-500); color: #fff;
  box-shadow: 0 4px 15px rgb(99 102 241 / 35%);
}

.sidebar-note {
  margin-top: auto; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, var(--indigo-soft), var(--surface));
}
.sidebar-note p { margin: 8px 0 0; color: var(--ink-soft); font-size: .85rem; }
.minor-nav { display: flex; flex-wrap: wrap; gap: 14px; }
.minor-nav a { color: var(--ink-faint); font-size: .78rem; font-weight: 600; text-decoration: none; }
.minor-nav a:hover { color: var(--indigo); }

.mobile-header { display: none; }

/* --- Powłoka strony ------------------------------------------------------ */
.page-shell {
  position: relative; z-index: 10;
  min-height: 100vh; margin-left: var(--sidebar);
  padding: 48px clamp(28px, 5vw, 80px) 24px;
}
.page-shell > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* --- Prymitywy ----------------------------------------------------------- */
.eyebrow { display: block; color: var(--ink-faint); font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.lead { color: var(--ink-soft); font-size: clamp(1.05rem, 2vw, 1.22rem); font-weight: 500; line-height: 1.65; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 900; text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--indigo); color: #fff; }
.button-primary:hover { background: var(--indigo-700); box-shadow: 0 12px 24px -8px rgb(79 70 229 / 55%); }
html[data-theme="dark"] .button-primary:hover { background: var(--indigo-500); }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-secondary:hover { border-color: var(--indigo); color: var(--indigo); box-shadow: var(--shadow-soft); }
.button-large { min-height: 62px; padding-inline: 34px; font-size: 1.1rem; }

.text-link { color: var(--indigo); font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: .22em; }

.badge { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: var(--emerald-soft); color: var(--emerald-600); font-size: .7rem; font-weight: 800; }
html[data-theme="dark"] .badge { color: var(--emerald); }
.badge-demo { background: var(--amber-bg); color: var(--amber-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: .76rem; font-weight: 600; }
html[data-theme="dark"] .tags span { background: var(--surface-sunk); }
.tags-large span { padding: 9px 16px; font-size: .92rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 35%; gap: clamp(30px, 4vw, 56px); align-items: center; margin-bottom: 30px; }
.hero h1 { max-width: 15ch; margin: 18px 0 22px; }
.hero h1 em { color: var(--indigo); font-style: normal; }
.hero .lead { max-width: 60ch; }

.hero-search {
  display: flex; align-items: center; gap: 4px; margin-top: 30px; padding: 12px;
  border: 1px solid var(--surface); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  transition: border-color .2s, box-shadow .2s;
}
html[data-theme="dark"] .hero-search { border-color: rgb(51 65 85 / 50%); }
.hero-search:focus-within { border-color: var(--indigo); box-shadow: var(--shadow-xl), 0 0 0 4px rgb(99 102 241 / 20%); }
.hero-search > svg { flex-shrink: 0; width: 30px; height: 30px; margin: 0 14px 0 18px; color: var(--indigo-500); }
.hero-search input {
  flex: 1; min-width: 100px; padding: 16px 8px;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 1.35rem; font-weight: 700;
}
.hero-search input::placeholder { color: var(--ink-faint); font-weight: 600; }
.hero-search .button { min-height: 62px; padding-inline: 34px; border-radius: var(--radius); font-size: 1.1rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 22px; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }

.hero-visual { position: relative; animation: heroFloat 8s ease-in-out infinite; }
.hero-visual::before {
  content: ""; position: absolute; inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgb(99 102 241 / 22%), transparent 65%),
              radial-gradient(circle at 70% 70%, rgb(16 185 129 / 22%), transparent 62%);
  filter: blur(38px);
}
.hero-visual img { position: relative; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.floating-stat {
  position: absolute; right: -14px; bottom: 6%; z-index: 2;
  display: flex; flex-direction: column;
  padding: 16px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-card);
}
.floating-stat strong { color: var(--indigo); font-size: 1.05rem; }
.floating-stat span { color: var(--ink-soft); font-size: .8rem; font-weight: 600; }

/* --- Sekcje -------------------------------------------------------------- */
.section-block { margin-top: 72px; }
.section-block.compact { margin-top: 44px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.section-heading h2 { margin: 8px 0 0; }
.section-label { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.section-label h2 { margin: 0; font-size: .85rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.section-label > span { color: var(--ink-faint); font-size: .88rem; font-weight: 700; }

/* --- Karty kategorii ----------------------------------------------------- */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.category-card {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: center;
  padding: 28px; border: 1px solid var(--surface); border-radius: var(--radius-lg);
  background: linear-gradient(to bottom right, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft); text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
html[data-theme="dark"] .category-card { border-color: rgb(51 65 85 / 50%); }
.category-card:hover { transform: translateY(-4px); border-color: var(--indigo); box-shadow: var(--shadow-floating); }
.category-card > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.category-card strong { font-size: 1.45rem; font-weight: 900; letter-spacing: -.03em; transition: color .2s; }
.category-card:hover strong { color: var(--indigo); }
.category-card small { margin-top: 4px; color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.category-card > span:last-child { color: var(--ink-faint); font-size: 1.1rem; }

.category-icon {
  display: grid; place-items: center; width: 80px; height: 80px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--indigo);
  box-shadow: 0 1px 3px rgb(0 0 0 / 4%);
  transition: transform .25s, background .25s;
}
html[data-theme="dark"] .category-icon { background: var(--surface-sunk); border-color: rgb(30 41 59 / 80%); }
.category-card:hover .category-icon { transform: scale(1.08); background: var(--indigo-soft); }
.category-icon svg { width: 40px; height: 40px; }

/* --- Skróty (szybki dostęp do mapy) -------------------------------------- */
.shortcut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shortcut-card {
  display: flex; align-items: center; gap: 20px; padding: 22px 24px;
  border: 1px solid var(--surface); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  box-shadow: var(--shadow-soft); text-decoration: none;
  backdrop-filter: blur(6px);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
html[data-theme="dark"] .shortcut-card { border-color: rgb(51 65 85 / 50%); background: rgb(30 41 59 / 60%); }
.shortcut-card:hover { border-color: var(--indigo); background: var(--surface); box-shadow: var(--shadow-floating); transform: translateY(-3px); }
.shortcut-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--indigo);
  transition: transform .2s;
}
html[data-theme="dark"] .shortcut-icon { background: var(--surface-sunk); border-color: rgb(30 41 59 / 80%); }
.shortcut-card:hover .shortcut-icon { transform: scale(1.1); }
.shortcut-icon svg { width: 24px; height: 24px; }
.shortcut-card strong { font-size: 1.2rem; font-weight: 900; letter-spacing: -.02em; transition: color .2s; }
.shortcut-card:hover strong { color: var(--indigo); }

/* --- Callout „jak to działa” --------------------------------------------- */
.split-callout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  padding: clamp(30px, 5vw, 60px); border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #312e81, var(--indigo)); color: #fff;
}
.split-callout .eyebrow { color: #a5b4fc; }
.split-callout h2 { margin-top: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps li > span { flex: 0 0 36px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--emerald); color: #062b22; font-weight: 900; }
.steps strong { font-size: 1.1rem; }
.steps p { margin: 3px 0 0; color: rgb(255 255 255 / 72%); }

/* --- Karty miejsc -------------------------------------------------------- */
.place-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.place-card {
  display: flex; flex-direction: column; min-height: 290px; padding: 26px;
  border: 1px solid var(--surface); border-radius: var(--radius-lg);
  background: linear-gradient(to bottom right, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
html[data-theme="dark"] .place-card { border-color: rgb(51 65 85 / 50%); }
.place-card:hover { transform: translateY(-4px); border-color: var(--indigo); box-shadow: var(--shadow-floating); }
.place-card-top, .place-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.place-type { color: var(--indigo); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.place-card h3 { margin: 20px 0 10px; font-size: 1.4rem; font-weight: 900; }
.place-card h3 a { text-decoration: none; }
.place-card h3 a:hover { color: var(--indigo); }
.place-card p { color: var(--ink-soft); font-weight: 500; }
.place-meta { margin-top: auto; padding-top: 18px; color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.place-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.place-meta svg { width: 15px; height: 15px; }
.place-meta a { color: var(--indigo); font-weight: 800; text-decoration: none; }
.place-meta a:hover { text-decoration: underline; }

.site-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 96px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .82rem; font-weight: 600; }

/* --- Nagłówek podstrony -------------------------------------------------- */
.page-header { max-width: 860px; margin: 20px 0 40px; }
.page-header h1 { margin: 14px 0 18px; }
.page-header > p { color: var(--ink-soft); font-size: 1.15rem; font-weight: 500; }

/* --- Filtry katalogu ----------------------------------------------------- */
.filter-panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.filter-search { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.filter-search label { grid-column: 1/-1; }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.field { margin-bottom: 22px; }
.field label, .filter-panel label { display: block; margin-bottom: 8px; font-size: .8rem; font-weight: 800; color: var(--ink-soft); }

input, select, textarea {
  width: 100%; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  background: var(--surface-2); color: var(--ink); font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--surface-sunk); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); font-weight: 500; }
input:hover, select:hover, textarea:hover { border-color: var(--indigo-500); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--indigo); box-shadow: 0 0 0 4px rgb(99 102 241 / 18%); }

.filter-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.filter-footer > a { color: var(--ink-soft); font-size: .85rem; font-weight: 700; }
.help-text { margin: 7px 0 0; color: var(--ink-soft); font-size: .8rem; }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 700; }

.results-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 18px; }
.results-toolbar p { margin: 0; color: var(--ink-soft); font-weight: 600; }
.results-toolbar strong { color: var(--ink); font-size: 1.15rem; }
.view-switch { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-2); }
html[data-theme="dark"] .view-switch { background: var(--surface-sunk); }
.view-switch button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.view-switch button svg { width: 16px; height: 16px; }
.view-switch button:hover { color: var(--indigo); }
.view-switch button[aria-pressed="true"] { background: var(--indigo); color: #fff; box-shadow: 0 4px 12px rgb(79 70 229 / 25%); }

.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); gap: 24px; }
.catalog-results { display: grid; gap: 18px; }
.catalog-results .place-card { min-height: 250px; }
.map-column { position: sticky; top: 20px; align-self: start; }
#map { height: min(68vh, 660px); min-height: 440px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-sunk); z-index: 1; }
.map-attribution-note { margin-top: 10px; color: var(--ink-faint); font-size: .74rem; }

.empty-state { grid-column: 1/-1; padding: 52px 28px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state p { max-width: 570px; margin: 0 auto 24px; color: var(--ink-soft); }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: var(--radius-sm); background: var(--indigo-soft); color: var(--indigo); }
.empty-icon svg { width: 30px; height: 30px; }

/* --- Strona miejsca ------------------------------------------------------ */
.detail-page { padding-top: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--indigo); }
.detail-header { display: grid; grid-template-columns: 1fr 340px; gap: 50px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.detail-header h1 { margin: 18px 0; }
.detail-badges { display: flex; gap: 12px; align-items: center; }
.detail-address { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.detail-address strong { font-size: 1.1rem; }
.detail-address .button { width: 100%; margin-top: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 64px; margin-top: 46px; }
.detail-main section { margin-bottom: 42px; }
.detail-main h2, .detail-sidebar h2 { font-size: 1.4rem; font-weight: 900; }
.detail-main p { color: var(--ink-soft); }
.detail-sidebar { display: flex; flex-direction: column; gap: 20px; }
.detail-sidebar section { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.detail-sidebar dl, .detail-sidebar dd { margin: 0; }
.detail-sidebar dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.detail-sidebar dl > div:last-child { border-bottom: 0; }
.detail-sidebar dt { color: var(--ink-soft); }
.detail-sidebar dd { font-weight: 700; }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: .86rem; }
.source-note p { color: var(--ink-soft); font-size: .82rem; }

/* --- Doradca ------------------------------------------------------------- */
.advisor-shell { max-width: 880px !important; padding-top: 18px; }
.progress-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
.progress-header .back-link { margin: 0; }
.progress-track { height: 8px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--indigo-500), var(--indigo)); transition: width .35s ease; }

.advisor-heading { margin: 62px 0 34px; }
.advisor-heading h1 { margin: 16px 0 18px; font-size: clamp(2.5rem, 5vw, 4rem); }
.advisor-heading p { color: var(--ink-soft); font-size: 1.1rem; font-weight: 500; }

.advisor-form, .advisor-query-form { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.advisor-form { max-width: 640px; }
.advisor-query-form { position: relative; }
.query-control {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 10px 10px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color .2s, box-shadow .2s;
}
html[data-theme="dark"] .query-control { background: var(--surface-sunk); }
.query-control:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 4px rgb(99 102 241 / 18%); }
.query-control > svg { width: 24px; height: 24px; color: var(--indigo-500); }
.query-control input { padding: 14px 4px; border: 0; outline: 0; background: transparent; font-size: 1.1rem; font-weight: 700; box-shadow: none; }
.query-control input:hover, .query-control input:focus { border: 0; box-shadow: none; }
.privacy-hint { margin: 12px 0 0; color: var(--ink-faint); font-size: .8rem; }

.live-suggestions {
  position: absolute; z-index: 20; top: calc(100% - 18px); left: 26px; right: 26px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-xl);
}
.live-suggestions button, .live-suggestions a {
  display: flex; justify-content: space-between; gap: 18px; width: 100%; padding: 14px 18px;
  border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink);
  font-weight: 700; text-align: left; text-decoration: none; cursor: pointer;
}
.live-suggestions button:last-child, .live-suggestions a:last-child { border-bottom: 0; }
.live-suggestions button:hover, .live-suggestions button:focus, .live-suggestions a:hover, .live-suggestions a:focus { background: var(--indigo-soft); color: var(--indigo); }
.live-suggestions small { color: var(--ink-soft); font-weight: 600; }

.recognition-panel, .unknown-panel { margin-top: 26px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.recognition-panel h2, .unknown-panel h2 { margin: 10px 0; font-size: 1.75rem; }
.recognition-panel > p, .unknown-panel p { color: var(--ink-soft); }
.recognition-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 22px; }
.recognition-option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 78px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
html[data-theme="dark"] .recognition-option { background: var(--surface-sunk); }
.recognition-option:hover { border-color: var(--indigo); background: var(--indigo-soft); transform: translateX(4px); }
.recognition-option > span:first-child { display: flex; flex-direction: column; }
.recognition-option strong { font-size: 1.05rem; }
.recognition-option small { color: var(--ink-soft); }

.unknown-panel { display: grid; grid-template-columns: 68px 1fr; gap: 22px; background: linear-gradient(145deg, var(--indigo-soft), var(--surface)); }
.unknown-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: var(--radius-sm); background: var(--indigo); color: #fff; font-size: 1.7rem; font-weight: 900; }
.unknown-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.manual-choice { margin-top: 58px; padding-top: 36px; border-top: 1px solid var(--line); }
.manual-choice-heading { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 22px; }
.manual-choice-heading h2 { margin: 8px 0 0; font-size: 1.85rem; }
.manual-choice-heading > p { max-width: 390px; margin: 0; color: var(--ink-soft); }
.item-groups { display: grid; gap: 10px; }
.item-groups details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.item-groups details[open] { border-color: var(--indigo); }
.item-groups summary { display: flex; justify-content: space-between; gap: 18px; padding: 18px 20px; font-weight: 800; cursor: pointer; }
.item-groups summary:hover { color: var(--indigo); }
.item-groups summary small { color: var(--ink-soft); font-weight: 600; }
.item-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 16px; }
.item-choice-grid button {
  display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  background: var(--surface-2); color: var(--ink); font-weight: 600; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s;
}
html[data-theme="dark"] .item-choice-grid button { background: var(--surface-sunk); }
.item-choice-grid button:hover { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); }

.provider-escape { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-top: 20px; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, #312e81, var(--indigo)); color: #fff; }
.provider-escape p { margin: 4px 0 0; color: rgb(255 255 255 / 72%); font-size: .86rem; }
.provider-escape .text-link { flex: 0 0 auto; color: #a5b4fc; }

/* --- Pytania doradcy ----------------------------------------------------- */
.answer-form fieldset { display: grid; gap: 14px; padding: 0; margin: 0 0 26px; border: 0; }
.answer-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  min-height: 88px; padding: 18px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s, background .2s;
}
.answer-card:hover { transform: translateX(4px); border-color: var(--indigo); box-shadow: var(--shadow-floating); }
.answer-card input { position: absolute; width: 1px; opacity: 0; }
.answer-marker { width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; transition: border .2s; }
.answer-card > span:nth-child(3) { display: flex; flex-direction: column; }
.answer-card strong { font-size: 1.1rem; }
.answer-card small { margin-top: 3px; color: var(--ink-soft); font-size: .88rem; }
.answer-card > span:last-child { color: var(--ink-faint); }
.answer-card:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); }
.answer-card:has(input:checked) .answer-marker { border: 7px solid var(--indigo); background: var(--surface); }
.answer-form > .button { float: right; }

/* --- Wynik --------------------------------------------------------------- */
.result-hero {
  display: grid; grid-template-columns: 110px 1fr; gap: 32px; align-items: start;
  padding: clamp(30px, 5vw, 64px); border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--indigo-soft), var(--surface));
}
.result-icon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--radius-lg); background: var(--emerald); color: #fff; box-shadow: 0 14px 30px -10px rgb(16 185 129 / 60%); }
.result-icon svg { width: 46px; height: 46px; }
.result-hero h1 { margin: 16px 0 22px; font-size: clamp(2.4rem, 5vw, 4rem); }
.benefit { display: flex; align-items: flex-start; gap: 16px; max-width: 700px; margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.benefit > svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--emerald-600); }
html[data-theme="dark"] .benefit > svg { color: var(--emerald); }
.benefit p { margin: 4px 0 0; color: var(--ink-soft); }
.result-actions { display: flex; gap: 14px; margin-top: 36px; }

/* --- Strony treści ------------------------------------------------------- */
.content-page { max-width: 920px !important; }
.content-page.narrow { max-width: 720px !important; }
.prose { font-size: 1.06rem; }
.prose h2 { margin: 48px 0 14px; font-size: 1.65rem; }
.prose p { color: var(--ink-soft); }
.faq-list { display: grid; gap: 12px; }
.faq-list details { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.faq-list details[open] { border-color: var(--indigo); }
.faq-list summary { font-weight: 800; cursor: pointer; }
.faq-list summary:hover { color: var(--indigo); }
.faq-list p { margin: 14px 0 0; color: var(--ink-soft); }
.contact-form, .success-panel { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.success-panel { border-color: var(--emerald); }

.error-page { padding: 10vh 0; text-align: center; }
.error-page p { color: var(--ink-soft); }
.error-page > div { display: flex; justify-content: center; gap: 14px; }
.error-code { font-size: 6rem; font-weight: 900; letter-spacing: -.05em; color: var(--indigo); }
.alert { padding: 15px 20px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); }
.alert-error { border-color: var(--danger); }
.messages { margin-bottom: 22px; }

/* --- Leaflet: krytyczny lokalny fallback --------------------------------
   Zapobiega wypływaniu kafli, gdy CDN CSS jest zablokowany lub Safari nie
   zastosuje zewnętrznego arkusza. */
.leaflet-container { position: relative; overflow: hidden; background: #e2e8f0; outline-offset: 1px; -webkit-tap-highlight-color: transparent; }
.leaflet-container .leaflet-pane,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow,
.leaflet-container .leaflet-tile-container,
.leaflet-container .leaflet-pane > svg,
.leaflet-container .leaflet-pane > canvas,
.leaflet-container .leaflet-zoom-box,
.leaflet-container .leaflet-image-layer { position: absolute; top: 0; left: 0; }
.leaflet-container .leaflet-map-pane,
.leaflet-container .leaflet-tile-pane,
.leaflet-container .leaflet-overlay-pane,
.leaflet-container .leaflet-shadow-pane,
.leaflet-container .leaflet-marker-pane,
.leaflet-container .leaflet-tooltip-pane,
.leaflet-container .leaflet-popup-pane { position: absolute; inset: 0; }
.leaflet-container .leaflet-map-pane { z-index: 2; }
.leaflet-container .leaflet-tile-pane { z-index: 200; }
.leaflet-container .leaflet-overlay-pane { z-index: 400; }
.leaflet-container .leaflet-shadow-pane { z-index: 500; }
.leaflet-container .leaflet-marker-pane { z-index: 600; }
.leaflet-container .leaflet-tooltip-pane { z-index: 650; }
.leaflet-container .leaflet-popup-pane { z-index: 700; }
.leaflet-container .leaflet-map-pane canvas { z-index: 100; }
.leaflet-container .leaflet-map-pane svg { z-index: 200; }
.leaflet-container .leaflet-tile,
.leaflet-container img.leaflet-tile {
  display: block;
  width: 256px;
  height: 256px;
  max-width: none !important;
  max-height: none !important;
  padding: 0;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.leaflet-container .leaflet-tile { visibility: hidden; }
.leaflet-container .leaflet-tile-loaded { visibility: inherit; }
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow { display: block; max-width: none !important; }
.leaflet-container .leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-container.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0, 0, .25, 1); }
.leaflet-container .leaflet-interactive { cursor: pointer; }
.leaflet-container .leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-container .leaflet-top,
.leaflet-container .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-container .leaflet-top { top: 0; }
.leaflet-container .leaflet-right { right: 0; }
.leaflet-container .leaflet-bottom { bottom: 0; }
.leaflet-container .leaflet-left { left: 0; }
.leaflet-container .leaflet-control { float: left; clear: both; }
.leaflet-container .leaflet-right .leaflet-control { float: right; }
.leaflet-container .leaflet-top .leaflet-control { margin-top: 12px; }
.leaflet-container .leaflet-bottom .leaflet-control { margin-bottom: 12px; }
.leaflet-container .leaflet-left .leaflet-control { margin-left: 12px; }
.leaflet-container .leaflet-right .leaflet-control { margin-right: 12px; }
.leaflet-container .leaflet-bar { overflow: hidden; border: 1px solid rgb(0 0 0 / 10%); border-radius: 12px; box-shadow: 0 4px 16px rgb(15 23 42 / 16%); }
.leaflet-container .leaflet-bar a { display: grid; place-items: center; width: 34px; height: 34px; border-bottom: 1px solid #e2e8f0; background: #fff; color: #4f46e5; font-weight: 800; text-align: center; text-decoration: none; }
.leaflet-container .leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-container .leaflet-bar a:hover { background: #eef2ff; }
.leaflet-container .leaflet-control-attribution { padding: 3px 8px; background: rgb(255 255 255 / 85%); color: #475569; font-size: 10px; }
.leaflet-container .leaflet-control-attribution a { color: #4f46e5; }
.leaflet-container .leaflet-popup { position: absolute; margin-bottom: 20px; text-align: center; }
.leaflet-container .leaflet-popup-content-wrapper { min-width: 190px; padding: 1px; border-radius: 16px; background: #fff; color: #0f172a; box-shadow: 0 12px 32px rgb(15 23 42 / 24%); text-align: left; }
.leaflet-container .leaflet-popup-content { margin: 16px 18px; line-height: 1.45; }
.leaflet-container .leaflet-popup-content p { margin: 7px 0; }
.leaflet-popup-content a { color: #4f46e5; font-weight: 800; }
.leaflet-container .leaflet-popup-tip-container { position: absolute; left: 50%; width: 40px; height: 20px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-container .leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; transform: rotate(45deg); background: #fff; box-shadow: 3px 3px 8px rgb(15 23 42 / 15%); }
.leaflet-container .leaflet-popup-close-button { position: absolute; z-index: 2; top: 6px; right: 8px; width: 26px; height: 26px; border: 0; background: transparent; color: #94a3b8; font-size: 20px; text-decoration: none; cursor: pointer; }
.leaflet-container .marker-cluster { border-radius: 50%; background: rgb(99 102 241 / 30%); }
.leaflet-container .marker-cluster div { display: grid; place-items: center; width: 30px; height: 30px; margin: 5px; border-radius: 50%; background: #4f46e5; color: #fff; font-weight: 800; text-align: center; }
.leaflet-container .marker-cluster span { line-height: 1; }

/* --- Responsywność ------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --sidebar: 260px; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .place-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; }
  .category-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .map-column { position: static; }
  .detail-grid { grid-template-columns: 1fr 310px; gap: 36px; }
}

@media (max-width: 760px) {
  .mobile-header {
    position: sticky; top: 0; z-index: 40;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .mobile-header .brand strong { font-size: 1.15rem; }
  .mobile-header .brand img { width: 44px; height: 44px; }
  .mobile-header .icon-button { flex: 0 0 auto; width: 48px; }
  .sidebar { transform: translateX(-105%); width: min(88vw, 330px); transition: transform .25s; box-shadow: 20px 0 60px rgb(0 0 0 / 25%); }
  .sidebar.is-open { transform: none; }
  .page-shell { margin-left: 0; padding: 28px 16px 20px; }
  .page-watermark { display: none; }
  .hero h1 { font-size: 2.8rem; }
  .hero-search { flex-wrap: wrap; }
  .hero-search > svg { margin-left: 12px; }
  .hero-search input { font-size: 1.1rem; }
  .hero-search .button { width: 100%; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .floating-stat { right: 0; }
  .place-grid, .split-callout, .detail-header, .detail-grid { grid-template-columns: 1fr; }
  .split-callout { gap: 30px; }
  .category-card { grid-template-columns: 60px 1fr auto; gap: 16px; padding: 20px; }
  .category-icon { width: 60px; height: 60px; }
  .category-icon svg { width: 30px; height: 30px; }
  .category-card strong { font-size: 1.2rem; }
  .section-block { margin-top: 56px; }
  .section-heading, .section-label { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-label > span { display: none; }
  .filter-search, .filter-grid { grid-template-columns: 1fr; }
  .filter-search .button { width: 100%; }
  .filter-footer { align-items: stretch; flex-direction: column; gap: 14px; }
  .filter-footer .button { width: 100%; }
  .results-toolbar { align-items: flex-start; flex-direction: column; gap: 14px; }
  .catalog-layout:not(.show-map) .map-column { display: none; }
  .catalog-layout.show-map .catalog-results { display: none; }
  #map { min-height: 60vh; }
  .detail-address { grid-row: 1; }
  .detail-grid { gap: 40px; }
  .result-hero { grid-template-columns: 1fr; }
  .result-icon { width: 74px; height: 74px; border-radius: var(--radius); }
  .result-icon svg { width: 36px; height: 36px; }
  .result-actions, .site-footer { flex-direction: column; }
  .result-actions .button { width: 100%; }
  .advisor-heading { margin-top: 44px; }
  .query-control { grid-template-columns: auto 1fr; }
  .query-control .button { grid-column: 1/-1; }
  .live-suggestions { top: calc(100% - 10px); left: 16px; right: 16px; }
  .recognition-options, .item-choice-grid { grid-template-columns: 1fr; }
  .unknown-panel { grid-template-columns: 1fr; }
  .manual-choice-heading, .provider-escape { align-items: flex-start; flex-direction: column; }
  .unknown-actions .button { width: 100%; }
  .answer-form > .button { float: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
