/* =========================================================
   Sojowa Medica — arkusz stylów
   Paleta: spokojna zieleń medyczna + biel + grafit
   ========================================================= */

:root {
  --primary: #0f7d78;
  --primary-dark: #0b5f5b;
  --primary-050: #e8f4f3;
  --primary-100: #d1e8e6;
  --text: #1e2a2a;
  --muted: #5f6f6e;
  --bg: #ffffff;
  --surface: #f4f8f7;
  --surface-2: #eaf1f0;
  --border: #e0e7e6;
  --danger: #b4453a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 39, .06), 0 1px 3px rgba(16, 40, 39, .08);
  --shadow-md: 0 8px 24px rgba(16, 40, 39, .10);
  --maxw: 1140px;
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-dark); }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--surface { background: var(--surface); }
.section--tint { background: linear-gradient(180deg, var(--primary-050), #fff); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.125rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ===== Przyciski ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s, box-shadow .15s, border-color .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; color: var(--primary-dark); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-050); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: var(--primary-050); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ===== Pasek pomocniczy (dla lekarzy / logowanie) ===== */
.utility-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.utility-inner {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding-block: .4rem;
}
.utility-bar a { color: var(--muted); text-decoration: none; font-weight: 500; }
.utility-bar a:hover { color: var(--primary-dark); }
.utility-bar a.is-active { color: var(--primary-dark); font-weight: 700; }

.nav-mobile-only { display: none; }

/* ===== Nagłówek ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  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: 96px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.site-header .brand { font-size: 1.725rem; }
.brand-mark { width: 78px; height: 78px; flex: none; object-fit: contain; display: block; }
.brand-name strong { color: var(--primary); }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
  padding: .55rem .8rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a.is-active { color: var(--primary-dark); font-weight: 700; }
.site-nav .btn { margin-left: .4rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav .nav-mobile-only {
    display: block;
    border-top: 1px solid var(--border);
    margin-top: .4rem;
    padding-top: .8rem;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 20px 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: .18s;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: .8rem .6rem; }
  .site-nav .btn { margin: .35rem 0 0; }
}

/* ===== Hero ===== */
.hero { background: linear-gradient(180deg, var(--primary-050), #fff); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 span { color: var(--primary); }
.hero .lead { max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}
.hero-card h3 { margin-bottom: 1rem; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li {
  display: flex;
  gap: .7rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .97rem;
}
.hero-card li:last-child { border-bottom: 0; }
.hero-card li svg { flex: none; color: var(--primary); }

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

/* ===== Pasek zaufania ===== */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.75rem 0;
}
.trust div { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; font-size: .95rem; }
.trust svg { flex: none; color: var(--primary); margin-top: .1rem; }
@media (max-width: 800px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .trust { grid-template-columns: 1fr; } }

/* ===== Siatki / karty ===== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-050);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.card .card-link { font-weight: 600; text-decoration: none; color: var(--primary-dark); font-size: .92rem; }
.card .card-link:hover { text-decoration: underline; }

/* Blok ilustracyjny (bez zdjęć) */
.media {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #3aa8a2);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.media svg { width: 64px; height: 64px; opacity: .9; }

/* ===== Kroki ===== */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: .9rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ===== Lista cech ===== */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2.5rem; }
.feature { display: flex; gap: 1rem; }
.feature .icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  background: var(--primary-050);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature h3 { margin-bottom: .25rem; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

/* ===== Pas CTA ===== */
.cta-band {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 52ch; }

/* ===== Split (tekst + blok) ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split--reverse .split-media { order: -1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split--reverse .split-media { order: 0; }
}

/* ===== Mapa ===== */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ===== Formularze ===== */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.checkbox input { width: auto; margin-top: .2rem; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* Logowanie */
.auth {
  max-width: 960px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.auth-form { padding: clamp(1.5rem, 3vw, 2.5rem); }
.auth-aside {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.auth-aside h3 { color: #fff; }
.auth-aside p { color: rgba(255, 255, 255, .85); }
.auth-aside ul { list-style: none; padding: 0; margin: 0; }
.auth-aside li { display: flex; gap: .6rem; padding: .5rem 0; font-size: .95rem; }
.auth-aside li svg { flex: none; margin-top: .15rem; }

.segmented {
  display: inline-flex;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: .55rem 1.1rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.segmented button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.auth-pane[hidden] { display: none; }

@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { order: -1; }
}

/* ===== Rezerwacja / kalendarz ===== */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.cal-scroll { overflow-x: auto; margin-top: 1rem; }
.cal {
  display: grid;
  grid-template-columns: 64px repeat(6, minmax(92px, 1fr));
  gap: 6px;
  min-width: 640px;
}
.cal-h { font-weight: 700; font-size: .82rem; text-align: center; padding: .4rem .2rem; color: var(--muted); }
.cal-time { font-size: .8rem; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: .4rem; }
.slot {
  padding: .5rem .3rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: .82rem;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: var(--text);
}
.slot--free:hover { border-color: var(--primary); background: var(--primary-050); }
.slot--busy { background: var(--surface-2); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.slot.is-selected { background: var(--primary); color: #fff; border-color: var(--primary); }

.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1.5px solid var(--border); }
.dot--free { background: #fff; }
.dot--busy { background: var(--surface-2); }
.dot--sel { background: var(--primary); border-color: var(--primary); }

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}
.summary strong { font-size: 1.05rem; }

/* Podgląd panelu lekarza */
.preview { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.preview .preview-inner { filter: blur(2px); pointer-events: none; padding: 1.25rem; background: #fff; }
.preview .preview-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: rgba(244, 248, 247, .72);
  text-align: center;
  padding: 1rem;
}
.mock-grid { display: grid; grid-template-columns: 70px repeat(5, 1fr); gap: 5px; }
.mock-grid div { height: 26px; border-radius: 5px; background: var(--surface-2); }
.mock-grid .mg-on { background: var(--primary-100); }
.mock-grid .mg-h { background: transparent; font-size: .72rem; color: var(--muted); display: flex; align-items: center; }

/* ===== Hero podstron ===== */
.page-hero {
  background: linear-gradient(180deg, var(--primary-050), #fff);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.page-hero p { max-width: 60ch; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); }

/* ===== Cennik ===== */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-table th, .price-table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
.price-table th { background: var(--surface); font-weight: 700; }
.price-table td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.price-table tr:last-child td { border-bottom: 0; }

/* Kotwica pod sticky header */
.anchor { scroll-margin-top: 112px; }

/* ===== Stopka ===== */
.site-footer { background: #0e1a1a; color: #c7d3d2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-block: 3rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: #c7d3d2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0 0 .5rem; font-size: .92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; font-size: .92rem; }
.brand--footer { color: #fff; margin-bottom: .8rem; }
.brand--footer .brand-name strong { color: #5cc8c1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 1.25rem;
  font-size: .85rem;
  color: #8ea3a1;
}
.footer-bottom a { color: #8ea3a1; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Narzędziowe ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.stack > * + * { margin-top: 1rem; }
.tag {
  display: inline-block;
  background: var(--primary-050);
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  letter-spacing: .03em;
}
.hr { height: 1px; background: var(--border); border: 0; margin-block: 3rem; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }
