/* Vzhled specifický pro ddhtyn.cz — připojeno přes brand.stylesheet.
   Podle předlohy (Sydney child, 2019): světle šedá hlavička se znakem
   a dvouřádkovým názvem, menu v červené, písmo Roboto Slab, nadpisy
   s červenou linkou, úvod s fotkou budovy, šedý pás „Něco o nás“, tmavá
   patička s červeným pruhem podpisu. Barvy jdou přes proměnné motivu
   (site.yaml `temata`): světlý = předloha, ostatní vzhledy dovymyšlené.
   I barvy, které téma nezná (--hlavicka, --paticka, --modra …), drží
   `temata` — každý vzhled je má celé na jednom místě.
   ⚠️ Načítá se PŘED styly tématu — pravidla potřebují vyšší specifičnost. */

/* ── písmo Roboto Slab (self-hosted, licence OFL; předloha ho brala z Google Fonts) ── */
@font-face { font-family: 'Roboto Slab'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('fonts/robotoslab-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto Slab'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('fonts/robotoslab-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
html[lang] { --font: 'Roboto Slab', Georgia, 'Times New Roman', serif; }

html body { font-size: 1rem; line-height: 1.75; }

/* ── hlavička: znak + dvouřádkový název, menu v červené ── */
html body .site-header { background: var(--hlavicka); border-bottom: 0; }
html body .site-header > .wrap-wide { min-height: 104px; gap: 1.5rem 2rem; }
html body .site-header .brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
}
html body .site-header .brand img { grid-row: 1 / 3; grid-column: 1; }
/* Název je v předloze text vedle obrázku. Tady taky: pseudoprvky nesou
   jen vzhled, čtečka dostane celý název z alt textu znaku. */
html body .site-header .brand::before,
html body .site-header .brand::after { grid-column: 2; line-height: 1.05; font-weight: 500; letter-spacing: 0; }
html body .site-header .brand::before { content: 'Dětský domov,'; grid-row: 1; align-self: end; font-size: 1.5rem; color: var(--modra); }
html body .site-header .brand::after { content: 'Horšovský Týn'; grid-row: 2; align-self: start; font-size: 1.95rem; color: var(--cervena-znacky); }

html body .site-header .site-nav { gap: 1.25rem; align-items: center; font-size: 0.97rem; }
html body .site-header .brand { flex-shrink: 0; white-space: nowrap; }
/* Logo a menu na jednom řádku jako předloha; užší okno menu zalomí pod logo. */
@media (min-width: 1200px) {
  html body .site-header > .wrap-wide { flex-wrap: nowrap; gap: 1.5rem; }
  html body .site-header .site-nav { flex-wrap: nowrap; white-space: nowrap; }
}
html body .site-header .site-nav > a,
html body .site-header .site-nav > .nav-item > summary { color: var(--accent); font-weight: 600; }
html body .site-header .site-nav > a:hover,
html body .site-header .site-nav > .nav-item > summary:hover { color: var(--fg); }

@media (max-width: 1100px) {
  html body .site-header .brand::before { font-size: 1.15rem; }
  html body .site-header .brand::after { font-size: 1.6rem; }
  html body .site-header .brand img { height: 56px; }
}
@media (max-width: 720px) {
  html body .site-header > .wrap-wide { min-height: 76px; }
  html body .site-header .brand::before { font-size: 1rem; }
  html body .site-header .brand::after { font-size: 1.35rem; }
  html body .site-header .brand img { height: 48px; }
}

/* ── nadpisy: běžné písmo místo verzálek, červená linka jako předloha ── */
html body h1, html body h2, html body h3 { letter-spacing: 0; font-weight: 600; }
html body article > h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); }
html body article > h1::after {
  content: '';
  display: block;
  width: 5rem;
  height: 3px;
  margin-top: 0.7rem;
  background: var(--cervena-znacky);
}
html body article h2 { color: var(--modra); }
html body article h3 a { color: var(--modra); }
html body .meta { color: var(--muted); font-size: 0.9rem; }
/* Logo ESF u projektů je značka, ne fotka — v plné šířce by přerostlo text. */
html body article img[src*='esf-logo'] { max-width: 16rem; border-radius: 0; }

