/* ==========================================================================
   Váš Okýnkový Pán – style.css
   Mobile first. Breakpointy: 560 px a 900 px. Bez externích zdrojů.
   ========================================================================== */

/* ---------- Proměnné (světlý režim) ---------- */
:root {
  --graphite: #202B35;
  --grey: #E7ECEB;
  --green: #B7D5CC;
  --green-light: #DCEBE6;
  --green-hover: #A6C9BE;

  --bg: #FFFFFF;
  --text: #202B35;
  --heading: #202B35;
  --muted: #465662;
  --surface: #E7ECEB;      /* pozadí sekcí */
  --card: #FFFFFF;
  --border: #C5D0CE;
  --focus: #1F6F5C;

  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 13px;
  --radius-sm: 8px;
  --gutter: 18px;
  --maxw: 1080px;
  color-scheme: light dark;
}

/* ---------- Tmavý režim ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141B21;
    --text: #E7ECEB;
    --heading: #F4F7F6;
    --muted: #A9B6BE;
    --surface: #1B252D;
    --card: #212D37;
    --border: #34444F;
    --focus: #B7D5CC;
  }
}

/* ---------- Základ ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  background: var(--bg);
  color: var(--text);
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 { color: var(--heading); font-weight: 800; }
h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
h3 { font-size: 19px; line-height: 1.25; margin: 0 0 8px; }
p { margin: 0 0 1em; }

a { color: inherit; text-underline-offset: 3px; }

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* Odkaz „Přeskočit na obsah" */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 1000;
  background: var(--green);
  color: var(--graphite);
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn svg { flex: none; width: 18px; height: 18px; }

.btn--primary { background: var(--green); color: var(--graphite); }
.btn--primary:hover { background: var(--green-hover); }

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .6);
}
.btn--secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.btn--outline { background: transparent; color: var(--heading); border-color: var(--heading); }
.btn--outline:hover { background: var(--green-light); color: var(--graphite); border-color: var(--graphite); }

