/* Autoškola Noháček – mobile first: základ je pro telefon, větší displeje přes @media (min-width: …). */

:root {
  --blue: #0f6fb5;
  --blue-dark: #0b5791;
  --navy: #114d79;
  --navy-dark: #0b2f4b;
  --red: #c8102e;
  --red-bg: #fdeef0;
  --ink: #1a2330;
  --muted: #5a6675;
  --line: #dfe5ec;
  --bg: #ffffff;
  --bg-soft: #f3f7fb;
  --radius: 12px;
  --shadow: none;
  --header-h: 60px;
  --callbar-h: 64px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

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

a { color: var(--blue); text-underline-offset: .15em; }
a:hover { color: var(--blue-dark); }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; color: var(--navy-dark); text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6.5vw, 2.75rem); margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 5vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .35em; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 760px; }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; color: #fff; }

/* ---------- Hlavička a menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-dark); min-height: 48px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.08rem; }
.brand-text small { font-size: .78rem; color: var(--muted); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--navy-dark); cursor: pointer;
}
.burger, .burger::before, .burger::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s, background-color .2s;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 8px 16px 16px;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.nav-open .nav { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li + li { margin: 0; border-top: 1px solid var(--line); }
.nav a { display: flex; align-items: center; min-height: 52px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.nav a[aria-current="page"] { color: var(--blue); }
.nav .nav-call {
  justify-content: center; gap: 8px; margin-top: 12px; border-radius: 10px;
  background: var(--red); color: #fff;
}
.nav-call svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; text-align: center;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: #a50d26; border-color: #a50d26; }
.btn-ghost { background: #fff; color: var(--navy-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--navy-dark); border-color: var(--line); }
.btn-row { display: grid; gap: 10px; }

/* ---------- Sekce ---------- */
.section { padding: 40px 0; }
.section-soft { background: var(--bg-soft); }
.section-head p { color: var(--muted); }
.lead { font-size: 1.125rem; color: var(--muted); }