/* ── úvod: fotka budovy bez textu přes ni (jako předloha) ── */
html body .hero-foto { --hero-vyska: clamp(13rem, 34vw, 29rem); margin-bottom: 0; }
html body .hero-foto::after { display: none; }
html body .hero-foto-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
}

/* Pásy úvodu přes celou šířku. Článek úvodu je vycentrovaný, takže
   50 % je střed stránky. */
html body .uvod-pas {
  width: 100vw;
  width: 100cqw;
  margin-left: calc(50% - 50vw);
  margin-left: calc(50% - 50cqw);
  padding: 3.5rem max(1.25rem, calc(50vw - 31rem)) 3.8rem;
  padding: 3.5rem max(1.25rem, calc(50cqw - 31rem)) 3.8rem;
}
html body .uvod-novinky { padding-inline: max(1.25rem, calc(50vw - 36rem)); padding-inline: max(1.25rem, calc(50cqw - 36rem)); }
html body .uvod-pas > h2 {
  margin: 0 0 2.2rem;
  text-align: center;
  color: var(--fg);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
}
html body .uvod-pas > h2::after {
  content: '';
  display: block;
  width: 7.5rem;
  height: 3px;
  margin: 1.2rem auto 0;
  background: var(--cervena-znacky);
}
html body .uvod-o-nas { background: var(--pas); }
html body .uvod-o-nas > p { text-align: justify; hyphens: auto; }
html body .dalsi { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem 1.6rem; margin: 1.6rem 0 0; }
html body .dalsi a {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
html body .dalsi a:hover { background: var(--accent); color: var(--on-accent); }
html body .uvod-galerie { padding-bottom: 1.5rem; }
/* Galerie po třech: výběr šesti fotek na úvodu 3 + 3 (karusel předlohy
   ukazoval tři vedle sebe), fotogalerie 21 fotek = 7 řad bez díry. */
html body.galerie-mrizka article p:has(> picture + picture) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) {
  html body.galerie-mrizka article p:has(> picture + picture) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Novinky: příspěvky z Facebooku vlevo, oznámení z webu vpravo. */
html body .novinky-sloupce {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin: 0 0 1rem;
}
@media (max-width: 860px) { html body .novinky-sloupce { grid-template-columns: 1fr; } }
html body .novinky-z-webu h2, html body .novinky-z-webu h3,
html body .novinky-fb h2, html body .novinky-fb h3 { margin: 0 0 0.8rem; font-size: 1.2rem; color: var(--modra); }
html body .novinky-z-webu h2 + ul, html body .novinky-z-webu h3 + ul { margin-bottom: 2rem; }
html body .novinky-z-webu .dalsi, html body .novinky-fb .dalsi { justify-content: flex-start; }
html body .kratke-zpravy { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
html body .kratke-zpravy li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
html body .kratke-zpravy a { display: block; font-weight: 600; }
html body .kratke-zpravy span, html body .kratke-zpravy time { color: var(--muted); font-size: 0.92rem; }
/* Vlastní blok místo facebookového okna (CEO 22. 10. 2026). Příspěvky
   doplní /novinky-fb.js z dat na našem serveru; bez nich zůstane odkaz.
   Fotka se neořezává — na výšku je užší, ne useknutá. */
html body .novinky-fb .dalsi { margin-top: 0.4rem; }
html body .novinky-fb-seznam { list-style: none; margin: 0 0 1.2rem; padding: 0; }
html body .novinky-fb-prispevek { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--border); }
html body .novinky-fb-prispevek:first-child { padding-top: 0.2rem; }
html body .novinky-fb-fotka img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 22rem;
  margin: 0 0 0.7rem;
  border-radius: 4px;
}
html body .novinky-fb-datum { display: block; color: var(--muted); font-size: 0.92rem; }
html body .novinky-fb-text { margin: 0.3rem 0 0.5rem; white-space: pre-line; overflow-wrap: break-word; }
html body .novinky-fb-zobrazit { font-weight: 600; }

