/* Stránky obcí (/dostupnost-pokryti/internet-…/) pro člověka, který přijde z vyhledávače nebo od AI (Čeněk 24. 11. 2026:
   „pro vyhledávače úžasné, ale … aby to bylo hezké i pro člověka“). Načítá jen City/detail.latte; obsah stránky
   (texty z administrace i vygenerované sekce) se nemění, mění se jen podání. Barvy a pole adresy jako nová úvodní
   stránka (uvodni.css). Při změně zvýšit ?v v šabloně. */
:root {
    --obc-modra: #003770;
    --obc-modra-tmava: #002452;
    --obc-zelena: #93D500;
    --obc-ruzova: #e171ca;
    --obc-linka: rgba(0, 55, 112, .12);
    --obc-roh: clamp(20px, 1.05rem + 1.234vw, 36px);
    --obc-roh-maly: clamp(14px, .7rem + .5vw, 20px);
    --obc-stin: 0 18px 39px rgba(0, 55, 112, .07);
}

/* 1) Úvod: tmavá karta s nadpisem, polem adresy a hlavními čísly obce, vpravo mapa */
.obc-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(20px, 3vw, 48px);
    padding: clamp(24px, 4vw, 56px);
    border-radius: var(--obc-roh);
    /* Stejný barevný přechod jako doporučený tarif a nejrychlejší technologie na úvodní stránce (Čeněk 24. 11. 2026:
       „místo čisté modré … přechodovou jako na doporučeném tarifu“): zelená záře vpravo nahoře, růžová vlevo dole. */
    background:
        radial-gradient(75% 95% at 62% 0%, rgba(147, 213, 0, .5) 0%, rgba(147, 213, 0, 0) 60%),
        radial-gradient(110% 95% at 0% 100%, rgba(225, 113, 202, .8) 0%, rgba(225, 113, 202, 0) 60%),
        var(--obc-modra);
    color: #fff;
    overflow: hidden;
}
.obc-hero .tag__list { margin-bottom: .5rem; }
.obc-hero__nadpis { margin: .25rem 0 .9rem; color: #fff; font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); line-height: 1.08; letter-spacing: -.01em; }
.obc-hero__veta { max-width: 38em; margin: 0 0 1.5rem; color: rgba(255, 255, 255, .86); font-size: 1.0625rem; line-height: 1.55; }
.obc-hero__veta strong { color: #fff; }

.obc-adresa {
    display: flex; align-items: center; gap: 12px;
    width: 100%; max-width: 560px; min-height: 4.125rem;
    padding: 7px 7px 7px 22px;
    border: 0; border-radius: 999px;
    background: #fff; color: var(--obc-modra);
    font: inherit; text-align: left; cursor: pointer;
    box-shadow: 0 14px 40px rgba(0, 20, 50, .35);
    transition: box-shadow .2s ease;
}
.obc-adresa:hover { box-shadow: 0 14px 40px rgba(0, 20, 50, .35), 0 0 0 4px rgba(147, 213, 0, .55); }
.obc-adresa:focus-visible { outline: 3px solid var(--obc-zelena); outline-offset: 3px; }
.obc-adresa__pole { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; color: rgba(0, 55, 112, .72); }
.obc-adresa__pole svg { flex: none; width: 22px; height: 22px; color: var(--obc-ruzova); }
.obc-adresa__pole > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obc-adresa__tlacitko { flex: none; padding: 15px 26px; border-radius: 999px; background: var(--obc-zelena); color: var(--obc-modra); font-weight: 600; font-size: .9375rem; line-height: 1.4; white-space: nowrap; }
.obc-hero__telefon { margin: .9rem 0 0; color: rgba(255, 255, 255, .78); font-size: .9375rem; }
.obc-hero__telefon a { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.obc-hero__telefon a:hover { text-decoration: underline; }

/* Hlavní čísla obce (dl.city-facts z administrace; skript páruje dt + dd do .obc-fakt) */
.obc-fakta { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.obc-fakta dl.city-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.obc-fakta .obc-fakt { padding: 14px 16px 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.obc-fakta .obc-fakt + .obc-fakt { padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .16); }
.obc-fakta .obc-fakt:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.obc-fakta dt { margin: 0 0 4px; color: rgba(255, 255, 255, .66); font-size: .75rem; font-weight: 500; line-height: 1.3; }
.obc-fakta dd { margin: 0; color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.obc-fakta p { margin: .9rem 0 0; font-size: .8125rem; }
.obc-fakta a { color: rgba(255, 255, 255, .85); }

.obc-hero__mapa { position: relative; min-height: 320px; }
.obc-hero__mapa .map-wrapper { height: 100%; min-height: 320px; border-radius: var(--obc-roh-maly); overflow: hidden; }
.obc-hero__mapa #map { height: 100%; min-height: 320px; }

/* Karty technologií jako na úvodní stránce (uvodni.css .nhp-tech); tady bez okrajů sekce úvodní stránky,
   nahoře místo pro štítek „Nejrychlejší“, který přečnívá přes horní hranu karty. */
.obc-technologie.nhp-sekce { margin-block: 0; padding-top: 18px; }

/* 2) Texty o obci jako průvodce (Čeněk 24. 11. 2026: „tuto celou spodní část si redesignoval?“): úvodní text
   z administrace (.obc-uvod) i vygenerované oddíly dole (.city-content > section). Nadpis vlevo – při posouvání
   zůstává na místě –, obsah vpravo, oddíly oddělené linkou. Na mobilu pod sebou. Obsah se nemění. */
.obc-uvod, .city-content > section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: clamp(24px, 4.5vw, 80px);
    align-items: start;
}
.city-content > section { margin: 0 !important; padding-block: clamp(28px, 3.6vw, 52px); border-top: 1px solid var(--obc-linka); }
.city-content > section:first-child { padding-top: 0; border-top: 0; }
.obc-uvod > h2, .city-content > section > h2 {
    grid-column: 1; grid-row: 1 / span 40;
    position: sticky; top: 130px;
    margin: 0 !important;
    color: var(--obc-modra);
    font-size: clamp(1.35rem, 1.05rem + 1vw, 1.875rem); line-height: 1.2; letter-spacing: -.01em;
    text-wrap: balance;
}
.obc-uvod > :not(h2), .city-content > section > :not(h2) { grid-column: 2; min-width: 0; }
.obc-uvod > p, .city-content > section > p { max-width: 68ch; font-size: 1.0625rem; line-height: 1.65; }
.obc-uvod > p + p, .city-content > section > p + p { margin-top: .9rem; }
.city-content > section > h3 { margin: 1.75rem 0 .5rem !important; font-size: 1.125rem; color: var(--obc-modra); }
.city-content p, .city-content ul:not(.nearby-obce__list):not(.city-neighbours):not(.city-streets__list) { max-width: 68ch; }

/* Tabulky (pokrytí podle technologie, části obce): bílá karta, jen čísla. Pruhy jsme zkusili a vyřadili (Čeněk
   24. 11. 2026: „tento graf bych tam nedával, ať není vidět z kolika“) – prázdná dráha pruhu dělala z pokrytí podíl. */
.city-content table {
    width: 100%; max-width: none; margin: 1.25rem 0 0 !important;
    border-collapse: separate; border-spacing: 0; border: 0 !important;
    background: #fff; border-radius: var(--obc-roh-maly); box-shadow: var(--obc-stin); overflow: hidden;
}
.city-content table th, .city-content table td { padding: .95rem 1.25rem !important; border: 0 !important; border-bottom: 1px solid var(--obc-linka) !important; background: none; text-align: left; vertical-align: middle; }
.city-content table th { background: rgba(0, 55, 112, .04) !important; color: rgba(0, 55, 112, .7); font-size: .8125rem; font-weight: 600; }
.city-content table tbody tr:last-child td { border-bottom: 0 !important; }
.city-content table td:first-child { color: var(--obc-modra); font-weight: 600; }

/* Výčet ulic: rozbalovací tlačítko a ulice ve sloupcích */
.city-content details.city-streets { margin-top: 1rem; }
.city-content details.city-streets > summary {
    display: inline-flex; align-items: center; gap: .65rem;
    padding: .75rem 1.25rem; border: 1.5px solid rgba(0, 55, 112, .2); border-radius: 999px;
    background: #fff; color: var(--obc-modra); font-weight: 600; cursor: pointer; list-style: none;
    transition: border-color .2s ease;
}
.city-content details.city-streets > summary::-webkit-details-marker { display: none; }
.city-content details.city-streets > summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-25%); transition: transform .2s ease; }
.city-content details.city-streets[open] > summary::after { transform: rotate(225deg) translateY(-25%); }
.city-content details.city-streets > summary:hover { border-color: var(--obc-modra); }
.city-content details.city-streets > summary:focus-visible { outline: 3px solid var(--obc-zelena); outline-offset: 2px; }
.city-content .city-streets__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .45rem 1.5rem; list-style: none; padding: 1.25rem 0 0; margin: 0; }
.city-content .city-streets__list li { margin: 0; padding: 0; font-size: .9375rem; }
.city-content .city-streets__list li::before { content: none; }
.city-content .city-streets__list small { color: rgba(0, 55, 112, .55); }

/* Části obce jako karty (obce.js je seskupí do .obc-casti a přesune k předchozímu oddílu) */
.obc-casti { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.obc-casti > .coverage-part, .city-content .obc-casti > .coverage-part { display: block; margin: 0 !important; padding: 1.25rem 1.35rem !important; border: 0 !important; border-radius: var(--obc-roh-maly); background: #fff !important; box-shadow: var(--obc-stin); }
.obc-casti .coverage-part h2, .obc-casti .coverage-part h3 { position: static; margin: 0 0 .6rem !important; font-size: 1.0625rem !important; line-height: 1.3; color: var(--obc-modra); }
.obc-casti .coverage-part p { max-width: none; font-size: .9375rem; line-height: 1.55; }
.obc-casti .coverage-part p + p { margin-top: .5rem; }
.obc-zkraceno { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.obc-vice { display: inline-block; justify-self: start; margin: .35rem 0 .2rem; padding: 0; border: 0; background: none; color: var(--obc-modra); font: inherit; font-size: .875rem; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Odrážky jako fajfky (stejné jako karty technologií na úvodní stránce) */
.city-content > section > ul:not([class]) { list-style: none; display: grid; gap: .6rem; padding: 0; margin: 1rem 0 0; }
.city-content > section > ul:not([class]) > li { position: relative; margin: 0; padding-left: 30px; line-height: 1.5; }
.city-content > section > ul:not([class]) > li::before {
    content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px;
    border: 0; border-radius: 0; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e171ca' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6.5'/%3E%3C/svg%3E");
    transform: none;
}

/* Časté dotazy: rozklikávací (obce.js), text zůstává v HTML pro vyhledávače */
.city-content .faq__item { margin-top: .75rem !important; padding: 0 !important; border: 1px solid var(--obc-linka); border-radius: var(--obc-roh-maly); background: #fff; overflow: hidden; }
.city-content > section > .faq__item:first-of-type { margin-top: 0 !important; }
.city-content .faq__question { margin: 0 !important; color: var(--obc-modra); font-size: 1.0625rem; }
.city-content .faq__question.obc-otazka { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 1.35rem; cursor: pointer; }
.city-content .faq__question.obc-otazka::after { content: ""; flex: none; width: .65rem; height: .65rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-25%); transition: transform .2s ease; }
.city-content .faq__item.obc-otevreno .faq__question.obc-otazka::after { transform: rotate(225deg) translateY(-25%); }
.city-content .faq__question.obc-otazka:focus-visible { outline: 3px solid var(--obc-zelena); outline-offset: -3px; }
.city-content .faq__item .faq__answer { margin: 0; padding: 0 1.35rem 1.15rem; }
.city-content .faq__item.obc-dotaz:not(.obc-otevreno) .faq__answer { display: none; }
.city-content .faq__item:not(.obc-dotaz) .faq__question { padding: 1.05rem 1.35rem .4rem; }

/* Sousední obce jako štítky */
.city-content .city-neighbours, .city-content .nearby-obce__list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.city-content .city-neighbours li, .city-content .nearby-obce__list li { margin: 0; padding: 0; }
.city-content .city-neighbours li::before, .city-content .nearby-obce__list li::before { content: none; }
.city-content .city-neighbours a, .city-content .nearby-obce__list a {
    display: inline-block; padding: .45rem 1rem; border: 1px solid rgba(0, 55, 112, .2); border-radius: 999px;
    background: #fff; color: var(--obc-modra) !important; text-decoration: none !important; transition: background-color .2s ease, color .2s ease;
}
.city-content .city-neighbours a:hover, .city-content .nearby-obce__list a:hover { background: var(--obc-modra); color: #fff !important; }

@media (max-width: 991.98px) {
    .obc-uvod, .city-content > section { grid-template-columns: minmax(0, 1fr); }
    .obc-uvod > h2, .city-content > section > h2 { grid-row: auto; position: static; margin-bottom: 1rem !important; }
    .obc-uvod > :not(h2), .city-content > section > :not(h2) { grid-column: 1; }
}
@media (max-width: 575.98px) {
    .obc-uvod > p, .city-content > section > p { font-size: 1rem; }
    /* Úzká tabulka: dlouhá slova (němčina „Geschwindigkeit“) se dělí, jinak stránka přetékala o pár px do strany */
    .city-content table { table-layout: fixed; }
    .city-content table th, .city-content table td { padding: .75rem .8rem !important; font-size: .875rem; overflow-wrap: anywhere; hyphens: auto; }
}

/* 3) Mobil: tlačítko ověření po ruce při posouvání (vlevo, vpravo je bublina chatu) */
.obc-lista { display: none; }
@media (max-width: 991.98px) {
    .obc-hero { grid-template-columns: 1fr; }
    .obc-hero__mapa, .obc-hero__mapa .map-wrapper, .obc-hero__mapa #map { min-height: 240px; }
    .obc-lista {
        position: fixed; left: 12px; bottom: 14px; z-index: 900;
        display: inline-flex; align-items: center; gap: .5rem;
        padding: .85rem 1.25rem; border: 0; border-radius: 999px;
        background: var(--obc-zelena); color: var(--obc-modra); font: inherit; font-weight: 600; font-size: .9375rem;
        box-shadow: 0 10px 30px rgba(0, 20, 50, .3);
        transform: translateY(150%); transition: transform .25s ease;
    }
    .obc-lista.obc-lista--videt { transform: none; }
}
@media (max-width: 575.98px) {
    .obc-hero { margin-left: -4px; margin-right: -4px; }
    .obc-fakta dl.city-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .obc-fakta .obc-fakt:nth-child(3n + 1) { padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .16); }
    .obc-fakta .obc-fakt:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
    .obc-adresa { gap: 8px; padding: 6px 6px 6px 16px; min-height: 3.6rem; }
    .obc-adresa__pole svg { display: none; }
    .obc-adresa__tlacitko { padding: 11px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .obc-lista, .city-content .faq__question.obc-otazka::after, .city-content details.city-streets > summary::after { transition: none; }
}
