/* ===================================================================
 * Obec Martinice v Krkonoších - hlavní stylesheet
 * Inspirováno designem z claude.ai/design (handoff bundle)
 * =================================================================== */

:root {
    --blue-900: #0f2d56;
    --blue-800: #163d72;
    --blue-700: #1e5bab;
    --blue-50:  #eef3fb;
    --gold-600: #c98712;
    --gold-500: #e5a82f;
    --gold-400: #f0c258;
    --gold-50:  #fbf3df;
    --ink:      #1a1d21;
    --ink-2:    #3a3f47;
    --muted:    #6b727c;
    --line:     #e6e3dc;
    --paper:    #fafaf6;
    --paper-2:  #f3f1ea;
    --white:    #ffffff;

    --radius:    14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 45, 86, .06), 0 1px 1px rgba(15, 45, 86, .04);
    --shadow:    0 8px 24px -12px rgba(15, 45, 86, .18), 0 2px 6px rgba(15, 45, 86, .06);
    --shadow-lg: 0 30px 60px -30px rgba(15, 45, 86, .35);
    --maxw:      1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-size: 16.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
}
h1 {
    font-size: clamp(2.5rem, 5.2vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-weight: 500;
}
h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
h3 { font-size: 1.2rem; line-height: 1.25; }
p  { margin: 0 0 .8em; }

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

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

.eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .74rem;
    font-weight: 600;
    color: var(--blue-700);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--blue-700);
}

/* ===== UTILITY BAR ===== */
.utility {
    background: var(--blue-900);
    color: #cdd9ec;
    font-size: .82rem;
}
.utility .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.utility a       { color: #e8eef9; }
.utility .util-left  { display: flex; gap: 22px; flex-wrap: wrap; }
.utility .util-right { display: flex; gap: 14px; align-items: center; }
.util-right .pill {
    border: 1px solid rgba(255, 255, 255, .22);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .74rem;
    color: #fff;
    text-decoration: none;
    transition: all .15s;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.util-right a.pill:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .42);
    color: #fff;
}

/* ===== NAV ===== */
/*
   Hero/expanded režim: na samém vrchu stránky (data-scrolled="0") je hlavička průhledná,
   logo je veliké (96px) a vizuálně přečuhuje pod hlavičku do hero sekce.
   Sticky/compact režim: jakmile uživatel scrolluje (data-scrolled="1"), hlavička se
   změní na bílý sticky pruh + logo se smrští na 42px. Přechod je smooth.
   Kompaktní stav je default (žádné JS = vše OK), JS jen přidá expanded třídu nahoře.
*/
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000; /* nad Leaflet popupy (default ~700) i nad běžným obsahem */
    backdrop-filter: saturate(140%) blur(8px);
    background-color: rgba(255, 255, 255, .92);
    transition: background-color .25s ease, border-color .25s ease, padding .25s ease;
}

/* Leaflet — uzavřít stacking context, aby popup/control nikdy nepřekryly horní lištu. */
.leaflet-container {
    isolation: isolate;
    z-index: 0;
}
.nav[data-scrolled="0"] {
    background-color: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
}
.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 24px;
}
/* Expanded režim NEZVĚTŠUJE výšku hlavičky — padding a wrapper rozměr zůstávají
   stejné jako v compact módu. Větší logo se naopak nechá vyčuhovat pod hlavičku
   pomocí position:absolute (overflow:visible na wrapperu). */

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #000;
}
.brand:hover,
.brand:focus,
.brand:visited  { text-decoration: none; color: #000; }

/* Logo — wrapper drží FIXNÍ layout 46×46 (= výška hlavičky se nemění).
   Obrázek je naturálně 46×50 a v expanded režimu ho jen TRANSFORMEM zvětšíme
   a posuneme dolů. Žádná animace width/height/top → žádný layout-jitter,
   čistě GPU akcelerovaný transform na single property. */
.brand-logo-wrap {
    position: relative;
    width: 46px;
    height: 50px;
    flex-shrink: 0;
    overflow: visible; /* img při scale přesahuje dolů do hero sekce */
    z-index: 2;        /* nad případným pozadím hero sekce */
}
.brand img {
    display: block;
    width: 46px;
    height: 50px;
    object-fit: contain;
    transform-origin: center 30%; /* anchor pro scale/translate */
    transition: transform .35s cubic-bezier(.4,0,.2,1),
                filter .35s ease;
    will-change: transform;
}

/* === EXPANDED stav (top of page) — pouze transform + filter, žádný layout shift === */
.nav[data-scrolled="0"] .brand img {
    /* scale ~1.9 = vizuálně cca 88×95 px, translateY(35%) posune dolů pod hlavičku,
       translateX(-22%) odsadí znak vlevo, ať nezakrývá název obce. */
    transform: scale(1.9) translate(-22%, 35%);
    filter: drop-shadow(0 10px 20px rgba(15, 45, 86, 0.28));
}
/* V expanded režimu zvětšíme gap mezi znakem a textem (a posuneme b-text mírně vpravo)
   aby zvětšený znak nezasahoval do názvu obce. */
.nav[data-scrolled="0"] .brand { gap: 26px; }
.nav[data-scrolled="0"] .brand .b-text { padding-left: 6px; }

.brand .b-text { display: flex; flex-direction: column; line-height: 1.05; color: #000; }
.brand .b-name {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: #000;
}
.brand .b-sub {
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #000;
}

/* Reduce-motion uživatelé: nech logo statické v compact režimu, žádné animace */
@media (prefers-reduced-motion: reduce) {
    .nav, .nav .container, .brand, .brand-logo-wrap, .brand img, .brand .b-name { transition: none !important; }
}

/* Mobil: vypneme expanded efekt — logo by jinak zakrývalo menu/burger button */
@media (max-width: 720px) {
    .nav[data-scrolled="0"] .brand img {
        transform: none;
        filter: none;
    }
}

.menu  { display: flex; gap: 6px; align-items: center; }
.menu a {
    color: var(--ink-2);
    padding: 9px 13px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .93rem;
}
.menu a:hover {
    background: var(--paper-2);
    text-decoration: none;
    color: var(--ink);
}
.menu .cta {
    background: var(--blue-700);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
}
.menu .cta:hover { background: var(--blue-800); }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.menu-toggle svg { display: block; }

/* ===== HERO ===== */
.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -2;
    transform: scale(1.05);
}
.hero .bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 45, 86, .55) 0%, rgba(15, 45, 86, .25) 35%, rgba(15, 45, 86, .75) 100%),
        linear-gradient(90deg, rgba(15, 45, 86, .55) 0%, rgba(15, 45, 86, 0) 60%);
}
.hero-inner {
    padding: 90px 0 110px;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 48px;
    align-items: end;
}
.hero h1            { color: #fff; max-width: 14ch; }
.hero h1 .accent    { color: var(--gold-400); font-style: italic; font-weight: 400; }
.hero .lead {
    color: rgba(255, 255, 255, .92);
    font-size: 1.12rem;
    max-width: 48ch;
    margin-top: 20px;
}
.hero-eyebrow {
    color: var(--gold-400);
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .22em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.hero-eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--gold-400);
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.btn:hover     { transform: translateY(-1px); text-decoration: none; }
.btn-gold      { background: var(--gold-500); color: #1a1206; }
.btn-gold:hover { background: var(--gold-400); }
.btn-ghost {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.hero-card {
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    box-shadow: var(--shadow-lg);
    align-self: end;
    margin-bottom: 8px;
    backdrop-filter: blur(8px);
}
.hero-card .eyebrow         { color: var(--gold-600); }
.hero-card .eyebrow::before { background: var(--gold-600); }
.hero-card h3               { margin: 10px 0 6px; font-size: 1.35rem; }
.hero-card .meta {
    font-size: .85rem;
    color: var(--muted);
    display: flex;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.hero-card .meta strong { color: var(--ink); font-weight: 600; }
.hero-card .arrow {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--blue-700);
    font-size: .92rem;
}

.hero-stats { position: relative; margin-top: -50px; z-index: 5; }
.stats-grid {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}
.stat            { padding: 26px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num {
    font-family: 'Fraunces', serif;
    font-size: 2.3rem;
    font-weight: 500;
    color: var(--blue-800);
    letter-spacing: -0.02em;
    line-height: 1;
}
.stat .num .unit {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 4px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
}
.stat .lbl {
    font-size: .82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-top: 8px;
    font-weight: 500;
}

/* ===== SECTIONS ===== */
section.s         { padding: 90px 0; }
section.s.tight   { padding: 70px 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 44px;
    flex-wrap: wrap;
}
.section-head .lead { color: var(--muted); max-width: 50ch; margin-top: 14px; }
.all-link {
    font-weight: 600;
    font-size: .92rem;
    color: var(--blue-700);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid transparent;
}
.all-link:hover { text-decoration: none; border-color: var(--blue-700); }

/* ===== AKTUALITY + ÚŘEDNÍ DESKA ===== */
.news-layout {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 36px;
    align-items: start;
}
.news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.news-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    color: var(--ink);
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #dcd6c8;
    text-decoration: none;
}
.news-card .thumb {
    aspect-ratio: 16/10;
    margin: -22px -22px 18px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(135deg, #1e5bab, #0f2d56);
    position: relative;
    overflow: hidden;
}
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .thumb.placeholder {
    background: linear-gradient(135deg, var(--ph-from, var(--blue-700)) 0%, var(--ph-to, var(--blue-900)) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 22px;
    overflow: hidden;
    position: relative;
}
.news-card .thumb.placeholder::before {
    content: "";
    position: absolute;
    top: -30%; right: -20%;
    width: 70%; height: 160%;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.news-card .thumb.placeholder::after {
    content: "";
    position: absolute;
    bottom: 12px; right: 16px;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background:
        linear-gradient(45deg, transparent 47%, rgba(255,255,255,.35) 47%, rgba(255,255,255,.35) 53%, transparent 53%),
        linear-gradient(-45deg, transparent 47%, rgba(255,255,255,.35) 47%, rgba(255,255,255,.35) 53%, transparent 53%);
    pointer-events: none;
}
.news-card .thumb.placeholder .ph-mark {
    font-family: 'Fraunces', Georgia, serif;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: rgba(255,255,255,.65);
    font-weight: 500;
    z-index: 1;
}
.news-card .thumb.placeholder .ph-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Defense pro dlouhá slova bez mezer. */
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

/* Variant palettes - cycled by title hash */
.news-card .thumb.placeholder.v1 { --ph-from: #1e5bab; --ph-to: #0f2d56; }
.news-card .thumb.placeholder.v2 { --ph-from: #c98712; --ph-to: #7d4f08; }
.news-card .thumb.placeholder.v3 { --ph-from: #163d72; --ph-to: #2a5d9e; }
.news-card .thumb.placeholder.v4 { --ph-from: #3b6e3a; --ph-to: #1f3d1f; }
.news-card .thumb.placeholder.v5 { --ph-from: #8a4f1d; --ph-to: #4a2a0f; }
.news-card .thumb.placeholder.v6 { --ph-from: #1e5bab; --ph-to: #c98712; }
.news-card .date { font-size: .8rem; color: var(--muted); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.news-card .tag {
    display: inline-block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--blue-700);
    background: var(--blue-50);
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 600;
    margin-bottom: 8px;
    align-self: flex-start;
}
.news-card h3   {
    font-size: 1.15rem;
    margin: 8px 0 8px;
    line-height: 1.25;
    /* Dlouhé slovo (např. "elektrospotřebičů") nesmí přečuhovat ven z karty. */
    overflow-wrap: anywhere;
    word-break: break-word;
}
.news-card p    {
    color: var(--muted);
    font-size: .94rem;
    flex-grow: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.news-card .more { margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--blue-700); }

.news-card.feat {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    padding: 0;
    overflow: hidden;
}
.news-card.feat .thumb { margin: 0; aspect-ratio: auto; border-radius: 0; min-height: 280px; }
.news-card.feat .thumb.placeholder { padding: 32px; }
.news-card.feat .thumb.placeholder .ph-title { font-size: 1.45rem; -webkit-line-clamp: 6; }
.news-card.feat .thumb.placeholder .ph-mark  { font-size: .85rem; }
.news-card.feat .thumb.placeholder::after    { width: 56px; height: 56px; bottom: 22px; right: 24px; }
.news-card.feat .body  { padding: 32px; display: flex; flex-direction: column; }
.news-card.feat h3     { font-size: 1.55rem; }

/* Úřední deska */
.urad-desk {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: 80px;
}
.urad-desk .head {
    background: var(--blue-900);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.urad-desk .head .ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-500);
    color: var(--blue-900);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: 'Fraunces', serif;
}
.urad-desk .head h3   { color: #fff; font-size: 1.2rem; }
.urad-desk .head .sub { color: rgba(255, 255, 255, .7); font-size: .78rem; }
.urad-list { list-style: none; margin: 0; padding: 0; }
.urad-list li {
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}
.urad-list li:last-child { border-bottom: none; }
.urad-list a { color: inherit; display: contents; }
.urad-list a:hover .what .t { color: var(--blue-700); }
.urad-list .when {
    width: 54px;
    text-align: center;
    background: var(--paper-2);
    border-radius: 8px;
    padding: 8px 4px;
    font-family: 'Fraunces', serif;
}
.urad-list .when .d { font-size: 1.3rem; font-weight: 600; color: var(--ink); line-height: 1; }
.urad-list .when .m {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .1em;
    margin-top: 3px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.urad-list .what    { font-size: .93rem; }
.urad-list .what .t { font-weight: 600; color: var(--ink); display: block; margin-bottom: 3px; line-height: 1.35; }
.urad-list .what .meta { font-size: .78rem; color: var(--muted); }
.urad-list .what .meta .dot { margin: 0 6px; opacity: .5; }
.urad-foot {
    padding: 18px 24px;
    background: var(--paper-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.urad-foot a { font-weight: 600; font-size: .9rem; }

/* ===== O OBCI ===== */
.about           { background: var(--paper-2); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about .image-stack {
    position: relative;
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    justify-self: end;
}
.about .image-stack .img-main {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about .image-stack .znak-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: #fff;
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 170px;
    text-align: center;
}
.about .image-stack .znak-card img { width: 80px; height: auto; margin: 0 auto 10px; }
.about .image-stack .znak-card .lbl {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--muted);
    font-weight: 600;
}
.about .image-stack .znak-card .name {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: .95rem;
    margin-top: 2px;
}

.about p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 50ch; }
.about p      { color: var(--ink-2); }
.info-row {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding-top: 30px;
}
.info-row .k {
    font-size: .75rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .14em;
    font-weight: 600;
}
.info-row .v {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--blue-800);
    margin-top: 4px;
    letter-spacing: -0.01em;
}
.info-row .v small {
    font-size: .85rem;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin-left: 4px;
}

/* ===== ÚŘAD ===== */
.office-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; }
.office-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
}
.office-card.dark {
    color: #fff;
    border: none;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(229, 168, 47, .15) 0%, transparent 50%),
        linear-gradient(160deg, var(--blue-800) 0%, var(--blue-900) 100%);
}
.office-card.dark h3 { color: #fff; }
.office-card .ico {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-700);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.office-card.dark .ico { background: rgba(255, 255, 255, .12); color: var(--gold-400); }
.office-card h3 { font-size: 1.25rem; margin-bottom: 14px; }
.office-card .hours {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 18px;
    font-size: .95rem;
}
.office-card .hours .day  { color: rgba(255, 255, 255, .8); font-weight: 500; }
.office-card.dark .hours .day { color: rgba(255, 255, 255, .6); }
.office-card .hours .time { font-variant-numeric: tabular-nums; font-weight: 500; }
.office-card .hours .time.closed { opacity: .55; }
.office-card .note {
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.contact-line { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: none; }
.contact-line .ico-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--paper-2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--blue-700);
}
.contact-line .k {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 600;
}
.contact-line .v { font-weight: 500; font-size: .96rem; margin-top: 2px; }

.people-list { display: grid; gap: 16px; }
.person {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: none; }
.person .ava {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #1a1206;
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.05rem;
    overflow: hidden;
}
.person .ava img { width: 100%; height: 100%; object-fit: cover; }
.person .role {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 600;
}
.person .name { font-weight: 600; margin-top: 2px; font-size: .95rem; }

/* Klikatelná verze person karty (vede na detail zastupitelstva) */
a.person.person-link {
    text-decoration: none;
    color: inherit;
    margin: 0 -8px;
    padding: 12px 8px;
    border-radius: 10px;
    transition: background-color .15s ease, transform .15s ease;
}
a.person.person-link:hover {
    background: var(--paper-2);
    text-decoration: none;
}
a.person.person-link:hover .ava {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(229,168,47,.35);
}
a.person.person-link .ava { transition: transform .15s ease, box-shadow .15s ease; }
a.person.person-link .ava-more {
    background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
    color: #fff;
}
a.person.person-link:hover .name { color: var(--blue-700); }
.person-arrow {
    margin-left: 6px;
    color: var(--blue-700);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s ease, transform .15s ease;
    display: inline-block;
}
a.person.person-link:hover .person-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== ŽIVOT V OBCI ===== */
.life-grid    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.life-card {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    isolation: isolate;
    background: #1e2530;
    transition: transform .25s ease;
    text-decoration: none;
}
.life-card:hover { transform: translateY(-3px); text-decoration: none; }
.life-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
}
.life-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(15, 45, 86, .1) 0%, rgba(15, 45, 86, .85) 100%);
}
.life-card .num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: .95rem;
    color: var(--gold-400);
    letter-spacing: .04em;
}
.life-card h3   { color: #fff; font-size: 1.5rem; margin-top: 8px; }
.life-card p    { color: rgba(255, 255, 255, .85); font-size: .92rem; margin-top: 8px; }
.life-card .arrow {
    margin-top: 14px;
    display: inline-flex;
    gap: 8px;
    font-weight: 600;
    font-size: .88rem;
    color: var(--gold-400);
}
.life-card.bg-image::before { /* image set via inline style */ }
.life-card.gradient_blue {
    background: linear-gradient(160deg, #1e5bab, #0f2d56);
}
.life-card.gradient_gold {
    background: linear-gradient(160deg, #c98712, #7d4f08);
}
.life-card.gradient_blue::before,
.life-card.gradient_gold::before { display: none; }

/* ===== AKCE ===== */
.events { background: var(--paper-2); }
.events-list { display: grid; gap: 14px; }
.event {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 24px;
    padding: 22px 26px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s ease, transform .15s ease;
    color: var(--ink);
}
.event:hover { border-color: var(--gold-500); transform: translateX(2px); text-decoration: none; }
.event .date {
    text-align: center;
    border-right: 1px solid var(--line);
    padding-right: 24px;
}
.event .date .d {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--blue-800);
    line-height: 1;
}
.event .date .m {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 600;
}
.event .body .t {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--ink);
}
.event .body .meta {
    color: var(--muted);
    font-size: .88rem;
    margin-top: 4px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.event .cta-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--paper-2);
    color: var(--blue-700);
    display: grid;
    place-items: center;
    transition: background .2s ease;
}
.event:hover .cta-arrow { background: var(--gold-500); color: var(--blue-900); }

/* ===== Zvýrazněná akce ===== */
.event--featured {
    border-color: var(--gold-500);
    border-width: 2px;
    background: linear-gradient(180deg, rgba(247, 195, 73, 0.06) 0%, var(--white) 60%);
    box-shadow: 0 6px 18px rgba(247, 195, 73, 0.18);
    position: relative;
}
.event--featured::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px var(--gold-500);
    opacity: 0;
    transition: opacity .2s ease;
}
.event--featured:hover::before { opacity: 1; }
.event-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--blue-900);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 8px;
}
.event-featured-badge svg { color: var(--blue-900); }

/* ===== DOKUMENTY ===== */
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.docs-col  { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.doc-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--ink);
    transition: background .15s ease;
}
.doc-link:hover { background: var(--paper-2); text-decoration: none; }
.doc-link .ext {
    font-family: ui-monospace, monospace;
    font-size: .7rem;
    font-weight: 600;
    background: var(--blue-50);
    color: var(--blue-700);
    padding: 3px 7px;
    border-radius: 5px;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.doc-link .ext.ext-doc,
.doc-link .ext.ext-docx { background: #fdf3df; color: #8a5a06; }
.doc-link .ext.ext-xls,
.doc-link .ext.ext-xlsx { background: #e6f5ec; color: #2c6e3a; }
.doc-link .ext.ext-zip  { background: #f1ecfb; color: #6b3fb3; }
.doc-link .ext.ext-link { background: #f3f1ea; color: #6b727c; }
.doc-link .arr { color: var(--muted); transition: transform .15s ease; }
.doc-link:hover .arr { transform: translateX(3px); color: var(--blue-700); }
.doc-link .t { font-weight: 500; font-size: .95rem; }
.doc-link .s { font-size: .78rem; color: var(--muted); }

.docs-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.docs-head h3 { font-size: 1.05rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.docs-head .count { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.docs-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

/* ===== KONTAKT ===== */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
}
.contact-side       { padding: 50px; }
.contact-side h2    { margin-bottom: 18px; }
.contact-side .lead { color: var(--ink-2); }
.contact-tiles      { display: grid; gap: 8px; margin-top: 30px; }
.contact-tile {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    transition: border-color .15s ease;
}
.contact-tile:hover { border-color: var(--blue-700); text-decoration: none; }
.contact-tile .ico {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-700);
    display: grid;
    place-items: center;
}
.contact-tile .k {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    font-weight: 600;
}
.contact-tile .v { font-weight: 500; font-size: .98rem; color: var(--ink); }
.map-side {
    min-height: 520px;
    position: relative;
    background: var(--blue-50);
    overflow: hidden;
}
.map-side iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(.9);
}

/* ===== NEWSLETTER SECTION ===== */
/* Vzdálenost od obsahu nahoře (různé landing-stránky končí různě —
   delší padding = vždy spolehlivý vzdušný prostor) i od patičky dole. */
.newsletter-section {
    padding: 96px 0 80px;
    background:
        radial-gradient(circle at 18% 20%, rgba(229, 168, 47, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 82% 80%, rgba(30, 91, 171, 0.04) 0%, transparent 45%),
        var(--bg, #f8fafc);
}
@media (max-width: 720px) {
    .newsletter-section { padding: 64px 0 56px; }
}

/* ===== FOOTER ===== */
footer {
    background: var(--blue-900);
    color: #cdd9ec;
    padding: 70px 0 30px;
    margin-top: 0;
}
footer h4 {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 600;
    margin-bottom: 18px;
}
.foot-grid    { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; }
.foot-grid a  { color: #cdd9ec; display: block; padding: 5px 0; font-size: .92rem; }
.foot-grid a:hover { color: #fff; }
.foot-brand   { display: flex; gap: 18px; align-items: flex-start; }
.foot-brand img      { width: 52px; }
.foot-brand .name {
    font-family: 'Fraunces', serif;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.foot-brand .sub {
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-top: 4px;
}
.foot-brand p { color: rgba(255, 255, 255, .6); font-size: .9rem; margin-top: 14px; max-width: 38ch; }
.foot-bottom {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .82rem;
    color: rgba(255, 255, 255, .5);
}
.foot-bottom a { color: rgba(255, 255, 255, .65); }
.foot-bottom a:hover { color: #fff; }

/* ===== HELPERS ===== */
.icon    { width: 18px; height: 18px; stroke-width: 1.7; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; stroke-width: 1.7; }
/* Skip link – sr-only pattern: pro oko neviditelný, viditelný jen při focus
   (přes klávesnici Tab). Pevná velikost 1×1 + clip zaručí, že nečouhá. */
.skip-link {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
    position: fixed !important;
    top: 8px; left: 8px;
    width: auto; height: auto;
    padding: 10px 14px;
    margin: 0;
    overflow: visible;
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
    white-space: normal;
    background: var(--blue-700);
    color: #fff;
    border-radius: 6px;
    z-index: 100000;
    font-weight: 600;
    box-shadow: 0 6px 20px -6px rgba(15,23,42,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
    .hero-inner            { grid-template-columns: 1fr; gap: 30px; padding: 80px 0 100px; }
    .stats-grid            { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2)     { border-right: none; }
    .stat:nth-child(1),
    .stat:nth-child(2)     { border-bottom: 1px solid var(--line); }
    .news-layout           { grid-template-columns: 1fr; }
    .urad-desk             { position: static; }
    .about-grid            { grid-template-columns: 1fr; gap: 80px; }
    .about .image-stack    { margin: 0 auto; }
    .office-grid           { grid-template-columns: 1fr; }
    .life-grid             { grid-template-columns: 1fr 1fr; }
    .docs-grid             { grid-template-columns: 1fr; }
    .contact-wrap          { grid-template-columns: 1fr; }
    .foot-grid             { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
    section.s     { padding: 60px 0; }
    .container    { padding: 0 20px; }
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid var(--line);
        padding: 14px 20px;
        box-shadow: var(--shadow);
    }
    .menu.open    { display: flex; }
    .menu a       { padding: 12px 14px; border-radius: 8px; }
    .menu .cta    { margin-top: 6px; text-align: center; }
    .menu-toggle  { display: inline-flex; }
    .nav .container { position: relative; }
    .news-list    { grid-template-columns: 1fr; }
    .news-card    { padding: 16px; }
    .news-card.feat { grid-template-columns: 1fr; }
    .news-card.feat .thumb { aspect-ratio: 16/10; }
    .news-card.feat .body { padding: 18px; }
    .news-card.feat h3 { font-size: 1.2rem; }
    .news-card.feat .thumb.placeholder { padding: 18px; }
    .news-card.feat .thumb.placeholder .ph-title { font-size: 1.1rem; -webkit-line-clamp: 5; }
    .life-grid    { grid-template-columns: 1fr; }
    .info-row     { grid-template-columns: 1fr 1fr; gap: 14px; }
    .event        { grid-template-columns: 60px 1fr; padding: 16px 18px; gap: 14px; }
    .event .date  { padding-right: 14px; }
    .event .date .d { font-size: 1.5rem; }
    .event .cta-arrow { display: none; }
    .contact-side  { padding: 32px 24px; }
    .foot-grid     { grid-template-columns: 1fr; }
    .utility .util-left  { font-size: .74rem; gap: 14px; }
    .utility .util-right .pill { display: none; }
}

/* ===================================================================
 * SUBPAGE LAYOUT — luxusní hlavička + obsah pro všechny vnitřní stránky
 * =================================================================== */

.subpage-hero {
    position: relative;
    color: #fff;
    padding: 70px 0 60px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 50%, var(--blue-700) 100%);
}
.subpage-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -2;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(229,168,47,.18) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.05) 0%, transparent 50%);
}
.subpage-hero.has-image::before {
    background-image:
        linear-gradient(135deg, rgba(15,45,86,.85) 0%, rgba(22,61,114,.7) 100%),
        var(--bg-image, none);
    background-size: cover;
    background-position: center;
}
.subpage-hero .crumbs {
    font-size: .8rem;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: .14em;
    display: inline-flex; gap: 10px;
    align-items: center; margin-bottom: 18px;
}
.subpage-hero .crumbs::before {
    content: ""; width: 24px; height: 1px; background: var(--gold-400);
}
.subpage-hero .crumbs a {
    color: rgba(255,255,255,.85);
}
.subpage-hero .crumbs a:hover {
    color: var(--gold-400);
}
.subpage-hero .crumbs .sep {
    opacity: .4;
}
.subpage-hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    margin-bottom: 14px;
    max-width: none;
}
.subpage-hero .lead {
    color: rgba(255,255,255,.86);
    font-size: 1.08rem;
    max-width: 60ch;
    line-height: 1.55;
}
.subpage-hero .meta-bar {
    margin-top: 26px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: .85rem;
    color: rgba(255,255,255,.78);
}
.subpage-hero .meta-bar > span {
    display: inline-flex; align-items: center; gap: 8px;
}
.subpage-hero .meta-bar strong {
    color: #fff;
    font-weight: 600;
}

/* Prose – pro libovolný obsah článků a stránek */
.prose {
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--ink-2);
    max-width: 70ch;
}
/* Tailwind utility fallback — frontend build je partial a `.max-w-none` chybí.
   Stránky s `class="prose max-w-none"` (např. zakladni-informace) ji potřebují,
   aby se vyláme z 70ch constraintu. */
.prose.max-w-none,
.max-w-none { max-width: none !important; }

/* Info-table — elegantní moderní tabulka pro stránky typu Základní informace.
   Admin edituje přes Quill (běžný <table>), frontend stylem v brandu obce
   (modrá/zlatá), bez excelovských pruhů, decentní jednoduchost.

   Markup:  <table class="info-table"><tr><th>Label</th><td>Value</td></tr>...
   Yes/No:  <span class="info-table__yes|no|partial">…</span>
*/
.prose .info-table,
.subsite-text-body .info-table,
.info-table {
    /* Override globálního `.prose table { display: block }` (mobilní hack), aby
       naše .info-table fungovala jako normální table na desktopu. */
    display: table !important;
    overflow: visible !important;
    width: 100%;
    max-width: none;
    border-collapse: collapse;
    margin: 24px 0 32px;
    background: transparent;
    font-size: 1rem;
    table-layout: fixed;
}
.info-table tbody { display: table-row-group; }
.info-table tr {
    transition: background .18s ease;
    border: 0;
}
.info-table tr:hover td,
.info-table tr:hover th {
    background: rgba(30, 91, 171, 0.035);
}
.info-table th,
.info-table td {
    padding: 18px 22px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line, #e8e3dc);
    line-height: 1.55;
    background: transparent;
    transition: background .18s ease;
}
.info-table tr:first-child th,
.info-table tr:first-child td { border-top: 2px solid var(--blue-900, #0f2d56); }
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: 2px solid var(--blue-900, #0f2d56); }
/* Specificita zvýšena (table.info-table th) aby přebila globální
   `.prose th { width: auto !important }` pravidlo, které je definované níže. */
table.info-table th,
.prose table.info-table th,
.subsite-text-body table.info-table th {
    width: 260px !important;
    min-width: 220px !important;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted, #64748b);
    padding-top: 22px;
}
.info-table td {
    color: var(--blue-900, #0f2d56);
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.08rem;
    letter-spacing: -0.005em;
}
.info-table td a {
    color: var(--blue-700, #1d4ed8);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: color .15s ease;
}
.info-table td a:hover {
    color: var(--gold-600, #c98712);
}
.info-table td code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.92em;
    background: rgba(30, 91, 171, 0.08);
    padding: 4px 10px;
    border-radius: 5px;
    color: var(--blue-900, #0f2d56);
    font-weight: 600;
    letter-spacing: 0;
}
.info-table__yes,
.info-table__no,
.info-table__partial {
    display: inline-block;
    font-family: Inter, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    line-height: 1.3;
    letter-spacing: 0;
}
.info-table__yes     { background: rgba(34, 197, 94, 0.13);  color: #166534; }
.info-table__no      { background: rgba(239, 68, 68, 0.11);  color: #991b1b; }
.info-table__partial { background: rgba(229, 168, 47, 0.16); color: #7d4f08; }

@media (max-width: 720px) {
    .info-table th, .info-table td { padding: 13px 14px; }
    .info-table th { width: 40%; font-size: 0.72rem; }
    .info-table td { font-size: 1rem; }
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--ink);
    margin-top: 1.6em;
    margin-bottom: .5em;
    line-height: 1.2;
}
.prose h1 { font-size: 1.85rem; font-weight: 600; }
.prose h2 { font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; }
.prose h3 { font-size: 1.18rem; font-weight: 600; }
.prose h1.big, .prose h2.big { font-size: 1.55rem; }
.prose p { margin: 0 0 1.05em; }
.prose p.big { font-size: 1.12rem; color: var(--ink); font-weight: 500; }
.prose a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--blue-800); text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.prose li { margin-bottom: .35em; }
.prose img {
    border-radius: var(--radius);
    margin: 1.4em 0;
    box-shadow: var(--shadow);
}
.prose blockquote {
    margin: 1.6em 0;
    padding: 18px 24px;
    border-left: 4px solid var(--gold-500);
    background: var(--paper-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink);
    font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.prose th {
    background: var(--paper-2);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--ink);
    font-size: .94rem;
    border-bottom: 1px solid var(--line);
}
.prose td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: .96rem;
}
.prose tr:last-child td { border-bottom: none; }
.prose strong { color: var(--ink); font-weight: 600; }

/* Two-column layout for article + sidebar */
.subpage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
}
.subpage-layout > .main { min-width: 0; }
.subpage-layout > .aside {
    position: sticky;
    top: 80px;
}

.aside-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
}
.aside-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 600;
    color: var(--blue-700);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.aside-card .stack {
    display: grid; gap: 10px;
}
.aside-card .stack a {
    color: var(--ink-2);
    font-size: .92rem;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
}
.aside-card .stack a:hover { color: var(--blue-700); text-decoration: none; }
.aside-card .stack a:last-child { border-bottom: none; }

@media (max-width: 980px) {
    .subpage-layout { grid-template-columns: 1fr; }
    .subpage-layout > .aside { position: static; }
}

/* Cards grid for documents */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Pagination */
.pagination {
    display: flex; gap: 6px; justify-content: center;
    margin-top: 40px; flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--white);
    border: 1px solid var(--line);
    transition: all .15s ease;
}
.pagination a:hover { background: var(--paper-2); border-color: var(--blue-700); text-decoration: none; }
.pagination .active {
    background: var(--blue-700); color: #fff; border-color: var(--blue-700);
}

/* Article card grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Categories chips */
.chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 30px;
}
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--white);
    color: var(--ink-2);
    border: 1px solid var(--line);
    font-size: .85rem;
    font-weight: 500;
    transition: all .15s ease;
}
.chip:hover, .chip.active {
    background: var(--blue-700); color: #fff; border-color: var(--blue-700);
    text-decoration: none;
}

/* Form styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-field {
    display: flex; flex-direction: column; gap: 6px;
}
.form-field label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--ink);
}
.form-field label .req { color: #dc2626; }
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: .96rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--blue-700);
    box-shadow: 0 0 0 3px rgba(30,91,171,.12);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-help {
    font-size: .82rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .subpage-hero { padding: 50px 0 40px; }
    .subpage-hero h1 { font-size: 1.8rem; }
}

/* Detail meta bar (used in board/article detail) */
.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin: 0 0 32px;
    padding: 22px 26px;
    background: var(--paper-2);
    border-radius: var(--radius);
}
.detail-meta .k {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.detail-meta .v {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    color: var(--ink);
    font-size: 1.05rem;
}

/* Download button */
.download-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 22px;
    background: var(--blue-700);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    transition: background .2s ease, transform .15s ease;
}
.download-btn:hover {
    background: var(--blue-800); text-decoration: none;
    transform: translateY(-1px);
}
.download-btn .ext-pill {
    background: var(--gold-500); color: var(--blue-900);
    padding: 2px 8px; border-radius: 4px;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: var(--white);
    border: 2px dashed var(--line);
    border-radius: var(--radius-lg);
    color: var(--muted);
}
.empty-state svg { color: var(--line); margin-bottom: 16px; }
.empty-state h3 { color: var(--ink-2); font-family: 'Fraunces', serif; font-weight: 500; margin-bottom: 8px; }

/* Section padding shortcuts */
section.s            { padding: 70px 0; }
section.s.tight      { padding: 50px 0; }
section.s.wide       { padding: 90px 0; }
section.s.bg-paper   { background: var(--paper-2); }

/* Skip link – druhá (starší) definice; ponecháno odstraněné, viz pravidla výše */

/* ===================================================================
 * DROPDOWN MEGA MENU pro hlavní navigaci
 * =================================================================== */

.menu .item { position: relative; }
.menu .item > a {
    color: var(--ink-2);
    padding: 9px 13px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .93rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.menu .item > a:hover { background: var(--paper-2); text-decoration: none; color: var(--ink); }
.menu .item > a.cta {
    background: var(--blue-700);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
}
.menu .item > a.cta:hover { background: var(--blue-800); color: #fff; }
.menu .item.has-dropdown > a::after {
    content: "";
    border: 4px solid transparent;
    border-top-color: currentColor;
    margin-top: 3px;
    opacity: .5;
}
.menu .item .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 60;
}
.menu .item:hover .dropdown,
.menu .item:focus-within .dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.menu .dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: .9rem;
    line-height: 1.3;
}
.menu .dropdown a:hover { background: var(--paper-2); color: var(--blue-700); text-decoration: none; }
.menu .dropdown a.active { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }

/* On mobile, dropdown becomes inline */
@media (max-width: 720px) {
    /* Mobil: dropdown je COLLAPSIBLE — defaultně skrytý, .item.is-open ho odhalí.
       JS handler: klik na parent <a> s .has-dropdown přepíná .is-open. */
    .menu .item .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 18px;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease, opacity .15s ease;
    }
    .menu .item.is-open .dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 800px; /* dost pro největší podmenu */
    }
    /* Indikátor rozbalení — chevron napravo, otáčí se podle stavu */
    .menu .item.has-dropdown > a {
        position: relative;
        padding-right: 36px;
    }
    .menu .item.has-dropdown > a::after {
        content: '';
        display: block;
        position: absolute;
        right: 14px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-70%) rotate(45deg);
        transition: transform .2s ease;
    }
    .menu .item.is-open.has-dropdown > a::after {
        transform: translateY(-30%) rotate(-135deg);
    }
    .menu .dropdown a {
        font-size: .85rem;
        padding: 8px 10px;
        color: var(--muted);
        min-height: 36px;
    }
}

/* ===================================================================
 * LIGHTBOX – jemný překryv pro fotogalerie
 * =================================================================== */
.mlb-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 45, 86, 0.78);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 60px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
    cursor: zoom-out;
}
.mlb-overlay.open { opacity: 1; visibility: visible; }
.mlb-frame {
    position: relative;
    max-width: min(1400px, 92vw);
    max-height: 88vh;
    display: flex; align-items: center; justify-content: center;
    cursor: default;
}
.mlb-frame img {
    max-width: 100%;
    max-height: 88vh;
    display: block;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    background: #fff;
    transition: opacity .2s ease;
}
.mlb-frame.loading img { opacity: .35; }
.mlb-loader {
    position: absolute; left: 50%; top: 50%;
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: var(--gold-400);
    border-radius: 50%;
    animation: mlb-spin 0.7s linear infinite;
    display: none;
}
.mlb-overlay.open .mlb-frame.loading .mlb-loader { display: block; }
@keyframes mlb-spin { to { transform: rotate(360deg); } }

.mlb-close, .mlb-prev, .mlb-next {
    position: absolute;
    background: rgba(255,255,255,.9);
    color: var(--blue-900);
    border: none;
    border-radius: 999px;
    width: 44px; height: 44px;
    cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    transition: transform .15s ease, background .15s ease;
}
.mlb-close:hover, .mlb-prev:hover, .mlb-next:hover {
    background: var(--gold-400);
    transform: scale(1.05);
}
.mlb-close { top: -56px; right: 0; }
.mlb-prev  { left: -64px; top: 50%; transform: translateY(-50%); }
.mlb-next  { right: -64px; top: 50%; transform: translateY(-50%); }
.mlb-prev:hover { transform: translateY(-50%) scale(1.05); }
.mlb-next:hover { transform: translateY(-50%) scale(1.05); }
.mlb-counter {
    position: absolute;
    bottom: -40px; left: 0; right: 0;
    text-align: center;
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}
.mlb-caption {
    position: absolute;
    bottom: -40px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.95);
    font-size: .92rem;
    max-width: 90%;
    text-align: center;
}

