/* SDH Černíkovice – statické zrcadlo (HTML + CSS + JS) */
:root {
  --c1: #E21E51;  /* akcent – červená */
  --c2: #4d40ff;  /* akcent – modrá */
  --c3: #040037;  /* nejtmavší */
  --c4: #032075;  /* nadpisy / text */
  --c5: #514d7c;  /* běžný text */
  --c6: #666699;
  --c7: #deddeb;
  --c8: #efeff5;  /* pozadí stránky */
  --c9: #f8f9fa;  /* karty */
  --font-body: "Karla", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Rubik", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1290px;
  --radius: 7px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c8);
  color: var(--c5);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c1); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--c2); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--c3);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(34px, 5vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 26px; }
h4 { font-size: 22px; }
h5 { font-size: 20px; }
h6 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--c1); }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--c7); margin: 2.2em 0; }
blockquote {
  margin: 1.5em 0; padding: .4em 0 .4em 1.2em;
  border-left: 4px solid var(--c1); color: var(--c4); font-size: 1.1em;
}
blockquote p:last-child { margin: 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c7); vertical-align: top; }
th { background: var(--c4); color: #fff; font-family: var(--font-head); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tc { text-align: center; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 999; background: #fff; padding: 8px 14px; }

/* ---------- Hlavička ---------- */
.site-header {
  background: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(4,0,55,.06);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c3); flex-shrink: 0; }
.brand img { width: 60px; height: 60px; object-fit: contain; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 24px; }
.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-nav li { margin: 0; position: relative; }
.main-nav a, .main-nav .sub-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 26px 13px; color: var(--c4); text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .main-nav .sub-toggle:hover, .main-nav a[aria-current="page"] { color: var(--c1); }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.main-nav .submenu {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: 0; min-width: 210px;
  background: #fff; box-shadow: 0 12px 30px rgba(4,0,55,.12); border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.main-nav .submenu a { padding: 9px 20px; font-weight: 500; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.open > .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .sub-toggle svg, .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.header-cta { flex-shrink: 0; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--c4); }
.menu-btn svg { width: 28px; height: 28px; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 3px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; cursor: pointer; transition: .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-fill { background: var(--c1); color: #fff; }
.btn-fill:hover { background: var(--c2); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.6); color: var(--c5); }
.btn-ghost:hover { color: var(--c1); }
.btn-link { padding-left: 0; padding-right: 0; color: var(--c5); background: none; }
.btn-link:hover { color: var(--c1); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.2em 0; }
.tc .btns, .btns.tc { justify-content: center; }

/* ---------- Sekce / hero ---------- */
.section { padding: 70px 0; }
.section-sm { padding: 40px 0; }
.hero {
  position: relative; padding: 90px 0;
  background-color: var(--c9); background-size: cover; background-position: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--c9); opacity: .65; }
.hero > * { position: relative; }
.hero h1, .hero h2 { color: var(--c3); }
.hero-home { padding: 110px 0 120px; background-position: center bottom; }
.hero-home.hero::before { opacity: .82; }
.hero-home .hero-text p, .hero-home .hero-text h2 { max-width: 960px; }
.hero-home h1 { font-size: clamp(24px, 2.8vw, 36px); white-space: nowrap; }
@media (max-width: 760px) { .hero-home h1 { white-space: normal; font-size: 30px; } }
.hero-center { text-align: center; }
.hero-center .lead { max-width: 820px; margin-left: auto; margin-right: auto; }
.lead { font-size: 18px; }

/* hero obrázky – lokální soubor, záložně originál */
.bg-home     { background-image: url("../img/2026/01/DSC_0746-hero.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/DSC_0746.jpg"); }
.bg-technika { background-image: url("../img/2026/01/DSC_0746.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/DSC_0746.jpg"); }
.bg-kontakt  { background-image: url("../img/2026/01/muzi_zeny-scaled.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/muzi_zeny-scaled.jpg"); }
.bg-historie { background-image: url("../img/2026/01/historicka_technika.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/historicka_technika.jpg"); }
.bg-prispevky{ background-image: url("../img/2026/01/soutez_nastup-scaled.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/soutez_nastup-scaled.jpg"); }
.bg-nabor    { background-image: url("../img/2026/01/nabor.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/nabor.jpg"); }
.bg-vybor    { background-image: url("../img/2026/01/oslavy_130_let.jpg"), url("https://sdhcernikovice.cz/wp-content/uploads/2026/01/oslavy_130_let.jpg"); }

/* ---------- Mřížky ---------- */
.grid { display: grid; gap: 32px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Karta akce ---------- */
.event { position: relative; }
.event-img { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 8 / 7; background: var(--c7); }
.event-img img { width: 100%; height: 100%; object-fit: cover; }
.event-date {
  position: absolute; top: 18px; right: 18px;
  background: var(--c9); border-radius: var(--radius); padding: 14px 22px; text-align: center;
  box-shadow: 0 6px 20px rgba(4,0,55,.15);
}
.event-date b { display: block; font-family: var(--font-head); font-size: 32px; line-height: 1; color: var(--c3); }
.event-date small { font-size: 14px; color: var(--c5); }
.event h5 { margin: 22px 0 12px; font-size: 20px; }
.iconlist { list-style: none; padding: 0; margin: 0 0 8px; }
.iconlist li { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 6px; }
.iconlist svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--c4); }

