/* =============================================================
   DENTOMAPA — System projektowy (design system)
   Portal informacyjny: baza placówek stomatologicznych w Polsce
   -------------------------------------------------------------
   Kierunek: editorial / clean-medical
   Typografia: Fraunces (display) + Instrument Sans (UI/body)
   Kolorystyka: pastelowa zieleń (szałwia/mięta) + błękit, jasne tło
   -------------------------------------------------------------
   UWAGA dla LLM budującego serwis:
   - Ten plik zawiera KOMPLETNY system. Nie duplikuj stylów w komponentach.
   - Wszystkie kolory/odstępy/promienie steruj tokenami (:root).
   - Klasy są semantyczne i wielokrotnego użytku między widokami.
   ============================================================= */

/* ---------- 1. FONTY ---------- */
/* Fraunces + Instrument Sans wczytywane w <head> (preconnect + <link>) — szybszy render niż @import. */

/* ---------- 2. TOKENY ---------- */
:root {
  /* Kolory bazowe — jasne, pastelowe */
  --bg:            #F3F8F5;   /* miętowo-białe tło strony */
  --bg-alt:        #ECF3EF;   /* sekcje naprzemienne */
  --surface:       #FFFFFF;   /* karty, panele */
  --surface-tint:  #F7FBF9;   /* subtelnie wyróżnione tło karty */

  /* Zieleń (kolor wiodący) */
  --green-50:  #EAF5EF;
  --green-100: #D3EBDD;
  --green-200: #A9D8BF;
  --green-400: #4FB088;
  --green-500: #2F9A72;   /* akcent / przyciski */
  --green-700: #1C6B4E;   /* tekst akcentowy na jasnym */
  --green-900: #0E3A2A;   /* głębia */

  /* Błękit (kolor wspierający) */
  --blue-50:  #E9F2FA;
  --blue-100: #D2E6F5;
  --blue-200: #A9CEEC;
  --blue-400: #5C9FD8;
  --blue-500: #3B82C4;
  --blue-700: #23577F;

  /* Atrament / neutralne */
  --ink:       #10312A;   /* nagłówki, ciemna zieleń-czerń */
  --ink-soft:  #3A554C;   /* tekst główny */
  --muted:     #66817A;   /* tekst pomocniczy */
  --line:      #DCE8E2;   /* obramowania */
  --line-soft: #E9F0EC;

  /* Semantyczne */
  --accent:      var(--green-500);
  --accent-ink:  var(--green-700);
  --accent-2:    var(--blue-500);

  /* Typografia */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Skala odstępów */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* Promienie */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;

  /* Cienie — miękkie, „medyczne” */
  --shadow-sm: 0 1px 2px rgba(16,49,42,.05), 0 2px 8px rgba(16,49,42,.04);
  --shadow-md: 0 6px 24px rgba(16,49,42,.08), 0 2px 6px rgba(16,49,42,.05);
  --shadow-lg: 0 20px 50px rgba(16,49,42,.12);

  /* Warstwy */
  --z-header: 100; --z-menu: 200;

  /* Kontener */
  --container: 1180px;
  --container-narrow: 820px;
}

/* ---------- 3. RESET / BAZA ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--green-500); }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; border-radius: 4px; }

/* ---------- 4. TYPOGRAFIA ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--ink-soft); }

.display-italic { font-style: italic; font-weight: 500; color: var(--green-700); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.text-muted { color: var(--muted); }

/* ---------- 5. LAYOUT ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-8); }
.section--alt { background: var(--bg-alt); }
.stack > * + * { margin-top: var(--sp-4); }
.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--sp-4); }

.split-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-7); }

/* Siatki */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 6. PRZYCISKI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; font-size: .98rem; line-height: 1;
  padding: 14px 24px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green-500); color: #fff; box-shadow: 0 8px 20px rgba(47,154,114,.28); }
