/* ===========================================================
   Bliźniacze strony: Medycyna pracy + Kardiologia
   (dwie niezależne firmy jednego właściciela, wspólny system)
   Sygnatura: linia EKG (puls). Typografia: Fraunces + Atkinson
   Hyperlegible (krój pod czytelność dla osób słabowidzących).
   Projekt pod starszych odbiorców: duża czcionka, wysoki
   kontrast, jasna nawigacja, wyraźny przycisk telefonu.
   =========================================================== */

:root {
  /* --- Paleta --- */
  --ink: #15302b;          /* tekst — ciepła zieleń-czerń */
  --sea: #0f5d5a;          /* podstawowy teal (medycyna pracy) */
  --sea-deep: #0a4543;
  --mist: #e8f2ef;         /* delikatne tło sekcji */
  --paper: #fbfdfc;        /* tło strony */
  --pulse: #d9544a;        /* akcent — koral „puls” (kardiologia) */
  --pulse-deep: #b8413a;
  --pulse-text: #9e352f;   /* ciemniejszy koral pod tekst na jasnym tle */
  --muted: #4c5e58;        /* tekst drugorzędny */
  --border: #d2e0dc;
  --white: #ffffff;
  --footer-bg: #15302b;    /* tło stopki (domyślnie ciemna zieleń) */

  /* --- Typografia --- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-base: clamp(1.1rem, 0.98rem + 0.45vw, 1.25rem); /* ~18–20px */

  /* --- Wymiary --- */
  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(15, 93, 90, 0.13);
  --shadow-sm: 0 4px 16px rgba(21, 48, 43, 0.07);
  --ring: 0 0 0 3px rgba(217, 84, 74, 0.85);
}

/* =================== Reset / baza =================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sea-deep); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); font-weight: 600; }
p  { margin: 0 0 1em; }

strong { font-weight: 700; }

/* Cele kotwic nie chowają się pod przyklejony nagłówek */
section[id], #main { scroll-margin-top: 96px; }

/* =================== Dostępność =================== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sea-deep);
  color: #fff;
  padding: 0.85rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Widoczny fokus + zapas dla trybu Windows High Contrast (forced-colors) */
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--ring);
  border-radius: 6px;
}
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}

