:root {
  --bg: #f7fbf3;
  --soft: #eaf5e9;
  --panel: #ffffff;
  --text: #153326;
  --muted: #617368;
  --brand: #24785d;
  --brand-2: #58a96d;
  --water: #2e9fbb;
  --sand: #f5dfa4;
  --border: #dce8de;
  --shadow: 0 18px 45px rgba(23, 79, 55, .13);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
.container {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
}
.site-header {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--water), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.main-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--soft);
  color: var(--brand);
}
.menu-toggle {
  display: none;
  border: 0;
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 24px;
}
.hero {
  padding: 72px 0 42px;
  background:
    radial-gradient(circle at 80% 12%, rgba(88, 169, 109, .28), transparent 30%),
    radial-gradient(circle at 10% 20%, rgba(46, 159, 187, .18), transparent 30%);
}
.hero-grid,
.split,
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 34px;
  align-items: center;
}
.eyebrow {
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}
h1, h2, h3 { line-height: 1.12; margin: 0 0 14px; }
h1 { font-size: clamp(38px, 6vw, 68px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 670px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.hero-card {
  position: relative;
  background: #fff;
  padding: 14px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}
.hero-card img {
  border-radius: 24px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.info-box {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.info-box span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.section { padding: 60px 0; }
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card,
.news-item,
.gallery-item,
.contact-card,
.info-grid > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.card-body { padding: 20px; }
.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}
time {
  color: var(--muted);
  font-size: 14px;
  display: block;
  margin: 10px 0 8px;
}
.more { margin-top: 22px; font-weight: 800; }
.soft { background: var(--soft); }
.check-list {
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}
.check-list li {
  margin: 10px 0;
  padding-left: 30px;
  position: relative;
}
.check-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  font-weight: 900;
}
.mini-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mini-gallery img {
  border-radius: 22px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.mini-gallery img:first-child {
  grid-column: span 2;
}
.page-hero {
  padding: 68px 0 46px;
  background:
    linear-gradient(135deg, rgba(46, 159, 187, .16), rgba(88, 169, 109, .22)),
    var(--soft);
}
.page-hero p { max-width: 780px; color: var(--muted); font-size: 18px; }
.filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.filter a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.filter a.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.news-list { display: grid; gap: 18px; }
.news-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 18px;
}
.news-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 20px;
}
.news-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-item figcaption {
  padding: 16px;
}
.gallery-item span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.text-page {
  max-width: 900px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.info-grid > div { padding: 22px; }
.info-grid p { color: var(--muted); }
.contact-grid {
  align-items: start;
}
.contact-card {
  padding: 28px;
}
.notice {
  background: var(--soft);
  border-radius: 18px;
  padding: 16px;
  margin-top: 20px;
  font-weight: 700;
}
.site-footer {
  background: #173124;
  color: #e7f2ea;
  padding: 34px 0;
}
.site-footer a { color: #ccefd7; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 20px;
}
.footer-grid p { margin: 6px 0; color: #c8d8ce; }

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 17px;
    right: 17px;
    top: 76px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav.open { display: flex; }
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .cards, .gallery-grid, .info-grid, .footer-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .section-title { display: block; }
}


/* Doplněno ve verzi SNK: rozložení aktualit a nová stránka návštěvy */
.text-split { align-items: start; }
.side-card { padding: 16px; }
.side-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 20px; margin-bottom: 18px; }
.side-card h3, .side-card p, .side-card ul { margin-left: 8px; margin-right: 8px; }
.rule-list { padding: 0; margin: 22px 0 0; list-style: none; }
.rule-list li { margin: 10px 0; padding-left: 30px; position: relative; }
.rule-list li:before { content: "•"; position: absolute; left: 6px; top: -2px; color: var(--brand); font-weight: 900; font-size: 24px; }
.news-item .post-image { width: 100%; height: 210px; object-fit: cover; border-radius: 20px; }
.news-title-wide { grid-column: 1 / -1; }
.news-item.layout-right { grid-template-columns: 1fr 260px; }
.news-item.layout-right .post-image { order: 2; }
.news-item.layout-right .news-content { order: 1; }
.news-item.layout-top, .news-item.layout-large, .news-item.no-image { grid-template-columns: 1fr; }
.news-item.layout-top .post-image, .news-item.layout-large .post-image { width: 100%; height: auto; max-height: 430px; aspect-ratio: 16/7; object-fit: cover; }
.news-item.no-image { padding: 24px; }
@media (max-width: 850px) {
  .news-item.layout-right { grid-template-columns: 1fr; }
  .news-item.layout-right .post-image, .news-item.layout-right .news-content { order: 0; }
}


/* Verze 3: kontaktní osoby */
.contact-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.wide-card { grid-column: 1 / -1; }
.contact-person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.person-card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.person-card h3 { margin-bottom: 4px; }
.person-role { color: var(--muted); font-weight: 800; margin-top: 0; }
@media (max-width: 900px) {
  .contact-page-grid, .contact-person-grid { grid-template-columns: 1fr; }
}


/* Velký náhled obrázků po kliknutí */
.lightboxable {
  cursor: zoom-in;
}
.no-scroll {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(9, 24, 18, .86);
  z-index: 999;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  background: #fff;
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #173124;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  color: #fff;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}


/* Verze 5: upozornění při první návštěvě */
.attention-target.attention-pulse {
  position: relative;
  z-index: 1002;
  animation: attentionPulse 1s ease-in-out 5;
}
@keyframes attentionPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(36,120,93,.55); }
  50% { transform: scale(1.055); box-shadow: 0 0 0 14px rgba(36,120,93,.22); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(36,120,93,0); }
}
.first-visit-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10,31,22,.46);
  backdrop-filter: blur(5px);
}
.first-visit-overlay[hidden] { display: none; }
.first-visit-card {
  width: min(660px, 100%);
  background: rgba(255,255,255,.98);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  position: relative;
  animation: attentionCardIn .35s ease-out both;
}
@keyframes attentionCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.first-visit-card h2 { font-size: clamp(26px,4vw,40px); margin-bottom: 12px; }
.first-visit-card p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.first-visit-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.first-visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn.ghost { background: transparent; color: var(--muted); }
@media (max-width: 700px) {
  .first-visit-overlay { place-items: end center; padding: 14px; }
  .first-visit-card { border-radius: 24px; padding: 24px 18px 18px; }
  .first-visit-actions { display: grid; grid-template-columns: 1fr; }
  .first-visit-actions .btn { width: 100%; }
}


