/* ==========================================================================
   ZŠ a MŠ Chotoviny – šablona pro Joomla 6
   Bootstrap 5.3 (podmnožina, pouze CSS) + vlastní vrstva. Prefix tříd: .zs-
   Barvy textu na plochách splňují WCAG 2.1 AA (kontrast alespoň 4,5 : 1).
   ========================================================================== */

/* ---------- 1) Design tokeny ---------- */
:root {
  --zs-ink: #23201d;          /* text, obrysy, stíny */
  --zs-paper: #fdfaf4;        /* pozadí stránky */
  --zs-red: #e1533d;          /* dekorace (tečky, pruhy, tvary) */
  --zs-red-strong: #c9432e;   /* plochy a text v červené (bílý text 4,85 : 1) */
  --zs-yellow: #f2a63b;
  --zs-green: #2aa273;        /* plocha s tmavým textem (5 : 1) */
  --zs-green-strong: #1d8558; /* zelený text na bílé */
  --zs-green-light: #43bd84;
  --zs-blue: #2f6ec4;
  --zs-purple: #7b61d9;
  --zs-sand: #f0e8d8;
  --zs-sand-dark: #e6dcc6;
  --zs-sky: #d9edf9;          /* horní lišta */
  --zs-hero: #eaf2fd;
  --zs-hero-line: #d3e3f7;
  --zs-mint: #eef6f1;
  --zs-mint-line: #cfe4d8;
  --zs-line: #e6ddcc;
  --zs-header-line: #eee3d0;
  --zs-gold: #ffd98a;

  --zs-tint-red: #fbe3df;
  --zs-tint-blue: #dfeaf9;
  --zs-tint-yellow: #fcecd2;
  --zs-tint-green: #ddefe6;
  --zs-tint-purple: #e6e0f8;

  --zs-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --zs-display: "Baloo 2", "Nunito Sans", system-ui, sans-serif;
  --zs-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --zs-border: 2.5px solid var(--zs-ink);
  --zs-shadow: 4px 4px 0 var(--zs-ink);
  --zs-shadow-lg: 7px 7px 0 var(--zs-ink);
  --zs-radius: 20px;
  --zs-ease: cubic-bezier(.2, .8, .3, 1.2);

  /* Sémantické barvy – mění je barevná schémata (data-theme na <html>) */
  --zs-text: #23201d;          /* text stránky */
  --zs-muted: #4d4741;         /* doplňkový text (min. 4,5 : 1 na všech plochách) */
  --zs-surface: #ffffff;       /* karty, tabulky, rozbalovací menu */
  --zs-link: #2762b0;
  --zs-link-hover: #b83c29;
  --zs-hl: #2762b0;            /* zvýrazněné slovo v nadpisu */
  --zs-backdrop: rgba(35, 32, 29, .45);
  --zs-figure: #cfe6fb;

  /* Výplně dlaždic, tlačítek a štítků + barva textu na nich */
  --zs-fill-red: var(--zs-red-strong);   --zs-on-red: #ffffff;
  --zs-fill-blue: var(--zs-blue);        --zs-on-blue: #ffffff;
  --zs-fill-yellow: var(--zs-yellow);    --zs-on-yellow: #23201d;
  --zs-fill-green: var(--zs-green);      --zs-on-green: #23201d;
  --zs-fill-purple: var(--zs-purple);    --zs-on-purple: #ffffff;
  --zs-fill-sand: var(--zs-sand);        --zs-on-sand: #23201d;
  --zs-fill-light-green: var(--zs-green-light);

  /* Barevný text na kartách (štítky kategorií) */
  --zs-text-red: #c9432e;
  --zs-text-blue: #2f6ec4;
  --zs-text-green: #1d8558;
  --zs-text-purple: #6a4fcf;
  --zs-text-yellow: #8a5a00;

  /* Podklady dlaždic rozcestníku po najetí */
  --zs-tint-red-hover: #f7cec7;
  --zs-tint-blue-hover: #cddff5;
  --zs-tint-yellow-hover: #f9dfb5;
  --zs-tint-green-hover: #c9e6d8;
  --zs-tint-purple-hover: #d8cff4;

  /* Patička */
  --zs-footer-bg: var(--zs-blue);
  --zs-footer-text: #ffffff;
  --zs-footer-line: rgba(255, 255, 255, .35);

  --bs-body-font-family: var(--zs-font);
  --bs-body-bg: var(--zs-paper);
  --bs-body-color: var(--zs-text);
  --bs-emphasis-color: var(--zs-text);
  --bs-secondary-color: var(--zs-muted);
  --bs-border-color: var(--zs-line);
  --bs-heading-color: var(--zs-text);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-focus-ring-color: rgba(47, 110, 196, .45);
}

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

body {
  background: var(--zs-paper);
  color: var(--zs-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--zs-link); text-underline-offset: .18em; }
a:hover { color: var(--zs-link-hover); }

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

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--zs-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
}
h1, .h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3, .h3 { font-size: 1.5rem; font-weight: 700; }
h4, .h4 { font-size: 1.25rem; font-weight: 700; }

.zs-skip {
  position: absolute; left: 1rem; top: 1rem; z-index: 1100;
  background: var(--zs-text); color: var(--zs-paper);
  padding: .6rem 1rem; border-radius: 10px; font-weight: 700;
}

.container { padding-left: 20px; padding-right: 20px; }

/* ---------- 2) Barvy ploch (sdílené moduly) ---------- */
.zs-bg-blue   { background: var(--zs-fill-blue); color: var(--zs-on-blue); }
.zs-bg-red    { background: var(--zs-fill-red); color: var(--zs-on-red); }
.zs-bg-green  { background: var(--zs-fill-green); color: var(--zs-on-green); }
.zs-bg-purple { background: var(--zs-fill-purple); color: var(--zs-on-purple); }
.zs-bg-white  { background: var(--zs-surface); color: var(--zs-text); }
.zs-bg-sky    { background: var(--zs-hero); color: var(--zs-text); }
.zs-bg-mint   { background: var(--zs-mint); color: var(--zs-text); }
.zs-bg-sand   { background: var(--zs-fill-sand); color: var(--zs-on-sand); }

.zs-hl { color: var(--zs-hl); }

/* Štítek („nálepka“) */
.zs-sticker {
  display: inline-block;
  margin: 0;
  background: var(--zs-paper);
  color: var(--zs-text);
  border: var(--zs-border);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: var(--zs-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  box-shadow: var(--zs-shadow);
  transform: rotate(-6deg);
}
.zs-sticker--yellow { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); transform: rotate(-3deg); padding: 7px 18px; }

/* Nadpis sekce s linkou */
.zs-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.zs-heading::after { content: ""; flex: 1 1 auto; height: 2px; background: var(--zs-line); }
.zs-heading-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.125rem); }
.zs-heading-title--sm { font-size: clamp(1.375rem, 2.6vw, 1.875rem); }
.zs-section--mint .zs-heading::after { background: var(--zs-mint-line); }

.zs-section { padding: 48px 0; }

/* Pětibarevný pruh */
.zs-stripe { display: flex; height: 6px; }
.zs-stripe span { flex: 1; }
.zs-stripe span:nth-child(1) { background: var(--zs-red); }
.zs-stripe span:nth-child(2) { background: var(--zs-yellow); }
.zs-stripe span:nth-child(3) { background: var(--zs-green); }
.zs-stripe span:nth-child(4) { background: var(--zs-blue); }
.zs-stripe span:nth-child(5) { background: var(--zs-purple); }

/* ---------- 3) Horní lišta ---------- */
.zs-topbar { background: var(--zs-sky); color: var(--zs-text); font-size: 14px; }
.zs-topbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 0; }
.zs-topbar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.zs-topbar-links li { display: flex; align-items: center; gap: 18px; }
.zs-topbar-links li + li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--zs-text); opacity: .4;
}
.zs-topbar-links a { color: var(--zs-text); font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.zs-topbar-links a:hover { text-decoration: underline; color: var(--zs-text); }
.zs-topbar-spacer { flex: 1 1 auto; }
.zs-clock { display: flex; align-items: center; gap: 10px; font-family: var(--zs-mono); }
.zs-clock-label { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--zs-muted); }
.zs-clock-time { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- 4) Hlavička a navigace ---------- */
.zs-header { background: var(--zs-paper); border-bottom: 2px solid var(--zs-header-line); }
.zs-header-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px 22px; padding: 22px 0 20px; }
.zs-brand { display: flex; align-items: center; gap: 16px; color: var(--zs-text); text-decoration: none; min-width: 0; }
.zs-brand:hover { color: var(--zs-text); }
.zs-brand img { flex: 0 0 auto; height: auto; max-height: 72px; width: auto; }
.zs-brand-name { display: block; font-family: var(--zs-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.05; }
/* Části názvu (oddělené čárkou) se nikdy nedělí; zalomit se smí jen mezi nimi. */
.zs-brand-line { white-space: nowrap; }
.zs-brand-sub { display: block; font-family: var(--zs-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--zs-muted); margin-top: 6px; }
.zs-header-spacer { flex: 1 1 auto; }
.zs-header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.zs-brand > span { min-width: 0; }
/* Mobil: název na dva řádky („ZŠ a MŠ Chotoviny,“ / „okres Tábor“), co největší, aby se vešel vedle loga
   a tlačítka menu. Šířka první části je 8,8 em → velikost = volné místo / 8,8
   (100vw − okraje 40 − logo 48 − mezery 10 + 12 − tlačítko menu 52 = 100vw − 162 px). */
@media (max-width: 575.98px) {
  .zs-header-bar { padding: 14px 0; gap: 12px; }
  .zs-header-spacer { display: none; }
  .zs-brand { gap: 10px; }
  .zs-brand img { max-height: 48px; }
  .zs-brand-name { font-size: clamp(17px, calc((100vw - 162px) / 8.8), 30px); }
  .zs-brand-line { display: block; }
}

.zs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--zs-text); color: var(--zs-paper);
  border: var(--zs-border); border-radius: 999px;
  padding: 11px 22px; font-weight: 700; font-size: 15px; line-height: 1.2;
  box-shadow: 4px 4px 0 var(--zs-yellow);
  text-decoration: none;
  transition: background-color .15s, transform .15s var(--zs-ease), box-shadow .15s;
}
.zs-btn:hover, .zs-btn:focus-visible { background: var(--zs-fill-red); color: var(--zs-on-red); transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--zs-yellow); }

