/* Základní nastavení */
:root {
    --krem: #ffffd0;
    --cerna: #111;
    --linka: #ddd6b0;
    --zelena: #2f4a2a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--cerna);
    background: var(--krem);
    line-height: 1.4;
}

a {
    color: inherit;
}

h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h2 a {
    text-decoration: none;
}

h2 a:hover {
    text-decoration: underline;
}

p {
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    line-height: 1.6;
    max-width: 60ch;
}

/* Úvodní pruh s fotkou */
.hero {
    position: relative;
    min-height: 561px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Dokud není fotka img/hero.jpg, zobrazí se zelený přechod */
    background:
        linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)),
        url('../content/Homepage.webp') center / cover no-repeat,
        linear-gradient(135deg, #3d5a2e, #6b6a3a 50%, #2c4a5a);
    color: #fff;
}

.hero-small {
    position: relative;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Dokud není fotka img/hero.jpg, zobrazí se zelený přechod */
    background:
        linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)),
        url('../content/Homepage.webp') center / cover no-repeat,
        linear-gradient(135deg, #3d5a2e, #6b6a3a 50%, #2c4a5a);
    color: #fff;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 2.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #fff;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

.menu a:hover {
    text-decoration: underline;
}

.menu .socialni,
.menu .domu {
    display: flex;
    align-items: center;
}

.menu .socialni svg,
.menu .domu svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: #fff;
}

/* Logo v levém horním rohu, menší; pod 1100 px se vrátí nad menu, aby se nepřekrývalo */
/* Odkaz s logem je flex položka hero, proto auto margin patří jemu */
.logo-odkaz {
    margin-top: auto;
}

.logo {
    display: block;
    width: clamp(6.67rem, 12vw, 10.67rem);
    height: auto;
}