@media (max-width: 720px) {
    .mlb-overlay { padding: 16px; }
    .mlb-close { top: -48px; right: 0; }
    .mlb-prev  { left: 4px; }
    .mlb-next  { right: 4px; }
    .mlb-counter, .mlb-caption { bottom: -34px; font-size: .82rem; }
}

/* Make linked thumbnails feel clickable */
.prose a:has(> img),
.subsite-text-body a:has(> img),
a.mlb-trigger {
    display: inline-block;
    cursor: zoom-in;
    transition: opacity .15s ease, transform .15s ease;
}
.prose a:has(> img):hover img,
.subsite-text-body a:has(> img):hover img,
a.mlb-trigger:hover img {
    opacity: .92;
    transform: scale(1.01);
}

/* Bare <img> v builderu / textu / článku → kurzor zoom-in (lightbox přes klik) */
img.mlb-trigger-img {
    cursor: zoom-in;
    transition: opacity .15s ease, transform .15s ease;
}
img.mlb-trigger-img:hover {
    opacity: .92;
    transform: scale(1.01);
}

/* ===================================================================
 * CONTENT TRANSFORMS – timeline arrow + content gallery
 * =================================================================== */
.prose .ts-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #1a1206;
    margin: 0 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    box-shadow: 0 2px 6px rgba(229,168,47,.35), inset 0 1px 0 rgba(255,255,255,.4);
    transition: transform .2s ease;
}
.prose .ts-arrow svg { width: 11px; height: 11px; display: block; }
.prose .ts-arrow:hover { transform: rotate(8deg) scale(1.1); }

