/* =============================================================
   Za obyvatelnost Pozořic – styl webu
   Paleta vychází z loga a volebních letáků (grafika/logo.jpg,
   grafika/letak1.jpg, grafika/letak2.jpg): zelená, modrá, tyrkysová.
   ============================================================= */

:root {
  --green: #3fa64a;
  --green-dark: #2c7a37;
  --green-light: #8bc34a;
  --blue: #1e88c9;
  --teal: #1fa596;
  --ink: #1c2b24;
  --ink-soft: #4b5a54;
  --paper: #ffffff;
  --paper-soft: #f4f8f6;
  --line: #e2e9e5;

  --gradient-brand: linear-gradient(120deg, var(--green) 0%, var(--teal) 55%, var(--blue) 100%);

  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 46, 33, 0.1);
  --shadow-sm: 0 2px 10px rgba(23, 46, 33, 0.08);

  --container: 1140px;
  --header-h: 88px;
}

* { box-sizing: border-box; }

button, input, textarea { font-family: inherit; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: "Poppins", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

h1, h2, h3, h4 {
  line-height: 1.22;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); color: var(--ink); }
h3 { font-size: 1.2rem; }

.section { padding: 84px 0; }
.section--soft { background: var(--paper-soft); }

.section-head {
  max-width: 640px;
  margin: 0 0 44px;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: rgba(63, 166, 74, .1);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.lead { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: var(--paper);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow); }

.btn--outline {
  border-color: rgba(255,255,255,.75);
  color: #fff;
}
.btn--outline:hover { background: rgba(255,255,255,.12); }

.btn--solid {
  background: var(--gradient-brand);
  color: #fff;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.02rem;
}
.brand:hover { text-decoration: none; }

.brand img {
  height: 56px;
  width: auto;
  flex-shrink: 0;
}

.brand span { display: block; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: .72rem;
  color: var(--ink-soft);
}

.nav-desktop {
  display: none;
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
}

.nav-desktop ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-desktop a:not(.btn) {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
}
.nav-desktop a:not(.btn):hover {
  background: var(--paper-soft);
  text-decoration: none;
}

.nav-desktop a.is-active {
  background: rgba(63, 166, 74, .12);
  color: var(--green-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn { padding: 10px 20px; font-size: .92rem; }

/* hamburger */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}
@media (min-width: 900px) {
  .hamburger { display: none; }
}
.hamburger svg { width: 22px; height: 22px; }

/* ---------- offcanvas ---------- */
.offcanvas {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(340px, 86vw);
  height: 100vh;
  background: var(--paper);
  z-index: 200;
  box-shadow: -20px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  padding: 22px;
}
.offcanvas.is-open { transform: translateX(0); }

.offcanvas-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
}

.offcanvas-title {
  font-size: .92rem;
  line-height: 1.2;
}

.offcanvas-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.offcanvas-close svg { width: 18px; height: 18px; }

.offcanvas ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offcanvas a:not(.btn) {
  display: block;
  padding: 14px 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.offcanvas a:not(.btn):hover { color: var(--green-dark); text-decoration: none; }

.offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 28, 22, .45);
  z-index: 190;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
}
.offcanvas-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-brand);
  color: #fff;
  padding: 76px 0 96px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% -30% -10%;
  background: linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 35%);
  clip-path: polygon(0 0, 45% 0, 20% 100%, 0% 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -10% -10% -30% -10%;
  background: linear-gradient(135deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.14) 100%);
  clip-path: polygon(100% 0, 100% 100%, 70% 100%, 88% 0);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 1.6rem + 2.6vw, 3.4rem);
  color: #fff;
  margin-bottom: .4em;
}

.hero p.lead { color: rgba(255,255,255,.92); max-width: 60ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.05fr .95fr; }
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

.history-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.history-list li {
  display: flex;
  gap: 14px;
}

.history-year {
  flex-shrink: 0;
  width: 64px;
  font-weight: 800;
  color: var(--green-dark);
}

/* ---------- program ---------- */
.program-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.program-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.program-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.program-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}
.program-card ul li { margin-bottom: 6px; }
.program-card p { color: var(--ink-soft); }

.program-highlight {
  margin-top: 40px;
  border-radius: var(--radius);
  background: var(--gradient-brand);
  color: #fff;
  padding: 32px;
  display: grid;
  gap: 20px;
}
@media (min-width: 720px) {
  .program-highlight { grid-template-columns: auto 1fr; align-items: center; }
}
.program-highlight h3 { color: #fff; margin-bottom: 8px; }
.program-highlight p { margin: 0; color: rgba(255,255,255,.92); }
.program-highlight .tag {
  font-size: 2.2rem;
}

/* ---------- map ---------- */
.map-layout {
  display: grid;
  gap: 22px;
}
@media (min-width: 860px) {
  .map-layout { grid-template-columns: 1.4fr .9fr; align-items: start; }
}

.map-frame {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--paper-soft);
}

.map-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.map-point {
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s ease, background .15s ease;
}
.map-point:hover { border-color: var(--green); }
.map-point.is-active {
  border-color: var(--green);
  background: rgba(63, 166, 74, .08);
}

.map-point-title { font-weight: 700; font-size: .94rem; }
.map-point-text { font-size: .84rem; color: var(--ink-soft); }

.map-marker-icon,
.leaflet-div-icon.map-marker-icon {
  background: transparent;
  border: none;
}
.map-marker-icon span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.map-cluster-icon,
.leaflet-div-icon.map-cluster-icon {
  background: transparent;
  border: none;
}
.map-cluster-icon span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  font-size: .82rem;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}

/* ---------- team ---------- */
.team-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.candidate-tile {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.candidate-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.candidate-tile img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
}

.candidate-tile figcaption {
  padding: 14px 16px 18px;
}

.candidate-name { font-weight: 700; font-size: .96rem; }
.candidate-role { font-size: .84rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.82);
  padding: 54px 0 28px;
}

.footer-top {
  display: grid;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (min-width: 780px) {
  .footer-top { grid-template-columns: 1.3fr 1fr; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}
.footer-brand img { height: 46px; width: auto; }

.footer-col h4 {
  color: #fff;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(255,255,255,.8); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: .84rem;
  color: rgba(255,255,255,.6);
}

/* ---------- password gate ---------- */
.gate-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  padding: 24px;
}

.gate-card {
  width: 100%;
  max-width: 340px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 30px;
  text-align: center;
}

.gate-card img {
  height: 64px;
  width: auto;
  margin: 0 auto 24px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-form input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  font: inherit;
  color: var(--ink);
  background: var(--paper-soft);
  text-align: center;
}
.gate-form input[type="password"]:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  background: var(--paper);
}

.gate-error {
  color: #b3261e;
  font-size: .88rem;
  font-weight: 600;
  margin: 0 0 4px;
}

/* ---------- utils ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