.btn--primary:hover { background: var(--green-700); color:#fff; box-shadow: 0 10px 26px rgba(47,154,114,.34); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green-200); color: var(--green-700); }
.btn--blue { background: var(--blue-500); color:#fff; box-shadow: 0 8px 20px rgba(59,130,196,.26); }
.btn--blue:hover { background: var(--blue-700); color:#fff; }
.btn--sm { padding: 9px 16px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-ink); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .18s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- 7. NAGŁÓWEK / NAWIGACJA ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(243,248,245,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--green-400), var(--blue-400));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 20px; height: 20px; }
.nav__links { display: flex; align-items: center; gap: var(--sp-6); }
.nav__links a { color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav__links a:hover { color: var(--green-700); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }
.nav__toggle { display: none; background: none; border: 0; color: var(--ink); }
.nav__toggle svg { width: 26px; height: 26px; }
@media (max-width: 860px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__toggle { display: block; }
  .nav__links.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4);
    position: absolute; left: 0; right: 0; top: 74px;
    background: var(--surface); padding: var(--sp-5); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- 8. HERO (strona główna) ---------- */
.hero { position: relative; padding-block: var(--sp-9) var(--sp-8); overflow: hidden; }
.hero__mesh {
  position: absolute; inset: -20% -10% auto; height: 130%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 44% at 12% 8%,  rgba(79,176,136,.34), transparent 70%),
    radial-gradient(34% 40% at 92% 18%, rgba(92,159,216,.32), transparent 70%),
    radial-gradient(46% 50% at 70% 96%, rgba(169,216,191,.30), transparent 72%);
  filter: blur(6px);
}
.hero__grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.hero__inner { position: relative; z-index: 1; text-align: center; max-width: 900px; margin-inline: auto; }
.hero h1 { margin-block: var(--sp-4) var(--sp-4); }
.hero h1 em { font-style: italic; color: var(--green-700); }
.hero .lead { margin-inline: auto; margin-bottom: var(--sp-6); }
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-6); }

/* animacja wejścia */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: .06s; } .reveal.d2 { animation-delay: .14s; }
.reveal.d3 { animation-delay: .22s; } .reveal.d4 { animation-delay: .3s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* ---------- 9. WYSZUKIWARKA ---------- */
.searchbar {
  display: flex; align-items: stretch; gap: var(--sp-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px;
  box-shadow: var(--shadow-md); max-width: 760px; margin-inline: auto;
}
.searchbar__field { display: flex; align-items: center; gap: 10px; flex: 1; padding-inline: 16px; min-width: 0; }
.searchbar__field + .searchbar__field { border-left: 1px solid var(--line-soft); }
.searchbar__field svg { width: 20px; height: 20px; color: var(--green-500); flex: none; }
.searchbar input, .searchbar select {
  border: 0; background: transparent; font-family: inherit; font-size: 1rem;
  color: var(--ink); width: 100%; padding-block: 12px; min-width: 0;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar select { appearance: none; cursor: pointer; }
.searchbar .btn { flex: none; }
@media (max-width: 720px) {
  .searchbar { flex-direction: column; border-radius: var(--r-lg); }
  .searchbar__field + .searchbar__field { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* pasek szybkich linków pod wyszukiwarką */
.quick-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-4); }
.quick-links span { color: var(--muted); font-size: .9rem; }
.quick-links a { font-size: .9rem; background: var(--green-50); padding: 5px 12px; border-radius: var(--r-pill); }
.quick-links a:hover { background: var(--green-100); }

/* ---------- 10. KARTY (uniwersalne) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-200); }

/* Karta obszaru (województwo / powiat / miejscowość) */
.area-card { display: flex; flex-direction: column; gap: var(--sp-3); min-height: 168px; }
.area-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.area-card__icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: var(--green-700);
  background: var(--green-50); border: 1px solid var(--green-100);
}
.area-card__icon svg { width: 24px; height: 24px; }
.area-card h3 { font-size: 1.35rem; }
.area-card__meta { display: flex; align-items: center; gap: var(--sp-3); color: var(--muted); font-size: .92rem; margin-top: auto; }
.area-card__count {
  font-weight: 600; color: var(--green-700);
  background: var(--green-50); padding: 3px 11px; border-radius: var(--r-pill); font-size: .85rem;
}
.area-card::after {
  content: "→"; position: absolute; top: var(--sp-5); right: var(--sp-5);
  color: var(--green-200); font-size: 1.2rem; transition: transform .2s ease, color .2s ease;
}
.area-card:hover::after { color: var(--green-500); transform: translateX(3px); }

/* Kompaktowa lista obszarów (np. miejscowości w powiecie) */
.pill-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill-list a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: var(--r-pill); color: var(--ink-soft); font-weight: 500;
}
.pill-list a:hover { border-color: var(--green-200); background: var(--green-50); color: var(--green-700); }
.pill-list a b { color: var(--muted); font-weight: 600; font-size: .85rem; }

/* ---------- 11. KARTA GABINETU (na listach) ---------- */
.clinic-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.clinic-card__head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.clinic-card__logo {
  width: 54px; height: 54px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
  border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--green-700);
}
.clinic-card__title { flex: 1; min-width: 0; }
.clinic-card__title h3 { font-size: 1.2rem; }
.clinic-card__title h3 a { color: var(--ink); }
.clinic-card__title h3 a:hover { color: var(--green-700); }
.clinic-card__addr { color: var(--muted); font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.clinic-card__addr svg { width: 15px; height: 15px; color: var(--green-500); flex: none; }
.clinic-card__desc { color: var(--ink-soft); font-size: .96rem; }
.clinic-card__services { display: flex; flex-wrap: wrap; gap: 6px; }
.clinic-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--line-soft); }
.clinic-card__contacts { display: flex; gap: var(--sp-3); font-size: .9rem; }
.clinic-card__contacts a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.clinic-card__contacts svg { width: 15px; height: 15px; color: var(--green-500); }