/* =================== Layout =================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--mist { background: var(--mist); }

.section-head { max-width: 660px; margin: 0 0 2.75rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pulse-text);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--pulse);
}

/* =================== Linia EKG (sygnatura) =================== */
.ecg {
  display: block;
  width: 100%;
  height: 46px;
  overflow: visible;
}
.ecg path {
  fill: none;
  stroke: var(--pulse);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.ecg--draw path {
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  animation: ecg-draw 2.4s ease-out forwards;
}
@keyframes ecg-draw {
  to { stroke-dashoffset: 0; }
}
.ecg-divider {
  padding: 0;
  line-height: 0;
  background: var(--paper);
}
.ecg-divider.on-mist { background: var(--mist); }

/* =================== Przyciski =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.06s ease, box-shadow 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn .ico { font-size: 1.2em; line-height: 1; }
.btn--block { width: 100%; }

.btn--call { background: var(--sea); color: #fff; box-shadow: var(--shadow-sm); }
.btn--call:hover { background: var(--sea-deep); }

.btn--accent { background: var(--pulse); color: #fff; }
.btn--accent:hover { background: var(--pulse-deep); }

.btn--ghost { background: transparent; color: var(--sea-deep); border-color: var(--sea); }
.btn--ghost:hover { background: rgba(15, 93, 90, 0.08); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1.2rem; }

/* Biały przycisk — na kolorowych paskach CTA (kontrast niezależnie od motywu) */
.btn--white { background: #fff; color: var(--sea-deep); }
.btn--white:hover { background: rgba(255, 255, 255, 0.88); color: var(--sea-deep); }

/* =================== Nagłówek / nawigacja =================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 253, 252, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--sea);
  border-radius: 13px;
}
.brand--heart .brand__mark { background: var(--pulse); }
.brand__mark svg { width: 28px; height: 28px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
}
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
}
.nav a:hover { background: var(--mist); color: var(--sea-deep); }
.nav a[aria-current="page"] {
  color: var(--sea-deep);
  background: var(--mist);
  box-shadow: inset 0 -4px 0 var(--pulse);
  border-radius: 9px 9px 0 0;
}
.nav .btn { margin-left: 0.4rem; padding: 0.6rem 1.2rem; font-size: 1rem; color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: 11px;
  padding: 0.5rem 0.7rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--sea-deep);
}

/* =================== Hero =================== */
.hero { background: linear-gradient(165deg, var(--mist) 0%, var(--paper) 68%); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0 1.5rem;
}
.hero__content p.lead {
  font-size: 1.3rem;
  color: var(--ink);
  max-width: 40ch;
  margin-bottom: 1.9rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__actions .btn { min-width: 15rem; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =================== Dlaczego my =================== */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.reason { text-align: left; }
.reason__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.9rem;
}
.reason__icon svg { width: 30px; height: 30px; color: var(--sea); }
.reason h3 { margin-bottom: 0.25rem; }
.reason p { color: var(--muted); margin-bottom: 0; }

/* =================== Galeria =================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sea-deep);
}

/* =================== Treść oferty =================== */
.layout-2col {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.prose { max-width: 760px; }
.prose > p { color: var(--ink); }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.feature-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}
.feature-list .check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(217, 84, 74, 0.14);
  color: var(--pulse-deep);
  font-weight: 700;
}
.feature-list li strong { display: block; }
.feature-list li span.desc { color: var(--muted); font-size: 0.98rem; }

.info-card {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.info-card h3 { margin-top: 0; }
.info-card ul { padding-left: 1.2rem; margin: 0; }
.info-card li { margin-bottom: 0.5rem; }
.info-card li:last-child { margin-bottom: 0; }
.info-card li > ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  list-style: none;
}
.info-card li > ul li {
  position: relative;
  margin-bottom: 0.3rem;
}
.info-card li > ul li::before {
  content: "–";
  position: absolute;
  left: -1.1rem;
  color: var(--pulse-deep);
  font-weight: 700;
}

/* Notka alarmowa (kardiologia: 112) */
.emergency-note {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--white);
  border-left: 4px solid var(--pulse-deep);
  border-radius: var(--radius-sm);
}
.emergency-note p { margin: 0; }
.emergency-link {
  font-weight: 700;
  font-size: 1.25em;
  color: var(--pulse-deep);
  text-decoration: underline;
  white-space: nowrap;
}
.emergency-link:hover,
.emergency-link:focus { color: var(--pulse); }

/* =================== Pasek CTA =================== */
.cta-band {
  background: var(--sea);
  color: #fff;
  text-align: center;
}
.cta-band--heart { background: var(--pulse-deep); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.88); max-width: 540px; margin: 0 auto 1.75rem; }

