/* Nordic Walking – praktický průvodce
   Sdílený styl pro všechny stránky. Barvy a typografie jsou na jednom místě v :root. */

:root {
  --forest: #16372a;
  --pine: #235a40;
  --leaf: #b9d79b;
  --mist: #eef4e8;
  --stone: #58615b;
  --line: #d7ded3;
  --ink: #1c2922;
  --white: #ffffff;
  --warn: #7a4a00;
  --warn-bg: #fbf3e2;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --read: 42rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 0.18em; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid #e8a317; outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--forest); line-height: 1.2; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.4em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.read { max-width: var(--read); }
.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; background: var(--white); color: var(--forest);
  padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 100; font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Hlavička a navigace ---------- */
.site-header { background: var(--forest); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--white); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.brand:hover { color: var(--leaf); }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.nav-list { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 0; }
.nav-list a {
  display: block; padding: 0.7rem 0.85rem; color: #e3eedb; text-decoration: none; border-radius: var(--radius);
  font-size: 0.98rem; border-bottom: 3px solid transparent;
}
.nav-list a:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.nav-list a[aria-current="page"] { color: var(--white); border-bottom-color: var(--leaf); font-weight: 600; }
.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.9rem;
    background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius); font: inherit; cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
    display: block; width: 1.1rem; height: 2px; background: currentColor; content: ""; position: relative;
  }
  .nav-toggle .bars::before { position: absolute; top: -6px; }
  .nav-toggle .bars::after { position: absolute; top: 6px; }
  .site-header .wrap { flex-wrap: wrap; padding-block: 0.5rem; }
  .site-nav { width: 100%; }
  .nav-list { flex-direction: column; padding-bottom: 0.6rem; }
  .nav-list a { padding: 0.85rem 0.6rem; border-bottom: 0; border-left: 3px solid transparent; }
  .nav-list a[aria-current="page"] { border-left-color: var(--leaf); }
  .js .site-nav[hidden] { display: none; }
}

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; min-height: 2.75rem; border-radius: var(--radius);
  background: var(--leaf); color: var(--forest); font-weight: 700; text-decoration: none; border: 2px solid var(--leaf);
}
.btn:hover { background: var(--white); border-color: var(--white); color: var(--forest); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); color: var(--white); }
.btn-dark { background: var(--forest); border-color: var(--forest); color: var(--white); }
.btn-dark:hover { background: var(--pine); border-color: var(--pine); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Úvodní hero ---------- */
.hero { background: var(--forest); color: var(--white); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: min(36rem, 78vh); }
.hero-text { padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: var(--white); }
.hero .lead { color: #dcead2; font-size: 1.15rem; max-width: 34rem; }
.hero-photo { position: relative; min-height: 18rem; }
.hero-photo picture { display: block; height: 100%; }
.hero-photo img { width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 60%; }
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; min-height: 0; aspect-ratio: 3 / 2; }
}

/* ---------- Page header (podstránky) ---------- */
.page-head { background: var(--mist); border-bottom: 1px solid var(--line); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.page-head .lead { font-size: 1.15rem; color: var(--stone); max-width: 44rem; margin-bottom: 0; }
.crumbs { font-size: 0.92rem; color: var(--stone); margin-bottom: 1rem; }
.crumbs a { color: var(--stone); }

/* ---------- Sekce ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-mist { background: var(--mist); }
.section-dark { background: var(--forest); color: #dcead2; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark a:not(.btn) { color: var(--leaf); }
.lead { font-size: 1.15rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split.top { align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }

/* Stopa kroku: oddělovač s otisky hrotů holí */
.trail { height: 10px; margin: 0; border: 0; background: radial-gradient(circle, var(--pine) 2px, transparent 2.5px) 0 50% / 18px 10px repeat-x; opacity: 0.45; }

/* ---------- Fotografie s popiskem ---------- */
figure { margin: 0 0 1.5rem; }
figure img { border-radius: var(--radius); width: 100%; }
figcaption { font-size: 0.9rem; color: var(--stone); padding-top: 0.5rem; }
.section-dark figcaption { color: #bcd1b0; }

/* ---------- Úvod: tři hlavní témata ---------- */
.topics { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 1.5rem; }
.topic { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.topic img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 0; }
.topic-body { padding: 1.25rem 1.4rem 1.5rem; }
.topic h3 { margin-bottom: 0.4em; }
.topic p { margin-bottom: 0.8em; color: var(--stone); }
.topic a.more { font-weight: 700; }
.topic a.more::after { content: ""; position: absolute; inset: 0; } /* celá karta je klikací */
.topic:hover { border-color: var(--pine); }
.topic-main { grid-row: span 2; }
.topic-main img { aspect-ratio: 4 / 3; }
@media (max-width: 52rem) { .topics { grid-template-columns: 1fr; } .topic-main { grid-row: auto; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; }
.checklist li { padding-left: 1.7rem; position: relative; margin: 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.9rem; height: 0.5rem; border-left: 3px solid var(--pine); border-bottom: 3px solid var(--pine); transform: rotate(-45deg) translateY(-25%); }
.checklist strong { color: var(--forest); }

.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1.5rem; }
.photo-strip img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: var(--radius); }
@media (max-width: 40rem) { .photo-strip { grid-template-columns: 1fr 1fr; } .photo-strip a:nth-child(3) { display: none; } }

.nav-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.nav-tiles li { margin: 0; }
.nav-tiles a { display: block; height: 100%; padding: 1.1rem 1.25rem; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius); color: var(--white) !important; text-decoration: none; }
.nav-tiles a:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--leaf); }
.nav-tiles strong { display: block; font-family: var(--serif); font-size: 1.15rem; }
.nav-tiles span { font-size: 0.93rem; color: #cfe0c4; }

/* ---------- Články ---------- */
.article-layout > * { min-width: 0; }
.article-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 5.5rem; font-size: 0.95rem; border-left: 3px solid var(--leaf); padding-left: 1rem; }
.toc p { font-family: var(--serif); font-weight: 700; color: var(--forest); margin-bottom: 0.5em; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 0.35rem; }
.toc a { text-decoration: none; color: var(--stone); }
.toc a:hover { color: var(--forest); text-decoration: underline; }
@media (max-width: 62rem) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }

.article h2 { margin-top: 2.6rem; padding-top: 0.4rem; scroll-margin-top: 5rem; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 1.8rem; }
.article > p, .article > ul, .article > ol, .article > .callout { max-width: var(--read); }

.callout { border-left: 4px solid var(--pine); background: var(--mist); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.caution { border-left-color: #c88a12; background: var(--warn-bg); color: #3b2a07; }
.callout strong.title { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.3rem; color: var(--forest); }
.callout.caution strong.title { color: var(--warn); }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
caption { text-align: left; font-weight: 700; padding: 0.8rem 1rem; font-family: var(--serif); color: var(--forest); background: var(--mist); }
th, td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { background: var(--forest); color: var(--white); border-top: 0; }
tbody th { font-weight: 700; color: var(--forest); background: #f7faf4; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 0 3rem; margin-bottom: 1.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--forest); color: var(--white); font-weight: 700; display: grid; place-items: center; font-size: 0.95rem;
}
.steps strong { color: var(--forest); }

.badge { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.badge-strong { background: var(--forest); color: var(--white); }
.badge-partial { background: var(--leaf); color: var(--forest); }
.badge-assumed { background: var(--white); color: var(--stone); border: 1.5px dashed var(--stone); }

.mistakes { display: grid; gap: 1rem; margin: 1.5rem 0; }
.mistake { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mistake > div { padding: 1rem 1.2rem; }
.mistake .bad { background: #f6f0ee; }
.mistake .fix { background: #f2f8ee; }
.mistake h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.mistake p { margin: 0; font-size: 0.98rem; }
@media (max-width: 40rem) { .mistake { grid-template-columns: 1fr; } }

.related { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }

/* ---------- Galerie ---------- */
.gallery { columns: 18rem; column-gap: 0.9rem; padding: 0; margin: 0; list-style: none; }
.gallery li { break-inside: avoid; margin: 0 0 0.9rem; }
.gallery figure { margin: 0; }
.gallery a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.gallery img { width: 100%; height: auto; transition: transform 0.25s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 0.45rem 0.1rem 0; }
.note-box { border: 2px dashed var(--pine); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--mist); margin-bottom: 2rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(8, 20, 14, 0.96); color: var(--white); }
.lightbox::backdrop { background: rgba(8, 20, 14, 0.96); }
.lightbox[open] { display: grid; place-items: center; }
.lb-stage { width: 100%; height: 100%; display: grid; place-items: center; padding: 3.5rem 4rem 1rem; min-height: 0; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 9.5rem); max-height: calc(100dvh - 9.5rem); width: auto; height: auto; object-fit: contain; border-radius: 3px; touch-action: pan-y; }
.lb-bar { padding: 0.7rem 0.5rem 0; text-align: center; font-size: 1rem; color: var(--white); }
.lb-bar .count { display: block; color: #a9c39a; font-size: 0.85rem; margin-top: 0.15rem; }
.lb-btn {
  position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(22, 55, 42, 0.85); color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.lb-btn:hover { background: var(--pine); }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }
@media (max-width: 40rem) {
  .lb-stage { padding: 3.5rem 0.25rem 5.5rem; }
  .lb-stage img { max-height: calc(100vh - 13rem); max-height: calc(100dvh - 13rem); }
  .lb-prev, .lb-next { top: auto; bottom: 0.9rem; transform: none; width: 3.25rem; height: 3.25rem; }
  .lb-prev { left: 0.75rem; } .lb-next { right: 0.75rem; }
  .lb-bar { padding: 0.6rem 0.75rem 0; }
}

/* ---------- Patička ---------- */
.site-footer { border-top: 4px solid var(--leaf); background: var(--forest); color: #e4eddc; padding: 3rem 0 2rem; font-size: 1rem; }
.site-footer h2 { font-size: 1.15rem; color: var(--white); margin-bottom: 0.8rem; }
.site-footer a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(185, 215, 155, 0.7); text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--leaf); text-decoration-color: var(--leaf); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem 3rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.3); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.92rem; color: #cfdcc4; }
@media (max-width: 62rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 3rem 0; }

/* ---------- Omezení pohybu ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .toc, .btn-row { display: none; }
}
