/* =========================================================
   KDU-ČSL Pustiměř – vizuál „Noví lidovci“ 2026
   Barvy převzaty z oficiálního webu novi-lidovci.cz.
   Oficiální písmo „Owners“ (Adobe Fonts) je licencované –
   web používá systémový font stack; licencovaný webfont
   lze později doplnit do --font-heading.
   ========================================================= */

:root {
    --c-yellow: #fff84d;
    --c-yellow-light: #fffdd3;
    --c-peach: #ffbc7d;
    --c-black: #000;
    --c-ink: #141414;
    --c-white: #fff;
    --c-gray-100: #f4f4f4;
    --c-gray-300: #d9d9d9;
    --c-gray-600: #626262;

    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-body);

    --radius: 16px;
    --radius-pill: 999px;
    --container: 1140px;
    --gutter: 1.25rem;
    --section-y: clamp(2.5rem, 6vw, 5rem);
    --shadow-sticker: 6px 6px 0 var(--c-yellow);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--c-ink);
    background: var(--c-white);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--c-yellow); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 4.5vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--c-black); outline-offset: 3px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--c-yellow); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.skip-link {
    position: absolute; left: 1rem; top: -100%;
    padding: 0.5rem 1rem; background: var(--c-black); color: var(--c-yellow);
    font-weight: 700; z-index: 100;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Header + navigace ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--c-white);
    border-bottom: 3px solid var(--c-black);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 4.5rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; padding: 0.6rem 0; }
.brand__logo { width: auto; height: 2.75rem; }
.brand__place {
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.95rem;
    padding: 0.1rem 0.5rem; background: var(--c-yellow); border-radius: 4px;
}

.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav__list a {
    display: block; padding: 0.55rem 0.9rem;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.95rem;
    text-decoration: none; border-radius: var(--radius-pill);
    transition: background-color 0.15s ease;
}
.nav__list a:hover { background: var(--c-yellow-light); }
.nav__list a.is-active { background: var(--c-yellow); }

.nav-toggle {
    display: none; width: 2.75rem; height: 2.75rem; padding: 0.6rem;
    background: transparent; border: 2px solid var(--c-black); border-radius: 8px; cursor: pointer;
    flex-direction: column; justify-content: center; gap: 0.35rem;
}
.nav-toggle__bar { display: block; height: 3px; background: var(--c-black); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(0.53rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-0.53rem) rotate(-45deg); }

@media (max-width: 767px) {
    .nav-toggle { display: flex; }
    .nav { display: none; flex-basis: 100%; padding-bottom: 0.75rem; }
    .nav--open { display: block; }
    .nav__list { flex-direction: column; gap: 0.15rem; }
    .nav__list a { padding: 0.8rem 1rem; border-radius: 10px; }
    .brand__logo { height: 2.25rem; }
}

/* ---------- Tlačítka ---------- */
.btn {
    display: inline-block; padding: 0.85em 1.6em;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.95rem;
    text-decoration: none; border-radius: var(--radius-pill);
    background: var(--c-black); color: var(--c-white); border: 2px solid var(--c-black);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--c-yellow); }
.btn--outline { background: transparent; color: var(--c-black); }
.btn--yellow { background: var(--c-yellow); color: var(--c-black); border-color: var(--c-yellow); }
.btn--yellow:hover { box-shadow: 4px 4px 0 var(--c-white); }
.btn--white { background: var(--c-white); color: var(--c-black); border-color: var(--c-white); }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Sekce ---------- */
.section { padding-block: var(--section-y); }
.section--alt { background: var(--c-gray-100); }
.section--yellow { background: var(--c-yellow); }
.section--dark { background: var(--c-black); color: var(--c-white); }
.section--dark a:hover { text-decoration-color: var(--c-yellow); }

