/* BCT Survival – vzhled webu. Barvy podle loga a úvodní fotky (les, oheň, papír). */
:root {
  --bg: #f5eee2;
  --surface: #fffaf1;
  --surface-2: #efe5d4;
  --ink: #1f2722;
  --muted: #55605a;
  --line: #d9ccb6;
  --accent: #2f5d34;
  --accent-ink: #ffffff;
  --link: #2a5a2f;
  --fire: #a8470c;
  --fire-ink: #ffffff;
  --header: #1d2329;
  --header-ink: #f3ead9;
  --shadow: 0 1px 2px rgba(40, 30, 10, .08), 0 4px 14px rgba(40, 30, 10, .07);
  --radius: 10px;
  --serif: "Rockwell", "Roboto Slab", "Zilla Slab", "Courier New", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --surface: #1d2328;
    --surface-2: #262d33;
    --ink: #ece4d6;
    --muted: #b4ab9c;
    --line: #38414a;
    --accent: #8cc896;
    --accent-ink: #11160f;
    --link: #9fd3a8;
    --fire: #f2a65a;
    --fire-ink: #14181b;
    --header: #0d1012;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a.plain { text-decoration: none; }
a.plain:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--fire); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--fire); color: var(--fire-ink); padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 8px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }

/* Hlavička */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header); color: var(--header-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 64px; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); text-decoration: none; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; min-height: 44px; }
.brand img { width: 44px; height: 44px; border-radius: 8px; }
.site-header ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.site-header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--header-ink); text-decoration: none; border-radius: 8px; font-weight: 600;
}
.site-header nav a:hover { background: rgba(255, 255, 255, .1); }
.site-header nav a[aria-current="page"] { background: var(--header-ink); color: var(--header); }
@media (max-width: 560px) {
  .brand span { display: none; }
  .site-header nav a { padding: 0 10px; font-size: 16px; }
}
@media (max-width: 340px) {
  .site-header nav a { padding: 0 7px; font-size: 15px; }
}