/* Hamburger (přepínač bez JavaScriptu přes skryté zaškrtávací pole) */
.zs-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 52px; height: 52px; padding: 0 13px; margin: 0;
  background: var(--zs-fill-red); border: var(--zs-border); border-radius: 14px; box-shadow: var(--zs-shadow);
  cursor: pointer;
}
.zs-burger span { display: block; height: 3.5px; background: var(--zs-on-red); border-radius: 2px; }
.zs-header:has(.zs-nav-toggle:focus-visible) .zs-burger { outline: 3px solid var(--zs-link); outline-offset: 3px; }

/* Panel s menu: na mobilu vysouvací zprava, na desktopu řádek dlaždic */
.zs-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: var(--zs-border); }
.zs-panel-title { margin: 0; font-size: 22px; }
.zs-panel-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; border: var(--zs-border); border-radius: 12px; background: var(--zs-surface); color: var(--zs-text); cursor: pointer;
  font-size: 26px; line-height: 1; font-weight: 700;
}
.zs-panel-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.zs-panel-extra { display: flex; flex-direction: column; gap: 10px; }
.zs-panel-backdrop { display: none; }

@media (max-width: 991.98px) {
  .zs-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1050;
    width: 360px; max-width: 92vw; overflow-y: auto;
    background: var(--zs-paper); border-left: 3px solid var(--zs-ink);
    transform: translateX(105%); visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .zs-nav-toggle:checked ~ .zs-panel { transform: none; visibility: visible; transition: transform .25s ease; }
  .zs-nav-toggle:checked ~ .zs-panel-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1040; background: var(--zs-backdrop); cursor: pointer;
  }
  body:has(.zs-nav-toggle:checked) { overflow: hidden; }
}

@media (min-width: 992px) {
  .zs-burger, .zs-panel-head, .zs-panel-extra, .zs-panel-backdrop, .zs-nav-toggle { display: none !important; }
  .zs-panel-body { padding: 0 0 22px; }
}
@media (max-width: 575.98px) {
  .zs-header-actions .zs-btn { display: none; }
}

/* Hlavní menu – barevné dlaždice */
.zs-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 992px) {
  .zs-nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .zs-nav > li > a, .zs-nav > li > .zs-nav-heading { height: 100%; }
}
.zs-nav > li { position: relative; }
.zs-nav > li > a,
.zs-nav > li > .zs-nav-heading {
  display: block;
  border: var(--zs-border); border-radius: 14px; padding: 15px 16px;
  font-family: var(--zs-display); font-weight: 700; font-size: 17px; line-height: 1.15;
  box-shadow: var(--zs-shadow); text-decoration: none;
  transition: transform .18s var(--zs-ease), box-shadow .18s, filter .18s;
}
.zs-nav > li > a:hover, .zs-nav > li > a:focus-visible {
  transform: translate(-2px, -3px) rotate(-1.5deg); box-shadow: 7px 8px 0 var(--zs-ink); filter: brightness(1.06);
}
.zs-nav > li:nth-child(6n+1) > :is(a, .zs-nav-heading) { background: var(--zs-fill-red); color: var(--zs-on-red); }
.zs-nav > li:nth-child(6n+2) > :is(a, .zs-nav-heading) { background: var(--zs-fill-blue); color: var(--zs-on-blue); }
.zs-nav > li:nth-child(6n+3) > :is(a, .zs-nav-heading) { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); }
.zs-nav > li:nth-child(6n+4) > :is(a, .zs-nav-heading) { background: var(--zs-fill-green); color: var(--zs-on-green); }
.zs-nav > li:nth-child(6n+5) > :is(a, .zs-nav-heading) { background: var(--zs-fill-purple); color: var(--zs-on-purple); }
.zs-nav > li:nth-child(6n+6) > :is(a, .zs-nav-heading) { background: var(--zs-fill-sand); color: var(--zs-on-sand); }
.zs-nav > li.active > a { text-decoration: underline; text-decoration-thickness: 2px; }

/* Podmenu: na desktopu rozbalení při najetí / fokusu (bez JS), na mobilu odsazený seznam */
.zs-submenu { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; display: grid; gap: 4px; }
.zs-submenu a {
  display: block; padding: 6px 10px; border-radius: 8px;
  color: var(--zs-text); font-weight: 700; text-decoration: none;
}
.zs-submenu a:hover, .zs-submenu a:focus-visible { background: var(--zs-fill-sand); color: var(--zs-on-sand); }
.zs-submenu .current > a { text-decoration: underline; }
@media (min-width: 992px) {
  .zs-submenu {
    position: absolute; left: 0; top: calc(100% + 6px); z-index: 1000;
    min-width: 240px; margin: 0; padding: 8px;
    background: var(--zs-surface); border: var(--zs-border); border-radius: 14px; box-shadow: var(--zs-shadow);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    /* Skrytí s malým zpožděním – myš může přejet z dlaždice do podmenu i šikmo. */
    transition: opacity .15s .25s, transform .15s .25s, visibility 0s linear .4s;
  }
  /* Neviditelný „můstek“ přes mezeru mezi dlaždicí a podmenu (jinak by se při přejezdu ztratil hover). */
  .zs-submenu::before { content: ""; position: absolute; left: -8px; right: -8px; top: -16px; height: 16px; }
  .zs-nav > li:hover > .zs-submenu,
  .zs-nav > li:focus-within > .zs-submenu { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s, visibility 0s; z-index: 1001; }
  .zs-nav > li:nth-last-child(-n+2) > .zs-submenu { left: auto; right: 0; }
}

/* Doplňkové odkazy v mobilním panelu */
.zs-panel-extra .zs-btn { justify-content: flex-start; border-radius: 14px; font-family: var(--zs-display); font-size: 18px; box-shadow: var(--zs-shadow); }

/* ---------- 5) Hero (mod_zschotoviny_hero) ---------- */
.zs-hero { background: var(--zs-hero); border-bottom: 2px solid var(--zs-hero-line); padding: 44px 0 48px; }
.zs-hero-head { max-width: 880px; margin-bottom: 34px; }
.zs-hero-title { font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.02; letter-spacing: -.015em; margin: 0 0 12px; }
.zs-hero-perex { margin: 0; font-size: 1.1875rem; line-height: 1.5; color: var(--zs-muted); max-width: 640px; text-align: justify; text-align-last: left; hyphens: auto; -webkit-hyphens: auto; }
/* Mobil: moto menší, aby se každý řádek vešel celý – první končí čárkou, druhý začíná „že“.
   Nejdelší řádek („Škola, která se nestydí za to,“) má 12,1 em → velikost = (100vw − okraje 40 px) / 12,6. */
