/* ==========================================================
   dializatory.com – NTM-MED S.C.
   ========================================================== */

:root {
  /* paleta z grafiki „Profesjonalny zestaw dializatorów WEGO” */
  --ink: #0b2350;
  --ink-soft: #43597d;
  --muted: #6a7f9e;
  --line: #d3e4f5;
  --bg: #ffffff;
  --bg-alt: #eef6fe;
  --primary: #0b3a91;
  --primary-dark: #082a6b;
  --primary-bright: #0042ce;
  --primary-tint: #dbeefe;
  --sky: #c7e2fa;

  /* kolory serii – zgodne z kolorem pokryw dializatorów */
  --hf: #02795a;
  --hf-tint: #e0f3ec;
  --lf: #7a5a2e;
  --lf-tint: #f3ece2;
  --hp: #0042ce;
  --hp-tint: #e1ebfd;
  --hdf: #e3540b;
  --hdf-tint: #fdebe1;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 35, 80, .06), 0 8px 28px rgba(11, 58, 145, .08);
  --container: 1180px;
  --header-h: 72px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.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: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary-tint); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .95rem; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand-sub {
  font-size: .85rem; font-weight: 600; color: var(--muted);
  padding-left: 14px; border-left: 1px solid var(--line);
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.main-nav a:hover { background: var(--bg-alt); }
.main-nav .nav-cta { background: var(--primary); color: #fff; }
.main-nav .nav-cta:hover { background: var(--primary-dark); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  cursor: pointer; position: relative; border-radius: var(--radius-sm);
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: "";
  transition: transform .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
  .main-nav a { border-radius: var(--radius-sm); padding: 12px 14px; }
  .main-nav .nav-cta { text-align: center; margin-top: 6px; }
}
@media (max-width: 420px) {
  .brand img { height: 30px; }
  .brand-sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, var(--sky) 0%, transparent 70%),
    linear-gradient(180deg, var(--primary-tint) 0%, #fff 100%);
  padding: 48px 0 56px;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700;
  color: var(--primary); margin-bottom: .8em;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

@media (max-width: 900px) {
  .hero { padding: 28px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-media { order: -1; }
}

/* ---------- Oznaczenie grafik AI (AI Act, art. 50 ust. 4) ---------- */
.hero-media,
.about-media { position: relative; }
.ai-label {
  position: absolute; left: 10px; bottom: 10px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(11, 35, 80, .78); color: #fff;
  font-size: .75rem; font-weight: 600; line-height: 1.5;
  pointer-events: none;
}

/* ---------- Sekcje ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); }

@media (max-width: 700px) {
  .section { padding: 48px 0; }
}

/* ---------- Kolory serii ---------- */
[data-series="hf"]  { --accent: var(--hf);  --accent-tint: var(--hf-tint); }
[data-series="lf"]  { --accent: var(--lf);  --accent-tint: var(--lf-tint); }
[data-series="hp"]  { --accent: var(--hp);  --accent-tint: var(--hp-tint); }
[data-series="hdf"] { --accent: var(--hdf); --accent-tint: var(--hdf-tint); }

.series-tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-tint, var(--primary-tint)); color: var(--accent, var(--primary));
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- Karty serii ---------- */
.series-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.series-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); border-top: 4px solid var(--accent);
  background: #fff; color: var(--ink); text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.series-card .series-tag { align-self: flex-start; }
.series-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.series-card h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.series-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.series-card .range { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--ink); }

@media (max-width: 980px) { .series-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .series-grid { gap: 10px; }
  .series-card { padding: 14px 14px 16px; }
  .series-card .series-tag { font-size: .68rem; padding: 3px 9px; align-self: flex-start; }
  .series-card h3 { font-size: .95rem; margin-top: 6px; }
  .series-card p { font-size: .85rem; }
}
@media (max-width: 340px) { .series-grid { grid-template-columns: 1fr; } }

/* ---------- Sekcja produktu ---------- */
.product { border-top: 1px solid var(--line); }
.product-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.product-copy h2 { margin-top: 12px; }
.product-copy > p { color: var(--ink-soft); }

.features { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.features li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.features li strong { color: var(--ink); }
.features li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint);
}

.note {
  font-size: .92rem; color: var(--ink-soft);
  border-left: 3px solid var(--accent); padding: 4px 0 4px 12px;
}