/* ---------- Výpis příspěvků ---------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { display: grid; grid-template-columns: 300px 1fr; gap: 28px; margin-bottom: 34px; align-items: start; }
.post-list .thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--c7); }
.post-list .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-list a:hover .thumb img { transform: scale(1.04); }
.post-list h3 { font-size: 22px; margin: 0 0 8px; }
.post-list h3 a { color: var(--c1); text-decoration: underline; }
.post-list p { margin: 0; font-size: 16px; }
.post-list .meta { font-size: 14px; color: var(--c6); margin-bottom: 6px; }

.post-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(4,0,55,.06); display: flex; flex-direction: column; }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--c7); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c1); text-decoration: none; }
.post-card h2 { font-size: 22px; margin: 6px 0 8px; }
.post-card h2 a { color: var(--c3); text-decoration: none; }
.post-card h2 a:hover { color: var(--c1); }
.post-card .meta { font-size: 14px; color: var(--c6); margin-bottom: 10px; }
.post-card p { font-size: 16px; flex: 1; }
.post-card[hidden] { display: none; }
.post-card .more { font-weight: 700; text-decoration: none; font-size: 15px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.cat-filter a { padding: 7px 18px; border-radius: 99px; background: #fff; color: var(--c4); text-decoration: none; font-weight: 600; font-size: 15px; }
.cat-filter a.active, .cat-filter a:hover { background: var(--c1); color: #fff; }

/* ---------- Článek ---------- */
.entry-hero { padding: 70px 0 40px; text-align: center; }
.entry-hero .cats a { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.entry-hero h1 { margin: 10px 0 14px; font-size: clamp(32px, 4.4vw, 52px); }
.entry-hero .meta { color: var(--c6); font-size: 15px; }
.entry {
  background: #fff; border-radius: var(--radius); padding: 50px clamp(22px, 5vw, 70px);
  box-shadow: 0 15px 40px rgba(4,0,55,.06); margin-bottom: 70px;
}
.entry .featured { margin: -50px calc(-1 * clamp(22px, 5vw, 70px)) 40px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.entry .featured img { width: 100%; max-height: 560px; object-fit: cover; }
.entry figure { margin: 2em 0; }
.entry figure img { margin: 0 auto; border-radius: var(--radius); }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c7); font-size: 15px; }
.post-nav a { text-decoration: none; font-weight: 700; max-width: 48%; }
.post-nav small { display: block; color: var(--c6); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }

/* ---------- Infobox / karty ---------- */
.card { background: var(--c9); border-radius: var(--radius); padding: 28px 26px; text-align: center; box-shadow: 0 8px 24px rgba(4,0,55,.05); }
.card.white { background: #fff; }
.card .ico { width: 54px; height: 54px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--c1); color: #fff; }
.card .ico svg { width: 26px; height: 26px; }
.card h4, .card h6 { margin-bottom: 8px; }
.card p { margin: 0; }
.person img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 16px; }
.person h4 { font-size: 20px; margin-bottom: 4px; }
.person p { font-size: 15px; }
.contact-card p { font-size: 15px; word-break: break-word; }
.social-grid a { text-decoration: none; display: block; }
.social-grid img { width: 110px; height: 110px; object-fit: contain; margin: 0 auto 14px; }
.social-grid h2 { font-size: 24px; color: var(--c4); }
.social-grid a:hover h2 { color: var(--c1); }
.map { width: 100%; height: 420px; border: 0; border-radius: var(--radius); display: block; margin: 30px 0; }
.notice-box { background: #fff; border-left: 5px solid var(--c1); border-radius: var(--radius); padding: 28px 30px; }
.notice-box h2 { font-size: 26px; }

/* ---------- Slider ---------- */
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--c3); aspect-ratio: 16 / 7; }
.slides { display: flex; height: 100%; transition: transform .6s ease; }
.slides figure { margin: 0; flex: 0 0 100%; height: 100%; }
.slides img { width: 100%; height: 100%; object-fit: cover; }
.slider button {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--c3); display: grid; place-items: center;
}
.slider button:hover { background: #fff; }
.slider .prev { left: 16px; } .slider .next { right: 16px; }
.slider button svg { width: 22px; height: 22px; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.dots span.on { background: #fff; }

/* ---------- Soutěže ---------- */
.comp-table td:nth-child(2), .comp-table th:nth-child(2) { white-space: nowrap; }

/* ---------- Patička ---------- */
.site-footer { background: var(--c3); color: rgba(255,255,255,.8); font-size: 15px; }
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 70px; padding-bottom: 50px; }
.footer-top img { width: 96px; margin-bottom: 18px; }
.site-footer h3 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; padding-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.socials a:hover { background: var(--c1); }
.socials svg { width: 16px; height: 16px; fill: #fff; }
.socials img { width: 16px; height: 16px; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c1); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: .25s; z-index: 40;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Responzivita ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
  .main-nav a, .main-nav .sub-toggle { padding: 26px 9px; }
}
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .main-nav {
    position: fixed; inset: 80px 0 0 0; background: #fff; margin: 0;
    transform: translateX(100%); transition: transform .25s; overflow-y: auto; padding: 10px 0 30px;
  }
  .nav-open .main-nav { transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav a, .main-nav .sub-toggle { padding: 14px 24px; width: 100%; justify-content: space-between; font-size: 18px; border-bottom: 1px solid var(--c8); }
  .main-nav .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding: 0 0 0 16px; }
  .has-sub.open > .submenu { display: block; }
  .has-sub:hover > .submenu { display: none; }
  .has-sub.open:hover > .submenu { display: block; }
  .mobile-cta { display: block; padding: 20px 24px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3, .post-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 961px) { .mobile-cta { display: none; } }
@media (max-width: 680px) {
  body { font-size: 16px; }
  .section { padding: 50px 0; }
  .hero, .hero-home { padding: 60px 0; }
  .g2, .g3, .post-cards { grid-template-columns: 1fr; }
  .post-list li { grid-template-columns: 1fr; gap: 14px; }
  .brand span { font-size: 20px; }
  .brand img { width: 48px; height: 48px; }
  .slider { aspect-ratio: 4 / 3; }
  .footer-top { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
}
@media (max-width: 440px) { .g4 { grid-template-columns: 1fr; } }

/* ---------- Úpravy 4. 11. ---------- */
.hero-veil::before { opacity: .82; }
.bg-historie { min-height: 30vw; display: flex; align-items: center; background-position: center 62%; }
.bg-technika { min-height: 36vw; display: flex; align-items: center; background-position: center 38%; }
.bg-kontakt  { min-height: 44.5vw; display: flex; align-items: center; background-position: center center; }
.hero-veil > .wrap { width: 100%; }
.h1-small { font-size: clamp(22px, 3vw, 36px); }
.h2-small { font-size: clamp(16px, 1.7vw, 20px); }
.gap-top, .card p.gap-top { margin-top: 1.6em; }
.nowrap { white-space: nowrap; }
.steps { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 1100px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Úpravy 5. 11. ---------- */
.bg-prispevky { background-position: center 12%; }
.entry-post p, .entry-post li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.half-img { max-width: 50%; margin: 50px auto 70px; }
.half-img img { width: 100%; border-radius: var(--radius); }
@media (max-width: 680px) { .half-img { max-width: 100%; } }
.copy-btn { background: #fff; border: 2px solid var(--c7); text-transform: none; letter-spacing: 0; font-size: 15px; padding: 9px 20px; }
.copy-btn:hover { border-color: var(--c1); }
.copy-msg { display: inline-block; margin-left: 12px; font-size: 15px; color: #1a7f37; font-weight: 600; }

/* ---------- Odběr novinek ---------- */
.subscribe { background: #fff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(4,0,55,.06); padding: 40px clamp(20px, 5vw, 60px); max-width: 820px; margin: 0 auto 30px; text-align: center; }
.subscribe h2 { font-size: clamp(24px, 2.6vw, 32px); }
.subscribe-name { max-width: 560px; margin: 18px auto 0; }
.subscribe-row { display: flex; gap: 12px; max-width: 560px; margin: 12px auto 14px; }
.subscribe-name input { width: 100%; padding: 13px 16px; border: 2px solid var(--c7); border-radius: 3px; font: inherit; color: var(--c3); }
.subscribe-name input:focus { outline: none; border-color: var(--c2); }
.subscribe-row input { flex: 1; min-width: 0; padding: 13px 16px; border: 2px solid var(--c7); border-radius: 3px; font: inherit; color: var(--c3); }
.subscribe-row input:focus { outline: none; border-color: var(--c2); }
.consent { display: flex; gap: 10px; align-items: flex-start; max-width: 560px; margin: 0 auto; text-align: left; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; flex-shrink: 0; }
.form-msg { margin: 14px 0 0; font-weight: 600; min-height: 1.4em; }
.form-msg.ok { color: #1a7f37; } .form-msg.err { color: var(--c1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .subscribe-row { flex-direction: column; } }

/* věta o tísňové lince na jeden řádek (na užších displejích se zalomí) */
@media (min-width: 900px) {
  .one-line { white-space: nowrap; width: max-content; max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
}

/* články – fotka na výšku, tabulka výsledků */
.entry figure.portrait img { max-width: 480px; width: 100%; }
.entry table.results td:first-child, .entry table.results th:first-child { width: 80px; text-align: center; }

/* hlavní nadpis článku ve velikosti H2 */
.entry-hero h1.post-title { font-size: clamp(26px, 3.4vw, 40px); }

/* anketa ve formuláři odběru – možnosti pod sebou */
.poll { border: 0; padding: 0; max-width: 560px; margin: 0 auto 14px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 15px; }
.poll legend { font-weight: 700; color: var(--c3); padding: 0; margin-bottom: 4px; }
.poll label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.poll input { margin: 0; accent-color: var(--c1); }