@media (max-width: 575.98px) {
  .zs-hero { padding: 32px 0 36px; }
  .zs-hero-title { font-size: clamp(1.125rem, calc((100vw - 40px) / 12.6), 2rem); line-height: 1.1; }
  /* Dovětek do bloku na dva řádky: první řádek končí „Chotoviny —“ (20,2 em), druhý má 21,1 em, s „učíme“ by měl první 23,1 em. */
  .zs-hero-perex { font-size: clamp(14px, calc((100vw - 40px) / 21.6), 1.1875rem); line-height: 1.45; }
}
.zs-hero-figure {
  position: relative; height: 100%; margin: 0;
  border: var(--zs-border); border-radius: 22px; overflow: hidden;
  background: var(--zs-figure); box-shadow: var(--zs-shadow-lg);
}
/* Slideshow: posuvný pás se zarovnáním na snímek (funguje i bez JS), ovládání přidá slider.js */
.zs-slides {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.zs-slides::-webkit-scrollbar { display: none; }
.zs-slides:focus-visible { outline: 3px solid var(--zs-link); outline-offset: -6px; }
.zs-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.zs-slide img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.zs-hero-figure .zs-sticker { position: absolute; left: 16px; top: 16px; }
.zs-slider-controls {
  position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 6px;
  background: var(--zs-paper); color: var(--zs-text); border: var(--zs-border); border-radius: 999px; padding: 4px 6px; box-shadow: var(--zs-shadow);
}
.zs-slider-controls[hidden] { display: none; }
.zs-slider-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--zs-text); font: 700 24px/1 var(--zs-display); cursor: pointer;
}
.zs-slider-btn:hover { background: var(--zs-fill-sand); color: var(--zs-on-sand); }
.zs-icon-pause { display: inline-block; width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.is-paused .zs-icon-pause { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.zs-slider-dots { display: flex; gap: 2px; }
.zs-slider-dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.zs-slider-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--zs-ink); background: var(--zs-paper); }
.zs-slider-dot[aria-current]::before { background: var(--zs-red); }
.zs-slider-dot:nth-child(5n+2)[aria-current]::before { background: var(--zs-yellow); }
.zs-slider-dot:nth-child(5n+3)[aria-current]::before { background: var(--zs-green); }
.zs-slider-dot:nth-child(5n+4)[aria-current]::before { background: var(--zs-blue); }
.zs-slider-dot:nth-child(5n+5)[aria-current]::before { background: var(--zs-purple); }
.zs-hero-placeholder {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18%;
  aspect-ratio: 16 / 10; height: 100%; background: var(--zs-figure);
}
.zs-hero-placeholder span { border: var(--zs-border); border-radius: 18px; }
.zs-hero-placeholder span:nth-child(1) { background: var(--zs-red); }
.zs-hero-placeholder span:nth-child(2) { background: var(--zs-yellow); }
.zs-hero-placeholder span:nth-child(3) { background: var(--zs-green); }
.zs-hero-placeholder span:nth-child(4) { background: var(--zs-blue); }
.zs-hero-card {
  height: 100%; border: var(--zs-border); border-radius: 22px; padding: 30px; box-shadow: var(--zs-shadow-lg);
}
.zs-hero-text { margin: 0 0 16px; font-size: 16.5px; line-height: 1.65; }
.zs-hero-text > :last-child { margin-bottom: 0; }
.zs-hero-text p, .zs-hero-text ul, .zs-hero-text ol, .zs-hero-text blockquote { margin: 0 0 .8em; }
.zs-hero-text :is(h2, h3, h4, h5, h6) { margin: 0 0 .5em; color: inherit; line-height: 1.2; }
.zs-hero-text h2 { font-size: 1.5rem; }
.zs-hero-text h3 { font-size: 1.3rem; }
.zs-hero-text :is(h4, h5, h6) { font-size: 1.125rem; }
.zs-hero-text hr { margin: 1em 0; border: 0; border-top: 2px solid currentColor; opacity: .5; }
.zs-hero-text a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.zs-hero-text blockquote { padding-left: 14px; border-left: 3px solid currentColor; font-style: italic; }
.zs-hero-signature { margin: 0; text-align: right; font-family: var(--zs-display); font-weight: 700; font-size: 18px; }

/* ---------- 6) Rozcestník (mod_zschotoviny_rozcestnik) ---------- */
.zs-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  min-height: 158px; height: 100%;
  border: var(--zs-border); border-radius: var(--zs-radius); padding: 20px;
  color: var(--zs-text); box-shadow: 5px 5px 0 var(--zs-ink); text-decoration: none;
  transition: transform .18s var(--zs-ease), box-shadow .18s, background-color .18s;
}
a.zs-tile:hover, a.zs-tile:focus-visible { transform: translate(-2px, -3px) rotate(1.5deg); box-shadow: 8px 9px 0 var(--zs-ink); color: var(--zs-text); }
.zs-tile-label { font-family: var(--zs-display); font-weight: 700; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.15; overflow-wrap: anywhere; }
.zs-tile-shape { flex: 0 0 auto; }
.zs-tile--red    { background: var(--zs-tint-red); }    .zs-tile--red .zs-tile-shape { fill: var(--zs-red); }
.zs-tile--blue   { background: var(--zs-tint-blue); }   .zs-tile--blue .zs-tile-shape { fill: var(--zs-blue); }
.zs-tile--yellow { background: var(--zs-tint-yellow); } .zs-tile--yellow .zs-tile-shape { fill: var(--zs-yellow); }
.zs-tile--green  { background: var(--zs-tint-green); }  .zs-tile--green .zs-tile-shape { fill: var(--zs-green); }
.zs-tile--purple { background: var(--zs-tint-purple); } .zs-tile--purple .zs-tile-shape { fill: var(--zs-purple); }
a.zs-tile--red:hover    { background: var(--zs-tint-red-hover); }
a.zs-tile--blue:hover   { background: var(--zs-tint-blue-hover); }
a.zs-tile--yellow:hover { background: var(--zs-tint-yellow-hover); }
a.zs-tile--green:hover  { background: var(--zs-tint-green-hover); }
a.zs-tile--purple:hover { background: var(--zs-tint-purple-hover); }

/* Řada barevných teček (oddělovač) */
.zs-dots { padding: 6px 0 10px; }
.zs-dots .container { position: relative; display: flex; justify-content: center; }
.zs-dots .container::before { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; height: 2.5px; margin-top: -1.25px; background: var(--zs-ink); }
.zs-dots-row { position: relative; display: flex; gap: 22px; padding: 0 14px; background: var(--zs-paper); }
.zs-dots-row span { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--zs-ink); }
.zs-dots-row span:nth-child(5n+1) { background: var(--zs-red); }
.zs-dots-row span:nth-child(5n+2) { background: var(--zs-yellow); }
.zs-dots-row span:nth-child(5n+3) { background: var(--zs-green); }
.zs-dots-row span:nth-child(5n+4) { background: var(--zs-blue); }
.zs-dots-row span:nth-child(5n+5) { background: var(--zs-purple); }
@media (max-width: 767.98px) { .zs-dots-row span:nth-child(n+8) { display: none; } }
@media (max-width: 399.98px) { .zs-dots-row { gap: 14px; } }

/* ---------- 7) Aktuality (blog com_content) ---------- */
.zs-section--mint { background: var(--zs-mint); }
.zs-content .page-header h1, .zs-content .page-header h2 { margin: 0 0 24px; }

.blog-items { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 24px; }
@media (min-width: 768px) {
  .blog-items[class*="columns-"]:not(.columns-1),
  .blog-items[class*="masonry-"]:not(.masonry-1),
  .zs-home .blog-items { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .blog-items.columns-3, .blog-items.masonry-3 { grid-template-columns: repeat(3, 1fr); }
  .blog-items.columns-4, .blog-items.masonry-4 { grid-template-columns: repeat(4, 1fr); }
}
.blog-item { min-width: 0; }

.zs-card {
  position: relative; height: 100%;
  background: var(--zs-surface); border: var(--zs-border); border-top-width: 8px; border-radius: var(--zs-radius);
  padding: 26px; box-shadow: 6px 6px 0 var(--zs-ink);
}
.blog-item:nth-child(5n+1) .zs-card { border-top-color: var(--zs-red); --zs-accent: var(--zs-text-red); }
.blog-item:nth-child(5n+2) .zs-card { border-top-color: var(--zs-blue); --zs-accent: var(--zs-text-blue); }
.blog-item:nth-child(5n+3) .zs-card { border-top-color: var(--zs-green); --zs-accent: var(--zs-text-green); }
.blog-item:nth-child(5n+4) .zs-card { border-top-color: var(--zs-purple); --zs-accent: var(--zs-text-purple); }
.blog-item:nth-child(5n+5) .zs-card { border-top-color: var(--zs-yellow); --zs-accent: var(--zs-text-yellow); }
.zs-card-label {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--zs-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--zs-accent, var(--zs-text-blue));
}
.zs-card-title { font-size: 1.625rem; font-weight: 700; margin: 0 0 10px; }
.zs-card-title a { color: var(--zs-text); text-decoration: none; }
.zs-card-title a:hover { color: var(--zs-link); text-decoration: underline; }
.zs-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--zs-radius); }
.zs-card .item-content > :last-child { margin-bottom: 0; }
.zs-card p { font-size: 16px; line-height: 1.6; }
.zs-card a:not(.zs-card-title a) { position: relative; z-index: 1; font-weight: 700; }
.zs-card .item-image { margin: -26px -26px 18px; border-bottom: var(--zs-border); overflow: hidden; border-radius: 12px 12px 0 0; }
.zs-card .item-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.zs-card .article-info { font-size: 14px; color: var(--zs-muted); margin: 0 0 10px; }
.zs-card .article-info dt { display: none; }
.zs-card .article-info dd { display: inline; margin: 0 .75em 0 0; }
.zs-card .readmore { margin: 14px 0 0; }
.readmore .btn, .zs-readmore, .pagenavigation .btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--zs-surface); color: var(--zs-text); border: 2px solid var(--zs-ink); border-radius: 999px;
  padding: 5px 14px; font-weight: 700; font-size: 15px; box-shadow: 3px 3px 0 var(--zs-ink);
}
.readmore .btn:hover, .pagenavigation .btn:hover { background: var(--zs-text); color: var(--zs-paper); }
.pagenavigation { margin-top: 32px; }
.pagenavigation .pagination { justify-content: space-between; }
.items-more { margin-bottom: 24px; }

