/* ==========================================================================
   styles.css  —  ALL the styling for the Starý Lískovec ON website
   ==========================================================================
   HOW TO RE-THEME THE SITE:
     • Want different colours or fonts? Change the values in the ":root" block
       right below this comment. Everything else uses those values, so one edit
       updates the whole site.
     • The file is then split into clearly-labelled chunks (HEADER, HERO,
       PROGRAM, PEOPLE, …). Use your editor's "find" to jump to the one you want.

   Brand colours come straight from the "Piráti a Zelení pro Lískovec" logo:
     black (Piráti) · green (Zelení), with a coral pink lifted from the
     logo's flower motif for dark-backdrop accents.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   DESIGN TOKENS  —  ⭐ the one place to change colours, fonts and spacing
   ---------------------------------------------------------------------------- */
:root {
  /* Brand colours — LIGHT theme (white page, dark text) */
  --color-bg:        #ffffff;   /* page background (white) */
  --color-surface:   #f6f5f8;   /* slightly tinted panels / alternating sections */
  --color-surface-2: #eef8f1;   /* cards (a hint of green) */
  --color-text:      #1a1a1a;   /* main text (near-black) */
  --color-muted:     #585c58;   /* secondary / quieter text (passes AA on white) */
  --color-border:    #dde8e0;   /* hairline borders / dividers on the light theme */

  /* Logo colours, kept exact for fills, dots and glows */
  --color-pirati:      #141414; /* official Piráti black — text accent + fills (18.4:1 on white) */
  --color-pirati-soft: #ff7a91; /* coral pink from the logo's flower motif — a slight touch only: the hero's soft background glow, never a dominant gradient stop */
  --color-pirati-dark: #000000; /* black hover state (fills only) */
  --color-green:       #0bd26f; /* official Zelení green — FILLS ONLY (use green-ink for text on white) */
  --color-green-ink:   #078245; /* darkened green that passes AA as text on white and on tinted panels */
  --color-green-dark:  #06713c; /* green hover state */
  --color-green-deep:  #03645a; /* the logo ring/wordmark gradient's dark teal end — gradients + deep accents (7.1:1 on white) */

  /* Semantic accents — what to use for links and text accents on the white page */
  --color-link:        var(--color-green-ink);
  --color-link-hover:  var(--color-green-deep);
  --color-error:        #c62828; /* form validation text */
  --color-error-border: #e0556b; /* form validation border */

  /* Party tag colours */
  --pirati:  var(--color-pirati);
  --zeleni:  var(--color-green);

  /* Fonts */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif; /* big headings */
  --font-body:    "Roboto", system-ui, -apple-system, Segoe UI, sans-serif;

  /* Layout */
  --container:   1140px;        /* max content width */
  --radius:      14px;          /* rounded corners (the friendly Zelení touch) */
  --radius-pill: 999px;
  --gap:         clamp(1rem, 2.5vw, 2rem);
  --section-pad: clamp(3rem, 7vw, 6rem);

  /* Effects */
  --shadow:     0 10px 30px rgba(10, 20, 14, 0.12);
  --shadow-sm:  0 4px 14px rgba(10, 20, 14, 0.08);
  --transition: 0.25s ease;
  --header-h:   72px;           /* header height (used to offset anchor scrolling) */
}

/* ----------------------------------------------------------------------------
   DEV DISCLAIMER BANNER
   To hide it permanently: set  display: none  on .dev-banner, or delete the
   <div id="dev-banner"> block in index.html entirely.
   ---------------------------------------------------------------------------- */
.dev-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  background: var(--color-green); color: #000;
  font-size: 0.9rem; font-weight: 600; text-align: center;
  padding: 0.55rem 1rem; position: relative;
}
.dev-banner__text { flex: 1; }
.dev-banner__close {
  flex: 0 0 auto; background: none; border: 0; cursor: pointer;
  font-size: 1rem; font-weight: 700; color: #000; padding: 0 0.25rem;
  line-height: 1; opacity: 0.6;
}
.dev-banner__close:hover { opacity: 1; }
.dev-banner[hidden] { display: none; }

/* ----------------------------------------------------------------------------
   BASE / RESET
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h); /* so anchors don't hide under the header */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }

