/* ==========================================================================
   Ječmínek, o. p. s. – hlavní styl
   Bez frameworků a bez jQuery. Rozvržení řeší CSS grid a flexbox.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Proměnné
   -------------------------------------------------------------------------- */
:root {
    --modra: #00aae1;
    --modra-tmava: #0087b4;
    --modra-svetla: #e6f6fc;

    --text: #394e63;
    --text-tlumeny: #6b7f93;
    --tmava: #22303d;

    --pozadi: #f4f7fa;
    --bila: #ffffff;
    --linka: #dde5ec;

    --stin: 0 1px 2px rgba(34, 48, 61, .05), 0 8px 24px rgba(34, 48, 61, .06);
    --stin-vyssi: 0 2px 4px rgba(34, 48, 61, .06), 0 16px 40px rgba(34, 48, 61, .12);

    --radius: 14px;
    --radius-maly: 8px;

    --pismo: 'Roboto Condensed', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --sirka: 1180px;
    --sirka-textu: 760px;
}

/* --------------------------------------------------------------------------
   2. Reset a typografie
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--pismo);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--pozadi);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--modra-tmava);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    color: var(--tmava);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; color: var(--modra-tmava); text-transform: uppercase; letter-spacing: .04em; }

p {
    margin: 0 0 1.1em;
}

ul, ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

li {
    margin-bottom: .4em;
}

blockquote {
    margin: 0 0 1.2em;
    padding: 0;
}

hr {
    height: 1px;
    margin: 2.5rem 0;
    border: 0;
    background: var(--linka);
}

::selection {
    background: var(--modra);
    color: #fff;
}

.jen-pro-ctecku {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jen-pro-ctecku:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    width: auto;
    height: auto;
    padding: 12px 20px;
    clip: auto;
    color: #fff;
    background: var(--tmava);
    border-radius: var(--radius-maly);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--modra);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. Rozvržení
   -------------------------------------------------------------------------- */
.obal {
    width: 100%;
    max-width: var(--sirka);
    margin: 0 auto;
    padding: 0 20px;
}

.sekce {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.sekce--bila {
    background: var(--bila);
}

.sekce__nadpis {
    max-width: var(--sirka-textu);
    margin: 0 auto 2.5rem;
    text-align: center;
}

.sekce__nadpis p {
    color: var(--text-tlumeny);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Tlačítka */
.btn {
    display: inline-block;
    padding: 11px 26px;
    color: #fff;
    font-family: var(--pismo);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    background: var(--modra);
    border: 2px solid var(--modra);
    border-radius: 100px;
    cursor: pointer;
    transition: background-color .18s, border-color .18s, color .18s, transform .18s;
}

.btn:hover {
    color: #fff;
    text-decoration: none;
    background: var(--modra-tmava);
    border-color: var(--modra-tmava);
    transform: translateY(-1px);
}

.btn--obrys {
    color: var(--modra-tmava);
    background: transparent;
}

.btn--obrys:hover {
    color: #fff;
    background: var(--modra-tmava);
}

.btn--svetle {
    color: var(--tmava);
    background: #fff;
    border-color: #fff;
}

.btn--svetle:hover {
    color: var(--tmava);
    background: rgba(255, 255, 255, .85);
    border-color: rgba(255, 255, 255, .85);
}

/* --------------------------------------------------------------------------
   4. Hlavička
   -------------------------------------------------------------------------- */
.lista-kontakt {
    padding: 6px 0;
    color: rgba(255, 255, 255, .92);
    font-size: .92rem;
    background: var(--tmava);
}

.lista-kontakt__obal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 22px;
}

.lista-kontakt a {
    color: #fff;
}

.lista-kontakt svg {
    width: 1em;
    height: 1em;
    margin-right: 6px;
    fill: var(--modra);
    vertical-align: -.12em;
}

.hlavicka {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bila);
    box-shadow: 0 1px 0 var(--linka);
}