/* Odznaki / tagi usług */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100);
}
.badge--green { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.badge--soft  { background: var(--surface-tint); color: var(--muted); border-color: var(--line); }
.badge--dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }

/* ---------- 12. BREADCRUMBS ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); padding-block: var(--sp-5) 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--green-700); }
.breadcrumbs span.sep { color: var(--line); }
.breadcrumbs .current { color: var(--ink-soft); font-weight: 600; }

/* ---------- 13. NAGŁÓWEK OBSZARU (hero podstron) ---------- */
.page-hero { position: relative; padding-block: var(--sp-6) var(--sp-7); overflow: hidden; }
.page-hero::before {
  content:""; position:absolute; inset: 0; z-index:0; pointer-events:none;
  background: radial-gradient(40% 80% at 8% 0%, rgba(79,176,136,.16), transparent 70%),
              radial-gradient(40% 80% at 100% 0%, rgba(92,159,216,.14), transparent 70%);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { margin-top: var(--sp-4); }
.page-hero .lead { margin-top: var(--sp-4); }
.page-hero__stats { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin-top: var(--sp-6); }
.stat { display: flex; flex-direction: column; }
.stat b { font-family: var(--font-display); font-size: 2rem; color: var(--green-700); line-height: 1; }
.stat span { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---------- 14. UKŁAD LISTINGU (sidebar + wyniki) ---------- */
.listing { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-6); align-items: start; }
@media (max-width: 940px) { .listing { grid-template-columns: 1fr; } }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); position: sticky; top: 92px; }
.filters h4 { margin-bottom: var(--sp-4); }
.filter-group { padding-block: var(--sp-4); border-top: 1px solid var(--line-soft); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group > span { display:block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: var(--sp-3); }
.check { display: flex; align-items: center; gap: 10px; padding-block: 5px; color: var(--ink-soft); font-size: .95rem; cursor: pointer; }
.check input { accent-color: var(--green-500); width: 17px; height: 17px; }
.check .count { margin-left: auto; color: var(--muted); font-size: .82rem; }

.listing__main { min-width: 0; }
.listing__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.listing__bar .result-count { color: var(--muted); }
.listing__bar .result-count b { color: var(--ink); }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; font-family: inherit; background: var(--surface); color: var(--ink); }

/* aktywne filtry (chipy) */
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); border-radius: var(--r-pill); padding: 5px 10px 5px 12px; font-size: .85rem; font-weight: 600; }
.chip button { background: none; border: 0; color: var(--green-700); line-height: 1; font-size: 1rem; }

/* ---------- 15. PAGINACJA ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: var(--sp-7); }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: grid; place-items: center; padding-inline: 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink-soft); font-weight: 600; background: var(--surface);
}
.pagination a:hover { border-color: var(--green-200); color: var(--green-700); }
.pagination .is-active { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- 16. KARTA GABINETU — WIDOK SZCZEGÓŁOWY ---------- */
.clinic-detail { display: grid; grid-template-columns: 1fr 360px; gap: var(--sp-6); align-items: start; }
@media (max-width: 940px) { .clinic-detail { grid-template-columns: 1fr; } }

.detail-hero { display: flex; align-items: flex-start; gap: var(--sp-5); flex-wrap: wrap; }
.detail-hero__logo {
  width: 92px; height: 92px; border-radius: 18px; flex: none;
  background: linear-gradient(135deg, var(--green-100), var(--blue-100));
  border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; color: var(--green-700);
}
.detail-hero__meta { flex: 1; min-width: 260px; }
.detail-hero__meta h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: var(--sp-3); }
.detail-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-4); }

.detail-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); margin-top: var(--sp-5); }
.detail-section h2 { font-size: 1.5rem; margin-bottom: var(--sp-4); }
.detail-section p + p { margin-top: var(--sp-4); }

