/* ============================================================
   MedicGroup Ambulance s.r.o. — design system
   ============================================================ */

:root {
  /* Barvy */
  --ink:        #10262B;
  --ink-soft:   #355055;
  --muted:      #60757A;   /* ztmaveno z #6B8288 — na bílé mělo kontrast jen 4.06:1 (WCAG AA vyžaduje 4.5) */
  --line:       #DEE8E7;
  --line-soft:  #EDF3F2;

  --bg:         #FFFFFF;
  --bg-soft:    #F5F9F8;
  --bg-deep:    #0E2A2E;

  --teal:       #0F6E68;
  --teal-dark:  #0A524E;
  --teal-light: #E6F2F0;
  --sand:       #C9A46A;
  --sand-soft:  #F6EFE3;

  /* Typografie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Rozměry */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 38, 43, .05), 0 4px 14px rgba(16, 38, 43, .05);
  --shadow-md: 0 2px 4px rgba(16, 38, 43, .05), 0 14px 40px rgba(16, 38, 43, .09);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.3; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
section { padding: clamp(56px, 8vw, 104px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); }
.section-head { max-width: 660px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: .96rem; font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { color: var(--teal-dark); }
.btn--outline-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hlavička ---------- */
.topbar {
  background: var(--bg-deep); color: rgba(255,255,255,.82);
  font-size: .84rem; padding: 8px 0;
}
.topbar .wrap { display: flex; gap: 22px; justify-content: flex-end; flex-wrap: wrap; }
.topbar a { color: rgba(255,255,255,.82); }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--teal), #14867E);
  display: grid; place-items: center;
}
.brand__mark svg { width: 21px; height: 21px; }
.brand__text { line-height: 1.15; }
.brand__name {
  font-family: var(--font-serif); font-size: 1.06rem; font-weight: 600;
  color: var(--ink); display: block; letter-spacing: -.01em;
}
.brand__sub {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 13px; border-radius: 9px;
  font-size: .93rem; font-weight: 500; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a.is-active { color: var(--teal); font-weight: 600; }
.header-cta { margin-left: 10px; padding: 11px 20px; font-size: .9rem; }

.burger {
  display: none; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.burger span {
  display: block; width: 19px; height: 1.8px; background: var(--ink);
  position: relative; transition: transform .25s var(--ease), opacity .2s;
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 19px; height: 1.8px; background: var(--ink);
  transition: transform .25s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.burger[aria-expanded="true"] span { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::before { transform: rotate(-90deg) translateX(6px); }
.burger[aria-expanded="true"] span::after  { opacity: 0; }

@media (max-width: 940px) {
  .burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 22px 26px; box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 74px); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 4px; font-size: 1.02rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .header-cta { margin: 14px 0 0; justify-content: center; }
  .topbar .wrap { justify-content: center; gap: 16px; font-size: .78rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg-deep);
  color: rgba(255,255,255,.86);
  padding: clamp(70px, 10vw, 130px) 0 clamp(60px, 8vw, 108px);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 78% 12%, rgba(20,134,126,.5), transparent 62%),
    radial-gradient(620px 420px at 8% 88%, rgba(201,164,106,.16), transparent 60%);
}
.hero .wrap { position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(34px, 5vw, 70px); align-items: center; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .eyebrow { color: #8FD2C8; }
.hero__lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); max-width: 48ch; margin-bottom: 30px; }
.hero__note {
  margin-top: 26px; font-size: .86rem; color: rgba(255,255,255,.58);
  display: flex; align-items: center; gap: 8px;
}

.hero-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 26px 26px 20px;
  backdrop-filter: blur(8px);
}
.hero-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 16px; }
.loc { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); }
.loc:first-of-type { border-top: 0; padding-top: 0; }
.loc__name { color: #fff; font-weight: 600; font-size: .97rem; display: block; margin-bottom: 3px; }
.loc__meta { font-size: .87rem; color: rgba(255,255,255,.66); }
.loc__hours { font-size: .87rem; color: #8FD2C8; margin-top: 3px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}

/* ---------- Karty ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-light); }
.card__icon {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: var(--teal-light); color: var(--teal);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card__icon svg { width: 23px; height: 23px; }
.card p { font-size: .96rem; }
.card__link {
  margin-top: auto; padding-top: 18px;
  font-size: .92rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.card__link::after { content: '→'; transition: transform .18s var(--ease); }
.card:hover .card__link::after { transform: translateX(4px); }

/* Potíže — kompaktní dlaždice */
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; transition: border-color .2s, transform .2s var(--ease);
}
.tile:hover { border-color: var(--teal); transform: translateY(-3px); }
.tile h4 { margin-bottom: 5px; color: var(--ink); }
.tile p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- Postup ---------- */
.steps { counter-reset: step; display: grid; gap: 4px; }
.step {
  display: grid; grid-template-columns: 54px 1fr; gap: 20px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  counter-increment: step;
  font-family: var(--font-serif); font-size: 1.5rem; color: var(--teal);
  font-weight: 600; line-height: 1.2;
}
.step__num::before { content: '0' counter(step); }
.step h3 { margin-bottom: 6px; }
.step p { font-size: .97rem; margin: 0; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Ceník ---------- */
.price-list { display: grid; gap: 14px; }
.price {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.price--feature { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.price h3 { margin-bottom: 6px; }
.price p { font-size: .94rem; margin: 0 0 .6em; }
.price__tag {
  font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600;
  color: var(--ink); white-space: nowrap; line-height: 1.1;
}
.price__tag small { display: block; font-family: var(--font-sans); font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--sand-soft); color: #846626; margin-bottom: 10px;  /* ztmaveno kvůli kontrastu (bylo 4.40:1) */
}
.badge--teal { background: var(--teal-light); color: var(--teal-dark); }
@media (max-width: 620px) { .price { grid-template-columns: 1fr; } .price__tag { font-size: 1.4rem; } }

/* ---------- Tým ---------- */
.person {
  display: grid; grid-template-columns: 168px 1fr; gap: 28px; align-items: start;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.person:first-of-type { border-top: 0; }
.person__photo {
  width: 168px; height: 168px; border-radius: 18px; object-fit: cover;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.person__role { color: var(--teal); font-size: .88rem; font-weight: 600; margin: -4px 0 12px; }
.person p { font-size: .96rem; }
@media (max-width: 640px) {
  .person { grid-template-columns: 1fr; gap: 18px; }
  .person__photo { width: 120px; height: 120px; }
}

/* ---------- Reference ---------- */
.quote {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; display: flex; flex-direction: column;
}
.quote__mark { font-family: var(--font-serif); font-size: 2.6rem; color: var(--teal-light); line-height: .8; margin-bottom: 8px; }
.quote p { font-size: .96rem; font-style: italic; }
.quote__who { margin-top: auto; padding-top: 18px; font-size: .88rem; font-weight: 600; color: var(--ink); }

/* ---------- Poznámka / upozornění ---------- */
.notice {
  background: var(--sand-soft); border: 1px solid #E9DCC2;
  border-radius: var(--radius); padding: 20px 24px;
  font-size: .92rem; color: #6D5726;
}
.notice strong { color: #56441C; }
.notice--plain { background: var(--bg-soft); border-color: var(--line); color: var(--ink-soft); }
.notice--plain strong { color: var(--ink); }

/* ---------- Prose (textové stránky) ---------- */
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.15em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--teal); }

/* ---------- CTA pruh ---------- */
.cta-band {
  background: var(--bg-deep); color: rgba(255,255,255,.82);
  border-radius: 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(700px 420px at 82% 20%, rgba(20,134,126,.45), transparent 62%);
}
.cta-band .wrap { position: relative; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.78); max-width: 52ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 28px; }

/* ---------- Patička ---------- */
.footer {
  background: #08191C; color: rgba(255,255,255,.6);
  padding: clamp(48px, 6vw, 72px) 0 28px; font-size: .92rem;
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 34px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer a { color: rgba(255,255,255,.6); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer .brand__name { color: #fff; }
.footer .brand__sub { color: rgba(255,255,255,.45); }
.footer__bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .84rem; color: rgba(255,255,255,.42);
}
.footer__disclaimer {
  margin-top: 26px; padding: 18px 20px; border-radius: var(--radius);
  background: rgba(255,255,255,.05); font-size: .84rem; line-height: 1.6;
  color: rgba(255,255,255,.55);
}

/* ---------- Sticky mobilní lišta ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none; gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 22px rgba(16,38,43,.09);
}
.mobile-bar a {
  flex: 1; background: #fff; text-align: center; padding: 13px 8px;
  font-size: .88rem; font-weight: 600; color: var(--ink);
}
.mobile-bar a.is-primary { background: var(--teal); color: #fff; }
@media (max-width: 720px) {
  .mobile-bar { display: flex; padding-bottom: env(safe-area-inset-bottom); }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
}

/* ---------- Animace při scrollu ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover, .tile:hover { transform: none; }
}

/* ---------- Drobné ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); }
.stat__num { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--ink); font-weight: 600; line-height: 1; }
.stat__label { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--teal); color: #fff;
  padding: 12px 18px; z-index: 100; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Obrázky ---------- */
.card { overflow: hidden; }
.card__media {
  margin: -28px -28px 20px; aspect-ratio: 16 / 10;
  overflow: hidden; background: var(--bg-soft);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.figure { margin: 0; }
.figure img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--bg-soft);
}
.figure figcaption { font-size: .84rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.figure--sm { max-width: 340px; }

/* Hero s fotografií na pozadí */
.hero--photo {
  background-image:
    linear-gradient(180deg, rgba(14,42,46,.86), rgba(14,42,46,.92)),
    url('img/hero-konzultace.jpg');
  background-image:
    linear-gradient(180deg, rgba(14,42,46,.86), rgba(14,42,46,.92)),
    image-set(url('img/hero-konzultace.webp') type('image/webp'),
              url('img/hero-konzultace.jpg') type('image/jpeg'));
  background-size: cover, cover;
  background-position: center, 50% 28%;
  background-repeat: no-repeat;
}

/* ---------- Navigace mezi články ---------- */
.article-nav {
  display: grid; gap: 12px; margin-top: 38px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.article-nav a {
  font-size: .94rem; font-weight: 500; line-height: 1.45;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s, background .18s;
}
.article-nav a:hover { border-color: var(--teal); background: var(--bg-soft); }
@media (min-width: 720px) { .article-nav { grid-template-columns: 1fr 1fr; } }

audio { border-radius: 999px; }
.prose ol { padding-left: 1.15em; margin: 0 0 1.2em; }
.prose ol li::marker { color: var(--teal); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; }
.prose .figure { margin: 1.6em 0; }
.card h3 a:hover { color: var(--teal); }

/* ============================================================
   Doplňky pro produkci
   ============================================================ */

/* Drobný doprovodný text (datum, poznámka pod referencemi, popisky).
   Třída se používala v HTML, ale ve stylech chyběla. */
.form-note {
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.1em;
}
.form-note:last-child { margin-bottom: 0; }
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form-note a:hover { color: var(--teal); }

/* Kotvy (#bbc, #objednat …) končily schované pod sticky hlavičkou. */
:where([id]) { scroll-margin-top: 96px; }

/* Viditelné zaostření pro ovládání klávesnicí */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible, .cta-band :focus-visible, .footer :focus-visible, .topbar :focus-visible {
  outline-color: #8FD2C8;
}

/* Obrázky mají nově width/height v HTML — ať se kvůli tomu nedeformují. */
.card__media img, .media img, .figure img, .person__photo { height: auto; }
.card__media img, .media img { height: 100%; }
.person__photo { height: 168px; }
@media (max-width: 640px) { .person__photo { height: 120px; } }

/* Odkazy v patičce na právní stránky */
.footer__bottom a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer__bottom a:hover { color: #fff; text-decoration: underline; }

/* CTA tlačítko v hlavičce: selektor .nav a (0,1,1) přebíjel .btn--primary (0,1,0),
   takže tlačítko mělo tmavý text na tmavě zeleném pozadí — kontrast 1.4:1. */
.nav a.btn--primary,
.nav a.btn--primary:hover,
.nav a.btn--primary:focus { color: #fff; }
.nav a.btn--ghost { color: var(--ink); }