.hlavicka__obal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.znacka {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--tmava);
}

.znacka:hover {
    text-decoration: none;
}

.znacka img {
    width: 46px;
    height: auto;
    flex: none;
}

.znacka__nazev {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.1;
}

.znacka__popis {
    display: block;
    color: var(--text-tlumeny);
    font-size: .82rem;
    font-weight: 400;
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   5. Navigace
   -------------------------------------------------------------------------- */
.hamburger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: var(--tmava);
    font-family: var(--pismo);
    font-size: .95rem;
    font-weight: 700;
    background: var(--pozadi);
    border: 0;
    border-radius: 100px;
    cursor: pointer;
}

.hamburger svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.menu {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    list-style: none;
}

.menu.je-otevrene {
    display: block;
}

.menu a {
    display: block;
    padding: 12px 4px;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 1px solid var(--linka);
}

.menu a:hover {
    color: var(--modra-tmava);
    text-decoration: none;
}

.menu a[aria-current="page"] {
    color: var(--modra-tmava);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    display: grid;
    min-height: 62vh;
    background: var(--tmava);
    overflow: hidden;
}

.hero__snimek {
    grid-area: 1 / 1;
    background-position: center center;
    background-size: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero__snimek.je-aktivni {
    opacity: 1;
}

.hero__snimek::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(34, 48, 61, .82) 0%, rgba(34, 48, 61, .55) 45%, rgba(34, 48, 61, .25) 100%);
}

.hero__obsah {
    grid-area: 1 / 1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.hero__text {
    max-width: 640px;
    color: #fff;
}

.hero__text h1 {
    color: #fff;
    margin-bottom: .5em;
    text-wrap: balance;
}

.hero__text p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, .92);
}

.hero__tlacitka {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.8rem;
}

