/* =========================================================
   Pro Dobříkov srdcem — komunální volby 2026
   Barvy převzaté z loga/letáku: navy #001860, červená #D80010, zlatá #F8B010
   ========================================================= */

:root {
  --navy:        #0a2e6b;
  --navy-deep:   #06214f;
  --navy-ink:    #001860;
  --red:         #d6141e;
  --red-dark:    #b30f18;
  --gold:        #f5a81c;
  --gold-dark:   #d98f0a;
  --green:       #3a8d3f;
  --teal:        #0f8a86;
  --blue:        #2f7fc4;
  --sky:         #eaf2fb;

  --ink:         #1e2733;
  --muted:       #5a6675;
  --line:        #e2e8f0;
  --bg:          #ffffff;
  --bg-soft:     #f5f8fc;

  --radius:      16px;
  --radius-lg:   24px;
  --shadow-sm:   0 2px 10px rgba(6, 33, 79, .06);
  --shadow:      0 10px 30px rgba(6, 33, 79, .10);
  --shadow-lg:   0 20px 50px rgba(6, 33, 79, .16);
  --maxw:        1160px;
  --ease:        cubic-bezier(.2, .7, .2, 1);

  --ff-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  color: var(--navy-ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.01em;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section__head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
h2.section__title { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section__lead { color: var(--muted); font-size: 1.15rem; margin-top: .4em; }

/* Sazba běžného textu do bloku. */
.cand__bio,
.about__text p,
.theme p:not(.theme__motto) {
  text-align: justify;
  text-justify: inter-word;
}

/* Dělení slov jen tam, kde je řádek krátký a bez dělení by v bloku vznikaly
   díry mezi slovy — v kartách kandidátů vždy, u běžného textu až na úzkém
   displeji (viz @media na konci souboru). Na širokém řádku se nedělí vůbec.
   Limity dle českých zvyklostí: slovo min. 6 znaků, min. 3 znaky před
   dělením i za ním — nevzniká tak "vz-tah" ani "ak-tivně". */
.cand__bio {
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 3;
  hyphenate-limit-chars: 6 3 3;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--ff-head); font-weight: 700; font-size: 1rem;
  padding: 14px 28px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  text-decoration: none !important; line-height: 1;
  text-align: center; /* aby se popisek nedědil do bloku, když se zalomí na dva řádky */
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(214, 20, 30, .32); }
.btn--primary:hover { background: var(--red-dark); }
.btn--navy { background: var(--navy); color: #fff; box-shadow: 0 8px 22px rgba(10, 46, 107, .3); }
.btn--navy:hover { background: var(--navy-deep); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--outline:hover { border-color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand__txt { display: none; }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--ff-head); font-weight: 600; font-size: .98rem; color: var(--navy-ink);
  padding: 10px 14px; border-radius: 10px; transition: background .18s, color .18s;
}
.nav__links a:hover { background: var(--sky); text-decoration: none; }
.nav__links a.is-active { color: var(--red); }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  width: 44px; height: 44px; border-radius: 10px;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 26px; height: 3px; background: var(--navy-ink); border-radius: 3px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before { position: absolute; top: -8px; }
.nav__toggle span::after { position: absolute; top: 8px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  background: var(--navy-ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url("assets/bg-hero.jpg");
  background-size: cover; background-position: center 30%;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,33,79,.55) 0%, rgba(6,33,79,.35) 45%, rgba(6,33,79,.82) 100%);
}
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--ff-head); font-weight: 700; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  padding: 9px 18px; border-radius: 999px; margin-bottom: 26px;
}
.hero__badge b { color: var(--gold); }
.hero__logo { height: clamp(84px, 14vw, 132px); width: auto; margin: 0 auto 26px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.hero h1 {
  color: #fff; font-size: clamp(1.7rem, 4.6vw, 3rem); max-width: 20ch; margin: 0 auto .2em;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero__slogan {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 400; max-width: 34ch; margin: 0 auto 34px;
  color: #f2f6fc; text-shadow: 0 2px 16px rgba(0,0,0,.4); line-height: 1.45;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* page hero (subpages) */
.page-hero {
  position: relative; color: #fff; text-align: center; padding: clamp(64px, 12vw, 130px) 0 clamp(48px, 8vw, 84px);
  background: var(--navy-ink); overflow: hidden;
}
.page-hero__bg { position: absolute; inset: 0; background-image: url("assets/bg-sky-meadow.jpg"); background-size: cover; background-position: center; }
.page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,33,79,.78), rgba(6,33,79,.88)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.page-hero p { color: #eaf2fb; font-size: 1.2rem; max-width: 60ch; margin: 8px auto 0; }
.page-hero .eyebrow { color: var(--gold); }

/* ---------- Intro / about ---------- */
.about__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.about__text p { font-size: 1.12rem; }
.pill-quote {
  border-left: 5px solid var(--red); background: var(--sky);
  padding: 22px 26px; border-radius: 12px; font-family: var(--ff-head); font-weight: 700;
  color: var(--navy-ink); font-size: 1.2rem; line-height: 1.4; margin: 0;
}
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values li { display: flex; gap: 14px; align-items: flex-start; }
.values .dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; margin-top: 8px; background: var(--gold); }
.values li:nth-child(2) .dot { background: var(--red); }
.values li:nth-child(3) .dot { background: var(--navy); }
.values b { font-family: var(--ff-head); color: var(--navy-ink); }

/* ---------- Video ---------- */
.video-wrap { max-width: 900px; margin: 0 auto; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center;
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { text-align: center; color: #fff; padding: 24px; }
.video-placeholder .play,
.video-facade .play {
  width: 78px; height: 78px; border-radius: 50%; background: var(--red); margin: 0 auto 18px;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(214,20,30,.5);
}
.video-placeholder .play::before,
.video-facade .play::before { content: ""; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.video-placeholder p { color: #cdd9ee; margin: 6px 0 0; }
.video-placeholder .todo { color: var(--gold); font-family: var(--ff-head); font-weight: 700; font-size: .82rem; letter-spacing: .06em; margin-top: 14px; }
.video-placeholder a { color: var(--gold); text-decoration: underline; }
.video-placeholder a:hover { color: #fff; }

/* Fasáda YouTube — náhled s play tlačítkem; iframe se načte až po kliknutí */
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; margin: 0; cursor: pointer;
  background-color: transparent; background-size: cover; background-position: center;
  display: grid; place-items: center; font: inherit;
}
/* Náhled nechávám v původních barvách — jen jemné ztmavení na hover.
   Play tlačítko odlišuje bílý prstenec, aby bylo čitelné i na světlém náhledu. */
.video-facade::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,24,96,0); transition: background .22s var(--ease);
}
.video-facade .play {
  position: relative; z-index: 1; margin: 0;
  box-shadow: 0 0 0 9px rgba(255,255,255,.92), 0 12px 34px rgba(0,24,96,.35);
  transition: transform .22s var(--ease);
}
.video-facade:hover .play, .video-facade:focus-visible .play { transform: scale(1.08); }
.video-facade:hover::after { background: rgba(0,24,96,.12); }
.video-facade:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.video-note { text-align: center; margin-top: 16px; color: var(--muted); font-size: .92rem; }
.video-note[hidden] { display: none; }

/* ---------- Program cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm); position: relative;
  display: flex; flex-direction: column; transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  border-top: 4px solid var(--accent, var(--navy));
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard__icon {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent); color: #fff; margin-bottom: 16px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}
.pcard__icon svg { width: 32px; height: 32px; }
.pcard h3 { font-size: 1.18rem; margin-bottom: 12px; }
.pcard ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.pcard ul li { position: relative; padding-left: 24px; color: var(--muted); font-size: .98rem; }
.pcard ul li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
}
.pcard__more { margin-top: auto; font-family: var(--ff-head); font-weight: 700; color: var(--accent); font-size: .95rem; }
.pcard__more:hover { text-decoration: none; }
.pcard__more::after { content: " →"; }

/* accent helpers */
.a-navy  { --accent: var(--navy); }
.a-gold  { --accent: var(--gold-dark); }
.a-green { --accent: var(--green); }
.a-blue  { --accent: var(--blue); }
.a-red   { --accent: var(--red); }
.a-teal  { --accent: var(--teal); }

/* ---------- Candidates ---------- */
.cand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cand {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.cand:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
/* poměr shodný s předlohou fotek (700x1050) — bez ořezu, všem jsou vidět celé ruce */
.cand__photo { aspect-ratio: 2 / 3; background: var(--sky); overflow: hidden; }
.cand__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cand__body { padding: 20px 22px 26px; border-top: 5px solid var(--accent, var(--navy)); flex: 1; }
.cand__name { font-size: 1.2rem; margin-bottom: 2px; }
.cand__age { font-family: var(--ff-head); font-weight: 700; color: var(--accent, var(--navy)); font-size: .9rem; letter-spacing: .02em; margin-bottom: 12px; }
.cand__bio { color: var(--muted); font-size: .96rem; line-height: 1.6; margin: 0; }

/* ---------- Detailed themes ---------- */
.theme-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
.theme-nav a {
  font-family: var(--ff-head); font-weight: 600; font-size: .9rem; color: var(--navy-ink);
  background: #fff; border: 1px solid var(--line); padding: 8px 15px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.theme-nav a:hover { border-color: var(--navy); text-decoration: none; background: var(--sky); }

.theme {
  scroll-margin-top: 96px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 44px); box-shadow: var(--shadow-sm); margin-bottom: 26px;
  border-left: 6px solid var(--accent, var(--navy));
}
.theme__head { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.theme__num {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 15%, #fff); color: var(--accent);
  font-family: var(--ff-head); font-weight: 800; font-size: 1.4rem;
}
.theme__head h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.75rem); }
.theme__motto {
  font-style: italic; color: var(--navy-ink); font-size: 1.18rem; line-height: 1.5;
  border-left: 4px solid var(--accent, var(--navy)); padding: 6px 0 6px 20px; margin: 18px 0 20px;
}
.theme p { color: #384250; }
.theme h4 { font-size: 1.05rem; color: var(--accent, var(--navy)); margin: 22px 0 12px; }
.theme__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.theme__list li { position: relative; padding-left: 30px; }
.theme__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent, var(--navy));
  font-weight: 800; font-family: var(--ff-head);
}

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.cta-band p { color: #cdd9ee; font-size: 1.15rem; max-width: 54ch; margin: 0 auto 28px; }
.cta-band .btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cta-band .btn--outline:hover { background: rgba(255,255,255,.12); }

/* candidate teaser strip on homepage */
.cand-strip { display: flex; gap: -10px; justify-content: center; margin-bottom: 26px; }
.cand-strip img {
  width: 66px; height: 66px; border-radius: 50%; object-fit: cover; object-position: top center;
  border: 3px solid #fff; box-shadow: var(--shadow-sm); margin-left: -14px;
}
.cand-strip img:first-child { margin-left: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-ink); color: #cdd9ee; padding: 54px 0 30px; }
/* Výchozí barva odkazů je navy — na tmavé patičce by byla nečitelná.
   Musí zůstat před .socials a .footer__bottom, které si barvu přebíjejí. */
.site-footer a { color: #cdd9ee; }
.site-footer a:hover { color: #fff; }
.footer__web { margin-top: 14px; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer__brand img { height: 66px; margin-bottom: 12px; background: rgba(255,255,255,.96); border-radius: 14px; padding: 10px 14px; }
.footer__brand p { margin: 0; max-width: 42ch; }
/* pozor: element je <footer class="site-footer">, selektor .footer h4 nikdy nesedel
   a nadpisy dedily tmavou --navy-ink, takze byly na tmave paticce neviditelne */
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__nav a { color: #cdd9ee; }
.footer__nav a:hover { color: #fff; }
.socials { display: flex; gap: 12px; margin-top: 6px; }
.socials a {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff; transition: background .2s, transform .2s;
}
.socials a:hover { background: var(--red); transform: translateY(-2px); text-decoration: none; }
.socials svg { width: 22px; height: 22px; }
.footer__bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .9rem; color: #9fb2d4;
}
.footer__bottom a { color: var(--gold); }
.todo-flag { color: var(--gold); font-weight: 700; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cand-grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px; max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); visibility: hidden;
  }
  .nav.is-open .nav__links { max-height: 400px; visibility: visible; }
  .nav__links a { padding: 14px 16px; border-radius: 10px; font-size: 1.05rem; }
  .brand__txt { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .grid--3, .grid--2, .cand-grid { grid-template-columns: 1fr; }
  /* na úzkém displeji je řádek krátký, bez dělení by blok dělal díry */
  .about__text p,
  .theme p:not(.theme__motto) {
    -webkit-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 3;
    hyphenate-limit-chars: 6 3 3;
  }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .footer__grid { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