/* Verze 6: trvalé a hlavní zvýraznění */
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.attention-target.attention-primary-pulse {
  animation: attentionPrimaryPulse 1s ease-in-out 5;
}

@keyframes attentionPrimaryPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(238, 166, 37, .72);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 18px rgba(238, 166, 37, .28);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(238, 166, 37, 0);
  }
}

.attention-permanent {
  position: relative;
  border-color: rgba(238, 166, 37, .65) !important;
  box-shadow: 0 0 0 5px rgba(238, 166, 37, .14), 0 12px 30px rgba(23, 79, 55, .10) !important;
}

.attention-permanent::after {
  content: "Důležité";
  position: absolute;
  right: -8px;
  top: -12px;
  background: #eea625;
  color: #173124;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}

.first-visit-actions .attention-featured {
  box-shadow: 0 0 0 5px rgba(238, 166, 37, .18);
}

.badge.situace-badge,
.news-item .badge:has(+ time) {
  /* ponecháno kvůli kompatibilitě, moderní prohlížeče zvládnou :has */
}

@media (max-width: 900px) {
  .section-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }
}


/* ==========================================
   Návštěvnické barevné varianty webu
   ========================================== */

html[data-theme="light"] {
  --bg: #f7fbf3;
  --soft: #eaf5e9;
  --panel: #ffffff;
  --text: #153326;
  --muted: #617368;
  --brand: #24785d;
  --brand-2: #58a96d;
  --water: #2e9fbb;
  --sand: #f5dfa4;
  --border: #dce8de;
  --shadow: 0 18px 45px rgba(23, 79, 55, .13);
}