/* Stránkování */
.com-content-category-blog__navigation, .zs-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; font-family: var(--zs-mono); font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; --bs-pagination-border-radius: 9px; }
.pagination .page-link {
  background: var(--zs-surface); color: var(--zs-text); border: 2px solid var(--zs-ink) !important; border-radius: 9px !important;
  padding: 5px 13px; font-weight: 500; box-shadow: 3px 3px 0 var(--zs-ink); margin: 0 !important;
}
.pagination .page-link:hover, .pagination .page-link:focus-visible { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); }
.pagination .active > .page-link, .pagination .page-link.active { background: var(--zs-text); color: var(--zs-paper); box-shadow: none; }
.pagination .disabled { display: none; }
/* Šipky stránkování a „Číst dál“ bez písma ikon (Joomla používá třídy icon-*) */
[class^="icon-angle"], [class^="icon-chevron"] { font-style: normal; }
.icon-angle-left::before { content: "‹"; }
.icon-angle-right::before { content: "›"; }
.icon-angle-double-left::before { content: "«"; }
.icon-angle-double-right::before { content: "»"; }
.icon-chevron-right::before { content: "›"; }
.icon-chevron-left::before { content: "‹"; }
.readmore .icon-chevron-right, .readmore .icon-chevron-left { order: 2; }
.counter { margin: 0; color: var(--zs-muted); float: none !important; padding: 0 !important; }

/* ---------- 8) Spodní bloky (nejnovější články, partneři) ---------- */
.zs-latest { list-style: none; margin: 0; padding: 0; }
.zs-latest li { border-bottom: 1px solid var(--zs-line); }
.zs-latest a {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  color: var(--zs-link); font-size: 16.5px; font-weight: 600; text-decoration: none;
}
.zs-latest a:hover { color: var(--zs-link-hover); text-decoration: underline; }
.zs-latest a::before { content: ""; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--zs-red); }
.zs-latest li:nth-child(even) a::before { border-radius: 2.5px; }
.zs-latest li:nth-child(5n+2) a::before { background: var(--zs-blue); }
.zs-latest li:nth-child(5n+3) a::before { background: var(--zs-yellow); }
.zs-latest li:nth-child(5n+4) a::before { background: var(--zs-green); }
.zs-latest li:nth-child(5n+5) a::before { background: var(--zs-purple); }
.zs-block + .zs-block { margin-top: 40px; }

.zs-partner {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  height: 100%; min-height: 130px; padding: 20px;
  border: var(--zs-border); border-radius: 18px; box-shadow: 5px 5px 0 var(--zs-ink);
  color: var(--zs-text); text-decoration: none;
  transition: transform .18s var(--zs-ease), box-shadow .18s;
}
a.zs-partner:hover, a.zs-partner:focus-visible { transform: translate(-2px, -3px); box-shadow: 7px 8px 0 var(--zs-ink); color: var(--zs-text); }
.zs-partner-logo { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; align-self: flex-start; }
.zs-partner-name { font-size: 18px; line-height: 1.25; }
.zs-partner-text { font-size: 13.5px; line-height: 1.4; color: var(--zs-muted); }

/* ---------- 9) Obsah podstránek ---------- */
.zs-content { padding: 40px 0 56px; }
.zs-content.zs-section { padding: 48px 0 52px; }
.zs-content .item-page > h1, .zs-content .page-header h1 { margin-bottom: 18px; }
.zs-content .article-info { font-size: 14px; color: var(--zs-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 20px; }
.zs-content .article-info dt { display: none; }
.zs-content .article-info dd { margin: 0; }
.com-content-article__body, .item-page [itemprop="articleBody"] { max-width: 78ch; }
.zs-content img { max-width: 100%; height: auto; }
/* Tabulky v obsahu: vzhled určuje šablona. Hodnoty z editoru / Wordu (style="width…", border, cellpadding,
   bgcolor, align, barvy, výšky, obtékání) se přebíjejí, aby tabulka nikdy nepřetekla a vypadala všude stejně. */
.zs-content table {
  width: 100% !important; max-width: min(100%, 78ch) !important; height: auto !important; min-width: 0 !important;
  margin: 0 0 1.5rem !important; float: none !important; table-layout: auto !important;
  border-collapse: separate !important; border-spacing: 0 !important;
  background: var(--zs-surface) !important; color: var(--zs-text) !important;
  border: 2px solid var(--zs-ink) !important; border-radius: 14px; overflow: hidden; font-size: 15.5px !important; font-family: inherit !important;
  /* Bootstrap (.table, .table-striped, .table-hover – např. výpis kontaktů) */
  --bs-table-bg: transparent; --bs-table-accent-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-hover-bg: transparent; --bs-table-border-color: var(--zs-line);
}
.zs-content :is(thead, tbody, tfoot, tr) { height: auto !important; background: none !important; border: 0 !important; }
.zs-content :is(td, th) {
  width: auto !important; height: auto !important; min-width: 0 !important;
  padding: 8px 12px !important; border: 0 !important; border-bottom: 1px solid var(--zs-line) !important;
  background: none !important; color: inherit !important; font-size: inherit !important; font-family: inherit !important;
  vertical-align: top !important; text-align: left !important; white-space: normal !important; overflow-wrap: break-word;
  box-shadow: none !important;
}
/* Záhlaví řádku (<th scope="row">, např. jméno ve výpisu kontaktů) – tučně, ale bez podkladu záhlaví tabulky. */
.zs-content tbody th[scope="row"], .zs-content tbody tr:not(.zs-table-head) > th:first-child:not(:only-child) { background: none !important; color: inherit !important; font-weight: 700; }
.zs-content tbody th[scope="row"] :is(div, span, p):not(:has(a)) { font-weight: 400; color: var(--zs-muted); font-size: 14.5px; }
.zs-content tbody tr:hover > :is(td, th) { background-color: color-mix(in srgb, var(--zs-fill-sand) 35%, transparent) !important; }
.zs-content tr:last-child > td { border-bottom: 0 !important; }
.zs-content thead :is(td, th), .zs-content th, .zs-content .zs-table-head > :is(td, th) {
  background: var(--zs-fill-sand) !important; color: var(--zs-on-sand) !important; font-weight: 700; text-align: left !important;
}
/* Posuvný rámeček (přidá ho tables.js); bez JavaScriptu se posouvá tabulka sama. */
.zs-table-scroll { max-width: min(100%, 78ch); margin: 0 0 1.5rem; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.zs-content .zs-table-scroll > table { margin: 0 !important; }
.zs-table-scroll:focus-visible { outline: 3px solid var(--zs-link); outline-offset: 2px; }
@media (max-width: 767.98px) {
  .zs-content table:not(.zs-table-stack) { display: block; overflow-x: auto; }
  .zs-table-scroll > table:not(.zs-table-stack) { display: table; }
  .zs-content :is(td, th) { padding: 7px 10px !important; font-size: 15px !important; }
}
/* Mobil: tabulky se záhlavím a 3+ sloupci jako karty – řádek = karta, buňka = „popisek: hodnota“. */
@media (max-width: 575.98px) {
  .zs-content table.zs-table-stack, .zs-table-stack tbody, .zs-table-stack thead, .zs-table-stack tr, .zs-table-stack td, .zs-table-stack th { display: block !important; width: auto !important; }
  .zs-content table.zs-table-stack { border: 0 !important; background: none !important; }
  .zs-content .zs-table-stack .zs-table-head { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0; padding: 0; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); }
  .zs-content .zs-table-stack tr { margin: 0 0 12px; background: var(--zs-surface) !important; border: 2px solid var(--zs-ink) !important; border-radius: 14px; overflow: hidden; }
  .zs-content .zs-table-stack tr > :is(td, th) { background: none !important; color: var(--zs-text) !important; font-weight: 400; border-radius: 0; border-bottom: 1px solid var(--zs-line) !important; }
  .zs-content .zs-table-stack tr > :last-child { border-bottom: 0 !important; }
  .zs-content .zs-table-stack tr > :first-child { background: var(--zs-fill-sand) !important; color: var(--zs-on-sand) !important; }
  .zs-table-stack td[data-label] { display: grid !important; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .zs-table-stack td[data-label]::before { content: attr(data-label); font-size: 12.5px; font-weight: 700; color: var(--zs-muted); }
  .zs-table-stack tr > :first-child[data-label]::before { color: inherit; opacity: .75; }
  .zs-table-stack td:empty, .zs-table-stack td.zs-cell-empty { display: none !important; }
}
.zs-content .table-responsive { overflow-x: auto; }
.zs-content h2, .zs-content h3, .zs-content h4 { margin-top: 1.75rem; }
.zs-content ul li + li { margin-top: .25rem; }
.zs-sidebar .card, .zs-content .card { border: var(--zs-border); border-radius: 18px; box-shadow: 5px 5px 0 var(--zs-ink); margin-bottom: 24px; }
.zs-sidebar .card-header { background: transparent; border-bottom: 2px solid var(--zs-line); font-family: var(--zs-display); font-weight: 700; font-size: 1.25rem; }

.breadcrumb { font-size: 14px; margin: 0; }
.breadcrumb a { color: var(--zs-text); }
.zs-breadcrumbs { padding-top: 20px; }
.zs-breadcrumbs .breadcrumb { padding-left: 0 !important; padding-right: 0 !important; background: none; }

.btn-primary { --bs-btn-bg: var(--zs-fill-blue); --bs-btn-color: var(--zs-on-blue); --bs-btn-border-color: var(--zs-ink); --bs-btn-hover-bg: var(--zs-text); --bs-btn-hover-color: var(--zs-paper); --bs-btn-hover-border-color: var(--zs-ink); border-width: 2px; border-radius: 999px; font-weight: 700; }
.form-control, .form-select { border: 2px solid var(--zs-ink); border-radius: 10px; }
.input-group > .form-control { border-radius: 10px 0 0 10px; }
.input-group > .btn, .input-password-toggle { border: 2px solid var(--zs-ink); border-left: 0; border-radius: 0 10px 10px 0; background: var(--zs-fill-sand); color: var(--zs-on-sand); }

/* Systémové zprávy Joomla */
joomla-alert { display: block; border: var(--zs-border); border-radius: 14px; box-shadow: var(--zs-shadow); margin-bottom: 20px; }

/* ---------- 10) Patička ---------- */
.zs-footer { background: var(--zs-footer-bg); color: var(--zs-footer-text); }
.zs-footer .zs-stripe { height: 10px; }
.zs-footer .zs-stripe span:nth-child(3) { background: var(--zs-fill-light-green); }
.zs-footer .zs-stripe span:nth-child(4) { background: var(--zs-purple); }
.zs-footer-inner { padding: 44px 0 30px; }
.zs-footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .zs-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .zs-footer-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.zs-footer a { color: var(--zs-footer-text); }
.zs-footer-logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 16px; color: var(--zs-footer-text); text-decoration: none; }
.zs-footer-logo span { font-family: var(--zs-display); font-weight: 800; font-size: 23px; line-height: 1.1; }
.zs-footer-address { margin: 0 0 18px; font-size: 15.5px; line-height: 1.7; }
.zs-footer-title { font-size: 20px; font-weight: 800; margin: 0 0 14px; color: var(--zs-gold); }
.zs-footer-contacts { margin: 0; font-size: 15px; }
.zs-footer-contacts > div { display: flex; gap: 12px; padding: 3px 0; }
.zs-footer-contacts dt { flex: 0 0 4.5rem; font-weight: 400; }
.zs-footer-contacts dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: break-word; }
.zs-pills { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 0; padding: 0; }
.zs-pills a, .zs-pills .zs-pill {
  display: inline-block; border: var(--zs-border); border-radius: 999px; padding: 7px 16px;
  font-weight: 700; font-size: 14.5px; line-height: 1.3; box-shadow: 3px 3px 0 var(--zs-ink); text-decoration: none;
  transition: transform .15s var(--zs-ease), box-shadow .15s;
}
.zs-pills a:hover, .zs-pills a:focus-visible { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--zs-ink); text-decoration: underline; }
.zs-pills li:nth-child(6n+1) > * { background: var(--zs-fill-red); color: var(--zs-on-red); }
.zs-pills li:nth-child(6n+2) > * { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); }
.zs-pills li:nth-child(6n+3) > * { background: var(--zs-fill-light-green); color: var(--zs-on-green); }
.zs-pills li:nth-child(6n+4) > * { background: var(--zs-fill-purple); color: var(--zs-on-purple); }
.zs-pills li:nth-child(6n+5) > * { background: var(--zs-paper); color: var(--zs-text); }
.zs-pills li:nth-child(6n+6) > * { background: var(--zs-surface); color: var(--zs-link); }
.zs-pills .current > a { outline: 3px solid var(--zs-gold); outline-offset: 2px; }
.zs-footer .zs-sticker { box-shadow: var(--zs-shadow); }
.zs-footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: 34px; padding-top: 18px; border-top: 2.5px solid var(--zs-footer-line);
  font-size: 14px;
}
.zs-footer-bottom p { margin: 0; }
.zs-footer-dots { display: flex; gap: 8px; }
.zs-footer-dots span { width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--zs-ink); }
.zs-footer-dots span:nth-child(1) { background: var(--zs-red); }
.zs-footer-dots span:nth-child(2) { background: var(--zs-yellow); }
.zs-footer-dots span:nth-child(3) { background: var(--zs-green-light); }
.zs-footer-dots span:nth-child(4) { background: var(--zs-purple); }
.zs-footer-top { margin-left: auto; font-weight: 700; }