.content-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 26px 0;
}
.content-gallery__item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper-2);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    aspect-ratio: 4 / 3;
    position: relative;
    cursor: zoom-in;
}
.content-gallery__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.content-gallery__item img,
.content-gallery__item a {
    display: block;
    width: 100%; height: 100%;
}
.content-gallery__item img {
    object-fit: cover;
    transition: transform .4s ease;
}
.content-gallery__item:hover img { transform: scale(1.04); }

/* Také pro <a>(s obrázkem) v běžném prose – přidej zoom kurzor */
.prose a > img { border-radius: 14px; }

/* Timeline – pokud paragraph obsahuje šipky, dej mu pruh nahoru/dolů */
.prose p:has(.ts-arrow) {
    padding: 22px 24px;
    background: linear-gradient(180deg, var(--paper-2) 0%, var(--white) 100%);
    border-radius: 14px;
    border-left: 4px solid var(--gold-500);
    line-height: 2.1;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

/* ===================================================================
 * ROZCESTNÍK – grid karet s ikonou pro skupinu interních odkazů
 * (např. /o-obci, /obecni-urad)
 * =================================================================== */
/* === ROZCESTNÍK V2 — vizuální karty s velkou ikonou nahoře, gradient pozadí, hover overlay === */
.rozcestnik {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin: 0;
}
.rozcestnik__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 22px 20px;
    background: linear-gradient(160deg, #ffffff 0%, var(--paper) 100%);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(15, 45, 86, 0.04),
        0 4px 12px -6px rgba(15, 45, 86, 0.06);
    transition:
        transform .25s cubic-bezier(.4, 0, .2, 1),
        box-shadow .25s ease,
        border-color .25s ease;
    overflow: hidden;
    isolation: isolate;
    min-height: 160px;
}
/* Velký dekorativní kruh v pozadí karty (light blue) */
.rozcestnik__card::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 130px; height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 91, 171, 0.07) 0%, transparent 70%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), background .25s ease;
    z-index: 0;
}
/* Zlatý overlay na hoveru */
.rozcestnik__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(229, 168, 47, 0.04) 0%, rgba(229, 168, 47, 0.10) 100%);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 0;
}
.rozcestnik__card > * {
    position: relative;
    z-index: 1;
}
.rozcestnik__card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-500);
    box-shadow:
        0 14px 32px -14px rgba(15, 45, 86, 0.22),
        0 6px 16px -6px rgba(229, 168, 47, 0.20);
    text-decoration: none;
    color: var(--ink);
}
.rozcestnik__card:hover::before {
    transform: scale(1.4) translateY(10px);
    background: radial-gradient(circle, rgba(229, 168, 47, 0.18) 0%, transparent 70%);
}
.rozcestnik__card:hover::after { opacity: 1; }