.btn--dark { background: var(--graphite); color: #fff; }
.btn--dark:hover { background: #33424F; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hlavička (přilepená, tmavá v obou režimech) ---------- */
.site-header {
  --focus: #B7D5CC;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--graphite);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
  color: #fff;
  text-decoration: none;
}
.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: var(--radius-sm);
}
.brand__mark img { display: block; width: 28px; height: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand__name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.brand__tag {
  display: none;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #B9C4CC;
}

.btn--call { min-height: 44px; padding: 0 14px; font-size: 15px; flex: none; }

/* Tlačítko burger (vidět jen s JS pod 900 px) */
.nav-toggle,
.nav-close {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle:hover,
.nav-close:hover { background: rgba(255, 255, 255, .1); }
.nav-toggle__bars { position: relative; display: block; width: 20px; height: 14px; }
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }
.nav-close svg { width: 20px; height: 20px; }

/* Navigace – základ (bez JS a na počítači): řádek pod hlavním pruhem */
.site-nav { border-top: 1px solid rgba(255, 255, 255, .14); }
.site-nav__inner { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
}
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.nav-list a:hover { background: rgba(255, 255, 255, .1); }
.nav-list a[aria-current="page"] { background: var(--green); color: var(--graphite); }

.nav-backdrop { display: none; }

/* Vysouvací menu: pod 900 px, pokud běží JavaScript */
@media (max-width: 899.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav-close { display: inline-flex; margin: 0 14px 8px auto; }

  .js .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    width: min(86vw, 340px);
    padding: calc(env(safe-area-inset-top) + 12px) 0 calc(env(safe-area-inset-bottom) + 24px);
    background: var(--graphite);
    border-top: 0;
    box-shadow: -12px 0 32px rgba(0, 0, 0, .35);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .js.nav-open .site-nav {
    transform: none;
    visibility: visible;
    transition: transform .28s ease;
  }
  .js .site-nav__inner { width: auto; margin: 0; }
  .js .nav-list { flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 0; }
  .js .nav-list a {
    min-height: 52px;
    padding: 0 22px;
    border-radius: 0;
    border-left: 4px solid transparent;
    font-size: 17px;
  }
  .js .nav-list a[aria-current="page"] { border-left-color: var(--graphite); }

  .js .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(10, 15, 20, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility 0s linear .28s;
  }
  .js.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity .28s ease;
  }
  .nav-open { overflow: hidden; }
}

@media (min-width: 480px) {
  .brand__name { font-size: 14px; }
  .brand__tag { display: block; }
}

@media (max-width: 399.98px) {
  .btn--call svg { display: none; }
  .btn--call { padding: 0 12px; }
}

@media (min-width: 900px) {
  .header-bar { min-height: 72px; gap: 16px; }
  .brand__name { font-size: 15px; }
  .brand__tag { font-size: 11px; }
}

/* ---------- Sekce ---------- */
.section { padding: 44px 0; }
.section--alt { background: var(--surface); }
@media (min-width: 560px) { .section { padding: 60px 0; } }

.section-head { max-width: 70ch; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Hero ---------- */
.hero {
  --focus: #B7D5CC;
  background: var(--graphite);
  color: #fff;
  padding: 26px 0 32px;
}
.hero h1 { color: #fff; }
.hero__grid { display: grid; gap: 22px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero__lead { max-width: 52ch; margin: 0 0 20px; color: #DCE4E2; }
.hero__card {
  display: grid;
  place-items: center;
  padding: 16px 20px;
  background: #fff;
  border-radius: var(--radius);
}
.hero__card img { display: block; width: min(100%, 440px); height: auto; }

@media (min-width: 560px) {
  .hero { padding: 40px 0 48px; }
  .hero__card { padding: 28px; }
}
@media (min-width: 900px) {
  .hero { padding: 76px 0; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; }
  .hero__lead { margin-bottom: 28px; font-size: 18px; }
  .hero__card { padding: 40px; }
}

/* ---------- Karty a mřížka ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card p:last-child { margin-bottom: 0; }

/* Rada (tip): tučný nadpis, vlevo svislý zelený proužek */
.tip {
  max-width: 70ch;
  margin: 0 0 24px;
  padding: 2px 0 2px 18px;
  border-left: 4px solid var(--green);
}
.tip__title { margin: 0 0 6px; font-size: 20px; line-height: 1.3; font-weight: 800; color: var(--heading); }
.tip p { margin: 0 0 .7em; }
.tip ul { margin: 0 0 .7em; padding-left: 1.3em; }
.tip li { margin-bottom: .4em; padding-left: .2em; }
.tip > :last-child { margin-bottom: 0; }

/* Úvodní řádek tématu na stránce rad */
.topic-lead { max-width: 70ch; margin: 0 0 24px; color: var(--muted); }

/* Záhlaví podstránek (H1 + úvod) */
.page-head {
  --focus: #B7D5CC;
  background: var(--graphite);
  color: #fff;
  padding: 30px 0 34px;
}
.page-head h1 { margin-bottom: 12px; color: #fff; }
.page-head p { max-width: 60ch; margin: 0; color: #DCE4E2; font-size: 17px; }
@media (min-width: 900px) {
  .page-head { padding: 56px 0 60px; }
  .page-head p { font-size: 18px; }
}

/* Karta s ikonou */
.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  background: var(--green);
  color: var(--graphite);
  border-radius: 12px;
}
.card__icon svg { width: 26px; height: 26px; }

/* Poznámka malým písmem */
.note { max-width: 70ch; margin: 0; color: var(--muted); font-size: 14px; }
.note--top { margin-top: 24px; }

.card__title { margin: 0 0 8px; font-size: 19px; line-height: 1.25; }

/* ---------- Galerie „Z praxe" ---------- */
.gallery-group { margin-top: 44px; }
.gallery-group:first-of-type { margin-top: 0; }
.gallery-group > h3 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; }
.gallery-group__intro { max-width: 70ch; margin: 0 0 18px; color: var(--muted); }
.gallery-group__box { margin-top: 20px; }

.gallery {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.photo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.photo__link {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  cursor: zoom-in;
}
.photo__link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo__link:focus-visible { outline-offset: -3px; }
.photo__body { padding: 18px 20px 20px; }
.photo__title { margin: 0 0 10px; font-size: 18px; line-height: 1.25; font-weight: 800; color: var(--heading); }
.photo__body p { margin: 0 0 .8em; font-size: 15px; line-height: 1.55; }
.photo__body > :last-child { margin-bottom: 0; }

/* Zvýrazněná věta pod „Možné následky" (text na zelené vždy grafitový) */
.highlight {
  padding: 10px 12px;
  background: var(--green-light);
  color: var(--graphite);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Zástupný blok, dokud chybí fotografie */
.photo__ph {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}
.photo__ph p { margin: 0; font-size: 15px; }

/* ---------- Lightbox (přes celou obrazovku) ---------- */
html.lightbox-open { overflow: hidden; }
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 12, 16, .96);
  color: #fff;
  cursor: zoom-out;
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox::backdrop { background: transparent; }
.lightbox__fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 64px 12px 16px;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__cap { margin-top: 10px; font-size: 15px; text-align: center; color: #DCE4E2; }
.lightbox__close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: calc(env(safe-area-inset-right) + 10px);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius-sm);
  cursor: pointer;
  --focus: #B7D5CC;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close svg { width: 22px; height: 22px; }

/* Box s výzvou */
.callbox {
  background: var(--green-light);
  color: var(--graphite);
  border-radius: var(--radius);
  padding: 24px;
}
.callbox__title { display: block; margin: 0 0 6px; font-weight: 800; font-size: 20px; line-height: 1.3; }
.callbox p { margin: 0 0 18px; }

/* ---------- Patička (tmavá v obou režimech) ---------- */
.site-footer {
  --focus: #B7D5CC;
  background: var(--graphite);
  color: #DCE4E2;
  padding: 36px 0 calc(24px + env(safe-area-inset-bottom));
  font-size: 15px;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
.footer-title { margin: 0 0 4px; color: #fff; font-weight: 800; font-size: 17px; }
.footer-text { margin: 0; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #B9C4CC;
  font-size: 14px;
}
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }

/* ---------- Omezení pohybu ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Jak to probíhá: tři kroky ---------- */
.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; align-items: flex-start; }
.step p { margin: 0; }
.step__no {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  background: var(--green);
  color: var(--graphite);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
}

/* ---------- Kontakt a formulář ---------- */
.contact { display: grid; gap: 20px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.contact__label { margin: 18px 0 2px; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.contact__info .card__title + .contact__label { margin-top: 8px; }
.contact__info p { margin-top: 0; margin-bottom: 0; }
.contact__phone { font-size: clamp(28px, 6vw, 36px); font-weight: 800; line-height: 1.2; color: var(--heading); text-decoration: none; }
.contact__phone:hover { text-decoration: underline; }
.contact__mail { font-size: 18px; font-weight: 700; word-break: break-word; }

.field { margin: 0 0 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field input[type="text"], .field select, .field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;            /* méně než 16 px by na iPhonu způsobilo přiblížení */
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border-strong, var(--muted));
  border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; min-height: 120px; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field--check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.field--check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--graphite); }
.field--check label { margin: 0; font-weight: 400; }
.field--check .field__error { grid-column: 1 / -1; }
.field__error { margin: 6px 0 0; font-weight: 700; color: #B3261E; }
.req { color: #B3261E; }
@media (prefers-color-scheme: dark) { .field__error, .req { color: #FFB4AB; } }
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; border: 2px solid transparent; }
.form-status--ok { background: var(--green-light); color: var(--graphite); border-color: var(--green); }
.form-status--err { background: transparent; color: #B3261E; border-color: #B3261E; }
@media (prefers-color-scheme: dark) { .form-status--err { color: #FFB4AB; border-color: #FFB4AB; } }
.form-fallback { margin: 14px 0 0; }

/* ---------- Textové stránky (zásady ochrany osobních údajů) ---------- */
.legal { max-width: 760px; }
.legal h2 { margin: 36px 0 10px; font-size: 22px; }
.legal h2:first-of-type { margin-top: 28px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.todo { background: #FFE9A8; color: #202B35; font-weight: 800; padding: 1px 6px; border-radius: 4px; }