.hero__ovladani {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero__bod {
    width: 11px;
    height: 11px;
    padding: 0;
    background: rgba(255, 255, 255, .45);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
}

.hero__bod.je-aktivni {
    background: #fff;
    transform: scale(1.25);
}

/* Menší hero na podstránkách */
.podhlavicka {
    padding: clamp(2rem, 5vw, 3.2rem) 0 clamp(1.5rem, 4vw, 2.4rem);
    color: #fff;
    background: linear-gradient(120deg, var(--tmava) 0%, #33566e 100%);
}

.podhlavicka h1 {
    color: #fff;
    margin-bottom: 0;
    text-wrap: balance;
}

.podhlavicka p {
    max-width: var(--sirka-textu);
    margin: .8rem 0 0;
    color: rgba(255, 255, 255, .85);
    font-size: 1.1rem;
}

/* Drobečky */
.drobecky {
    padding: .9rem 0;
    font-size: .88rem;
    color: var(--text-tlumeny);
}

.drobecky ol {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drobecky li::after {
    content: "›";
    margin-left: .4rem;
    color: var(--linka);
}

.drobecky li:last-child::after {
    content: none;
}

/* --------------------------------------------------------------------------
   7. Obsah stránky
   -------------------------------------------------------------------------- */
.hlavni {
    flex: 1 0 auto;
}

.rozvrzeni {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.karta {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    background: var(--bila);
    border-radius: var(--radius);
    box-shadow: var(--stin);
}

/* Formátovaný text z redakce */
.text > *:first-child { margin-top: 0; }
.text > *:last-child { margin-bottom: 0; }

.text h2 {
    margin-top: 2rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--modra-svetla);
}

.text h3 {
    margin-top: 1.8rem;
    color: var(--modra-tmava);
}

.text h4 {
    margin-top: 1.6rem;
    margin-bottom: .3em;
}

.text img {
    border-radius: var(--radius-maly);
}

.text a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.text ul {
    padding-left: 0;
    list-style: none;
}

.text ul li {
    position: relative;
    padding-left: 1.5em;
}

.text ul li::before {
    content: "";
    position: absolute;
    top: .62em;
    left: 0;
    width: 7px;
    height: 7px;
    background: var(--modra);
    border-radius: 50%;
}

/* Vysazený údaj (kontakt, provozní doba) */
.udaj {
    margin: 0 0 1.4rem;
    padding: 1rem 1.2rem;
    background: var(--modra-svetla);
    border-radius: var(--radius-maly);
    border-left: 4px solid var(--modra);
}

.udaj p:last-child {
    margin-bottom: 0;
}

/* Postranní panel */
.postranni {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.postranni .karta {
    padding: 1.5rem;
}

.postranni h2 {
    font-size: 1.25rem;
}

/* Časté dotazy */
.dotazy {
    margin: 0;
}

.dotazy details {
    border-bottom: 1px solid var(--linka);
}

.dotazy details:last-child {
    border-bottom: 0;
}

.dotazy summary {
    padding: .85rem 1.6rem .85rem 0;
    position: relative;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.dotazy summary::-webkit-details-marker {
    display: none;
}

.dotazy summary::after {
    content: "+";
    position: absolute;
    top: .7rem;
    right: 0;
    color: var(--modra);
    font-size: 1.4rem;
    line-height: 1;
}

.dotazy details[open] summary::after {
    content: "–";
}

.dotazy__odpoved {
    padding-bottom: 1rem;
    color: var(--text-tlumeny);
}

.dotazy__odpoved p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. Karty služeb
   -------------------------------------------------------------------------- */
.sluzby {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sluzba {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2.2rem);
    background: var(--bila);
    border-radius: var(--radius);
    box-shadow: var(--stin);
    transition: transform .2s, box-shadow .2s;
}

.sluzba:hover {
    transform: translateY(-3px);
    box-shadow: var(--stin-vyssi);
}

.sluzba__ikona {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.1rem;
    background: var(--modra-svetla);
    border-radius: 50%;
}

.sluzba__ikona svg {
    width: 26px;
    height: 26px;
    fill: var(--modra-tmava);
}

.sluzba p {
    color: var(--text-tlumeny);
}

.sluzba .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   9. Aktuality
   -------------------------------------------------------------------------- */
.aktuality {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aktualita {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bila);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--stin);
    transition: transform .2s, box-shadow .2s;
}

.aktualita:hover {
    transform: translateY(-3px);
    box-shadow: var(--stin-vyssi);
}

.aktualita__obrazek {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--modra-svetla);
    overflow: hidden;
}

.aktualita__obrazek img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.aktualita:hover .aktualita__obrazek img {
    transform: scale(1.04);
}

.aktualita__telo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.3rem 1.4rem 1.5rem;
}

.aktualita__datum {
    margin-bottom: .5rem;
    color: var(--modra-tmava);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.aktualita h3 {
    margin-bottom: .5rem;
    font-size: 1.15rem;
    line-height: 1.3;
}

.aktualita h3 a {
    color: var(--tmava);
}

.aktualita h3 a:hover {
    color: var(--modra-tmava);
    text-decoration: none;
}

.aktualita__perex {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.1rem;
    color: var(--text-tlumeny);
    font-size: .97rem;
}

.aktualita__vice {
    margin-top: auto;
    font-weight: 700;
}

.aktualita__vice::after {
    content: " →";
}

/* Stránkování */
.strankovani {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2.5rem;
}

.strankovani a,
.strankovani span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    color: var(--text);
    font-weight: 700;
    background: var(--bila);
    border: 1px solid var(--linka);
    border-radius: var(--radius-maly);
}

.strankovani a:hover {
    color: var(--modra-tmava);
    text-decoration: none;
    border-color: var(--modra);
}

.strankovani .je-aktivni {
    color: #fff;
    background: var(--modra);
    border-color: var(--modra);
}

/* Detail článku */
.clanek__datum {
    margin-bottom: 1.5rem;
    color: var(--modra-tmava);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .9rem;
}

.clanek__obrazek {
    margin: 0 0 2rem;
}

.clanek__obrazek img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--stin);
}