/* Úvod */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(233, 138, 21, .18), transparent 40%),
    linear-gradient(180deg, var(--surface-2), var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-in { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; padding: 48px 0; }
.hero-logo { width: 220px; height: 220px; border-radius: 24px; box-shadow: var(--shadow); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 14px; font-weight: 700; color: var(--fire); margin-bottom: .4em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.hero .lead { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
@media (max-width: 720px) {
  .hero-in { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; text-align: left; }
  .hero-logo { width: 132px; height: 132px; border-radius: 18px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 600 17px/1 var(--sans);
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--link); border-color: currentColor; }
.btn.full { width: 100%; }

.facts { padding: 32px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 20px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats dt { font-size: 15px; color: var(--muted); }
.stats dd { margin: 0; font: 700 2rem/1.1 var(--serif); color: var(--accent); }
.summary { max-width: 75ch; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.section { padding: 28px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.more { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* Kartotéční lístky */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
/* Nejnovější záznamy: vždy plné řady (4, 2, nebo 1) */
.cards-latest { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .cards-latest { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-latest { grid-template-columns: 1fr; } }
.card[hidden] { display: none; }
.card article { height: 100%; }
.card-link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s ease;
}
.card-link:hover { transform: translateY(-2px); }
.card-link:hover .card-title { text-decoration: underline; }
.card-img { aspect-ratio: 4 / 3; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  padding: 14px 16px 16px; flex: 1;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(120, 140, 160, .16) 27px 28px);
  background-position: 0 40px;
}
.card-tab {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 4px;
  font: 700 13px/1.6 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  background: var(--tab, #2f5d34); color: #fff;
}
.card-title { font-size: 1.15rem; margin: 0 0 6px; }
.card-meta { font-size: 15px; color: var(--muted); margin: 0; }
.type-potulka, .tab-potulka { --tab: #2f5d34; }
.type-pochod, .tab-pochod { --tab: #7a4a1e; }
.type-recenze, .tab-recenze { --tab: #9a3412; }
.type-geocaching, .tab-geocaching { --tab: #1e5a7a; }
.type-misto, .tab-misto { --tab: #5b4a8a; }
.type-akce, .tab-akce { --tab: #8a2d4f; }
.card-tab a { color: #fff; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.chip:hover { border-color: var(--accent); }
.chip-n { font-size: 14px; color: var(--muted); font-weight: 500; }
.chips.small .chip { font-size: 15px; }

/* Zajímavost */

.about-teaser { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.big { font-size: 1.2rem; font-weight: 700; word-break: break-word; }
@media (max-width: 720px) { .about-teaser { grid-template-columns: 1fr; } }

/* Deník */
.page-head { padding: 24px 0 8px; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { display: inline-block; padding: 10px 0; }
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.filters fieldset { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.filters legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.type-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-pill input + span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--bg);
}
.type-pill .n { font-weight: 500; color: var(--muted); font-size: 14px; }
.type-pill input:checked + span { background: var(--tab, #2f5d34); border-color: var(--tab, #2f5d34); color: #fff; }
.type-pill input:checked + span .n { color: rgba(255, 255, 255, .85); }
.type-pill input:focus-visible + span { outline: 3px solid var(--fire); outline-offset: 2px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-row label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 16px; min-width: 150px; }
.filter-row .grow { flex: 1 1 220px; }
select, input[type="search"], input[type="text"], input[type="email"], input[type="url"], input[type="date"], input[type="password"], textarea {
  font: 17px/1.4 var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid #8a7f6c; border-radius: 8px; min-height: 46px; padding: 8px 12px; width: 100%;
}
.js .filters .btn { display: none; }
.result-count { color: var(--muted); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.reset { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.empty { padding: 32px; text-align: center; background: var(--surface); border-radius: var(--radius); }

/* Záznam */
.entry { padding-bottom: 32px; }
.entry-head { padding: 8px 0 16px; }
.entry-meta { color: var(--muted); }
.gallery { display: grid; gap: 10px; margin: 8px 0 28px; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n3 { grid-template-columns: 1fr 1fr; }
.gallery.n3 figure:first-child { grid-column: 1 / -1; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 8px; background: var(--surface-2); }
.gallery.n2 img, .gallery.n3 figure:not(:first-child) img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 15px; color: var(--muted); padding-top: 6px; }
.zoom { display: block; cursor: zoom-in; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.more-photos { font-size: 16px; margin-top: 24px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.pager a {
  display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600;
}
.pager a:hover { border-color: var(--accent); }
.pager span { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.pager-next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { grid-column: 1; text-align: left; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 6px; margin: auto; }
.lb-cap { color: #f3ead9; text-align: center; margin: 8px 0 0; }
.lb-close {
  position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #f3ead9; color: #1d2329; font-size: 30px; line-height: 1; cursor: pointer;
}

/* O mně */
.profile { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; padding-bottom: 40px; }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; text-align: center; position: sticky; top: 84px; }
.profile-card img { width: 160px; height: 160px; margin: 0 auto 12px; border-radius: 20px; }
.profile-card h1 { font-size: 2.2rem; margin-bottom: 0; }
.profile-card dl { margin: 16px 0; text-align: left; }
.profile-card dl div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.profile-card dt { color: var(--muted); }
.profile-card dd { margin: 0; font-weight: 700; }
.help summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
@media (max-width: 820px) {
  .profile { grid-template-columns: 1fr; gap: 24px; }
  .profile-card { position: static; }
}

/* Patička */
.site-footer { background: var(--header); color: var(--header-ink); margin-top: 40px; }
.site-footer a { color: var(--header-ink); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 32px 0 16px; }
.footer-brand { font: 700 1.3rem var(--serif); margin-bottom: .2em; }
.footer-h { font-weight: 700; margin-bottom: .2em; }
.footer-in p { margin-bottom: .4em; }
.footer-in a { display: inline-flex; min-height: 44px; align-items: center; }
.footer-bottom { border-top: 1px solid rgba(243, 234, 217, .2); padding: 14px 0 24px; font-size: 15px; }
.footer-bottom p { margin: 0 0 .2em; }

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

/* Zajímavost na úvodu („Věděli jste?“) */
.funfact { background: var(--surface); border: 2px dashed var(--fire); border-radius: 16px; padding: 24px clamp(16px, 4vw, 32px); }
.funfact-label { display: inline-block; background: var(--fire); color: var(--fire-ink); font-weight: 700; padding: 2px 10px; border-radius: 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.funfact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .funfact-grid { grid-template-columns: 1fr; } }
.places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .places { grid-template-columns: 1fr; } }
.place { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.place img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; }
.place-body { min-width: 0; }
.place-body h3 { font-size: 1.35rem; margin-bottom: .3em; }
.place-body p { margin: 0 0 .6em; font-size: 16px; }
.place-kicker { font-size: 13px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fire); }
@media (max-width: 460px) { .place { grid-template-columns: 1fr; } .place img { width: 100%; height: 180px; } }
.place-note { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.place-note h2 { font-size: 1.2rem; margin: 0 0 .3em; }
.place-note p { margin: 0; font-size: 16px; }
.preview-bar { margin: 0; padding: 8px 16px; background: #a8470c; color: #fff; text-align: center; font-weight: 600; font-size: 15px; }

/* Střídavá zajímavost na úvodu */
.funfact-item[hidden] { display: none; }
.funfact-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.funfact-top .funfact-label { margin: 0; }
.funfact-next[hidden] { display: none; }
.funfact-item { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin-top: 12px; }
.funfact-item img { width: 220px; height: 220px; object-fit: cover; border-radius: 12px; }
@media (max-width: 600px) { .funfact-item { grid-template-columns: 1fr; } .funfact-item img { width: 100%; height: 200px; } }
/* Stránka Místa */
.place-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 28px; }
.place-row { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; scroll-margin-top: 90px; }
.place-row img { width: 300px; height: 225px; object-fit: cover; border-radius: 8px; }
.place-row h2 { margin-bottom: .3em; }
.place-row p { max-width: 65ch; }
@media (max-width: 720px) { .place-row { grid-template-columns: 1fr; } .place-row img { width: 100%; height: 220px; } }

/* Loga spřátelených webů nad patičkou (bez nadpisu) */
.friends { border-top: 1px solid #d9ccb6; background: #fffaf1; color-scheme: light; margin-top: 40px; }
.friends + .site-footer { margin-top: 0; }
.friends-in { list-style: none; margin: 0 auto; padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 32px; }
.friends a { display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 4px; border-radius: 6px; }
.friends img { max-height: 60px; width: auto; height: auto; max-width: 180px; }
.friends a:focus-visible { outline-color: #a8470c; }

/* Vlastní stránky */
.page-gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 24px 0; padding: 0; list-style: none; }
.page-gallery figure { margin: 0; }
.page-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.page-gallery figcaption { font-size: 15px; color: var(--muted); margin-top: 6px; }
