/* ============================================================
   SP ZOZ Nowe Miasto — makieta 4 (układ inspirowany wzorcami z affidea.pl:
   pasek logotypów, niebieski pasek nawigacji, pigułki CTA, pełnoekranowy slider,
   karty usług ze zdjęciem, pas "Sprawdź", pas liczb). Własna szata graficzna.
   ============================================================ */
@import url('../fonts/fonts.css');
@import url('../fonts/bootstrap-icons.css');

:root {
  --navy: #1A2F6B;
  --navy-dark: #0E1B45;
  --teal: #09727D;
  --turq: #3CC4CC;
  --turq-hover: #2FB0B8;
  --tint: #E3F4F5;
  --tint-2: #F2F9FA;
  --band: #D2EDEF;
  --red: #C8202F;
  --ink: #1B2432;
  --muted: #4A5568;
  --line: #DCE5EA;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(14, 27, 69, .10);
  --shadow-lg: 0 14px 34px rgba(14, 27, 69, .16);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs: 1rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font); font-size: var(--fs); line-height: 1.6; color: var(--ink); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--navy); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 3px; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; background: var(--navy-dark); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 10px; }
.skip-link:focus { top: 0; color: #fff; }
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }
.container--full { max-width: none; }

/* ---------- Tryb wysokiego kontrastu i rozmiar tekstu ---------- */
html.hc { --navy: #000; --navy-dark: #000; --teal: #000; --tint: #fff; --tint-2: #fff; --band: #fff; --ink: #000; --muted: #000; --line: #000; --turq: #FFD500; --turq-hover: #FFE55C; }
html.hc body { background: #000; color: #fff; }
html.hc h1, html.hc h2, html.hc h3, html.hc h4 { color: #FFD500; }
html.hc a { color: #FFD500; }
html.hc .card, html.hc .svc-card, html.hc .promo, html.hc .clinic, html.hc .news-card, html.hc .contact-card { background: #000; border: 2px solid #FFD500; }
html.hc .band, html.hc .section--tint, html.hc .stats { background: #000; }

/* ---------- Pasek górny: dostępność + logotypy finansowania ---------- */
.topstrip { background: #fff; border-bottom: 1px solid var(--line); }
.topstrip__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding-block: 6px; }
.a11y { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.a11y button { min-width: 36px; height: 36px; padding: 0 8px; border: 1.5px solid var(--navy); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.a11y button:hover, .a11y button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.funding { display: flex; align-items: center; gap: 18px; }
.funding img { height: 40px; width: auto; max-width: 150px; object-fit: contain; }
@media (max-width: 900px) { .funding { display: none; } }

/* ---------- Pasek nawigacji (granatowy, z rozwijanymi menu) ---------- */
.mainnav { background: var(--navy); color: #fff; position: relative; z-index: 50; }
.mainnav__inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.nav-toggle { display: none; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: transparent; border: 1.5px solid rgba(255,255,255,.7); border-radius: 10px; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.mainnav__menu { display: contents; }
.menu { display: flex; align-items: stretch; }
.menu > li { position: relative; display: flex; }
.menu__link { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 0 clamp(10px, 1.1vw, 18px); min-height: 60px; background: none; border: 0; border-bottom: 4px solid transparent; color: #fff; font: inherit; font-weight: 700; font-size: .9375rem; text-decoration: none; cursor: pointer; }
.menu__link:hover, .menu__link[aria-expanded="true"] { background: rgba(255,255,255,.12); color: #fff; }
.menu__link[aria-current="page"] { border-bottom-color: var(--turq); }
.menu__link .bi { font-size: .7rem; transition: transform .2s; }
.menu__link[aria-expanded="true"] .bi { transform: rotate(180deg); }
.menu__right { display: flex; align-items: center; }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 270px; padding: 10px; background: #fff; border-radius: 0 0 14px 14px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--turq); }
.dropdown[hidden] { display: none; }
.dropdown a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.dropdown a:hover { background: var(--tint); color: var(--navy); }
.dropdown .dropdown__all { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--teal); }

/* ---------- Rząd nagłówka: logo, pigułki CTA, wyszukiwarka ---------- */
.header-row { background: #fff; box-shadow: 0 2px 8px rgba(14,27,69,.08); position: relative; z-index: 40; }
.header-row__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; color: var(--navy); }
.brand img { width: 96px; height: 96px; object-fit: contain; }
.brand__text strong { display: block; font-size: 1.125rem; line-height: 1.15; }
.brand__text span { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pills { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.pill--primary { background: var(--turq); color: var(--navy-dark); }
.pill--primary:hover { background: var(--turq-hover); color: var(--navy-dark); box-shadow: var(--shadow); }
.pill--navy { background: var(--navy); color: #fff; }
.pill--navy:hover { background: var(--navy-dark); color: #fff; }
.pill--outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.pill--outline:hover { background: var(--navy); color: #fff; }
.pill--white { background: #fff; color: var(--navy); }
.pill--white:hover { background: var(--tint); color: var(--navy); }
.search { display: flex; align-items: center; gap: 8px; width: 190px; flex: 0 1 190px; border-bottom: 2px solid var(--navy); }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; font: inherit; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { border-bottom-color: var(--turq); box-shadow: 0 2px 0 var(--turq); }
.search button { border: 0; background: none; color: var(--navy); font-size: 1.15rem; cursor: pointer; padding: 6px; }

/* ---------- Slider hero (pełna szerokość, tekst wyśrodkowany u dołu) ---------- */
.hero { position: relative; min-height: clamp(520px, 78vh, 780px); display: flex; align-items: flex-end; justify-content: center; color: #fff; background: var(--navy-dark); overflow: hidden; }
.hero__slide-bg { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hero__slide-bg.is-active { opacity: 1; }
.hero__slide-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,27,69,.15) 0%, rgba(14,27,69,.35) 45%, rgba(14,27,69,.88) 100%); }
.hero__copy { position: relative; width: 100%; padding: 0 20px 110px; display: grid; justify-items: center; text-align: center; }
.hero__text { grid-area: 1 / 1; max-width: 920px; display: flex; flex-direction: column; align-items: center; gap: 18px; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.hero__text.is-active { opacity: 1; visibility: visible; }
.hero__title { color: #fff; font-size: clamp(2.25rem, 5.2vw, 4.25rem); font-weight: 800; line-height: 1.08; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.5rem); font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.hero__ctrl { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero__dots { display: flex; gap: 10px; }
.hero__dots button { width: 36px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.5); cursor: pointer; }
.hero__dots button[aria-current="true"] { background: var(--turq); }
.hero__btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.75); background: rgba(14,27,69,.45); color: #fff; font-size: 1.1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hero__btn:hover { background: rgba(255,255,255,.25); }
.hero__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.25); }
.hero__progress-bar { display: block; width: 100%; height: 100%; background: var(--turq); transform: scaleX(0); transform-origin: left; }
.hero__progress-bar.is-running { animation: heroBar 7000ms linear forwards; }
.hero__progress-bar.is-paused { animation-play-state: paused; }
@keyframes heroBar { to { transform: scaleX(1); } }

/* ---------- Sekcje ---------- */
.section { padding: 80px 0; }
.section--tint { background: var(--tint-2); }
.section-title { text-align: center; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; color: var(--navy); }
.section-title::after { content: ""; display: block; width: 72px; height: 4px; margin: 16px auto 0; border-radius: 4px; background: var(--turq); }
.section-lead { max-width: 720px; margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 1.125rem; }
.section-head { margin-bottom: 48px; }

/* ---------- Karty usług (tytuł u góry, duże zdjęcie, okrągła strzałka) ---------- */
.svc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.svc-card { position: relative; flex: 0 1 calc((100% - 56px) / 3); min-width: 280px; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.svc-card:hover, .svc-card:focus-within { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.svc-card__title { padding: 26px 28px 22px; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.svc-card__title a { color: var(--navy); text-decoration: none; }
.svc-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.svc-card__title a:focus-visible { outline: none; }
.svc-card:focus-within { outline: 3px solid var(--turq); outline-offset: 3px; }
.svc-card__desc { padding: 0 28px 20px; color: var(--muted); }
.svc-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin-top: auto; background: var(--tint); }
.svc-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.svc-card:hover .svc-card__media img { transform: scale(1.05); }
.go { position: absolute; right: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.svc-grid--4 .svc-card { flex-basis: calc((100% - 84px) / 4); min-width: 250px; }
.svc-grid--4 .svc-card__title { font-size: 1.3125rem; }
.more { margin-top: 44px; text-align: center; }

/* ---------- Pas "Sprawdź": poziome karty tekst | zdjęcie ---------- */
.band { background: var(--band); padding: 80px 0; }
.band .section-title::after { background: var(--navy); }
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.promo { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 250px; }
.promo__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; }
.promo__body h3 { font-size: 1.375rem; font-weight: 800; }
.promo__body p { color: var(--muted); font-size: .9375rem; flex: 1; }
.promo__media { position: relative; background: var(--tint); }
.promo__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo:focus-within { outline: 3px solid var(--navy); outline-offset: 3px; }
.promo .pill { min-height: 46px; padding: 0 22px; font-size: .9375rem; }
.promo .pill::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ---------- Pas liczb (dwa panele) ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.stats__panel { padding: 36px 40px 44px; }
.stats__panel--light { background: var(--tint-2); }
.stats__panel--dark { background: var(--navy); color: #fff; }
.stats__panel h3 { font-size: 1.5rem; margin-bottom: 26px; }
.stats__panel--dark h3 { color: #fff; }
.stats__row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stats__item { padding: 6px 10px; border-left: 1px solid rgba(26,47,107,.2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stats__item:first-child { border-left: 0; }
.stats__panel--dark .stats__item { border-left-color: rgba(255,255,255,.3); }
.stats__icon { font-size: 1.6rem; color: var(--teal); }
.stats__panel--dark .stats__icon { color: var(--turq); }
.stats__num { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; line-height: 1; color: var(--navy); }
.stats__panel--dark .stats__num { color: #fff; }
.stats__label { font-size: .9375rem; color: var(--muted); }
.stats__panel--dark .stats__label { color: rgba(255,255,255,.92); }

/* ---------- Aktualności ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.news-card:hover, .news-card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card:focus-within { outline: 3px solid var(--turq); outline-offset: 3px; }
.news-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--tint); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 28px; flex: 1; }
.tag { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--teal); font-size: .8125rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.news-card__date { font-size: .875rem; color: var(--muted); }
.news-card h3 { font-size: 1.3125rem; font-weight: 800; }
.news-card h3 a { color: var(--navy); text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card p { color: var(--muted); }

/* ---------- Kontakt i lokalizacja ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: stretch; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-card .bi { font-size: 1.6rem; color: var(--teal); }
.contact-card h3 { font-size: 1.0625rem; }
.contact-card a { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--navy); }
.contact-card p { color: var(--muted); font-size: .9375rem; }
.hours { margin-top: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.hours h3 { margin-bottom: 10px; }
.hours dl { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours div:last-child { border-bottom: 0; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 800; color: var(--navy); text-align: right; }
.hours .note { margin-top: 10px; font-size: .8125rem; color: var(--muted); }
.map { min-height: 420px; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 28px; color: var(--navy); border: 1px solid var(--line);
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)), repeating-linear-gradient(0deg, transparent 0 39px, rgba(26,47,107,.08) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(26,47,107,.08) 39px 40px), var(--tint); }
.map .bi { font-size: 3rem; color: var(--red); }
.map strong { font-size: 1.25rem; }

/* ---------- Podstrony ---------- */
.page-hero { position: relative; color: #fff; background: var(--navy-dark); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(14,27,69,.92), rgba(26,47,107,.6)); }
.page-hero__inner { position: relative; z-index: 2; padding-block: 56px 60px; display: flex; flex-direction: column; gap: 12px; }
.crumbs { font-size: .9375rem; display: flex; flex-wrap: wrap; gap: 6px; color: #E3F4F5; }
.crumbs a { color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.page-hero p { max-width: 720px; font-size: 1.125rem; color: #E3F4F5; }
.finder { max-width: 640px; margin-bottom: 36px; }
.finder label { display: block; margin-bottom: 8px; font-weight: 800; color: var(--navy); }
.finder input { width: 100%; height: 58px; padding: 0 20px; border: 2px solid var(--navy); border-radius: 999px; font: inherit; font-size: 1.0625rem; }
.finder input:focus-visible { outline: 3px solid var(--turq); outline-offset: 2px; }
.finder p { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.clinic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.clinic { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 24px; transition: transform .25s, box-shadow .25s; }
.clinic:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.clinic:target { outline: 3px solid var(--turq); outline-offset: 3px; }
.clinic__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.clinic__media img { width: 100%; height: 100%; object-fit: cover; }
.clinic__body { display: flex; flex-direction: column; gap: 12px; padding: 26px 30px 30px; flex: 1; }
.clinic h2 { font-size: 1.625rem; font-weight: 800; }
.clinic p { flex: 1; color: var(--ink); font-size: 1.0625rem; }
.clinic__tel { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; background: var(--turq); color: var(--navy-dark); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.clinic__tel:hover { background: var(--turq-hover); color: var(--navy-dark); }
.empty { margin-top: 24px; padding: 28px; text-align: center; background: var(--tint); border-radius: var(--radius); color: var(--muted); }
.form { display: grid; gap: 16px; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--navy); }
.form input, .form textarea, .form select { width: 100%; padding: 13px 16px; border: 1.5px solid #6B7790; border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
.form textarea { min-height: 150px; resize: vertical; }
.form small { color: var(--muted); }

/* ---------- Stopka ---------- */
.funding-band { background: #fff; border-top: 1px solid var(--line); padding: 32px 0 28px; }
.funding-band ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: 16px; }
.funding-band img { width: 100%; max-width: 280px; max-height: 80px; object-fit: contain; }
.funding-band p { text-align: center; font-size: .875rem; color: var(--muted); max-width: 980px; margin-inline: auto; }
.footer { background: var(--navy-dark); color: #E3F4F5; padding: 64px 0 0; }
.footer a { color: #E3F4F5; text-decoration: none; }
.footer a:hover { color: var(--turq); text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer__logo { display: inline-flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.footer__logo img { width: 112px; height: 112px; background: #fff; border-radius: 50%; padding: 4px; }
.footer__logo strong { color: #fff; font-size: 1.125rem; line-height: 1.25; }
.footer h2 { color: #fff; font-size: 1.0625rem; margin-bottom: 14px; }
.footer li + li { margin-top: 8px; }
.footer address { font-style: normal; line-height: 1.8; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.18); padding: 20px 0; font-size: .875rem; color: #C9DDE2; }
.footer__bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Przycisk "na górę" z obwiednią postępu (zaokrąglony kwadrat) ---------- */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: 54px; height: 54px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(14,27,69,.3); cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s, background-color .2s; }
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--navy-dark); }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 3; }
.to-top__track { stroke: rgba(255,255,255,.25); }
.to-top__bar { stroke: var(--turq); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.to-top .bi { position: relative; font-size: 1.3rem; }

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
  .svc-card, .svc-grid--4 .svc-card { flex-basis: calc((100% - 28px) / 2); }
  .promo-grid, .stats, .contact-grid { grid-template-columns: 1fr; }
  .news-grid, .clinic-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; margin-block: 8px; }
  .mainnav__inner { flex-wrap: wrap; }
  .mainnav__menu { display: none; width: 100%; }
  .mainnav__menu.is-open { display: block; }
  .menu, .menu__right { flex-direction: column; width: 100%; }
  .menu > li { flex-direction: column; }
  .menu__right .menu__link { justify-content: flex-start; gap: 12px; }
  .menu__link { width: 100%; justify-content: space-between; min-height: 54px; border-bottom: 1px solid rgba(255,255,255,.15); }
  .dropdown { position: static; box-shadow: none; border-radius: 0; background: rgba(255,255,255,.08); border-top: 0; padding: 4px 8px 10px; }
  .dropdown a { color: #fff; } .dropdown a:hover { background: rgba(255,255,255,.14); color: #fff; }
  .header-row__inner { justify-content: center; }
  .pills { justify-content: center; }
}
@media (max-width: 700px) {
  .section, .band { padding: 56px 0; }
  .svc-card, .svc-grid--4 .svc-card { flex-basis: 100%; }
  .promo { grid-template-columns: 1fr; } .promo__media { min-height: 190px; order: -1; }
  .news-grid, .clinic-grid, .contact-cards { grid-template-columns: 1fr; }
  .stats__row { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .brand img { width: 84px; height: 84px; }
  .hero__copy { padding-bottom: 130px; }
}


/* ---------- Wyszukiwarka w pasku nawigacji ---------- */
.nav-search { display: flex; align-items: center; width: clamp(150px, 14vw, 240px); margin-right: 12px; background: #fff; border-radius: 999px; padding: 0 6px 0 18px; }
.nav-search input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font: inherit; font-size: .9375rem; color: var(--ink); }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { box-shadow: 0 0 0 3px var(--turq); }
.nav-search button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--navy); color: #fff; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nav-search button:hover { background: var(--navy-dark); }
@media (max-width: 1023px) { .nav-search { width: 100%; margin: 10px 0; } .menu__right { padding-bottom: 8px; } }

/* ---------- Zbiorczy pływający widżet dostępności ---------- */
.a11y-fab { position: fixed; left: 20px; bottom: 20px; z-index: 1050; }
.a11y-fab__btn { width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--turq); color: var(--navy-dark); font-size: 1.9rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 20px rgba(14,27,69,.3); }
.a11y-fab__btn:hover { background: var(--turq-hover); }
.a11y-fab__btn[aria-expanded="true"] { background: var(--navy); color: #fff; }
.a11y-fab__panel { position: absolute; left: 0; bottom: 68px; width: 290px; padding: 18px 20px 20px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--turq); }
.a11y-fab__panel[hidden] { display: none; }
.a11y-fab__title { margin-bottom: 12px; font-weight: 800; font-size: 1.0625rem; color: var(--navy); }
.a11y-fab__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.a11y-fab__btns { display: flex; gap: 6px; }
.a11y-fab__btns button, .a11y-fab__switch { min-width: 42px; height: 40px; padding: 0 10px; border: 1.5px solid var(--navy); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.a11y-fab__btns button:hover, .a11y-fab__switch:hover, .a11y-fab__switch[aria-pressed="true"] { background: var(--navy); color: #fff; }
html.hc .a11y-fab__panel { background: #000; border: 2px solid #FFD500; }
html.hc .a11y-fab__panel, html.hc .a11y-fab__row { color: #fff; }
@media (max-width: 480px) { .a11y-fab { left: 12px; bottom: 12px; } .to-top { right: 12px; bottom: 12px; } .a11y-fab__panel { width: min(290px, calc(100vw - 24px)); } }

/* przy dużym powiększeniu tekstu menu pozostaje w jednym wierszu */
html.big-text .menu__link { font-size: .78rem; padding-inline: 8px; }
html.big-text .nav-search { width: 150px; }

/* ---------- Zamówienia publiczne ---------- */
.container--text { max-width: 1080px; }
.container--text > p { max-width: 760px; margin: 28px auto; text-align: center; }
.container--text h3 { margin: 32px 0 12px; }
.container--text .finder { margin-top: 32px; }
.tenders, .docs, .years { list-style: none; margin: 0; padding: 0; }
.tenders { display: grid; gap: 14px; }
.tenders [hidden] { display: none; }
.tender { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.tender summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 18px 22px; cursor: pointer; list-style: none; border-radius: 14px; overflow-wrap: anywhere; }
.tender summary::-webkit-details-marker { display: none; }
.tender summary::after { content: "+"; grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 1.75rem; font-weight: 700; color: var(--navy); }
.tender[open] summary::after { content: "−"; }
.tender summary > span { grid-column: 1; }
.tender__num { font-weight: 800; color: var(--teal); }
.tender__subject { font-weight: 700; color: var(--navy); }
.tender__meta { font-size: .875rem; color: var(--muted); }
.tender .docs { padding: 0 22px 12px; }
.docs li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.docs time { color: var(--muted); font-variant-numeric: tabular-nums; }
.docs__type { margin-left: 6px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 6px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.years { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
html.hc .tender { background: #000; border: 2px solid #FFD500; }
html.hc .tender__num, html.hc .tender__subject, html.hc .tender summary::after { color: #FFD500; }
html.hc .tender__meta, html.hc .docs time { color: #fff; }
@media (max-width: 600px) { .docs li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Menu: ikona domku, panel "Leczenie", zagęszczenie na węższych ekranach ---------- */
.menu__link--home .bi { font-size: 1.15rem; transform: none; }
.dropdown--mega { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 760px; align-content: start; }
.dropdown--mega[hidden] { display: none; }
.dropdown__head { margin: 0; padding: 8px 14px; font-weight: 800; color: var(--teal); border-bottom: 2px solid var(--line); }
html.hc .dropdown__head { color: #000; }
@media (min-width: 1024px) {
  .menu { flex-wrap: wrap; }
  .menu__home-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .mainnav .container--full { padding-inline: 12px; }
  .menu__link { padding-inline: 8px; font-size: .8125rem; gap: 5px; }
  .nav-search { width: 140px; margin-right: 0; }
}
@media (max-width: 1023px) {
  .menu__link--home { justify-content: flex-start; }
  .dropdown--mega { grid-template-columns: 1fr; width: auto; }
  .dropdown__head { color: #fff; border-color: rgba(255,255,255,.3); }
  html.hc .dropdown__head { color: #FFD500; }
}

/* ---------- Podstrony ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.layout--single { grid-template-columns: minmax(0, 1fr); }
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 32px 0 12px; font-size: 1.5rem; }
.dropdown a[aria-current="page"] { text-decoration: underline; }
.subnav { background: var(--tint-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.subnav h2 { font-size: 1.0625rem; margin-bottom: 8px; }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.subnav a:hover { background: var(--tint); }
.subnav a[aria-current="page"] { background: var(--navy); color: #fff; }
.tiles { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tiles a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: var(--navy); text-decoration: none; }
.tiles a:hover { box-shadow: var(--shadow-lg); }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; }
.note-box { padding: 14px 18px; border-left: 4px solid var(--turq); background: var(--tint-2); border-radius: 8px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.people h2 { margin: 8px 0; font-size: 1.0625rem; }
.table-wrap { overflow-x: auto; margin-bottom: 32px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose caption { text-align: left; font-weight: 800; color: var(--navy); font-size: 1.25rem; padding-bottom: 8px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: normal; }
.prose td { white-space: nowrap; }
.tender__body { padding: 0 22px 16px; }
.clinic h2 a { color: inherit; text-decoration: none; }
.clinic h2 a:hover { text-decoration: underline; }
html.hc .subnav, html.hc .note-box, html.hc .tiles a { background: #000; border-color: #FFD500; color: #FFD500; }
html.hc .subnav a[aria-current="page"] { background: #FFD500; color: #000; }
html.hc .facts dt, html.hc .prose caption { color: #FFD500; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .facts div { grid-template-columns: 1fr; gap: 2px; } .prose th, .prose td { padding: 8px 4px; font-size: .875rem; } }
.stats--page { grid-template-columns: 1fr; margin-top: 40px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose .tiles { margin-bottom: 24px; padding: 0; }
.prose ul.tiles, .prose .subnav ul { padding-left: 0; }
.prose .contact-card p { margin: 0; }
.prose ul:not([class]) { list-style: disc; padding-left: 22px; }
.people { margin-bottom: 24px; }
@media (max-width: 1023px) { .menu__link.menu__link--home { justify-content: flex-start; gap: 12px; } .dropdown .dropdown__all { color: var(--turq); } }