h1, h2, h3 { line-height: 1.05; margin: 0 0 0.4em; }

/* The display font (Bebas Neue) is all-caps and tall; give it letter-spacing */
.hero__title, .section__title, .program-card__title,
.newsletter__title { font-family: var(--font-display); letter-spacing: 0.02em; font-weight: 400; }

/* Layout helper: centred, padded content column */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ----------------------------------------------------------------------------
   UTILITIES
   ---------------------------------------------------------------------------- */
/* Hidden visually but still read by screen readers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* "Skip to content" link — appears when tabbing with the keyboard */
.skip-link {
  position: absolute; left: 0.5rem; top: -3rem;
  background: var(--color-green); color: #000; padding: 0.5rem 1rem;
  border-radius: var(--radius); z-index: 1000; transition: top var(--transition);
}
.skip-link:focus { top: 0.5rem; }

/* Visible keyboard focus outline everywhere */
:focus-visible { outline: 3px solid var(--color-green-ink); outline-offset: 2px; border-radius: 4px; }

/* ----------------------------------------------------------------------------
   BUTTONS  (pill-shaped, rounded — the Zelení flavour)
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 0.8em 1.6em; border-radius: var(--radius-pill); border: 2px solid transparent;
  transition: transform var(--transition), background var(--transition), color var(--transition);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--color-green); color: #000; }
.btn--primary:hover { background: var(--color-pirati-dark); color: #fff; }

.btn--green { background: var(--color-green); color: #000; }
.btn--green:hover { background: var(--color-green-dark); color: #000; }

.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-green-ink); }
.btn--ghost:hover { background: var(--color-pirati); color: #fff; border-color: var(--color-pirati); }

/* ----------------------------------------------------------------------------
   HEADER + NAVIGATION
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--color-text); }
.brand:hover { color: var(--color-text); }
.brand__svg  { height: 56px; width: auto; display: block; }

/* Desktop navigation */
.main-nav { margin-left: auto; display: flex; gap: clamp(0.5rem, 1.5vw, 1.4rem); }
.main-nav a {
  color: var(--color-text); font-weight: 500; padding: 0.4rem 0.2rem;
  position: relative;
}
.main-nav a::after { /* animated underline on hover / current section */
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--color-green-ink); transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.main-nav a:hover, .main-nav a.is-current { color: var(--color-green-ink); }
.main-nav a:hover::after, .main-nav a.is-current::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 0.75rem; margin-left: 1rem; }