html[data-theme="mint"] {
  --bg: #edf8f1;
  --soft: #d9f0e3;
  --panel: #ffffff;
  --text: #123529;
  --muted: #58766a;
  --brand: #1f8a68;
  --brand-2: #62b981;
  --water: #28a7ad;
  --sand: #f4dfaa;
  --border: #cce5d5;
  --shadow: 0 18px 45px rgba(24, 113, 78, .14);
}

html[data-theme="sand"] {
  --bg: #fbf4e4;
  --soft: #f3e4c2;
  --panel: #fffdf7;
  --text: #3a2d1b;
  --muted: #75664e;
  --brand: #8a6a2c;
  --brand-2: #b48b3b;
  --water: #397d87;
  --sand: #e6c377;
  --border: #eadab9;
  --shadow: 0 18px 45px rgba(105, 78, 35, .14);
}

html[data-theme="water"] {
  --bg: #edf9fb;
  --soft: #d9f0f3;
  --panel: #ffffff;
  --text: #123039;
  --muted: #58727a;
  --brand: #197f91;
  --brand-2: #4aaeb7;
  --water: #167f9e;
  --sand: #f2dba3;
  --border: #c9e5ea;
  --shadow: 0 18px 45px rgba(16, 92, 108, .15);
}

html[data-theme="forest"] {
  --bg: #11251c;
  --soft: #1b372b;
  --panel: #183126;
  --text: #eef8f1;
  --muted: #b6cabe;
  --brand: #75c991;
  --brand-2: #52a86f;
  --water: #55b8c3;
  --sand: #dfc477;
  --border: #315344;
  --shadow: 0 18px 45px rgba(0, 0, 0, .28);
}

html[data-theme="night"] {
  --bg: #0b1416;
  --soft: #152327;
  --panel: #111c20;
  --text: #eef6f4;
  --muted: #afc3bf;
  --brand: #69c7bd;
  --brand-2: #48a99c;
  --water: #5fb6d1;
  --sand: #dac07a;
  --border: #2b3e43;
  --shadow: 0 18px 45px rgba(0, 0, 0, .36);
}

html[data-theme="forest"] .site-header,
html[data-theme="night"] .site-header {
  background: rgba(17, 28, 32, .92);
}

html[data-theme="forest"] .main-nav a,
html[data-theme="night"] .main-nav a,
html[data-theme="forest"] .brand,
html[data-theme="night"] .brand {
  color: var(--text);
}

html[data-theme="forest"] .btn,
html[data-theme="night"] .btn {
  background: var(--panel);
  color: var(--text);
}

html[data-theme="forest"] .btn.primary,
html[data-theme="night"] .btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #102018;
}

html[data-theme="forest"] .site-footer,
html[data-theme="night"] .site-footer {
  background: #07100f;
}

html[data-theme="forest"] .page-hero,
html[data-theme="night"] .page-hero {
  background:
    linear-gradient(135deg, rgba(46, 159, 187, .16), rgba(88, 169, 109, .18)),
    var(--soft);
}

.header-theme-switcher {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 8px;
  white-space: nowrap;
}

.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-dot {
  width: 27px;
  height: 27px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .9);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(21, 51, 38, .22), 0 5px 14px rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .18s ease;
}

.theme-dot:hover {
  transform: translateY(-2px) scale(1.06);
}

.theme-dot.is-active {
  box-shadow: 0 0 0 3px var(--brand), 0 8px 18px rgba(0,0,0,.18);
}

