/* tenlekarz.pl – własny styl serwisu (nie dzielimy wyglądu z innymi domenami).
   Zasady czytelności z wytycznych 6.0: min. 18 px, kontrast WCAG AA, duże cele dotyku, najpierw telefon. */

@font-face {
  font-family: "Jakarta";
  src: url("/fonts/jakarta-latin-ext.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jakarta";
  src: url("/fonts/jakarta-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #0f172a;
  --muted: #475569;
  --line: #dfe4ee;
  --brand: #4f46e5;
  --brand-deep: #3730a3;
  --brand-soft: #eef0ff;
  --accent: #0f9d8a;
  --accent-soft: #e2f6f2;
  --on-brand: #ffffff;
  --warn-bg: #fff6e0; --warn: #7a4b00;
  --focus: #f59e0b;
  --r: 18px; --r-s: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px -12px rgb(15 23 42 / .18);
  --shadow-up: 0 2px 4px rgb(15 23 42 / .06), 0 18px 40px -16px rgb(79 70 229 / .35);
  --hero-grad: linear-gradient(180deg, rgb(15 23 42 / .15) 0%, rgb(15 23 42 / .55) 55%, rgb(15 23 42 / .85) 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --ink: #e8ecf6; --muted: #aab4c8; --line: #263049;
    --brand: #8b85ff; --brand-deep: #b3afff; --brand-soft: #1d2142; --accent: #3fd1bb; --accent-soft: #10302c;
    --on-brand: #0b1020; --warn-bg: #3a2c0c; --warn: #ffd98a; --shadow: none; --shadow-up: 0 0 0 1px #3a4466; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --ink: #e8ecf6; --muted: #aab4c8; --line: #263049;
  --brand: #8b85ff; --brand-deep: #b3afff; --brand-soft: #1d2142; --accent: #3fd1bb; --accent-soft: #10302c;
  --on-brand: #0b1020; --warn-bg: #3a2c0c; --warn: #ffd98a; --shadow: none; --shadow-up: 0 0 0 1px #3a4466; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { font-size: 112.5%; line-height: 1.6; -webkit-text-size-adjust: 100%; font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 750; margin: 2em 0 .7em; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.3em 0 .5em; }
p { margin: .6em 0; max-width: 70ch; }
ul, ol { padding-left: 1.3em; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

.pomin { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 12px 16px; z-index: 50; }
.pomin:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wprowadzenie { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

/* ---------- Nagłówek ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.marka { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.marka-znak { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; box-shadow: 0 6px 16px -6px rgb(79 70 229 / .6); }
.marka b { color: var(--brand); font-weight: 800; }
.miasto-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; text-decoration: none; }
.miasto-chip svg { width: 18px; height: 18px; }
.ikona-btn { flex: 0 0 auto; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.ikona-btn:hover { background: var(--surface-2); }
.ikona-btn:hover { border-color: var(--brand); }
.dzialy-nav { border-top: 1px solid var(--line); }
.dzialy-nav ul { list-style: none; padding-top: 6px; padding-bottom: 6px; margin: 0 auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.dzialy-nav a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 650; font-size: .95rem; }
.dzialy-nav a svg { width: 18px; height: 18px; }
.dzialy-nav a:hover { color: var(--ink); background: var(--surface-2); }
.dzialy-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand); }

/* ---------- Nagłówek strony / hero ---------- */
.glowka { background: radial-gradient(1200px 300px at 10% -10%, var(--brand-soft), transparent 60%), radial-gradient(900px 260px at 100% 0%, var(--accent-soft), transparent 55%); padding: 18px 0 28px; border-bottom: 1px solid var(--line); }
.glowka h1 { margin-top: 14px; }
.hero { position: relative; color: #fff; min-height: clamp(320px, 46vw, 520px); display: flex; align-items: flex-end; overflow: hidden; background: #1e1b4b; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-grad); }
.hero-tresc { position: relative; z-index: 1; padding-top: 18px; padding-bottom: 32px; width: 100%; }
.hero h1 { color: #fff; margin: 12px 0 6px; text-shadow: 0 2px 18px rgb(0 0 0 / .35); }
.hero .wprowadzenie { color: rgb(255 255 255 / .9); }
.hero-podpis { position: absolute; right: 12px; bottom: 8px; z-index: 1; font-size: .72rem; color: rgb(255 255 255 / .8); max-width: 60ch; text-align: right; }
.hero-podpis a { color: inherit; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.hero .eyebrow { color: #a7f3e6; }

/* Okruszki / ścieżka przeglądania (public/trail.js podmienia treść, klasy muszą zostać) */
.trail { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); }
.trail ol { list-style: none; padding: 4px 14px; margin: 0; display: flex; flex-wrap: nowrap; align-items: center; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.trail li { display: inline-flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.trail .sep { margin: 0 .45em; opacity: .6; }
.trail a, .trail .trail-cur, .trail .trail-more { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 2px; color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--brand); text-decoration: underline; }
.trail .trail-cur { font-weight: 750; color: var(--ink); }
.trail a.trail-fwd { opacity: .7; }
.trail .trail-more { padding: 0 8px; background: var(--surface-2); border: 0; border-radius: 999px; font: inherit; font-weight: 750; color: var(--ink); cursor: pointer; }
.trail-cut li a, .trail-cut li .trail-more { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.trail-cut li .trail-cur { max-width: 20ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.trail-arrows { display: flex; gap: 4px; flex: 0 0 auto; }
.trail-arrow { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.trail-arrow:hover { border-color: var(--brand); color: var(--brand); }
.trail-menu { position: absolute; top: 100%; left: 0; z-index: 20; list-style: none; margin: 6px 0 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow-up); max-width: min(92vw, 420px); }
.trail-menu a { display: flex; align-items: center; min-height: 40px; padding: 4px 10px; font-size: 15px; }
.hero .trail ol { background: rgb(15 23 42 / .45); border-color: rgb(255 255 255 / .2); box-shadow: none; backdrop-filter: blur(8px); }
.hero .trail a, .hero .trail .sep { color: rgb(255 255 255 / .85); }
.hero .trail .trail-cur { color: #fff; }
.hero .trail-arrow { background: rgb(15 23 42 / .45); color: #fff; border-color: rgb(255 255 255 / .25); }

/* ---------- Treść ---------- */
.tresc { padding: 8px 0 24px; }
.sekcja-tytul { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* Kafle działów z ikonami */
.kafle { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kafel { display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.kafel:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: transparent; }
.kafel-ikona { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.kafel-ikona svg { width: 24px; height: 24px; }
.kafel:nth-child(3n+2) .kafel-ikona { background: var(--accent-soft); color: var(--accent); }
.kafel b { display: block; font-weight: 750; line-height: 1.25; }
.kafel small { color: var(--muted); font-size: .85rem; }

/* Siatka linków (specjalizacje, badania) */
.siatka { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.siatka a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-weight: 650; }
.siatka a:hover { border-color: var(--brand); color: var(--brand); }
.siatka small { min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 700; }

/* Karty miast ze zdjęciem */
.miasta { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.miasto-karta { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.miasto-karta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.miasto-karta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(15 23 42 / .8)); }
.miasto-karta span { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-weight: 800; font-size: 1.2rem; }
.miasto-karta small { display: block; font-weight: 500; font-size: .8rem; opacity: .85; }
.miasto-karta:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.miasto-karta:hover img { transform: scale(1.05); }

/* Karty wpisów */
.lista { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .lista { grid-template-columns: 1fr 1fr; } }
.karta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.karta h3 { margin: 0; font-size: 1.1rem; }
.karta h3 a { color: var(--ink); text-decoration: none; }
.karta h3 a:hover { color: var(--brand); }
.karta .adres { color: var(--muted); margin: 0; font-size: .95rem; }
.karta .fakty { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; list-style: none; padding: 0; }
.karta .akcje { margin-top: auto; padding-top: 10px; }
.znacznik { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.znacznik.nfz { background: var(--accent-soft); color: var(--accent); }

/* Przyciski */
.przycisk, button { font: inherit; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); text-decoration: none; cursor: pointer; }
.przycisk:hover, button:hover { background: var(--brand-deep); }
.przycisk.drugi { background: var(--surface); color: var(--brand); border: 1px solid var(--line); }
.przycisk.drugi:hover { border-color: var(--brand); }
.przycisk.maly { min-height: 44px; padding: 6px 16px; font-size: .92rem; }
.akcje { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

/* Wyszukiwarka */
.szukaj { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 8px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-up); max-width: 640px; }
.szukaj input { flex: 1 1 220px; font: inherit; color: var(--ink); background: transparent; border: 0; min-height: 52px; padding: 0 18px; }
.szukaj input:focus { outline: none; }
.szukaj:focus-within { outline: 3px solid var(--focus); }

/* Filtry */
.filtry { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filtr { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .95rem; }
.filtr:hover { border-color: var(--brand); }
.filtr[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.wynikow { font-weight: 750; margin: 8px 0; color: var(--muted); }
.stronicowanie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }

/* Bloki informacyjne */
dl.dane { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 10px 18px; margin: 14px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
dl.dane dt { font-weight: 750; color: var(--muted); }
dl.dane dd { margin: 0; }
@media (max-width: 520px) { dl.dane { grid-template-columns: 1fr; } }
.zrodla { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 32px; padding-top: 12px; }
.tabela-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.liczba-kol { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Strona główna */
.start-hero { position: relative; overflow: hidden; color: #fff; background: #1e1b4b; }
.start-hero .mozaika { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.start-hero .mozaika img { width: 100%; height: 100%; object-fit: cover; }
.start-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(30 27 75 / .94) 0%, rgb(49 46 129 / .78) 45%, rgb(15 157 138 / .45) 100%); }
.start-hero .wrap { position: relative; z-index: 1; padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(40px, 8vw, 96px); }
.start-hero h1 { color: #fff; max-width: 18ch; }
.start-hero p { color: rgb(255 255 255 / .88); font-size: 1.15rem; }
.atuty { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-weight: 650; color: rgb(255 255 255 / .9); }
.atuty li::before { content: "✓"; margin-right: 8px; color: #7ff0dc; }

/* ---------- Stopka ---------- */
.stopka { margin-top: 64px; background: #0b1020; color: #c7cfdf; font-size: .95rem; }
.stopka a { color: #e8ecf6; text-decoration: none; }
.stopka a:hover { color: #fff; text-decoration: underline; }
.stopka-siatka { display: grid; gap: 28px; padding-top: 48px; padding-bottom: 32px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .stopka-siatka { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.stopka h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #8f9bb6; margin: 0 0 12px; }
.stopka ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stopka .marka { color: #fff; }
.stopka .marka b { color: #a5a0ff; }
.stopka-alarm { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 16px; border-radius: 14px; background: rgb(244 63 94 / .14); color: #ffd1da; font-weight: 650; }
.stopka-alarm a { color: #fff; font-weight: 800; font-size: 1.1rem; }
.stopka-dol { border-top: 1px solid #1f2842; padding-top: 16px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .82rem; color: #8f9bb6; }

/* Podgląd struktury (tylko lokalnie) */
.struktura details { margin: 8px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 4px 14px; }
.struktura summary { cursor: pointer; font-weight: 750; min-height: 44px; display: flex; align-items: center; }
.struktura ul { columns: 2 320px; font-size: .92rem; }
.struktura li { break-inside: avoid; margin: 3px 0; }
.idx { font-size: .72rem; font-weight: 750; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.idx.tak { background: var(--accent-soft); color: var(--accent); }
.idx.nie { background: var(--surface-2); color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Opisy redakcyjne i obrazki stron */
.opis { max-width: 74ch; margin: 18px 0 8px; font-size: 1.06rem; line-height: 1.7; }
.opis h2 { margin-top: 1.6em; }
.opis h3 { margin-top: 1.3em; }
.opis ul { padding-left: 1.2em; }
.opis li { margin: .3em 0; }
.opis a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rycina { margin: 20px 0; max-width: 900px; }
.rycina img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow); background: var(--surface-2); }
.rycina.duza { margin-top: 12px; }
.rycina.duza img { aspect-ratio: 21 / 9; }
.rycina figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.rycina figcaption a { color: inherit; }
@media (max-width: 640px) { .rycina.duza img { aspect-ratio: 16 / 10; } }

/* Sąsiedztwo: hotel ↔ szpital, przychodnie, sklepy */
.poblize { margin-top: 32px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.poblize h2 { margin-top: 0; }
.poblize h3 { margin: 18px 0 8px; font-size: 1.05rem; }