/* Language switch styled like an ON/OFF toggle */
.lang-toggle {
  position: relative; display: inline-flex; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  padding: 3px; cursor: pointer; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem;
}
.lang-toggle__opt { position: relative; z-index: 1; padding: 4px 10px; color: var(--color-muted); transition: color var(--transition); }
.lang-toggle__opt.is-active { color: #000; }
.lang-toggle__knob {
  position: absolute; top: 3px; left: 3px; z-index: 0;
  width: calc(50% - 3px); height: calc(100% - 6px);
  background: var(--color-green); border-radius: var(--radius-pill);
  transition: transform var(--transition);
}
.lang-toggle.is-en .lang-toggle__knob { transform: translateX(100%); }

/* Hamburger button (hidden on desktop, shown on phones via the media query below) */
.menu-btn { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; padding: 10px; }
.menu-btn__bar { height: 2px; background: var(--color-text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------------------
   HERO  (top banner)
   ---------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  color: #1a1a1a;                 /* light overlay → dark text */
  border-top: 3px solid var(--color-green);
  border-bottom: 3px solid var(--color-green);
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(253, 100, 120, 0.15), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(1, 195, 109, 0.12), transparent 60%),
    linear-gradient(to right, rgba(245,243,238,0.55) 0%, rgba(245,243,238,0.18) 100%),
    linear-gradient(rgba(90, 90, 90, 0.28), rgba(90, 90, 90, 0.28)),
    url('../header-photo.jpg') center / cover no-repeat;
}
.hero__inner {
  display: flex; align-items: stretch; gap: var(--gap);
  min-height: clamp(360px, 46vw, 520px);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}
.hero__text {
  display: flex; flex-direction: column; justify-content: space-between;
  flex: 1 1 60%;
}
.hero__kicker {
  display: inline-block; margin: 0 0 1rem;
  color: var(--color-green-ink); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.9rem; border: 1px solid rgba(1, 130, 73, 0.45); border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
}
/* One continuous gradient across the whole two-line title, not a separate
   gradient per line — the clip/fill is set on the h1 itself so the
   background spans its full box and both child spans share it.
   Weighted stops (each colour holds to ~40%/60%) keep the crossfade brief,
   rather than a muddy blend spread across the whole title. The logo's
   wordmark is black+green; on the hero's dark photo backdrop black has
   no contrast, so this swaps in the same near-white used for the rest of
   the hero text — coral pink stays reserved for the small glow/flower
   touches, not the title itself. */
.hero__title {
  font-size: clamp(3rem, 11vw, 7rem); margin: 0;
  -webkit-text-fill-color: #1a1a1a;
  color: #1a1a1a;
}
.hero__title span:last-child {
  background: linear-gradient(90deg, #1a1a1a 0%, var(--color-green-ink) 55%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__tagline { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: rgba(26, 26, 26, 0.75); max-width: 50ch; margin: 1rem 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
/* Ghost button sits on the dark hero, so it needs light text + a light outline.
   Hover fills with green, not black or pink — both of those fail contrast
   with white text (2.3:1 / 2.9:1), so the fill switches to black text instead. */
.hero .btn--ghost { color: #1a1a1a; border-color: rgba(26, 26, 26, 0.40); }
.hero .btn--ghost:hover { background: rgba(7, 130, 69, 0.12); border-color: var(--color-green-ink); color: var(--color-green-ink); }

.hero__art { flex: 0 1 320px; display: flex; justify-content: center; }
.hero__logo { width: clamp(180px, 30vw, 340px); height: auto; border-radius: var(--radius); filter: drop-shadow(0 0 24px rgba(1, 195, 109, 0.5)); }

/* ----------------------------------------------------------------------------
   SECTIONS  (shared frame for every block)
   ---------------------------------------------------------------------------- */
.section { padding-block: var(--section-pad); }
.section--alt { background: var(--color-surface); } /* every other section is slightly lighter */

.section__head { text-align: center; max-width: 60ch; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section__title { font-size: clamp(2.2rem, 6vw, 3.6rem); }
/* A little green accent line under each section title */
.section__title::after {
  content: ""; display: block; width: 64px; height: 4px; margin: 0.5rem auto 0;
  background: linear-gradient(90deg, var(--color-pirati), var(--color-green)); border-radius: var(--radius-pill);
}
.section__lead { color: var(--color-muted); font-size: 1.1rem; margin: 0.5rem 0 0; }

/* ----------------------------------------------------------------------------
   O NÁS  (About)
   ---------------------------------------------------------------------------- */
/* Stacked layout: the team photo leads, the text reads below it */
.about__grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); justify-items: center; }
.about__text { max-width: 72ch; }
.about__text p { margin: 0 0 1rem; font-size: 1.08rem; }
.about__text p:first-child { font-size: 1.3rem; color: var(--color-green-ink); font-weight: 500; } /* lead-in sentence stands out */
.about__photo { order: -1; width: 100%; max-width: 760px; border-radius: var(--radius); overflow: hidden; }
.about__photo img { width: 100%; height: auto; display: block; } /* full photo, never cropped */

/* ----------------------------------------------------------------------------
   PROGRAM  (6 expandable cards — built with native <details> so they work
   even without JavaScript)
   ---------------------------------------------------------------------------- */
.program-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.program-card {
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; transition: border-color var(--transition);
}
.program-card[open] { border-color: var(--color-green); }
.program-card__summary {
  display: flex; align-items: center; gap: 1rem; cursor: pointer; list-style: none;
  padding: 1.2rem 1.4rem;
}
.program-card__summary::-webkit-details-marker { display: none; } /* hide default triangle */
.program-card__num {
  flex: 0 0 auto; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  background: var(--color-green); color: #000; font-family: var(--font-display); font-size: 1.5rem;
  border-radius: 50%;
}
.program-card__title { flex: 1; font-size: 1.55rem; margin: 0; }
.program-card__icon { font-size: 1.6rem; }
.program-card__chevron { transition: transform var(--transition); color: var(--color-green-ink); font-size: 1.4rem; }
.program-card[open] .program-card__chevron { transform: rotate(180deg); }
.program-card__body { padding: 0 1.4rem 1.4rem 5rem; color: var(--color-muted); }

/* ----------------------------------------------------------------------------
   LIDÉ  (candidate photo cards)
   ---------------------------------------------------------------------------- */
.people-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.person { text-align: center; }

/* The photo frame. Real photo fills it; if a candidate has no photo yet,
   the <img> falls back (via onerror in render.js) to the logo placeholder,
   which gets `object-fit: contain` instead of `cover` so it isn't cropped. */
.person__photo {
  position: relative; width: 100%; aspect-ratio: 3 / 4; margin-bottom: 1rem;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-top: 4px solid var(--photo-accent);
  display: flex; align-items: center; justify-content: center;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person__photo img.is-placeholder { width: 60%; height: 60%; object-fit: contain; }

/* Party accent: the top border follows the person's party, so the 8 cards
   read as two coalition parties, not one repeated card. */
.person__photo--pirati { --photo-accent: var(--pirati); }
.person__photo--zeleni { --photo-accent: var(--zeleni); }

.person__info { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.person__name { font-size: 1.3rem; font-family: var(--font-body); font-weight: 700; margin: 0; }
.person__subtitle { color: var(--color-muted); font-size: 0.8rem; font-weight: 500; margin: 0; text-align: center; }
.person__bio  { color: var(--color-muted); font-size: 0.95rem; margin: 0.3rem 0 0; text-align: left; }

/* party tag */
.party-tag { display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; line-height: 1;
  letter-spacing: 0.05em; padding: 0.2rem 0.7rem; border-radius: var(--radius-pill); color: #000; }
.party-tag--pirati { background: var(--pirati); color: #fff; } /* black fill is dark — needs light text */
.party-tag--zeleni { background: var(--zeleni); }

/* expandable secondary candidates list (positions 9–20) */
.candidates-other { margin-top: calc(var(--gap) * 1.5); }
.candidates-other__summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.1rem; list-style: none; cursor: pointer; user-select: none;
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; color: var(--color-text);
}
.candidates-other__summary::-webkit-details-marker { display: none; }
.candidates-other__chevron { transition: transform var(--transition); display: inline-block; }
.candidates-other[open] .candidates-other__chevron { transform: rotate(180deg); }
.candidates-other__list { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }
.candidates-other__item {
  display: grid; grid-template-columns: 2.2rem 5rem 1fr auto;
  align-items: center; gap: 0.6rem; padding: 0.45rem 1.1rem;
  border-radius: calc(var(--radius) - 4px);
}
.candidates-other__item:nth-child(odd) { background: rgba(0, 0, 0, 0.03); }
.candidates-other__pos { color: var(--color-muted); font-size: 0.85rem; text-align: right; }
.candidates-other__name { font-weight: 600; font-size: 0.95rem; }
.candidates-other__name--open { font-weight: 400; color: var(--color-muted); font-style: italic; }
.candidates-other__open { display: inline-block; width: 5rem; }
.candidates-other__prof { color: var(--color-muted); font-size: 0.875rem; text-align: right; }

/* ----------------------------------------------------------------------------
   SETKEJME SE  (events — vertical timeline, 4-event window with ◀ ▶ nav)
   ---------------------------------------------------------------------------- */
.events { list-style: none; padding: 0; margin: 0; position: relative; max-width: 760px; margin-inline: auto; }
.events::before { /* the vertical gradient line */
  content: ""; position: absolute; left: 28px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--color-pirati), var(--color-green));
}
.event { position: relative; padding: 0 0 1.6rem 72px; }
.event__dot {
  position: absolute; left: 19px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-green); border: 3px solid var(--color-bg); box-shadow: 0 0 0 2px var(--color-green);
  transition: box-shadow var(--transition);
}
.section--alt .event__dot { border-color: var(--color-surface); }
.event__date { color: var(--color-green-ink); font-weight: 700; font-size: 0.95rem; }
.event__title { font-size: 1.2rem; margin: 0.15rem 0; }
.event__place { color: var(--color-muted); font-size: 0.95rem; }
.event__desc  { color: var(--color-muted); margin: 0.2rem 0 0; }
.event__links { display: flex; gap: 0.4rem; margin-top: 0.55rem; }
.event__link  { display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 700; text-decoration: none; line-height: 1;
  border: 1.5px solid currentColor; transition: opacity var(--transition); }
.event__link:hover { opacity: 0.7; }
.event__link--f { color: #1877f2; }
.event__link--m { color: var(--color-green-ink); }
.event--past { opacity: 0.55; }
.event--past .event__dot { background: var(--color-muted); box-shadow: 0 0 0 2px var(--color-muted); }
/* nearest upcoming event — larger glowing dot + bigger title */
.event--nearest .event__dot {
  width: 26px; height: 26px; left: 16px; top: 2px;
  box-shadow: 0 0 0 3px var(--color-green), 0 0 14px rgba(1, 195, 109, 0.45);
}
.event--nearest .event__title { font-size: 1.4rem; }
.event__badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  background: var(--color-text); color: #fff; padding: 0.1rem 0.5rem; border-radius: var(--radius-pill); margin-left: 0.5rem; }

/* navigation — ▲ above, ▼ below the timeline, centered on the dot column */
.events-nav {
  max-width: 760px; margin-inline: auto;
  display: flex; justify-content: flex-start; /* align with the dot column */
  padding-left: 8px; /* nudge so the button centres over the timeline dot column */
}
.events-nav--top  { margin-bottom: 0.5rem; }
.events-nav--bottom { margin-top: 0.25rem; }
.events-nav__btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.9rem; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--color-surface-2); border: 1px solid var(--color-green);
  color: var(--color-green-ink); font-size: 0.8rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.events-nav__btn:not([disabled]):hover {
  background: var(--color-surface); border-color: var(--color-green); color: var(--color-text);
}
.events-nav__btn[disabled] { opacity: 0.3; cursor: default; border-color: var(--color-border); color: var(--color-muted); }

/* ----------------------------------------------------------------------------
   AKTUALITY  (news carousel — 3 cards, big side arrows, newest on left)
   ---------------------------------------------------------------------------- */
.news-carousel {
  display: flex; align-items: stretch; gap: 0.5rem;
}
.news-cards {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
  min-width: 0; /* prevent grid from overflowing flex container */
}
.news-carousel__btn {
  flex-shrink: 0; width: 3rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; line-height: 1; font-weight: 300;
  background: transparent; border: none; cursor: pointer;
  color: var(--color-green-ink);
  transition: color var(--transition);
  padding: 0;
}
.news-carousel__btn:not([disabled]):hover { color: var(--color-text); }
.news-carousel__btn[disabled] { color: rgba(0, 0, 0, 0.22); opacity: 0.4; cursor: default; }


.news-card {
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform var(--transition);
}
.news-card:hover { transform: translateY(-4px); }
.news-card__media { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.news-card__body { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; }
.news-card__date { color: var(--color-green-ink); font-weight: 700; font-size: 0.85rem; }
.news-card__title { font-size: 1.25rem; margin: 0; }
.news-card__excerpt { color: var(--color-muted); margin: 0; }

/* ----------------------------------------------------------------------------
   SPOJME SE  (contact + newsletter)
   ---------------------------------------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }

.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin: 0 0 1.2rem; }
.form-row label { font-weight: 500; }
.contact-form input, .contact-form textarea, .newsletter input {
  font-family: inherit; font-size: 1rem; color: var(--color-text);
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.7rem 0.9rem; transition: border-color var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus, .newsletter input:focus {
  border-color: var(--color-green); outline: none;
}
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: var(--color-error-border); }

.form-status { margin: 0.8rem 0 0; font-weight: 500; min-height: 1.2em; }
.form-status.is-ok    { color: var(--color-green-ink); }
.form-status.is-error { color: var(--color-error); }

.contact__intro { color: var(--color-muted); }
.contact__details { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.contact__details li { display: flex; gap: 0.6rem; align-items: baseline; }
.contact__details .label { color: var(--color-green-ink); min-width: 7.5rem; font-weight: 500; }
.contact__social { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.contact__social a {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text); font-weight: 700;
}
.contact__social a:hover { background: var(--color-green); color: #000; }

.newsletter {
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.4rem; margin-top: 1rem;
}
.newsletter__title { font-size: 1.5rem; }
.newsletter__text { color: var(--color-muted); margin: 0 0 1rem; }
.newsletter__row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter__row input { flex: 1 1 180px; }

/* ----------------------------------------------------------------------------
   PŘÁTELÉ  (partners / parent parties)
   ---------------------------------------------------------------------------- */
.partners__intro, .partners__outro { text-align: center; max-width: 65ch; margin: 0 auto; color: var(--color-muted); }
.partners__outro { margin-top: 2rem; }
.partners-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); margin: 2rem 0; }
.partner-card {
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.6rem; text-align: center; border-top: 4px solid var(--accent, var(--color-green));
}
.partner-card--pirati { --accent: var(--pirati); }
.partner-card--zeleni { --accent: var(--color-green); }
.partner-card__name { font-size: 1.6rem; font-family: var(--font-display); }
.partner-card__links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }

/* ----------------------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------------------- */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding-block: 3rem 1.5rem; margin-top: 2rem; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); align-items: start; }
.site-footer__brand { display: flex; gap: 1rem; align-items: flex-start; color: var(--color-muted); max-width: 52ch; }
.site-footer__brand img { border-radius: 8px; flex-shrink: 0; }
.site-footer__brand p { margin: 0; }
.site-footer__nav { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__nav a { color: var(--color-text); }
.site-footer__nav a:hover { color: var(--color-green-ink); }
.site-footer__social { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.7rem; }
.site-footer__social a {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-surface-2); color: var(--color-text); font-weight: 700;
}
.site-footer__social a:hover { background: var(--color-green); color: #000; }
.site-footer__bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 0.9rem; text-align: center; }
.site-footer__credit { margin-top: 0.5rem; font-size: 0.82rem; color: var(--color-muted); max-width: 60ch; margin-inline: auto; }
.site-footer__credit a { color: var(--color-green-ink); text-decoration: underline; }
.site-footer__credit a:hover { text-decoration: none; }

