/* ==========================================================================
   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 are mixed from our logo + the two parent parties:
     black background (Piráti) · violet · yellow (Piráti) · lime green (Zelení)
   ========================================================================== */

/* ----------------------------------------------------------------------------
   DESIGN TOKENS  —  ⭐ the one place to change colours, fonts and spacing
   ---------------------------------------------------------------------------- */
:root {
  /* Brand colours */
  --color-bg:        #0a0a0a;   /* page background (almost black) */
  --color-surface:   #141414;   /* slightly lighter panels / alternating sections */
  --color-surface-2: #1d1b22;   /* cards (a hint of violet) */
  --color-text:      #f4f4f5;   /* main text */
  --color-muted:     #b5b5bd;   /* secondary / quieter text */

  --color-violet:      #7a2e8e; /* Piráti-ish purple, from our logo */
  --color-violet-soft: #c79bd8; /* lighter violet — used for small text on dark */
  --color-yellow:      #f2c500; /* Piráti yellow — our main accent */
  --color-green:       #8dc540; /* Zelení lime green — call-to-action / "ON" */
  --color-green-dark:  #6fa72f; /* green hover state */

  /* Party tag colours */
  --pirati:  var(--color-yellow);
  --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(0, 0, 0, 0.45);
  --shadow-sm:  0 4px 14px rgba(0, 0, 0, 0.35);
  --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-yellow); 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-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-yellow); }

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, .brand__name, .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-yellow); 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); 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-yellow); color: #000; }
.btn--primary:hover { background: #ffd633; color: #000; }

.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-violet-soft); }
.btn--ghost:hover { background: var(--color-violet); color: #fff; border-color: var(--color-violet); }

/* ----------------------------------------------------------------------------
   THE TOGGLE-SWITCH MOTIF  (echoes the "ON" switch in our logo)
   ---------------------------------------------------------------------------- */
.toggle-switch {
  display: inline-flex; align-items: center;
  width: 2.1em; height: 1.1em; padding: 0.12em;
  background: #2a2a2a; border-radius: var(--radius-pill); vertical-align: middle;
  box-shadow: 0 0 0 2.5px rgba(141, 197, 64, 0.4);
}
.toggle-switch__knob {
  width: 0.86em; height: 0.86em; margin-left: auto; /* knob on the right = ON */
  background: var(--color-green); border-radius: 50%;
  box-shadow: 0 0 8px var(--color-green);
}

/* ----------------------------------------------------------------------------
   HEADER + NAVIGATION
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #242424;
}
.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__logo { width: 44px; height: 44px; border-radius: 8px; }
.brand__svg  { height: 40px; width: auto; display: block; }
.brand__name { font-size: 1.5rem; line-height: 1; }
.brand__on { color: var(--color-green); }

/* 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-yellow); transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.main-nav a:hover, .main-nav a.is-current { color: var(--color-yellow); }
.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: #222; border: 1px solid #333; 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-yellow); 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;
  border-top: 3px solid var(--color-green);
  border-bottom: 3px solid var(--color-green);
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(122, 46, 142, 0.35), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(141, 197, 64, 0.18), transparent 60%),
    linear-gradient(to right, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.50) 100%),
    url('../header-photo.jpg') center / cover no-repeat;
}
.hero__inner {
  display: flex; align-items: center; gap: var(--gap);
  padding-block: clamp(3rem, 9vw, 7rem);
}
.hero__text { flex: 1 1 60%; }
.hero__kicker {
  display: inline-block; margin: 0 0 1rem;
  color: var(--color-green); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.9rem; border: 1px solid rgba(141, 197, 64, 0.4); border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
}
.hero__title { font-size: clamp(3rem, 11vw, 7rem); margin: 0; }
.hero__title > span:first-child {
  background: linear-gradient(90deg, var(--color-violet-soft), var(--color-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__on { display: inline-flex; align-items: center; gap: 0.3em; color: var(--color-green); }
.hero__toggle { display: flex; margin: 0.75rem 0 0; font-size: clamp(2rem, 6vw, 3.5rem); }
.hero__tagline { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--color-muted); max-width: 30ch; margin: 1rem 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.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(122, 46, 142, 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 (toggle-switch vibe) */
.section__title::after {
  content: ""; display: block; width: 64px; height: 4px; margin: 0.5rem auto 0;
  background: linear-gradient(90deg, var(--color-violet), 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)
   ---------------------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gap); align-items: center; }