.rozcestnik__card[aria-disabled="true"] { opacity: .55; cursor: default; }
.rozcestnik__card[aria-disabled="true"]:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: 0 1px 2px rgba(15, 45, 86, 0.04);
}
.rozcestnik__card[aria-disabled="true"]:hover::before,
.rozcestnik__card[aria-disabled="true"]:hover::after { opacity: 0; transform: none; }

.rozcestnik__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--paper-2) 100%);
    color: var(--blue-700);
    box-shadow:
        inset 0 0 0 1px rgba(30, 91, 171, 0.08),
        0 4px 10px -4px rgba(15, 45, 86, 0.10);
    transition:
        background .25s ease,
        color .25s ease,
        transform .25s cubic-bezier(.4, 0, .2, 1),
        box-shadow .25s ease;
}
.rozcestnik__icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.rozcestnik__card:hover .rozcestnik__icon {
    background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-900) 100%);
    color: var(--gold-400);
    transform: scale(1.05) rotate(-3deg);
    box-shadow:
        inset 0 0 0 1px rgba(229, 168, 47, 0.20),
        0 8px 18px -4px rgba(15, 45, 86, 0.30);
}

.rozcestnik__label {
    font-weight: 600;
    line-height: 1.25;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.18rem;
    color: var(--blue-900);
    letter-spacing: -0.005em;
    align-self: stretch;
    transition: color .25s ease;
}
.rozcestnik__card:hover .rozcestnik__label {
    color: var(--blue-900);
}