/* ----------------------------------------------------------------------------
   BACK-TO-TOP BUTTON
   ---------------------------------------------------------------------------- */
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--color-green); color: #000; font-size: 1.4rem; font-weight: 700;
  box-shadow: var(--shadow); transition: transform var(--transition), opacity var(--transition);
}
.to-top:hover { transform: translateY(-3px); }

/* ----------------------------------------------------------------------------
   IMAGE PLACEHOLDERS  (the "add a photo here later" boxes)
   ---------------------------------------------------------------------------- */
.media-placeholder {
  position: relative; margin: 0; border-radius: var(--radius);
  border: 2px dashed var(--color-border); background:
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(1, 195, 109,0.06) 14px, rgba(1, 195, 109,0.06) 28px),
    var(--color-surface-2);
  display: grid; place-items: center; color: var(--color-muted); text-align: center; padding: 1rem;
  aspect-ratio: 4 / 3;
}
.media-placeholder::before { content: "📷"; font-size: 2.5rem; display: block; filter: grayscale(0.2); opacity: 0.6; }
.media-placeholder figcaption, .media-placeholder .ph-text { font-size: 0.9rem; margin-top: 0.5rem; }
.news-card__media.media-placeholder { aspect-ratio: 16 / 9; border-radius: 0; }

/* ----------------------------------------------------------------------------
   RESPONSIVE  —  phones & tablets
   The desktop menu turns into a slide-down panel below 880px.
   ---------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .menu-btn { display: flex; }            /* show the hamburger */
  .header-tools { margin-left: auto; }

  /* The menu becomes a full-width panel that drops down when opened */
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1rem 1rem; transform: translateY(-100%);
    /* visibility: hidden hides the panel completely when closed — prevents the last
       nav item from peeking above the dev-banner at translateY(-100%) bottom edge */
    visibility: hidden; pointer-events: none;
    transition: transform var(--transition), visibility 0s var(--transition);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open {
    transform: translateY(0);
    visibility: visible; pointer-events: auto;
    transition: transform var(--transition), visibility 0s; /* no delay when opening */
  }
  .main-nav a { padding: 0.9rem 0.5rem; border-bottom: 1px solid var(--color-border); }
  .main-nav a::after { display: none; }

  .hero__inner { flex-direction: column-reverse; text-align: center; }
  .hero__tagline { margin-inline: auto; }
  .hero__cta { justify-content: center; }

  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }
  /* On mobile: show the team photo above the body text, full-bleed to the screen edges */
  .about__photo {
    order: -1;
    margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem)); /* cancel the container padding */
    border-radius: 0;
  }
  .about__photo img { height: auto; }
  .program-list,
  .partners-list { grid-template-columns: 1fr; }
  .program-card__body { padding-left: 1.4rem; }

  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .candidates-other__item { grid-template-columns: 2.2rem 4.5rem 1fr; }
  .candidates-other__prof { display: none; }

  .event { padding-left: 60px; }
  .events::before { left: 20px; }
  .event__dot { left: 11px; }
  .event--nearest .event__dot { left: 8px; width: 22px; height: 22px; top: 3px; }
  .event--nearest .event__title { font-size: 1.2rem; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  /* Kicker pill was wrapping to two lines at phone widths — shrink it
     enough to stay on one line rather than let it wrap awkwardly. */
  .hero__kicker { font-size: 0.7rem; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; white-space: nowrap; }
  /* Push the CTA row further down so it clears the buildings and lands
     in the vineyard band, matching the desktop layout. hero__inner's
     min-height is a floor, not a cap, so this margin is free to grow
     the section rather than fight the space-between distribution. */
  .hero__cta { margin-top: 5rem; }

  .people-grid { grid-template-columns: 1fr; gap: 1rem; }
  .person {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
  }
  .news-cards { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   ACCESSIBILITY: respect "reduce motion" OS setting
   (turns off animations / the 3D flip spin for people who get motion sickness)
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* "Kde volit?" link below the events timeline */
.where-to-vote { text-align: center; margin-top: 2.5rem; }

/* Honeypot field — hidden via stylesheet to avoid CSP unsafe-inline */
.honeypot { display: none; }

/* Noscript fallback message (avoids inline style which would need CSP unsafe-inline) */
.noscript-msg { padding: 1rem; text-align: center; background: var(--color-green); color: #000; }

/* ----------------------------------------------------------------------------
   PRINT STYLESHEET
   Voters who print the programme page get readable black-on-white output.
   ---------------------------------------------------------------------------- */
@media print {
  /* White background, black text throughout */
  *, *::before, *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide: interactive chrome, web-only instructions, empty placeholders */
  .dev-banner,
  .site-header,
  .hero__cta,
  .lang-toggle,
  .menu-btn,
  .to-top,
  .site-footer__social,
  .site-footer__nav,
  .skip-link,
  .events__nav,
  .about__photo,
  [data-placeholder],
  .program-card__chevron { display: none !important; }

  /* Hero: compact — just kicker + title, no full-page spread */
  .hero {
    min-height: 0 !important;
    padding: 1.5rem 0 1rem !important;
    page-break-after: avoid;
  }
  .hero__title { font-size: 3rem !important; line-height: 1.1 !important; }
  .hero__kicker { font-size: 0.9rem !important; }
  .hero__tagline { font-size: 1rem !important; margin-top: 0.25rem !important; }

  /* Program lead "Klikněte na bod..." is web-only — hide it */
  #program .section__lead { display: none !important; }

  /* Program cards: remove card chrome, show as plain sections */
  .program-card { border: none !important; border-radius: 0 !important; padding: 0 !important; margin-bottom: 1.5rem !important; }
  .program-card summary { list-style: none !important; cursor: default !important; }
  .program-card__body { padding: 0 !important; margin-top: 0.4rem !important; }

  /* Decent typography */
  body { font-size: 11pt; line-height: 1.6; }
  h1, h2, h3 { page-break-after: avoid; }
  section { page-break-inside: auto; }
  p { orphans: 3; widows: 3; }

  /* Show URLs after external links */
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--color-muted) !important; }
  a[href^="#"]::after { content: ""; }

  /* Footer: just the copyright line, no dividers */
  .site-footer__inner { display: none !important; }
  .site-footer__bottom { border-top: none !important; }
}