.section__title { position: relative; padding-bottom: 0.9rem; margin-bottom: 1.25rem; }
.section__title::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 4.5rem; height: 0.4rem; background: var(--c-yellow); border-radius: 2px;
}
.section--yellow .section__title::after { background: var(--c-black); }
.section__lead { font-size: 1.2rem; max-width: 46rem; color: var(--c-gray-600); }
.section--dark .section__lead { color: rgb(255 255 255 / 0.8); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section__head .section__title { margin-bottom: 0; }

.page-head { padding-block: var(--section-y) 0; }
.page-head__kicker {
    display: inline-block; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem;
    background: var(--c-yellow); padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 1rem;
}

/* ---------- Hero ---------- */
.hero { background: var(--c-yellow); padding-block: clamp(2.5rem, 7vw, 6rem); overflow: hidden; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.15fr 1fr; } }
.hero__kicker { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; margin-bottom: 1rem; }
.hero__title { margin-bottom: 1.25rem; }
.hero__lead { font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.35rem); max-width: 34rem; margin-bottom: 2rem; }
.hero__media {
    border: 3px solid var(--c-black); border-radius: var(--radius); overflow: hidden;
    box-shadow: 10px 10px 0 var(--c-black); aspect-ratio: 4 / 5; background: var(--c-gray-100);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-photo { aspect-ratio: 3 / 2; }
.team-photo img { object-fit: contain; object-position: center; }
.team-photo--compact {
    width: min(100%, 262.5px);
    height: 350px;
    aspect-ratio: 3 / 4;
}
.team-callout { gap: 1.5rem; }
@media (min-width: 900px) {
    .team-callout { grid-template-columns: 262.5px minmax(0, 1fr); }
}

/* ---------- Karty a mřížky ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    position: relative; display: flex; flex-direction: column;
    padding: 1.5rem; background: var(--c-white); color: var(--c-ink);
    border: 2px solid var(--c-black); border-radius: var(--radius);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:has(a.card__link:hover), .card:has(a.card__link:focus-visible) { transform: translate(-3px, -3px); box-shadow: var(--shadow-sticker); }
.card__title { margin-bottom: 0.5rem; font-size: 1.25rem; }
.card__text { flex: 1; color: var(--c-gray-600); margin-bottom: 1rem; }
.card__link { font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem; text-decoration: none; }
.card__link::after { content: " →"; }
/* Celá karta je klikatelná přes pseudo-element odkazu */
.card__link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__icon {
    width: 3rem; height: 3rem; margin-bottom: 1rem;
    display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
    background: var(--c-yellow); border-radius: 12px;
}

.badge {
    display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 0.6rem;
    font-weight: 800; font-size: 1.2rem; background: var(--c-yellow); color: var(--c-black);
    border: 2px solid var(--c-black); border-radius: var(--radius-pill);
}

/* ---------- Seznam s odrážkami (program, výhody) ---------- */
.list-check { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.list-check li { position: relative; padding-left: 2rem; margin-bottom: 0.85rem; }
.list-check li::before {
    content: ""; position: absolute; left: 0; top: 0.45em;
    width: 1.1rem; height: 1.1rem; background: var(--c-yellow);
    border: 2px solid var(--c-black); border-radius: 4px;
}
.list-check--lg li { font-size: 1.1rem; }

/* ---------- Program ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.subnav a {
    display: inline-block; padding: 0.45rem 0.9rem; font-size: 0.9rem; font-weight: 700;
    border: 2px solid var(--c-black); border-radius: var(--radius-pill); text-decoration: none;
    background: var(--c-white);
}
.subnav a:hover { background: var(--c-yellow); }

.program-section { padding-block: 2.5rem; border-top: 2px solid var(--c-gray-300); scroll-margin-top: 6rem; }
.program-section:first-of-type { border-top: 0; }
.program-section__grid { display: grid; gap: 1.5rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .program-section__grid { grid-template-columns: 1fr 2fr; } }
.program-section__num { display: block; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.1em; color: var(--c-gray-600); margin-bottom: 0.5rem; }
.program-section h2 { position: sticky; top: 5.5rem; }

/* ---------- Tým ---------- */
.team-card { text-align: left; }
.team-card__photo {
    display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
    border-radius: 12px; border: 2px solid var(--c-black); background: var(--c-gray-100); margin-bottom: 1rem;
}
.team-card__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.team-card__head h3 { margin: 0; }
.team-card__meta { color: var(--c-gray-600); font-size: 0.95rem; margin-bottom: 0.6rem; }
.team-card__text { margin: 0; }

/* ---------- Kontakt ---------- */
.contact-list { margin: 0; }
.contact-list dt { font-weight: 800; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--c-gray-600); margin-top: 0.75rem; }
.contact-list dd { margin: 0; font-size: 1.05rem; }
.map-placeholder {
    display: block; border: 2px solid var(--c-black); border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 16 / 9; background: var(--c-gray-100);
}
.map-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Banner (termín voleb) ---------- */
.banner { background: var(--c-black); color: var(--c-white); padding-block: 2.5rem; }
.banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.banner h2 { margin: 0; color: var(--c-yellow); }
.banner p { margin: 0.35rem 0 0; font-size: 1.1rem; }

/* ---------- Patička ---------- */
.site-footer { background: var(--c-black); color: var(--c-white); margin-top: auto; }
.site-footer__grid { display: grid; gap: 2rem; padding-block: 3rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__logo { height: 2.75rem; width: auto; margin-bottom: 1rem; filter: invert(1); }
.site-footer__heading { font-size: 0.9rem; letter-spacing: 0.1em; color: var(--c-yellow); margin-bottom: 0.75rem; }
.site-footer__address { line-height: 1.8; }
.site-footer__links { list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; text-decoration-color: var(--c-yellow); }
.site-footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.2); padding-block: 1rem; font-size: 0.9rem; color: rgb(255 255 255 / 0.7); }
.site-footer__bottom p { margin: 0; }

/* ---------- Layout těla (patička dole i na krátkých stránkách) ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ---------- Přístupnost / pohyb ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