/* Nadpis uprostřed hero */
.hero-nadpis {
    margin: 1rem 0 auto;
    padding: 0 1rem;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Tlačítko „chci to zažít!“ přesahující přes spodní okraj fotky */
.tlacitko-zazit {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    display: flex;
    align-items: center;
    padding: 0.3rem 1.2rem 0.45rem 1.4rem;
    background: var(--cerna);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 12px;
    font-size: clamp(1.1rem, 1.8vw, 1.8rem);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.tlacitko-zazit:hover {
    background: var(--krem);
    color: var(--cerna);
}

/* Obsahové pruhy */
.pruh {
    padding: clamp(5rem, 9vw, 8rem) 8vw;
}

.pruh-svetly {
    background: var(--krem);
    padding-top: clamp(3.5rem, 6vw, 5.5rem);
    padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.pruh-bez-horniho-odsazeni {
    padding-top: 0;
}

/* Krémový pruh přes fotku, lehce průhledný, aby prosvítaly obrysy */
.pruh-foto {
    background:
        linear-gradient(rgba(255, 255, 208, 0.7), rgba(255, 255, 208, 0.7)),
        url('../content/Homepage.webp') center / cover no-repeat;
}

/* Fotky a kontakty: menší odsazení nadpisu shora a méně prostoru pod galerií */
.pruh-foto,
.pruh-kontakty {
    padding-top: 4rem;
}

.pruh-foto {
    padding-bottom: 4rem;
}

/* Rozmazaná fotka na pozadí kontaktů */
.pruh-kontakty {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    padding-bottom: 4rem;
}

.pruh-kontakty::before {
    content: "";
    position: absolute;
    inset: -3rem;
    z-index: -1;
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../content/Homepage.webp') center / cover no-repeat;
    filter: blur(12px);
}

.dva-sloupce {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
}

.sloupec {
    padding: 3rem 4vw;
}

/* Svislá dělicí linka mezi sloupci */
.sloupec + .sloupec {
    border-left: 1px solid var(--linka);
}

/* Video a Tábor 2027 jsou odsazené od linky uprostřed */
#video {
    padding-right: 6vw;
}

#prihlasky {
    padding-left: 6vw;
}

.nadpis-stred {
    font-size: clamp(1.6rem, 2.4vw, 2.3rem);
    text-align: center;
}

.stred {
    text-align: center;
}

/* Vzkazy: text u středu, jen krátký řádek */
.pruh-vzkazy p {
    margin: 0 auto 2rem;
}

/* Náhled videa */
/* Přehrávač YouTube přímo na stránce */
.video-nahled {
    position: relative;
    max-width: 32rem;
    width: 32rem;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.video-nahled iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-titulek {
    color: #f5d742;
    font-size: clamp(1.1rem, 2vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Galerie */
.galerie {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.galerie-polozka {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background-color: #7a8a55;
    background-size: cover;
    background-position: center;
    transition: filter 0.2s;
}

/* Jen mírné ztmavení, bez zvětšování */
.galerie-polozka:hover {
    filter: brightness(0.92);
}

.galerie-polozka span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

.tlacitko {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    background: var(--cerna);
    color: #fff;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.tlacitko:hover {
    background: #2a2a2a;
}

/* .tlacitko nastavuje display, což by jinak přebilo atribut hidden */
.tlacitko[hidden] {
    display: none;
}

/* Kontakty: holý text na fotce, sloupce odděluje stejná linka jako nahoře */
.kontakt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Jméno a fotka na jednom řádku, fotka u středu stránky */
.kontakt-hlava {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.kontakt-zrcadlo .kontakt-hlava {
    flex-direction: row-reverse;
}

.kontakt-foto {
    width: clamp(5rem, 9vw, 8rem);
    height: auto;
}

.kontakt h3 {
    font-size: clamp(1.5rem, 2.2vw, 2.1rem);
    line-height: 1.1;
}

.kontakt-role {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kontakt a {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Patička */
.paticka {
    padding: 3rem 2rem;
    background: var(--cerna);
    color: #fff;
    text-align: center;
}

/* Globální p má max-width, takže by text zůstal u levého okraje */
.paticka p {
    font-size: 1rem;
    max-width: none;
}

/* Ke stažení: tlačítka dokumentů vedle sebe, na úzkém displeji se zalamují */
.dokumenty {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0 4rem;
}

.kategorie {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 800px) {
    .kategorie {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kategorie-blok {
    min-width: 0;
    padding: 1.25rem;
    border-top: 3px solid var(--zelena);
    background: rgba(255, 255, 255, 0.5);
}

.kategorie-blok h2 {
    margin: 0 0 0.75rem;
    color: var(--zelena);
    font-size: 1.25rem;
}

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

.kategorie-blok li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--linka);
    overflow-wrap: anywhere;
}

.seznam {
    list-style: none;
    max-width: 60ch;
}

.seznam li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--linka);
    font-size: clamp(1.05rem, 1.35vw, 1.2rem);
}

/* Poděkování: text a loga partnerů vycentrovaná, každé logo v pevné oblasti */
.podekovani-text {
    margin: 0 auto 2.5rem;
    text-align: center;
}

.partneri {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(2rem, 6vw, 4.5rem);
    max-width: 1000px;
    margin: 0 auto;
}

.partner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(9rem, 26vw, 16rem);
    height: clamp(7rem, 16vw, 10rem);
}

/* Městská část: široké logo, samostatně pod sponzory */
.partner-mestska-cast {
    display: flex;
    width: min(100%, 22rem);
    height: auto;
    margin: 3.5rem auto 0;
}

.partner-mestska-cast img {
    width: 100%;
}

.partner img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner:hover {
    opacity: 0.75;
}

/* Podstránky: nižší úvodní pruh */
.hero.hero-small {
    min-height: 340px;
}

.hero-small .hero-nadpis {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}

/* Tábor 2026: velký nadpis zabere 70 % šířky, plakát 30 % */
.uvod-akce {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 4rem;
}

.uvod-akce h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.uvod-akce img {
    display: block;
    width: 70%;
    height: auto;
    border-radius: 15px; 
}

.dlouhy-popis p {
    max-width: none;
}

/* Formuláře */
.formular {
    max-width: 42rem;
    margin: 0 auto;
}

.formular fieldset {
    border: 0;
    margin-bottom: 2.5rem;
}

.formular legend {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.formular-uvod {
    font-size: 0.95rem;
    margin: 0 0 2rem;
}

.pole {
    display: block;
    margin-bottom: 1.2rem;
}

.pole > span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.pole input,
.pole select,
.pole textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--cerna);
    background: #fff;
    border: 1px solid var(--linka);
    border-radius: 6px;
}

.pole textarea {
    min-height: 8rem;
    resize: vertical;
}

.pole-volba {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.pole-volba label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* .pole input nastavuje šířku 100 %, u přepínačů by text skončil pod nimi */
.pole-volba input[type="radio"] {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

.dite + .dite {
    border-top: 1px solid var(--linka);
    padding-top: 1.5rem;
}

/* Chybové hlášky formuláře */
.pole > .chyba,
.chyba {
    display: block;
    margin-top: 0.4rem;
    margin-bottom: 0;
    color: #a3200f;
    font-size: 0.95rem;
    font-weight: 600;
}

.pole-volba + .chyba,
.souhlas + .chyba {
    margin-bottom: 1.2rem;
}

/* Modální okno po odeslání formuláře: stejný krém, linka a zaoblení jako zbytek webu */
.modal {
    width: min(26rem, calc(100% - 2rem));
    margin: auto;
    padding: 2rem;
    background: var(--krem);
    color: var(--cerna);
    border: 3px solid var(--cerna);
    border-radius: 12px;
    text-align: center;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.modal h2 {
    margin-bottom: 0.8rem;
}

.modal p {
    margin: 0 auto 1.5rem;
}

.modal button.tlacitko {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.souhlas {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.formular button.tlacitko {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

/* Časté dotazy */
.dotazy {
    max-width: 48rem;
    margin: 0 auto;
}

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

.dotaz[hidden] {
    display: none;
}

.dotaz summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
}

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

.dotaz summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.dotaz[open] summary::after {
    content: '−';
}

.dotaz p {
    padding-bottom: 1.2rem;
}

.dotazy-nic {
    padding-top: 1rem;
}

.dotazy-nic[hidden] {
    display: none;
}

/* Tablety */
@media (max-width: 1000px) {
    .galerie {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobily */
@media (max-width: 760px) {
    .hero {
        min-height: 442px;
    }

    .menu {
        gap: 0.4rem 1.2rem;
    }

    .menu a {
        font-size: 1.15rem;
    }

    .pruh {
        padding: 4rem 5vw;
    }

    .dva-sloupce {
        grid-template-columns: minmax(0, 1fr);
    }

    .video-nahled {
        width: 100%;
        max-width: none;
    }

    .sloupec {
        padding: 2rem 4vw;
    }

    .sloupec + .sloupec {
        border-left: none;
        border-top: 1px solid var(--linka);
    }

    #video,
    #prihlasky {
        padding-left: 4vw;
        padding-right: 4vw;
    }

    .galerie {
        gap: 1.5rem;
    }

    .uvod-akce {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Administrace */
.admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--linka);
}

.admin-menu a {
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
}

.admin-menu a:hover,
.admin-menu a[aria-current] {
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

/* Odhlášení musí být POST, tlačítko je tedy vzhledově shodné s odkazy menu */
.admin-odhlasit {
    margin-left: auto;
}

.admin-odhlasit button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 1.15rem;
    cursor: pointer;
}

.admin-odhlasit button:hover {
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

.admin-pocet {
    margin-bottom: 1rem;
}

.zaznam {
    padding: 1rem 0;
    border-bottom: 1px solid var(--linka);
}

.zaznam-hlava {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.zaznam dl {
    display: grid;
    grid-template-columns: minmax(6rem, 10rem) minmax(0, 1fr);
    gap: 0.25rem 1.5rem;
}

.zaznam dt {
    font-weight: 600;
}

.zaznam dd {
    overflow-wrap: anywhere;
}

.zaznam-text {
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .zaznam dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .zaznam dd {
        margin-bottom: 0.4rem;
    }
}