.theme-light { background: linear-gradient(135deg, #ffffff 0%, #eaf5e9 50%, #24785d 100%); }
.theme-mint { background: linear-gradient(135deg, #edf8f1 0%, #62b981 55%, #1f8a68 100%); }
.theme-sand { background: linear-gradient(135deg, #fbf4e4 0%, #e6c377 55%, #8a6a2c 100%); }
.theme-water { background: linear-gradient(135deg, #edf9fb 0%, #4aaeb7 55%, #197f91 100%); }
.theme-forest { background: linear-gradient(135deg, #75c991 0%, #1b372b 55%, #11251c 100%); }
.theme-night { background: linear-gradient(135deg, #69c7bd 0%, #152327 52%, #0b1416 100%); }

.footer-theme {
  min-width: 210px;
}

.footer-theme p {
  margin: 6px 0 12px;
}

@media (max-width: 1100px) {
  .header-theme-switcher {
    order: 3;
    width: 100%;
    justify-content: flex-end;
    padding: 0 0 10px;
  }
}

@media (max-width: 900px) {
  .header-theme-switcher {
    justify-content: flex-start;
    padding: 0 0 12px;
  }

  .theme-dot {
    width: 32px;
    height: 32px;
  }
}


/* V8: přepínač barev je ponechaný pouze v patičce */
.header-theme-switcher {
  display: none !important;
}


/* ==========================================
   V9: lepší čitelnost tlačítek v tmavých barvách
   ========================================== */

html[data-theme="forest"] .btn,
html[data-theme="night"] .btn {
  background: #f3fbf5;
  color: #0d2118;
  border-color: #f3fbf5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

html[data-theme="forest"] .btn:hover,
html[data-theme="night"] .btn:hover {
  background: #ffffff;
  color: #07140f;
}

html[data-theme="forest"] .btn.primary,
html[data-theme="night"] .btn.primary {
  background: #91e8a9;
  border-color: #91e8a9;
  color: #07140f;
  box-shadow: 0 10px 26px rgba(145, 232, 169, .22);
}

html[data-theme="forest"] .btn.primary:hover,
html[data-theme="night"] .btn.primary:hover {
  background: #b8f7c7;
  border-color: #b8f7c7;
  color: #07140f;
}

html[data-theme="forest"] .btn.ghost,
html[data-theme="night"] .btn.ghost {
  background: transparent;
  color: #eef8f1;
  border-color: rgba(238, 248, 241, .45);
  box-shadow: none;
}

html[data-theme="forest"] .filter a,
html[data-theme="night"] .filter a {
  background: #f3fbf5;
  color: #0d2118;
  border-color: #f3fbf5;
}

html[data-theme="forest"] .filter a.selected,
html[data-theme="night"] .filter a.selected {
  background: #91e8a9;
  color: #07140f;
  border-color: #91e8a9;
}

html[data-theme="forest"] button,
html[data-theme="night"] button {
  color: #0d2118;
}

html[data-theme="forest"] .menu-toggle,
html[data-theme="night"] .menu-toggle,
html[data-theme="forest"] .first-visit-close,
html[data-theme="night"] .first-visit-close {
  background: #f3fbf5;
  color: #0d2118;
}

/* Tlačítka barevných puntíků zůstávají jen jako puntíky, zde neřešit text */
html[data-theme="forest"] .theme-dot,
html[data-theme="night"] .theme-dot {
  color: transparent;
}


/* V10: malé počítadlo návštěv v patičce */
.footer-counter { min-width: 190px; }
.footer-counter p { margin: 6px 0 0; color: #c8d8ce; }
html[data-theme="forest"] .footer-counter p, html[data-theme="night"] .footer-counter p { color: var(--muted); }

/* Oprava čitelnosti mobilního menu v tmavých barevných režimech */
@media (max-width: 900px) {
  html[data-theme="forest"] .main-nav,
  html[data-theme="night"] .main-nav {
    background: #f3fbf5 !important;
  }

  html[data-theme="forest"] .main-nav a,
  html[data-theme="night"] .main-nav a {
    color: #0b1f17 !important;
  }

  html[data-theme="forest"] .main-nav a.active,
  html[data-theme="night"] .main-nav a.active,
  html[data-theme="forest"] .main-nav a:hover,
  html[data-theme="night"] .main-nav a:hover {
    background: #dff2e5 !important;
    color: #0b1f17 !important;
  }
}