.product-photo {
  margin: 24px 0 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.product-photo img { width: 100%; }
.product-photo figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 6px; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Tabele ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.spec-table caption {
  caption-side: top; text-align: left; padding: 14px 16px 10px;
  font-weight: 700; font-size: .95rem;
}
.spec-table th,
.spec-table td { padding: 10px 16px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.spec-table thead th {
  background: var(--accent, var(--primary)); color: #fff; font-weight: 700; font-size: .85rem;
}
.spec-table th:first-child { text-align: left; }
.spec-table tbody th { font-weight: 700; color: var(--accent, var(--ink)); }
.spec-table tbody tr:hover > * { background: var(--accent-tint, var(--bg-alt)); }

.table-foot { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.table-foot a { font-weight: 600; }

/* ---------- Katalogi ---------- */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.downloads a {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 18px 18px 18px 56px; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.downloads a::before {
  content: "PDF"; position: absolute; left: 14px; top: 18px;
  width: 30px; height: 36px; border-radius: 4px;
  background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;
}
.downloads a:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.dl-name { font-weight: 700; }
.dl-meta { font-size: .85rem; color: var(--muted); }
@media (max-width: 980px) { .downloads { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .downloads { grid-template-columns: 1fr; } }

/* ---------- O nas ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-text p { color: var(--ink-soft); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Kontakt ---------- */
.contact { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-bright) 100%); color: #fff; }
.contact .section-head p { color: rgba(255, 255, 255, .85); }

/* ---------- Responsywność: elementy siatek nie mogą rozpychać strony ---------- */
.hero-grid > *,
.product-grid > *,
.about-grid > *,
.series-grid > *,
.contact-grid > *,
.downloads > * { min-width: 0; }

/* ---------- Telefony ---------- */
@media (max-width: 600px) {
  body { font-size: .97rem; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 22px; }

  .hero { padding: 16px 0 32px; }
  .hero-grid { gap: 20px; }
  .eyebrow { font-size: .72rem; }
  .lead { font-size: 1rem; }
  .hero-actions { margin-top: 18px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 140px; padding: 0 14px; }

  .ai-label { left: 8px; bottom: 8px; font-size: .66rem; padding: 2px 8px; }

  .product-grid { gap: 20px; }
  .product-copy h2 { font-size: 1.35rem; }
  .features li { padding-left: 22px; }
  .product-photo { margin-top: 18px; padding: 10px; }

  .spec-table { font-size: .88rem; }
  .spec-table caption { padding: 12px 12px 8px; font-size: .9rem; }
  .spec-table th,
  .spec-table td { padding: 8px 10px; }
  .spec-table thead th { white-space: normal; font-size: .78rem; line-height: 1.25; vertical-align: bottom; }

  .downloads a { padding: 14px 14px 14px 52px; }
  .downloads a::before { top: 14px; }

  .about-grid { gap: 20px; }
  .contact-card { padding: 20px; }
  .contact-big { font-size: 1.4rem; }

  .site-footer { padding: 28px 0; }
}

/* Bardzo wąskie telefony (np. 320–380 px) – tabela mieści się bez przewijania */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .spec-table { font-size: .8rem; }
  .spec-table th,
  .spec-table td { padding: 7px 6px; }
  .spec-table thead th { font-size: .7rem; }
  .spec-table caption { padding: 10px 8px 6px; }
}
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px; }
.contact-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-big { display: inline-block; font-size: 1.6rem; font-weight: 700; text-decoration: none; margin-bottom: 6px; }
.contact-email { font-size: 1.1rem; font-weight: 700; word-break: break-all; }
.contact-card address { font-style: normal; margin-bottom: 10px; }
.email-slot { min-height: 46px; display: flex; align-items: center; margin-bottom: 8px; }
.email-slot.is-revealed { flex-direction: column; align-items: flex-start; }
.email-slot.is-revealed p { margin: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Okno potwierdzenia dla profesjonalistów ---------- */
html.gate-open { overflow: hidden; }
.pro-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(11, 35, 80, .55);
  backdrop-filter: blur(8px);
}
.pro-gate[hidden] { display: none; }
.pro-gate-box {
  width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: var(--radius); padding: 28px;
  box-shadow: 0 20px 60px rgba(11, 35, 80, .3);
  border-top: 4px solid var(--primary);
}
.pro-gate-logo { height: 34px; width: auto; margin-bottom: 18px; }
.pro-gate-box h2 { font-size: 1.4rem; }
.pro-gate-box p { color: var(--ink-soft); }
.pro-gate-box p strong { color: var(--ink); }
.pro-gate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1em; }
.pro-gate-denied {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--primary-tint); color: var(--ink) !important; outline: none;
}
@media (max-width: 480px) {
  .pro-gate-box { padding: 22px 18px; }
  .pro-gate-actions .btn { flex: 1 1 100%; }
}

/* ---------- Polityka prywatności ---------- */
.legal { padding-top: 48px; }
.legal-inner { max-width: 800px; }
.legal h1 { margin-bottom: .2em; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal h3 { margin-top: 1.4em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.3em; margin: 0 0 1em; display: grid; gap: 6px; }
.legal .email-slot { margin-bottom: 1em; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--bg-alt); color: var(--ink-soft); padding: 36px 0; font-size: .875rem; border-top: 1px solid var(--line); }
.footer-logo { height: 32px; width: auto; margin-bottom: 16px; }
.footer-inner p { margin: 0 0 .6em; }
.disclaimer { max-width: 820px; }