/* =================== Kontakt =================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-list { display: grid; gap: 1.1rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.contact-item__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--mist);
}
.contact-item__icon svg { width: 26px; height: 26px; color: var(--sea); }
.contact-item h3 { margin-bottom: 0.15rem; font-size: 1.2rem; }
.contact-item p { margin-bottom: 0; color: var(--muted); }
.contact-item a { font-weight: 700; color: var(--sea-deep); text-decoration: none; }
.contact-item a:not(.phone-big) { display: inline-block; padding: 0.35rem 0; }
.contact-item a:hover { text-decoration: underline; }
.contact-item .phone-big {
  display: inline-block;
  padding: 0.2rem 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--pulse-deep);
}
.contact-aside {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.hours { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.hours li:last-child { border-bottom: 0; }
.hours .day { font-weight: 700; }
.hours .closed { color: var(--muted); }
.hours .hours-multi { text-align: right; }

/* =================== Stopka =================== */
.site-footer {
  background: var(--footer-bg);
  color: #c4d3ce;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2.25rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 { color: #fff; font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: #9fb4ae; max-width: 32ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.footer-links a { display: inline-block; padding: 0.5rem 0; }

/* Cross-link do drugiej firmy (ta sama lokalizacja) */
.footer-cross__card {
  display: block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
}
.footer-cross__card:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.footer-cross__label { display: block; color: #9fb4ae; font-size: 0.9rem; }
.footer-cross__name { display: block; color: #fff; font-weight: 700; font-size: 1.1rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.5rem;
  font-size: 0.92rem;
  color: #9fb4ae;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.footer-bottom a { color: #c4d3ce; }

/* ===========================================================
   Rozdzielnik (strona startowa pod adresem /)
   =========================================================== */
.chooser {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(165deg, var(--mist) 0%, var(--paper) 70%);
}
.chooser__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.chooser h1 { margin-bottom: 0.25rem; }
.chooser__sub { color: var(--muted); font-size: 1.2rem; margin-bottom: 2.75rem; }
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  width: 100%;
  max-width: 760px;
}
.choice-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border-top: 6px solid var(--sea);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.choice-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); text-decoration: none; }
.choice-card--heart { border-top-color: var(--pulse); }
.choice-card__icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--mist);
  margin-bottom: 1.1rem;
}
.choice-card--heart .choice-card__icon { background: rgba(217, 84, 74, 0.12); }
.choice-card__icon svg { width: 34px; height: 34px; }
.choice-card h2 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.choice-card p { color: var(--muted); }
.choice-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--sea-deep);
}
.choice-card--heart .choice-card__cta { color: var(--pulse-deep); }
.chooser__contact { margin-top: 2.75rem; color: var(--muted); }
.chooser__contact a { font-weight: 700; color: var(--sea-deep); }

/* =================== Responsywność =================== */
/* Przy 920px: nagłówek → menu mobilne; układy 2-kolumnowe się składają */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 1rem; }
  .layout-2col { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav .btn {
    width: 100%;
    text-align: center;
    margin: 0.2rem 0;
    font-size: 1.15rem;
    padding: 0.8rem;
  }
  .nav a[aria-current="page"] {
    box-shadow: inset 4px 0 0 var(--pulse);
    border-radius: 9px;
  }
}

@media (max-width: 620px) {
  .choices { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 2rem; }
  .hero__content h1 { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 2.3rem); }
  .hero__content p.lead { font-size: 1.15rem; }
  .map-embed { height: 300px; }
  /* Mniejsze przyciski na telefonie (nadal ≥44px wysokości — dotyk) */
  .btn { padding: 0.75rem 1.3rem; font-size: 1.02rem; }
  .btn--lg { padding: 0.85rem 1.5rem; font-size: 1.08rem; }
  /* Przyciski hero dopasowane do treści i wyśrodkowane */
  .hero__actions { gap: 0.75rem; justify-content: center; }
  /* Na telefonie wszystkie przyciski pokazują samą akcję, bez numeru — bez zawijania */
  .btn .btn__num { display: none; }
}

/* ===========================================================
   Motyw „czerwony” — Kardiologia (lustrzane odbicie zielonego).
   Nadpisuje zmienne motywu, więc wszystkie komponenty (ikony,
   tła, linki, EKG, przyciski) stają się spójnie czerwone.
   Wystarczy <body class="theme-heart">.
   =========================================================== */
body.theme-heart {
  --sea: #c0392b;
  --sea-deep: #962d22;
  --mist: #fbeae7;
  --border: #f0d8d3;
  --footer-bg: #3a1411;    /* stopka w ciemnej czerwieni (motyw kardiologii) */
  --pulse: #c0392b;
  --pulse-deep: #962d22;
  --pulse-text: #962d22;
  --ring: 0 0 0 3px rgba(192, 57, 43, 0.85);
  --shadow: 0 14px 40px rgba(192, 57, 43, 0.14);
  --shadow-sm: 0 4px 16px rgba(60, 21, 18, 0.08);
}

/* =================== Dojazd / mapa =================== */
.map-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-card .btn { margin-top: 1.25rem; }

/* =================== Mniej ruchu =================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .ecg--draw path { stroke-dashoffset: 0; }
}