/* ── výpisy (Novinky, Úřední deska, Projekty ESF) ── */
html body .vypis { list-style: none; margin: 1rem 0 0; padding: 0; }
html body .vypis > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 1.5rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
}
html body .vypis > li > p:has(img) { grid-column: 2; grid-row: 1; margin: 0; }
html body .vypis > li > div { grid-column: 1; grid-row: 1; }
html body .vypis > li:not(:has(img)) { grid-template-columns: 1fr; }
html body .vypis img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
html body .vypis h3 { margin: 0 0 0.3rem; font-size: 1.3rem; }
html body .vypis .meta { margin: 0 0 0.6rem; }
html body .vypis p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  html body .vypis > li { grid-template-columns: 1fr; }
  html body .vypis > li > p:has(img) { grid-column: 1; grid-row: 2; }
}

/* ── rozcestník O nás, dokumenty a odkazy jako dlaždice ── */
html body .rozcestnik, html body .dokumenty {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}
html body .rozcestnik a, html body .dokumenty a {
  display: grid;
  gap: 0.25rem;
  height: 100%;
  box-sizing: border-box;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--cervena-znacky);
  border-radius: 4px;
  background: var(--karta);
  box-shadow: var(--stin);
  color: var(--fg);
  text-decoration: none;
}
html body .rozcestnik a:hover, html body .dokumenty a:hover { box-shadow: var(--stin-vyssi); }
html body .rozcestnik strong, html body .dokumenty strong { color: var(--accent); }
html body .rozcestnik span, html body .dokumenty span { color: var(--muted); font-size: 0.92rem; }

/* ── kontakty ── */
html body .kontakty-karty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.2rem;
  margin: 0 0 1rem;
}
html body .kontakt-karta {
  padding: 1.2rem 1.4rem;
  border-top: 4px solid var(--cervena-znacky);
  border-radius: 4px;
  background: var(--karta);
  box-shadow: var(--stin);
}
html body .kontakt-karta h2 { margin: 0 0 0.8rem; font-size: 1.15rem; }
html body .kontakt-karta p { margin: 0 0 0.7rem; }
html body .kontakt-karta ul { margin: 0; padding-left: 1.1rem; }
html body .tabulka-skupin { max-width: 32rem; }
html body .tabulka-skupin th { width: 55%; }
html body .udaje { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0; }
html body .udaje dt { font-weight: 600; }
html body .udaje dd { margin: 0; }
@media (max-width: 560px) {
  html body .udaje { grid-template-columns: 1fr; gap: 0.1rem; }
  html body .udaje dd { margin-bottom: 0.6rem; }
}
/* Pole formuláře i hledání: okraj aspoň 3 : 1 proti poli i stránce (WCAG
   1.4.11, zákon 99/2019). Tématové --border je na hranici pole slabé
   (#e1e1e1 = 1,31 : 1). Barva je `pole-okraj` ve vzhledu. Fokus má dál červenou. */
html body .formular input, html body .formular select, html body .formular textarea,
html body .nav-hledani input, html body .hledani-form input { border-color: var(--pole-okraj); }

/* ── dárci po letech ── */
html body .darci {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
html body .darci section { padding: 1rem 1.3rem; border-radius: 4px; background: var(--karta); box-shadow: var(--stin); }
html body .darci h2 { margin: 0 0 0.6rem; font-size: 1.4rem; }
html body .darci ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
html body .darci li { line-height: 1.35; color: var(--muted); font-size: 0.95rem; }
html body .darci li strong { color: var(--fg); font-size: 1rem; }

/* ── povinné informace: obsah stránky ve dvou sloupcích ── */
html body .obsah-stranky { padding: 1rem 1.4rem; background: var(--surface); border-radius: 4px; }
html body .obsah-stranky ol { margin: 0; columns: 2 14rem; column-gap: 2rem; }
html body .obsah-stranky li { break-inside: avoid; }

/* ── patička jako předloha: tmavá, tři sloupce, červený pruh s podpisem ── */
html body .site-footer {
  margin-top: 5rem;
  padding: 3rem 0 0;
  border-top: 0;
  background: var(--paticka);
  color: var(--paticka-text);
  font-size: 0.95rem;
}
html body .site-footer .footer-brand { display: none; }
html body .site-footer .footer-col strong { color: #fff; font-size: 1.05rem; }
html body .site-footer a { color: #fff; text-decoration: underline; }
html body .site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
html body .site-footer .footer-bottom {
  max-width: none;
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-top: 0;
  background: #c8202b;
  color: #fff;
  text-align: center;
}
html body .site-footer .footer-bottom a,
html body .site-footer .souhlas-nastaveni { color: #fff; }