.clanek__zpet {
    display: inline-block;
    margin-top: 2.5rem;
    font-weight: 700;
}

.clanek__zpet::before {
    content: "← ";
}

/* --------------------------------------------------------------------------
   10. Soubory ke stažení
   -------------------------------------------------------------------------- */
.soubory {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.soubor {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text);
    background: var(--bila);
    border: 1px solid var(--linka);
    border-radius: var(--radius-maly);
    transition: border-color .18s, box-shadow .18s;
}

.soubor:hover {
    text-decoration: none;
    border-color: var(--modra);
    box-shadow: var(--stin);
}

.soubor svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: var(--modra-tmava);
}

.soubor__nazev {
    font-weight: 700;
}

.soubor__typ {
    margin-left: auto;
    padding: 2px 10px;
    color: var(--modra-tmava);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--modra-svetla);
    border-radius: 100px;
}

/* --------------------------------------------------------------------------
   11. Loga podporovatelů
   -------------------------------------------------------------------------- */
.podporovatele {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(1.2rem, 4vw, 2.6rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.podporovatele img {
    max-height: 76px;
    width: auto;
}

.podporovatele--pas img {
    max-height: none;
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   12. Mapa
   -------------------------------------------------------------------------- */
.mapa {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--stin);
}

.mapa iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

/* --------------------------------------------------------------------------
   13. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: rgba(15, 22, 29, .93);
}

.lightbox.je-otevreny {
    display: flex;
}

.lightbox__obrazek {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-maly);
}

.lightbox__zavrit {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #fff;
    font-size: 30px;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox__zavrit:hover {
    background: var(--modra);
}

/* --------------------------------------------------------------------------
   14. Patička
   -------------------------------------------------------------------------- */
.paticka {
    flex: none;
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    color: rgba(255, 255, 255, .72);
    background: var(--tmava);
}

.paticka__mrizka {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.paticka h2 {
    margin-bottom: .8rem;
    color: #fff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.paticka a {
    color: rgba(255, 255, 255, .85);
}

.paticka a:hover {
    color: #fff;
}

.paticka ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.paticka li {
    margin-bottom: .45em;
}

.paticka address {
    font-style: normal;
}

.paticka__copy {
    padding: 1.1rem 0;
    font-size: .88rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.paticka__copy p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   15. Responzivní varianty
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
    .aktuality {
        grid-template-columns: repeat(2, 1fr);
    }

    .sluzby {
        grid-template-columns: repeat(2, 1fr);
    }

    .soubory {
        grid-template-columns: repeat(2, 1fr);
    }

    .paticka__mrizka {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .hlavicka__obal {
        flex-wrap: nowrap;
    }

    .hamburger {
        display: none;
    }

    .menu {
        display: flex !important;
        width: auto;
        padding: 0;
        gap: 4px;
    }

    .menu a {
        padding: 8px 14px;
        font-size: 1rem;
        border-bottom: 0;
        border-radius: 100px;
    }

    .menu a:hover {
        background: var(--pozadi);
    }

    .menu a[aria-current="page"] {
        color: #fff;
        background: var(--modra);
    }

    .rozvrzeni--se-sloupcem {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .aktuality {
        grid-template-columns: repeat(3, 1fr);
    }

    .paticka__mrizka {
        grid-template-columns: 1.4fr 1fr 1.2fr;
    }
}

@media (min-width: 1100px) {
    .znacka img {
        width: 54px;
    }
}

/* --------------------------------------------------------------------------
   16. Omezení pohybu a tisk
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .lista-kontakt,
    .hlavicka,
    .hero,
    .paticka,
    .lightbox,
    .strankovani {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .karta {
        box-shadow: none;
        padding: 0;
    }
}