.rozcestnik__arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    transition: transform .25s ease, color .25s ease, gap .25s ease;
}
.rozcestnik__arrow::before {
    content: "Otevřít";
}
.rozcestnik__arrow::after {
    content: "→";
    font-size: 1.05rem;
    font-weight: 700;
    transition: transform .25s ease;
}
.rozcestnik__card:hover .rozcestnik__arrow {
    color: var(--gold-600);
    gap: 10px;
}
.rozcestnik__card:hover .rozcestnik__arrow::after {
    transform: translateX(2px);
}

@media (max-width: 640px) {
    .rozcestnik { grid-template-columns: 1fr 1fr; gap: 12px; }
    .rozcestnik__card { padding: 18px 16px 14px; min-height: 140px; gap: 12px; }
    .rozcestnik__icon { width: 44px; height: 44px; border-radius: 12px; }
    .rozcestnik__icon svg { width: 22px; height: 22px; }
    .rozcestnik__label { font-size: 1rem; }
    .rozcestnik__arrow { font-size: 0.72rem; }
    .rozcestnik__icon { width: 36px; height: 36px; }
    .rozcestnik__icon svg { width: 18px; height: 18px; }
    .rozcestnik__label { font-size: .9rem; }
}

/* ===================================================================
 * KONTAKT — služby v budově OÚ + GDPR checkbox
 * =================================================================== */