.about__text p { margin: 0 0 1rem; font-size: 1.08rem; }
.about__text p:first-child { font-size: 1.3rem; color: #fff; } /* lead-in sentence stands out */
.about__photo { min-height: 320px; }

/* ----------------------------------------------------------------------------
   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 #2a2730; 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-yellow); 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); 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 flip-cards — the elephant → photo feature)
   ---------------------------------------------------------------------------- */
.people-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.person { text-align: center; }

/* The clickable flip area. It is a real <button> so the keyboard works too.
   The button itself carries the size (aspect-ratio) and is the positioning
   anchor; the inner + faces absolutely fill it. We deliberately DON'T use
   height:100% on the inner, because a percentage height does not reliably
   resolve against a parent sized only by aspect-ratio (that bug made the
   elephant invisible). */
.flip-card {
  position: relative;             /* anchor for the absolutely-filled inner */
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 1000px;            /* gives the 3D depth */
  aspect-ratio: 3 / 4; margin-bottom: 1rem;
}
.flip-card__inner {
  position: absolute; inset: 0;   /* fills the button reliably, no %-height guesswork */
  transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); } /* the flip */

.flip-card__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.flip-card__face--front { background: #000; border: 1px solid #2a2730; }
.flip-card__face--front img { width: 80%; height: 80%; object-fit: contain; } /* whole elephant */
.flip-card__face--back { transform: rotateY(180deg); background: #000; }
.flip-card__face--back img { width: 100%; height: 100%; object-fit: cover; } /* fill with the photo */

/* little "click to reveal" hint on the elephant face */
.flip-card__hint {
  position: absolute; bottom: 0.6rem; left: 50%; transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7); color: var(--color-yellow); font-size: 0.8rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: var(--radius-pill); white-space: nowrap;
}
.flip-card.is-flipped .flip-card__hint { opacity: 0; }
/* On true pointer/mouse devices: hover over the whole card flips it to the photo */
@media (hover: hover) {
  .flip-card:hover .flip-card__inner {
    transform: rotateY(180deg);
    box-shadow: 0 0 0 2px var(--color-green), var(--shadow);
  }
}

.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-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.7rem; border-radius: var(--radius-pill); color: #000; }
.party-tag--pirati { background: var(--pirati); }
.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 #2a2730; 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(255, 255, 255, 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-violet), 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-yellow); font-weight: 700; font-size: 0.95rem; }
.event__title { font-size: 1.2rem; margin: 0.15rem 0; }
.event__place { color: var(--color-violet-soft); font-size: 0.95rem; }
.event__desc  { color: var(--color-muted); margin: 0.2rem 0 0; }
.event--past { opacity: 0.55; }
.event--past .event__dot { background: #555; box-shadow: 0 0 0 2px #555; }
/* 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(141, 197, 64, 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: #444; 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); 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: #2a2730; 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);
  transition: color var(--transition);
  padding: 0;
}
.news-carousel__btn:not([disabled]):hover { color: var(--color-text); }
.news-carousel__btn[disabled] { color: rgba(255, 255, 255, 0.18); opacity: 0.4; cursor: default; }

/* oldest card grayed — signals the end of available content */
.news-card--oldest { opacity: 0.45; filter: grayscale(55%); }

.news-card {
  background: var(--color-surface-2); border: 1px solid #2a2730; 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; }
.news-card__body { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; }
.news-card__date { color: var(--color-yellow); 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 #333; 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: #e0556b; }

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

.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-violet-soft); 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 #2a2730; 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 #2a2730; 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 #2a2730; border-radius: var(--radius);
  padding: 1.6rem; text-align: center; border-top: 4px solid var(--accent, var(--color-green));
}
.partner-card--pirati { --accent: var(--color-yellow); }
.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: #060606; border-top: 1px solid #1e1e1e; 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: 40ch; }
.site-footer__brand img { border-radius: 8px; }
.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-yellow); }
.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 #1e1e1e; color: var(--color-muted); font-size: 0.9rem; text-align: center; }

/* ----------------------------------------------------------------------------
   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-yellow); 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 #3a3640; background:
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(122,46,142,0.06) 14px, rgba(122,46,142,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.8; }
.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: #0d0d0d; border-bottom: 1px solid #242424;
    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 #1c1c1c; }
  .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; }
  .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) {
  .brand__name { font-size: 1.2rem; }
  .people-grid { grid-template-columns: 1fr; }
  .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; }
  .flip-card__inner { transition: none; }
}