/* ---------- 11) Chybová a offline stránka ---------- */
.zs-plain { min-height: 100vh; display: flex; flex-direction: column; }
.zs-plain main { flex: 1 0 auto; display: flex; align-items: center; background: var(--zs-hero); padding: 48px 0; }
.zs-plain-card { max-width: 640px; margin: 0 auto; background: var(--zs-surface); border: var(--zs-border); border-radius: 22px; padding: 32px; box-shadow: var(--zs-shadow-lg); }
.zs-error-code { font-family: var(--zs-display); font-weight: 800; font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--zs-link); margin: 0 0 8px; }

/* ---------- 12) Tisk ---------- */
@media print {
  .zs-topbar, .zs-header, .zs-footer, .zs-dots, .zs-skip { display: none !important; }
  body { background: #fff; }
  .zs-card, .zs-tile, .zs-partner { box-shadow: none; }
}
/* ---------- 13) Barevná schémata (generováno: tools/themes.py, kontrast WCAG 2.1 AA ověřen) ---------- */
:root[data-theme="neon"] {
  color-scheme: dark;
  --zs-paper: #110e1c;
  --zs-surface: #1c1830;
  --zs-text: #f5f2ff;
  --zs-muted: #c4bddf;
  --zs-ink: #f5f2ff;
  --zs-line: #3b3459;
  --zs-header-line: #2c2645;
  --zs-sky: #1c1830;
  --zs-hero: #17132a;
  --zs-hero-line: #2c2645;
  --zs-mint: #141225;
  --zs-mint-line: #2c2645;
  --zs-figure: #231e3d;
  --zs-link: #4fe0ff;
  --zs-link-hover: #ff79c6;
  --zs-hl: #4fe0ff;
  --zs-backdrop: rgba(0, 0, 0, .6);
  --zs-fill-red: #ff4fa3;
  --zs-on-red: #110e1c;
  --zs-fill-blue: #2ad4ff;
  --zs-on-blue: #110e1c;
  --zs-fill-yellow: #ffe14d;
  --zs-on-yellow: #110e1c;
  --zs-fill-green: #3dff9e;
  --zs-on-green: #110e1c;
  --zs-fill-purple: #b98cff;
  --zs-on-purple: #110e1c;
  --zs-fill-sand: #2c2645;
  --zs-on-sand: #f5f2ff;
  --zs-fill-light-green: #3dff9e;
  --zs-text-red: #ff79c6;
  --zs-text-blue: #4fe0ff;
  --zs-text-green: #5dffb0;
  --zs-text-purple: #c9a6ff;
  --zs-text-yellow: #ffe14d;
  --zs-tint-red: #3a1530;
  --zs-tint-blue: #0f2f45;
  --zs-tint-yellow: #353014;
  --zs-tint-green: #0f3828;
  --zs-tint-purple: #2a1d4f;
  --zs-tint-red-hover: #4d1c40;
  --zs-tint-blue-hover: #143d5a;
  --zs-tint-yellow-hover: #45401b;
  --zs-tint-green-hover: #144a35;
  --zs-tint-purple-hover: #372766;
  --zs-footer-bg: #1c1830;
  --zs-footer-text: #f5f2ff;
  --zs-footer-line: rgba(245, 242, 255, .25);
  --zs-gold: #ffe14d;
  --zs-red: #ff4fa3;
  --zs-yellow: #ffe14d;
  --zs-green: #3dff9e;
  --zs-blue: #2ad4ff;
  --zs-purple: #b98cff;
  --zs-green-light: #3dff9e;
}
:root[data-theme="pastel"] {
  --zs-paper: #fff9fc;
  --zs-surface: #ffffff;
  --zs-text: #2b2340;
  --zs-muted: #574d6b;
  --zs-ink: #2b2340;
  --zs-line: #eadcef;
  --zs-header-line: #f3e3ee;
  --zs-sky: #ffe6f2;
  --zs-hero: #eef5ff;
  --zs-hero-line: #dbe8fb;
  --zs-mint: #eefaf4;
  --zs-mint-line: #d3efe1;
  --zs-figure: #e3eefc;
  --zs-link: #1f5fbf;
  --zs-link-hover: #b3195a;
  --zs-hl: #b3195a;
  --zs-backdrop: rgba(43, 35, 64, .45);
  --zs-fill-red: #ffa8cb;
  --zs-on-red: #2b2340;
  --zs-fill-blue: #a8d4ff;
  --zs-on-blue: #2b2340;
  --zs-fill-yellow: #ffe58f;
  --zs-on-yellow: #2b2340;
  --zs-fill-green: #9eeccb;
  --zs-on-green: #2b2340;
  --zs-fill-purple: #cfbaff;
  --zs-on-purple: #2b2340;
  --zs-fill-sand: #ffe2cc;
  --zs-on-sand: #2b2340;
  --zs-fill-light-green: #9eeccb;
  --zs-text-red: #b3195a;
  --zs-text-blue: #1f5fbf;
  --zs-text-green: #11704f;
  --zs-text-purple: #6a3fd0;
  --zs-text-yellow: #8a5a00;
  --zs-tint-red: #ffe8f1;
  --zs-tint-blue: #e5f1ff;
  --zs-tint-yellow: #fff4cc;
  --zs-tint-green: #e1f8ee;
  --zs-tint-purple: #efe8ff;
  --zs-tint-red-hover: #ffd3e4;
  --zs-tint-blue-hover: #d2e7ff;
  --zs-tint-yellow-hover: #ffeaa8;
  --zs-tint-green-hover: #c9f1df;
  --zs-tint-purple-hover: #e0d4ff;
  --zs-footer-bg: #2b2340;
  --zs-footer-text: #fff9fc;
  --zs-footer-line: rgba(255, 249, 252, .3);
  --zs-gold: #ffd1e6;
  --zs-red: #ff8fbd;
  --zs-yellow: #ffd966;
  --zs-green: #7fe0b5;
  --zs-blue: #8cc8ff;
  --zs-purple: #b9a2ff;
  --zs-green-light: #9eeccb;
}

/* Přepínač barevných schémat (zobrazí ho až skript, bez JS zůstává výchozí schéma) */
.zs-schemes {
  display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px;
  background: var(--zs-surface); border: 2.5px solid var(--zs-ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--zs-ink);
}
.zs-schemes[hidden] { display: none; }
.zs-schemes legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.zs-scheme {
  display: inline-flex; align-items: center; gap: 8px; padding: 0; margin: 0;
  background: none; border: 0; border-radius: 999px; color: var(--zs-text); font: inherit; cursor: pointer;
}
.zs-scheme-swatch {
  position: relative; display: block; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--zs-ink); transition: transform .18s var(--zs-ease), box-shadow .18s;
}
.zs-scheme-name { display: none; }
.zs-scheme:hover .zs-scheme-swatch { transform: translateY(-2px) rotate(-12deg); }
.zs-scheme:focus-visible { outline: 3px solid var(--zs-link); outline-offset: 2px; }
/* Vybrané schéma: dvojitý obrys a fajfka */
.zs-scheme[aria-pressed="true"] .zs-scheme-swatch { box-shadow: 0 0 0 2.5px var(--zs-surface), 0 0 0 5px var(--zs-ink); transform: none; }
.zs-scheme[aria-pressed="true"] .zs-scheme-swatch::after {
  content: ""; position: absolute; left: 50%; top: 45%; width: 7px; height: 12px; margin: -7px 0 0 -3.5px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
  filter: drop-shadow(0 0 1px #23201d) drop-shadow(0 0 1px #23201d);
}
.zs-scheme--classic .zs-scheme-swatch { background: conic-gradient(from 45deg, #e1533d 0 25%, #f2a63b 0 50%, #2aa273 0 75%, #2f6ec4 0); }
.zs-scheme--neon .zs-scheme-swatch { background: conic-gradient(from 45deg, #ff4fa3 0 25%, #ffe14d 0 50%, #3dff9e 0 75%, #2ad4ff 0); }
.zs-scheme--pastel .zs-scheme-swatch { background: conic-gradient(from 45deg, #ffa8cb 0 25%, #ffe58f 0 50%, #9eeccb 0 75%, #a8d4ff 0); }
/* Mobilní menu: vzorky s názvem, přes celou šířku */
.zs-panel-extra .zs-schemes { display: flex; justify-content: space-between; margin-top: 8px; padding: 8px 10px; border-radius: 14px; box-shadow: var(--zs-shadow); }
.zs-panel-extra .zs-schemes[hidden] { display: none; }
.zs-panel-extra .zs-scheme { padding: 2px 6px 2px 2px; }
.zs-panel-extra .zs-scheme-name { display: inline; font-weight: 700; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .zs-scheme-swatch { transition: none; } .zs-scheme:hover .zs-scheme-swatch { transform: none; } }
@media (max-width: 991.98px) { .zs-header-actions .zs-schemes { display: none; } }

/* Menu sekce v pravém sloupci podstránek */
.zs-sidemenu { background: var(--zs-surface); border: var(--zs-border); border-radius: 18px; box-shadow: 5px 5px 0 var(--zs-ink); padding: 18px 18px 12px; margin-bottom: 24px; }
.zs-sidemenu-title { font-family: var(--zs-display); font-weight: 800; font-size: 1.375rem; line-height: 1.15; margin: 0 0 10px; }
.zs-sidemenu ul { list-style: none; margin: 0; padding: 0; }
.zs-sidemenu li + li { border-top: 1px solid var(--zs-line); }
.zs-sidemenu a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; color: var(--zs-text); font-weight: 700; text-decoration: none; }
.zs-sidemenu a::before { content: ""; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--zs-red); }
.zs-sidemenu li:nth-child(5n+2) a::before { background: var(--zs-blue); border-radius: 2.5px; }
.zs-sidemenu li:nth-child(5n+3) a::before { background: var(--zs-yellow); }
.zs-sidemenu li:nth-child(5n+4) a::before { background: var(--zs-green); border-radius: 2.5px; }
.zs-sidemenu li:nth-child(5n+5) a::before { background: var(--zs-purple); }
.zs-sidemenu a:hover, .zs-sidemenu a.is-current { color: var(--zs-link); text-decoration: underline; }

/* Rozcestník v mobilním menu */
.zs-panel .zs-footer-col { margin-top: 12px; }
.zs-panel .zs-footer-title { color: var(--zs-muted); font-family: var(--zs-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }

/* Podmenu na mobilu: šipka vpravo na dlaždici rozbalí/sbalí podmenu; aktuální sekce je rozbalená. */
.zs-sub-check, .zs-sub-toggle { display: none; }
@media (max-width: 991.98px) {
  .zs-nav > li.deeper > a, .zs-nav > li.deeper > .zs-nav-heading { padding-right: 64px; }
  .zs-sub-toggle {
    position: absolute; right: 8px; top: 6px; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0; cursor: pointer;
    background: var(--zs-surface); color: var(--zs-text); border: var(--zs-border); border-radius: 12px;
  }
  .zs-sub-toggle span {
    width: 11px; height: 11px; margin-top: -5px;
    border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
    transform: rotate(45deg); transition: transform .2s, margin .2s;
  }
  .zs-sub-check:checked + .zs-sub-toggle span { transform: rotate(-135deg); margin-top: 6px; }
  .zs-sub-check:focus-visible + .zs-sub-toggle { outline: 3px solid var(--zs-link); outline-offset: 2px; }
  .zs-sub-check { display: block; }
  .zs-nav > li > .zs-submenu { display: none; }
  .zs-sub-check:checked ~ .zs-submenu { display: grid; }
}

/* ---------- 14) Důležité oznámení (pruh nad hlavičkou) ---------- */
.zs-notice { border-bottom: var(--zs-border); }
.zs-notice--yellow { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); }
.zs-notice--red    { background: var(--zs-fill-red); color: var(--zs-on-red); }
.zs-notice--blue   { background: var(--zs-fill-blue); color: var(--zs-on-blue); }
.zs-notice--green  { background: var(--zs-fill-green); color: var(--zs-on-green); }
.zs-notice--purple { background: var(--zs-fill-purple); color: var(--zs-on-purple); }
.zs-notice-inner { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.zs-notice-icon { flex: 0 0 auto; }
.zs-notice-text { flex: 1 1 auto; margin: 0; font-size: 15.5px; line-height: 1.45; }
.zs-notice-text a { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.zs-notice-close {
  flex: 0 0 auto; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 2px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1; font-weight: 700;
}
.zs-notice-close:hover { background: rgba(0, 0, 0, .1); }
.zs-notice-close[hidden] { display: none; }

/* ---------- 15) Úvod – kalendář akcí a jídelníček ---------- */
.zs-info { padding-top: 8px; }
.zs-info-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 992px) { .zs-info-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
.zs-block-more { margin: 16px 0 0; font-weight: 700; }

.zs-akce-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.zs-akce-list li {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px;
  background: var(--zs-surface); border: var(--zs-border); border-radius: 16px; box-shadow: 4px 4px 0 var(--zs-ink);
}
.zs-akce-date {
  flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 64px; border: var(--zs-border); border-radius: 14px; line-height: 1;
  background: var(--zs-fill-red); color: var(--zs-on-red);
}
.zs-akce-list li:nth-child(4n+2) .zs-akce-date { background: var(--zs-fill-blue); color: var(--zs-on-blue); }
.zs-akce-list li:nth-child(4n+3) .zs-akce-date { background: var(--zs-fill-yellow); color: var(--zs-on-yellow); }
.zs-akce-list li:nth-child(4n+4) .zs-akce-date { background: var(--zs-fill-green); color: var(--zs-on-green); }
.zs-akce-day { font-family: var(--zs-display); font-weight: 800; font-size: 24px; }
.zs-akce-month { font-family: var(--zs-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.zs-akce-body { min-width: 0; }
.zs-akce-title { color: var(--zs-text); font-weight: 700; font-size: 16.5px; text-decoration: none; }
.zs-akce-title:hover { color: var(--zs-link); text-decoration: underline; }
.zs-akce-meta { margin: 2px 0 0; font-size: 14px; color: var(--zs-muted); }
.zs-akce-empty { color: var(--zs-muted); }

.zs-jidlo-card {
  background: var(--zs-tint-yellow); color: var(--zs-text); border: var(--zs-border); border-radius: 20px;
  padding: 20px 22px; box-shadow: 5px 5px 0 var(--zs-ink);
}
.zs-jidlo-day { margin: 0 0 8px; font-family: var(--zs-mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--zs-muted); }
.zs-jidlo-soup { margin: 0 0 6px; }
.zs-jidlo-soup span { font-weight: 700; }
.zs-jidlo-main { margin: 0 0 6px; font-family: var(--zs-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.zs-jidlo-note { margin: 0; font-size: 14px; color: var(--zs-muted); }
.zs-jidlo-empty { margin: 0; color: var(--zs-muted); }
.zs-jidlo-week { margin-top: 14px; }
.zs-jidlo-week summary { cursor: pointer; font-weight: 700; color: var(--zs-link); }
.zs-jidlo-week dl { margin: 10px 0 0; }
.zs-jidlo-week dl > div { padding: 10px 0; border-bottom: 1px solid var(--zs-line); }
.zs-jidlo-week dl > div.is-today dt::after { content: " •"; color: var(--zs-red); }
.zs-jidlo-week dt { font-weight: 700; }
.zs-jidlo-week dd { margin: 4px 0 0; }
.zs-jidlo-week dd p { margin: 0; font-size: 15px; }
.zs-jidlo-week .zs-jidlo-main { font-family: var(--zs-font); font-size: 15px; }
/* Jídelníček ze Strava.cz: druh jídla, název, kódy alergenů */
.zs-jidlo-item { margin: 0 0 8px; line-height: 1.4; }
.zs-jidlo-item:last-child { margin-bottom: 0; }
.zs-jidlo-type { display: block; font-family: var(--zs-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--zs-muted); }
.zs-jidlo-name { font-weight: 600; }
.zs-jidlo-alerg { font-size: 13px; color: var(--zs-muted); white-space: nowrap; }
.zs-jidlo-week .zs-jidlo-item { margin-bottom: 4px; font-size: 15px; }
.zs-jidlo-week .zs-jidlo-type { display: inline; margin-right: 4px; }

@media (max-width: 575.98px) {
  .zs-notice-text { font-size: 14.5px; }
  .zs-notice-icon { display: none; }
}

/* ---------- 16) Povinné informace ve spodní liště patičky ---------- */
.zs-inline-menu ul { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.zs-inline-menu a { color: var(--zs-footer-text); text-decoration: underline; text-underline-offset: .2em; }
.zs-inline-menu a:hover { text-decoration-thickness: 2px; }
.zs-footer-bottom .zs-inline-menu { flex-basis: 100%; order: 3; }

/* ---------- 17) Rubriky (seznam kategorií) – barevné dlaždice ---------- */
.zs-rubriky-title { margin: 0 0 24px; }
.zs-rubriky-intro { margin-bottom: 24px; max-width: 70ch; }
.zs-rubriky-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.zs-rubrika {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 190px;
  border: var(--zs-border); border-radius: var(--zs-radius); padding: 20px; color: var(--zs-text);
  box-shadow: 5px 5px 0 var(--zs-ink); transition: transform .18s var(--zs-ease), box-shadow .18s;
}
.zs-rubrika:nth-child(odd) { transform: rotate(-.6deg); }
.zs-rubrika:nth-child(even) { transform: rotate(.6deg); }
.zs-rubrika:hover, .zs-rubrika:focus-within { transform: translate(-2px, -3px) rotate(0); box-shadow: 8px 9px 0 var(--zs-ink); }
.zs-rubrika .zs-tile-shape { margin-bottom: 8px; }
.zs-rubrika-title { margin: 0; font-size: 1.5rem; }
.zs-rubrika-title a { color: var(--zs-text); text-decoration: none; }
/* Celá dlaždice je odkazem na rubriku; odkaz na nejnovější článek leží nad ní. */
.zs-rubrika-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--zs-radius); }
.zs-rubrika-title a:focus-visible { outline: none; }
.zs-rubrika:has(.zs-rubrika-title a:focus-visible) { outline: 3px solid var(--zs-link); outline-offset: 3px; }
.zs-rubrika-count { margin: 0; font-family: var(--zs-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--zs-muted); }
.zs-rubrika-latest { margin: auto 0 0; padding-top: 12px; border-top: 2px dashed var(--zs-line); font-size: 14.5px; line-height: 1.4; }
.zs-rubrika-latest span { display: block; font-size: 12px; color: var(--zs-muted); }
.zs-rubrika-latest a { position: relative; z-index: 1; color: var(--zs-link); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .zs-rubrika:nth-child(n) { transform: none; } }
.zs-info-grid > .zs-block + .zs-block { margin-top: 0; }

/* ---------- 18) Úvod – Aktuálně (krátké zprávy, mod_zschotoviny_aktualne) ---------- */
.zs-aktualne-section { padding-bottom: 40px; }
.zs-zpravy { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .zs-zpravy { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .zs-zpravy { grid-template-columns: repeat(3, 1fr); } }
.zs-zprava {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--zs-surface); border: var(--zs-border); border-left-width: 10px; border-radius: var(--zs-radius);
  padding: 18px 20px; box-shadow: 5px 5px 0 var(--zs-ink);
  border-left-color: var(--zs-red); --zs-accent: var(--zs-text-red);
}
.zs-zprava--blue   { border-left-color: var(--zs-blue);   --zs-accent: var(--zs-text-blue); }
.zs-zprava--yellow { border-left-color: var(--zs-yellow); --zs-accent: var(--zs-text-yellow); }
.zs-zprava--green  { border-left-color: var(--zs-green);  --zs-accent: var(--zs-text-green); }
.zs-zprava--purple { border-left-color: var(--zs-purple); --zs-accent: var(--zs-text-purple); }
.zs-zprava-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; font-family: var(--zs-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--zs-muted); }
.zs-zprava-label { color: var(--zs-accent); font-weight: 500; }
.zs-zprava-title { margin: 0 0 6px; font-size: 1.25rem; line-height: 1.2; }
.zs-zprava-text { margin: 0; font-size: 15.5px; line-height: 1.55; }
.zs-zprava-more { margin: auto 0 0; padding-top: 10px; font-weight: 700; }
.zs-zprava-more a { color: var(--zs-link); }

/* ---------- 19) Úvod – kvalita ovzduší (mod_zschotoviny_ovzdusi) ---------- */
.zs-ovzdusi-card { background: var(--zs-surface); border: var(--zs-border); border-radius: var(--zs-radius); padding: 18px 20px; box-shadow: 5px 5px 0 var(--zs-ink); }
.zs-ovzdusi-intro { margin: 0 0 14px; }
/* Barvy stupnice CAQI (evropský index); text tmavý kvůli kontrastu na všech stupních. */
.zs-ovzdusi-index { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 14px; border: var(--zs-border); border-radius: 14px; color: #23201d; }
.zs-caqi-1 { background: #9fd68f; } .zs-caqi-2 { background: #d2df7a; } .zs-caqi-3 { background: #f4d35e; } .zs-caqi-4 { background: #f5a65b; } .zs-caqi-5 { background: #f08aa6; }
.zs-ovzdusi-index-value { font-family: var(--zs-display); font-weight: 800; font-size: 40px; line-height: 1; min-width: 2ch; text-align: center; }
.zs-ovzdusi-index-text { display: flex; flex-direction: column; line-height: 1.3; }
.zs-ovzdusi-index-label { font-size: 13px; }
.zs-ovzdusi-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.zs-ovzdusi-values dt { font-size: 13px; font-weight: 400; color: var(--zs-muted); }
.zs-ovzdusi-values dd { margin: 0; font-family: var(--zs-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.zs-ovzdusi-values dd span { font-family: var(--zs-font); font-size: 13px; font-weight: 600; color: var(--zs-muted); }
.zs-ovzdusi-time { margin: 12px 0 0; font-size: 13.5px; color: var(--zs-muted); }
.zs-ovzdusi-time.is-stale { color: var(--zs-text-red); font-weight: 700; }
.zs-ovzdusi-empty { margin: 0; color: var(--zs-muted); }
.zs-ovzdusi-diag { margin: 14px 0 0; padding: 10px 12px; border: 2px dashed var(--zs-text-red); border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.zs-ovzdusi-diag p { margin: 0 0 4px; }
.zs-ovzdusi-diag p:last-child { margin-bottom: 0; }
.zs-ovzdusi-diag code { color: inherit; word-break: break-all; }

/* ---------- 20) Náhodný obrázek (override mod_random_image) – polaroid ---------- */
.zs-polaroid {
  position: relative; margin: 8px 6px 28px; padding: 12px 12px 14px;
  background: #fff; color: #23201d; border: 2px solid var(--zs-ink); border-radius: 6px;
  box-shadow: 6px 6px 0 var(--zs-ink); transform: rotate(-1.5deg);
  transition: transform .25s var(--zs-ease), box-shadow .25s;
}
.zs-sidebar .zs-block:nth-child(even) .zs-polaroid { transform: rotate(1.5deg); }
/* Proužek „lepicí pásky“ */
.zs-polaroid::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 86px; height: 24px; margin-left: -43px;
  background: color-mix(in srgb, var(--zs-yellow) 70%, transparent); border: 1px solid rgba(0, 0, 0, .12); transform: rotate(-3deg);
}
.zs-polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; background: var(--zs-figure); }
.zs-polaroid figcaption { margin: 10px 2px 0; font-family: var(--zs-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; text-align: center; }
.zs-polaroid-link { display: block; }
.zs-polaroid-link:focus-visible { outline-offset: 4px; }
.zs-polaroid:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 8px 9px 0 var(--zs-ink); }
@media (prefers-reduced-motion: reduce) { .zs-polaroid, .zs-polaroid:hover { transition: none; transform: none; } }
@media (max-width: 991.98px) { .zs-polaroid { max-width: 420px; margin-left: auto; margin-right: auto; } }

/* ---------- 21) Odkazovník (mod_zschotoviny_odkazy) ---------- */
.zs-odkazy { display: grid; gap: 28px; margin: 8px 0 24px; }
.zs-odkazy-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px !important; font-size: 1.375rem; }
.zs-odkazy-title::before { content: ""; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--zs-ink); background: var(--zs-accent-dot, var(--zs-red)); }
.zs-odkazy-group--blue   { --zs-accent-dot: var(--zs-blue); }
.zs-odkazy-group--yellow { --zs-accent-dot: var(--zs-yellow); }
.zs-odkazy-group--green  { --zs-accent-dot: var(--zs-green); }
.zs-odkazy-group--purple { --zs-accent-dot: var(--zs-purple); }
/* Vnořená témata: skupina (např. „Odkazy podle předmětů“) a pod ní předměty */
.zs-odkazy-depth-1:has(+ .zs-odkazy-depth-2) .zs-odkazy-title { margin-bottom: 0 !important; font-size: 1.5rem; }
.zs-odkazy-depth-2, .zs-odkazy-depth-3 { padding-left: 18px; border-left: 3px solid var(--zs-line); }
.zs-odkazy-depth-2 .zs-odkazy-title, .zs-odkazy-depth-3 .zs-odkazy-title { font-size: 1.2rem; }
.zs-odkazy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .zs-odkazy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.zs-content .zs-odkazy-list li + li { margin-top: 0; }
.zs-odkaz {
  position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 12px 44px 12px 16px; background: var(--zs-surface); color: var(--zs-text); text-decoration: none;
  border: 2px solid var(--zs-ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--zs-ink);
  transition: transform .15s var(--zs-ease), box-shadow .15s, background-color .15s;
}
.zs-odkaz:hover, .zs-odkaz:focus-visible { color: var(--zs-text); transform: translate(-1px, -2px); box-shadow: 6px 6px 0 var(--zs-ink); background: var(--zs-fill-sand); }
.zs-odkaz-title { font-weight: 700; line-height: 1.35; }
.zs-odkaz-text { font-size: 14px; line-height: 1.45; color: var(--zs-muted); }
.zs-odkaz-host { font-family: var(--zs-mono); font-size: 12px; color: var(--zs-muted); }
.zs-odkaz-icon { position: absolute; right: 14px; top: 50%; margin-top: -.6em; font-weight: 700; font-size: 1.1rem; line-height: 1.2; color: var(--zs-link); }
@media (prefers-reduced-motion: reduce) { .zs-odkaz, .zs-odkaz:hover { transition: none; transform: none; } }

/* ---------- 22) Fotogalerie (plg_content_zschotoviny_galerie) ---------- */
.zs-galerie { margin: 0 0 1.75rem; }
.zs-galerie-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.zs-galerie-grid[hidden] { display: none; }
.zs-content .zs-galerie-grid li + li { margin-top: 0; }
.zs-galerie-item { display: block; overflow: hidden; border: 2px solid var(--zs-ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--zs-ink); background: var(--zs-figure); }
.zs-galerie-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s var(--zs-ease); }
.zs-galerie-item:hover img, .zs-galerie-item:focus-visible img { transform: scale(1.05); }
.zs-galerie-open {
  display: inline-flex; align-items: center; gap: 14px; max-width: 100%; padding: 8px 18px 8px 8px;
  background: var(--zs-surface); color: var(--zs-text); text-decoration: none;
  border: 2px solid var(--zs-ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--zs-ink);
  transition: transform .15s var(--zs-ease), box-shadow .15s;
}
.zs-galerie-open:hover, .zs-galerie-open:focus-visible { color: var(--zs-text); transform: translate(-1px, -2px); box-shadow: 6px 6px 0 var(--zs-ink); }
.zs-galerie-open img { flex: 0 0 auto; width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid var(--zs-ink); }
.zs-galerie-open-text { display: flex; flex-direction: column; line-height: 1.3; }
.zs-galerie-open-text strong { font-family: var(--zs-display); font-size: 1.15rem; }
.zs-galerie-open-text span { font-size: 14px; color: var(--zs-muted); }
.zs-galerie-empty { padding: 8px 12px; border: 2px dashed var(--zs-text-red); border-radius: 10px; font-size: 14px; }

.zs-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 10, 20, .94); color: #fff; }
.zs-lightbox::backdrop { background: rgba(12, 10, 20, .94); }
.zs-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.zs-lightbox-figure { margin: 0; max-width: calc(100vw - 32px); text-align: center; }
.zs-lightbox-figure img { display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); width: auto; height: auto; margin: 0 auto; border-radius: 8px; }
.zs-lightbox-figure figcaption { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.zs-lightbox-counter { opacity: .7; font-family: var(--zs-mono); font-size: 13px; margin-left: 8px; }
.zs-lightbox-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0;
  border: 2px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font: 700 30px/1 var(--zs-display); cursor: pointer;
}
.zs-lightbox-btn:hover, .zs-lightbox-btn:focus-visible { background: #fff; color: #23201d; }
.zs-lightbox-close { top: 14px; right: 14px; }
.zs-lightbox-prev { left: 14px; top: 50%; margin-top: -26px; }
.zs-lightbox-next { right: 14px; top: 50%; margin-top: -26px; }
.zs-lightbox.is-single :is(.zs-lightbox-prev, .zs-lightbox-next) { display: none; }
@media (max-width: 575.98px) { .zs-lightbox-prev, .zs-lightbox-next { top: auto; bottom: 14px; margin-top: 0; } }
body.zs-lightbox-open { overflow: hidden; }

/* Fotogalerie – prezentace ve stránce ({galerie prezentace}…) */
.zs-galerie--prezentace { max-width: 900px; }
.zs-prezentace-stage { position: relative; margin: 0 0 12px; background: var(--zs-figure); border: var(--zs-border); border-radius: var(--zs-radius); box-shadow: var(--zs-shadow-lg); overflow: hidden; }
.zs-prezentace-open { display: block; cursor: zoom-in; }
.zs-prezentace-stage img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #23201d; }
.zs-prezentace-stage .zs-lightbox-btn { top: 50%; margin-top: -26px; border-color: #fff; }
.zs-prezentace-prev { left: 12px; }
.zs-prezentace-next { right: 12px; }
.zs-prezentace-stage figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; background: var(--zs-surface); border-top: 2px solid var(--zs-ink); font-size: 15px; min-height: 2.4em; }
.zs-prezentace-counter { font-family: var(--zs-mono); font-size: 13px; color: var(--zs-muted); white-space: nowrap; }
.zs-prezentace-thumbs { list-style: none; margin: 0; padding: 4px 4px 8px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; }
.zs-content .zs-prezentace-thumbs li + li { margin-top: 0; }
.zs-prezentace-thumbs li { flex: 0 0 96px; scroll-snap-align: start; }
.zs-prezentace-thumbs .zs-galerie-item { box-shadow: none; opacity: .75; transition: opacity .15s, transform .15s; }
.zs-prezentace-thumbs .zs-galerie-item:hover { opacity: 1; }
.zs-prezentace-thumbs .zs-galerie-item[aria-current] { opacity: 1; outline: 3px solid var(--zs-link); outline-offset: 2px; }
@media (max-width: 575.98px) { .zs-prezentace-stage .zs-lightbox-btn { width: 42px; height: 42px; margin-top: -21px; font-size: 24px; } .zs-prezentace-thumbs li { flex-basis: 72px; } }