.contact-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.contact-service {
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.contact-service:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.contact-service__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}
.contact-service__icon {
    flex-shrink: 0;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--paper-2) 100%);
    color: var(--blue-700);
}
.contact-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: .92rem;
}
.contact-hours-table td {
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-variant-numeric: tabular-nums;
}
.contact-hours-table tr:last-child td { border-bottom: none; }
.contact-hours-table td:first-child { color: var(--muted); font-weight: 500; }
.contact-hours-table td:last-child { text-align: right; color: var(--ink); }

/* GDPR checkbox – clean alignment, never far from the label text */
.gdpr-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper-2);
    transition: border-color .15s ease, background-color .15s ease;
}
.gdpr-check:hover {
    border-color: var(--blue-700);
    background: var(--white);
}
.gdpr-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin: 0;
    accent-color: var(--blue-700);
    cursor: pointer;
}
.gdpr-check span {
    font-size: .9rem;
    color: var(--ink-2);
    line-height: 1.45;
}
.gdpr-check span .req { color: #dc2626; margin-left: 2px; }

/* ===================================================================
 * SUBSITE — table of contents + collapsible long sections
 * =================================================================== */
.subsite-toc {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.subsite-toc__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--sub-text, var(--ink));
    text-decoration: none;
    font-size: .93rem;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.subsite-toc__item:hover {
    transform: translateY(-2px);
    border-color: var(--sub-primary, var(--blue-700));
    box-shadow: var(--shadow);
    text-decoration: none;
}
.subsite-toc__num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sub-primary, var(--blue-700)), color-mix(in srgb, var(--sub-primary, var(--blue-700)) 70%, black));
    color: #fff;
    display: grid; place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: .85rem;
}
.subsite-toc__label {
    flex: 1;
    font-weight: 500;
    line-height: 1.3;
}
.subsite-toc__arrow {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 1rem;
    transition: transform .15s ease, color .15s ease;
}
.subsite-toc__item:hover .subsite-toc__arrow {
    color: var(--sub-primary, var(--blue-700));
    transform: translateX(3px);
}

/* Anchor offset (for sticky header) */
.subsite-section[id] {
    scroll-margin-top: 80px;
}

/* Collapsible section – pro všechny textové sekce v subsite */
.subsite-collapsible {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.85);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.subsite-collapsible[open] {
    box-shadow: var(--shadow);
    border-color: color-mix(in srgb, var(--sub-primary, var(--blue-700)) 30%, var(--line));
}
.subsite-collapsible > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.1));
    transition: background .15s ease;
    user-select: none;
}
.subsite-collapsible > summary::-webkit-details-marker { display: none; }
.subsite-collapsible > summary::before {
    content: "";
    flex-shrink: 0;
    width: 22px; height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform .25s ease;
    color: var(--sub-primary, var(--blue-700));
}
.subsite-collapsible[open] > summary::before { transform: rotate(180deg); }
.subsite-collapsible > summary:hover { background: rgba(255,255,255,.95); }
.subsite-collapsible__title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.25;
    color: var(--ink, #1a1d21);
    flex: 1;
    min-width: 0;
}
.subsite-collapsible__meta {
    flex-shrink: 0;
    font-size: .78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.subsite-collapsible[open] > .subsite-text-body {
    padding: 0 22px 22px;
    animation: subsite-fade .3s ease;
}

/* Když je sekce collapsible – odstraň zbytečné padding mezi nimi */
.subsite-section--collapsed {
    padding: 8px 0;
    background: transparent !important;
}
.subsite-section--collapsed + .subsite-section--collapsed {
    padding-top: 0;
}
.subsite-section--collapsed:first-of-type {
    padding-top: 24px;
}
.subsite-section--collapsed:last-of-type {
    padding-bottom: 32px;
}
@keyframes subsite-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
    .subsite-toc { grid-template-columns: 1fr; }
    .contact-services { gap: 16px; }
    .contact-service { padding: 22px; }
}

/* ===================================================================
 * Sanitizace starých Antee tabulek importovaných ze starého webu
 * (žluté bgcolor, fixní pixel šířky, colgroup span hacky)
 * =================================================================== */