.hero { padding: 28px 0 32px; background: linear-gradient(180deg, var(--bg-soft), #fff); }
.hero .eyebrow { margin-bottom: .5em; }
.hero-sub { font-size: 1.125rem; color: #34404f; max-width: 40em; }
.hero-logo { display: none; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }


.page-head { padding: 20px 0 8px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .35em; }
.page-head .lead { margin-bottom: 1.2em; }

.breadcrumbs { font-size: .9rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 4px; }
.breadcrumbs a { color: var(--muted); }

/* ---------- Upozornění ---------- */
.notice {
  border-left: 5px solid var(--red); background: var(--red-bg);
  border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px;
}
.notice h2, .notice h3 { margin: 0 0 .4em; font-size: 1.15rem; color: var(--red); }
.notice p:last-child { margin-bottom: 0; }
.notice-info { border-left-color: var(--blue); background: #eaf3fb; }
.notice-info h2, .notice-info h3 { color: var(--navy); }

/* ---------- Karty ---------- */
.cards { display: grid; gap: 14px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-price { font-size: 1.6rem; font-weight: 800; color: var(--navy-dark); margin: .1em 0 .3em; }

/* ---------- Ceníky a tabulky ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ptable { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ptable caption { text-align: left; font-weight: 700; padding: 12px 14px 0; color: var(--navy-dark); }
.ptable th, .ptable td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.ptable thead th { border-top: 0; background: var(--bg-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ptable td:last-child, .ptable th:last-child { text-align: right; white-space: nowrap; }
.ptable td:last-child { font-weight: 700; color: var(--navy-dark); }
.ptable .sub { display: block; font-size: .88rem; color: var(--muted); font-weight: 400; }
.ptable tr.hl td:first-child { font-weight: 600; }
.ptable tr.hl td:last-child { color: var(--red); }
.ptable .na { color: var(--muted); font-weight: 400; }
.price-section { margin-bottom: 32px; }
.price-section h2 { font-size: 1.3rem; }
.price-note { font-size: .95rem; color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: .92rem; font-weight: 600; color: var(--navy); }

/* Skupiny řidičského oprávnění */
.groups { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.groups li {
  margin: 0; display: grid; grid-template-columns: 56px 1fr; gap: 2px 12px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.groups .g { grid-row: span 2; font-weight: 800; font-size: 1.15rem; color: var(--blue); }
.groups .age { font-weight: 700; color: var(--navy-dark); }
.groups .desc { color: var(--muted); font-size: .98rem; }
.groups .off .g, .groups .off .age { color: var(--muted); }

/* ---------- Seznamy ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li + li { margin-top: .7em; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; min-height: 34px; }
.steps li + li { margin-top: 1em; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-weight: 800;
}

/* ---------- Kontakty ---------- */
.places { display: grid; gap: 14px; }
.place h3 { margin: 0 0 .3em; }
.place .when { font-weight: 600; color: var(--navy-dark); }
.place .btn { width: 100%; margin-top: 6px; min-height: 48px; font-size: 1rem; }

.people { display: grid; gap: 14px; }
.person h3 { margin: 0 0 .2em; }
.person .role { color: var(--muted); font-size: .98rem; }
.person .tel { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 10px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; }
.person .tel svg { width: 18px; height: 18px; fill: currentColor; }
.person .mail { display: inline-block; margin-top: 8px; font-size: .95rem; }
.person-main { border-color: var(--blue); }

.docs { list-style: none; padding: 0; display: grid; gap: 12px; }
.docs li { margin: 0; }
.docs a {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  text-decoration: none; color: var(--ink);
}
.docs a:hover { border-color: var(--blue); }
.docs .ico { flex: none; width: 44px; height: 52px; border-radius: 6px; background: var(--red); color: #fff; font-weight: 800; font-size: .78rem; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.docs strong { display: block; color: var(--navy-dark); }
.docs small { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; min-height: 52px;
  font-weight: 700; color: var(--navy-dark); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--blue);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 16px 14px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Galerie ---------- */
.gallery { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery li { margin: 0; }
.gallery a { display: block; text-decoration: none; color: var(--ink); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.gallery figcaption { font-size: .9rem; font-weight: 600; line-height: 1.3; padding: 6px 2px 0; }
.gallery figcaption span { display: block; font-weight: 400; color: var(--muted); }

.lightbox {
  padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; height: 100%;
}
.lightbox::backdrop { background: rgba(8, 20, 33, .92); }
.lightbox-in { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 16px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; border-radius: 8px; object-fit: contain; }
.lightbox p { color: #fff; margin: 10px 0 0; text-align: center; font-weight: 600; }
.lightbox-close {
  position: fixed; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
}

/* ---------- O nás ---------- */
.about-logo { margin: 0 auto 20px; max-width: 360px; }
.prose p { max-width: 42em; }
.split .card { margin-bottom: 20px; }

/* ---------- Patička ---------- */
.site-footer { background: var(--navy-dark); color: #d7e3ee; margin-top: 8px; padding: 36px 0 20px; font-size: .98rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
.footer-title { font-weight: 800; color: #fff; margin-bottom: .5em; font-size: 1.05rem; }
.footer-list { list-style: none; padding: 0; }
.footer-list a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-list li + li { margin-top: 0; }
.footer-note { color: #a9bccd; font-size: .92rem; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; text-decoration: none; font-weight: 600; }
.copy { margin: 24px auto 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .88rem; color: #a9bccd; }

/* Spodní lišta na telefonu – volání je hlavní akce */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 10px;
  text-decoration: none; font-weight: 700; color: var(--navy-dark); background: var(--bg-soft);
}
.callbar .callbar-call { background: var(--red); color: #fff; }
.callbar svg { width: 18px; height: 18px; fill: currentColor; }

.muted { color: var(--muted); }
.red { color: var(--red); }
.mt-0 { margin-top: 0; }
.center { text-align: center; }

/* ---------- Větší telefony a tablety ---------- */
@media (min-width: 560px) {
  .btn-row { grid-auto-flow: column; justify-content: start; }
  .cards-3, .places, .people { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 900px) {
  :root { --header-h: 72px; }
  body { padding-bottom: 0; font-size: 1.0625rem; }
  .callbar { display: none; }
  .nav-toggle { display: none; }
  .nav {
    display: flex; align-items: center; gap: 8px; position: static;
    padding: 0; border: 0; box-shadow: none; background: none; max-height: none; overflow: visible;
  }
  .nav ul { display: flex; gap: 2px; }
  .nav li + li { border: 0; }
  .nav a { min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: .98rem; }
  .nav a:hover { background: var(--bg-soft); }
  .nav .nav-call { margin: 0 0 0 8px; padding: 0 16px; }
  .nav .nav-call:hover { background: #a50d26; color: #fff; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
  .hero-logo { display: block; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .places { grid-template-columns: repeat(3, 1fr); }
  .people { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .groups { columns: 2; column-gap: 48px; border-top: 0; }
  .groups li { break-inside: avoid; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .page-head { padding: 32px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .callbar, .site-footer nav, .btn-row { display: none !important; }
  body { padding: 0; }
}