/* lista usług w kolumnach */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }
.service-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-tint); border: 1px solid var(--line-soft); border-radius: var(--r-md); font-weight: 500; color: var(--ink); }
.service-item svg { width: 18px; height: 18px; color: var(--green-500); flex: none; }

/* panel boczny kontaktu (sticky) */
.contact-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); position: sticky; top: 92px; box-shadow: var(--shadow-sm); }
.contact-row { display: flex; align-items: flex-start; gap: 12px; padding-block: var(--sp-3); border-top: 1px solid var(--line-soft); }
.contact-row:first-of-type { border-top: 0; padding-top: 0; }
.contact-row__icon { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.contact-row__icon svg { width: 18px; height: 18px; }
.contact-row__body { min-width: 0; }
.contact-row__body span { display: block; font-size: .82rem; color: var(--muted); }
.contact-row__body a, .contact-row__body strong { color: var(--ink); font-weight: 600; word-break: break-word; }
.contact-row__body a:hover { color: var(--green-700); }
.contact-panel .btn { margin-top: var(--sp-4); }

/* prosta mapa-placeholder */
.map-embed { height: 220px; border-radius: var(--r-md); border: 1px solid var(--line); margin-top: var(--sp-4);
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
  background-image:
    linear-gradient(rgba(47,154,114,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,154,114,.08) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px, 26px 26px;
  display: grid; place-items: center; color: var(--muted); text-align: center; position: relative; }
.map-embed svg { width: 32px; height: 32px; color: var(--green-500); }

/* godziny otwarcia */
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.hours td:first-child { color: var(--muted); }
.hours td:last-child { text-align: right; font-weight: 600; color: var(--ink); }
.hours tr:first-child td { border-top: 0; }
.hours .today td { color: var(--green-700); }

/* ---------- 17. SEKCJA „JAK TO DZIAŁA” ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-5); counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); }
.step__num { counter-increment: step; font-family: var(--font-display); font-size: 2.4rem; color: var(--green-200); font-weight: 600; line-height: 1; }
.step__num::before { content: "0" counter(step); }
.step h3 { margin-block: var(--sp-3) var(--sp-2); }

/* ---------- 18. CTA / BANER ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--green-700), var(--blue-700)); color: #fff; border-radius: var(--r-xl); padding: var(--sp-8); text-align: center; }
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(50% 120% at 90% 10%, rgba(255,255,255,.14), transparent 60%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); max-width: 52ch; margin: var(--sp-4) auto var(--sp-6); }
.cta-band .btn--ghost { background: rgba(255,255,255,.14); color:#fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.24); color:#fff; }

/* ---------- 19. STOPKA ---------- */
.site-footer { background: var(--ink); color: #C7D8D0; padding-block: var(--sp-8) var(--sp-6); margin-top: var(--sp-9); }
.site-footer a { color: #C7D8D0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col p { color: #92AAA0; font-size: .95rem; margin-top: var(--sp-4); max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.1); color: #7E958C; font-size: .88rem; }

/* ---------- 20. UŻYTKOWE ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: var(--sp-6); }

/* stan pusty */
.empty-state { text-align: center; padding: var(--sp-8); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty-state svg { width: 44px; height: 44px; color: var(--green-200); margin-inline: auto; margin-bottom: var(--sp-4); }

/* Sekcja SEO / opis tekstowy (ważne dla portalu informacyjnego) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.prose p { margin-bottom: var(--sp-4); }
.prose ul.bullets { list-style: disc; padding-left: 1.3em; }
.prose ul.bullets li { margin-bottom: 8px; }

/* ---------- 21. MAPA INTERAKTYWNA (województwa / powiaty) ---------- */
/* Układ: mapa + boczna lista klikalnych obszarów */
.map-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--sp-6); align-items: start; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }

.geo-map {
  position: relative;
  background:
    radial-gradient(60% 70% at 30% 20%, rgba(79,176,136,.10), transparent 70%),
    radial-gradient(60% 70% at 85% 90%, rgba(92,159,216,.10), transparent 70%),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
}
.geo-map svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Obszary klikalne (województwo/powiat) */
.geo-map .pw {
  fill: var(--green-100);
  stroke: var(--surface);
  stroke-width: 1;
  cursor: pointer;
  transition: fill .18s ease, transform .18s ease;
  transform-box: fill-box;
  transform-origin: center;
  outline: none;
}
.geo-map .pw:nth-of-type(even) { fill: #C6E6D6; }   /* subtelne przeplatanie odcieni */
.geo-map .pw:hover,
.geo-map .pw:focus-visible,
.geo-map .pw.is-active {
  fill: var(--green-500);
  stroke: var(--surface);
  stroke-width: 1.5;
}
.geo-map .pw:focus-visible { filter: drop-shadow(0 2px 6px rgba(47,154,114,.5)); }

/* Tooltip */
.map-tooltip {
  position: fixed; z-index: 500; pointer-events: none;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-md);
  font-size: .85rem; font-weight: 600; line-height: 1.35; box-shadow: var(--shadow-md);
  opacity: 0; transform: translate(-50%, -120%); transition: opacity .12s ease;
  white-space: nowrap;
}
.map-tooltip.is-visible { opacity: 1; }
.map-tooltip span { display: block; font-weight: 500; color: var(--green-200); font-size: .78rem; }

/* Boczna lista obszarów (sparowana z mapą) */
.map-list { columns: 2; column-gap: var(--sp-5); }
@media (max-width: 560px) { .map-list { columns: 1; } }
.map-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-soft);
  break-inside: avoid; font-size: .95rem;
}
.map-list a:hover, .map-list a.is-active { background: var(--green-50); color: var(--green-700); }
.map-list a b { color: var(--muted); font-weight: 600; font-size: .82rem; }
.map-legend { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-4); color: var(--muted); font-size: .85rem; }
.map-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* ---------- 22. POWIADOMIENIA + FORMULARZ ZGŁOSZENIA ---------- */
.notice { margin: var(--sp-5) 0 0; padding: 14px 18px; border-radius: var(--r-md); font-weight: 600; border: 1px solid; }
.notice--ok  { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.notice--err { background: #FCEDED; color: #A6362F; border-color: #F3C9C6; }

/* Modal bez JS: widoczny gdy #zglos jest w URL (:target) */
.report-modal { position: fixed; inset: 0; z-index: 700; display: none; }
.report-modal:target { display: grid; place-items: center; padding: var(--sp-4); }
.report-modal__backdrop { position: absolute; inset: 0; background: rgba(16,49,42,.55); backdrop-filter: blur(2px); }
.report-modal__card {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-lg);
}
.report-modal__close { position: absolute; top: 14px; right: 16px; font-size: 1.6rem; line-height: 1; color: var(--muted); text-decoration: none; }
.report-modal__close:hover { color: var(--ink); }

.report-form { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); }
.report-form > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); font-size: .92rem; }
.report-form input, .report-form select, .report-form textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--surface-tint);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 14px; width: 100%;
}
.report-form input:focus, .report-form select:focus, .report-form textarea:focus { outline: none; border-color: var(--green-400); background: #fff; }
.report-form textarea { resize: vertical; }
.report-form .check { flex-direction: row; align-items: flex-start; font-weight: 500; font-size: .9rem; color: var(--ink-soft); }
.report-form .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-500); }
.report-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }
.report-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 23. FORMULARZ DODAWANIA PLACÓWKI ---------- */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); }
@media (max-width: 560px) { .report-grid { grid-template-columns: 1fr; } }
.report-form h3 { font-size: 1.15rem; }
.services-check { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px var(--sp-4); }
@media (max-width: 560px) { .services-check { grid-template-columns: 1fr; } }
.services-check .check { font-weight: 500; font-size: .95rem; }

/* ---------- 24. BANER ZGODY NA COOKIES ---------- */
.cookie-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 800;
  width: min(720px, calc(100% - 24px));
  display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-lg);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { flex: 1; min-width: 220px; font-size: .92rem; color: var(--ink-soft); margin: 0; }
.cookie-banner__actions { display: flex; gap: var(--sp-2); flex: none; }
@media (max-width: 520px) { .cookie-banner { bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; } .cookie-banner__actions { width: 100%; } .cookie-banner__actions .btn { flex: 1; } }

/* ---------- 25. ROZBUDOWANY OPIS GABINETU ---------- */
.detail-section .services-desc { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px var(--sp-5); }
@media (max-width: 560px) { .detail-section .services-desc { grid-template-columns: 1fr; } }
.detail-section .services-desc li { position: relative; padding-left: 22px; color: var(--ink); }
.detail-section .services-desc li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 3px; background: var(--green-100); border: 1px solid var(--green-200); }
.detail-section h3 { font-size: 1.05rem; margin-top: var(--sp-5); color: var(--ink); }
.desc-source { margin-top: var(--sp-5); font-size: .82rem; color: var(--muted); font-style: italic; }