.subsite-text-body,
.prose {
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Force responsive tables */
.subsite-text-body table,
.prose table {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    border-collapse: collapse;
    margin: 1.4em 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: table;
    box-shadow: var(--shadow-sm);
    font-size: .94rem;
}
.subsite-text-body td,
.subsite-text-body th,
.prose td,
.prose th {
    padding: 10px 14px !important;
    border: 1px solid var(--line);
    background: transparent !important; /* zapomeň na žluté bgcolor */
    width: auto !important;
    height: auto !important;
    vertical-align: top;
    color: var(--ink-2);
}
/* Yellow bgcolor – stylová náhrada za milé jemné modré pozadí */
.subsite-text-body td[bgcolor],
.subsite-text-body th[bgcolor],
.prose td[bgcolor],
.prose th[bgcolor] {
    background: var(--blue-50) !important;
    font-weight: 600;
    color: var(--blue-900);
}
/* Skryj colgroup span hacky */
.subsite-text-body colgroup,
.prose colgroup { display: none; }

/* Wrap large tables in horizontal scroll on mobile */
.subsite-text-body table,
.prose table {
    display: block;
    overflow-x: auto;
}

/* Inline width/height pixel hacks z původního Antee */
.subsite-text-body img,
.prose img {
    height: auto !important;
    max-width: 100% !important;
}
.subsite-text-body img[width]:not([width="0"]),
.prose img[width]:not([width="0"]) {
    width: auto;
    max-width: 100%;
}

/* Ošklivé inline atributy color="..." */
.subsite-text-body font[color],
.prose font[color] { color: inherit !important; }

/* Antee „seznam-ikona" – moderní grid karet pro rozcestníky (/o-obci, /obecni-urad atd.).
   Karty bez ikony (jen čistý titulek), ale s viditelnou hierarchií, hover liftem
   a barevným accentem na šipce, aby to vypadalo jako pořádný odkaz, ne textový seznam. */
.subsite-text-body .seznam-ikona,
.prose .seznam-ikona {
    list-style: none;
    padding: 0;
    margin: 24px 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.subsite-text-body .seznam-ikona li,
.prose .seznam-ikona li {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
    list-style: none;
}
.subsite-text-body .seznam-ikona li::before,
.prose .seznam-ikona li::before { content: none; }
.subsite-text-body .seznam-ikona li:hover,
.prose .seznam-ikona li:hover {
    transform: translateY(-2px);
    border-color: var(--blue-700, #1d4ed8);
    box-shadow: 0 14px 28px -10px rgba(15, 45, 86, 0.18);
}
.subsite-text-body .seznam-ikona li a,
.prose .seznam-ikona li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 18px 22px;
    color: var(--blue-900, #0f2d56) !important;
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    text-decoration: none !important;
    border-left: 4px solid var(--blue-700, #1d4ed8);
    transition: color .18s ease, background .18s ease;
    min-height: 64px;
    box-sizing: border-box;
}
.subsite-text-body .seznam-ikona li a::after,
.prose .seznam-ikona li a::after {
    content: "→";
    font-family: Inter, -apple-system, sans-serif;
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 400;
    transition: color .18s ease, transform .18s ease;
    flex-shrink: 0;
}
.subsite-text-body .seznam-ikona li:hover a,
.prose .seznam-ikona li:hover a {
    color: var(--blue-700, #1d4ed8) !important;
    background: rgba(239, 246, 255, 0.5);
}
.subsite-text-body .seznam-ikona li:hover a::after,
.prose .seznam-ikona li:hover a::after {
    color: var(--blue-700, #1d4ed8);
    transform: translateX(3px);
}
@media (max-width: 720px) {
    .subsite-text-body .seznam-ikona,
    .prose .seznam-ikona {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }
    .subsite-text-body .seznam-ikona li a,
    .prose .seznam-ikona li a { padding: 14px 14px 14px 16px; font-size: 15px; min-height: 56px; }
}

/* Antee „action-button" → naše tlačítka */
.subsite-text-body .action-button,
.prose .action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--blue-700);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
    margin: 8px 0;
    transition: background .15s ease;
}
.subsite-text-body .action-button:hover,
.prose .action-button:hover { background: var(--blue-800); }

/* Antee „normal-text" – nedělej z toho nic special */
.subsite-text-body .normal-text,
.prose .normal-text { font: inherit; color: inherit; }

/* fbx (floatbox) z Antee – nech ho jako blok, ne float */
.subsite-text-body .fbx,
.prose .fbx {
    display: block;
    overflow: hidden;
}
.subsite-text-body .fbx > div,
.prose .fbx > div {
    float: none !important;
    width: auto !important;
    max-width: 100%;
}

/* `text-align: justify` → left (lépe se čte) */
.subsite-text-body p[style*="text-align: justify"],
.prose p[style*="text-align: justify"] {
    text-align: left;
    hyphens: auto;
}

/* Ipo widget seznam ikona – odstraň divnost */
.subsite-text-body .ipo-widget,
.prose .ipo-widget {
    margin: 1.5em 0;
}

/* =====================================================================
   Přístupnost – viditelný focus indikátor (WCAG 2.4.7 + 1.4.11)
   Globální fallback: pro klávesnicový focus všude jasná zlato-modrá
   linka + 3px outline-offset, aby šla vidět i u kulatých prvků.
   :focus-visible cílí pouze na klávesnicový focus, takže myš nedostane
   obrys (vizuální komfort) a klávesnice ano (a11y).
   ===================================================================== */
:focus-visible {
    outline: 3px solid var(--blue-700);
    outline-offset: 3px;
    border-radius: 4px;
}
/* Focus outline pro tmavá pozadí (utility bar, hero CTA) — gold má dostatečný
   kontrast oproti modré (#1e5bab) i tmavé. */
.utility a:focus-visible,
.hero .btn:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 2px;
}
/* Focus outline pro světlá pozadí — gold-500 na #fafaf6 má kontrast
   pouze ~1.9:1, nesplňuje WCAG 1.4.11 (3:1). Použij tmavou modrou. */
.btn:focus-visible,
.nav .menu a:focus-visible,
.dropdown a:focus-visible,
footer a:focus-visible,
.menu-toggle:focus-visible,
.prose a:focus-visible {
    outline: 3px solid var(--blue-700);
    outline-offset: 2px;
}
/* Form fields – už mají box-shadow ring, jen přidáme záložní outline pro
   uživatele s vysokým kontrastem / vlastním style sheetem. */
.form-field input:focus-visible,
.form-field textarea:focus-visible,
.form-field select:focus-visible {
    outline: 2px solid var(--blue-700);
    outline-offset: 1px;
}

/* aria-current="page" – vizuální indikace aktuální stránky v menu */
.menu a[aria-current="page"],
.dropdown a[aria-current="page"] {
    font-weight: 600;
    color: var(--blue-800);
}

/* =====================================================================
   Mobilní hlavní menu — overlay, scroll-lock, animace
   ===================================================================== */
@media (max-width: 720px) {
    /* Při otevřeném menu zamknout body scroll. JS přidává/odebírá .menu-open. */
    body.menu-open {
        overflow: hidden;
        /* iOS: zabránit gumovým efektům za panelem */
        position: relative;
    }

    /* Mobile: hlavička VŽDY bílá (ne transparentní) — jinak by byla na obsahu
       pozadu nečitelná. Override default `[data-scrolled="0"]` transparency. */
    .nav,
    .nav[data-scrolled="0"] {
        background-color: #fff !important;
        border-bottom: 1px solid var(--line) !important;
        backdrop-filter: none !important;
        z-index: 9999;
    }

    /* Backdrop za menu — semi-průhledné pozadí, kliknutí mimo menu zavře. */
    .menu-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 45, 86, 0.45);
        backdrop-filter: blur(2px);
        z-index: 9990;
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
    }
    .menu-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Plné překrytí obsahu pod hlavičkou — uživatel vidí pouze menu.
       z-index: 9999 aby přebilo lightboxy, video iframy, bannery. */
    .menu {
        position: fixed;
        top: var(--mobile-nav-h, 72px);
        left: 0;
        right: 0;
        bottom: 0;
        max-height: calc(100vh - var(--mobile-nav-h, 72px));
        max-height: calc(100dvh - var(--mobile-nav-h, 72px));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(15, 45, 86, .12);
        padding: 18px 20px 32px;
        gap: 4px;
        z-index: 9999;
        /* Plynulá animace; respektuj prefers-reduced-motion. */
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform .18s ease, opacity .18s ease;
    }
    .menu.open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Větší klikací plochy pro touch (WCAG 2.5.5 doporučuje 24×24+,
       komfortní cíl je 44 px). */
    .menu .item > a,
    .menu .dropdown a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Subtilní oddělení parent/child položek menu */
    .menu .item {
        border-bottom: 1px solid var(--line);
        padding: 4px 0;
    }
    .menu .item:last-child { border-bottom: none; }

    /* iOS Safari auto-zoomuje na form pole se font-size < 16px a už neodzoomuje
       — výsledkem je, že po vyplnění inputu je celý web zoomnutý a uživatel
       neví, jak to vrátit. Fix: všechna form pole na mobilu mají font-size 16px. */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Hamburger v otevřeném stavu vypadá jako "Zavřít" */
    .menu-toggle[aria-expanded="true"] {
        background: var(--blue-50);
        color: var(--blue-700);
        border-color: var(--blue-700);
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu { transition: none; }
}

/* =====================================================================
   Informační lišta — administrovaná v /admin/infobar
   ===================================================================== */
.infobar {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
    position: relative;
    z-index: 60;
}
.infobar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.infobar i {
    font-size: 16px;
    flex-shrink: 0;
}
.infobar__text {
    font-weight: 500;
}
.infobar__link {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    white-space: nowrap;
}
.infobar__link:hover {
    text-decoration-thickness: 2px;
}
.infobar__close {
    background: rgba(255, 255, 255, .14);
    border: 0;
    color: #fff;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: background .15s ease;
}
.infobar__close:hover {
    background: rgba(255, 255, 255, .28);
}
@media (max-width: 600px) {
    .infobar__inner {
        padding: 9px 14px;
        font-size: 13px;
        gap: 8px;
    }
    .infobar__close {
        margin-left: 4px;
    }
}
