:root {
    --bg: white;
    --fg: black;
    --orange: #c93939;
    --link: #3a3a3a;
    --font-base: "Roboto", sans-serif;
    --font-headings: "Jost";
    --font-input: "Roboto";
    --gap-logo-bottom: 1.5vh; /* vzdálenost loga od hrany k hero */
    --gap-selector-bottom: 1vh; /* vzdálenost selectoru od spodku */
    --selector-gap: 8px; /* vodorovné mezery v selectoru */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    height: 100%;
    margin: 0;
    background-color: var(--bg);
    color: var(--fg);
    padding: 0;
    font-family: var(--font-base);
    font-size: 1.5em;
}

a {
    color: var(--orange);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

p {
    padding: 5px 1em;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-headings); /* oprava: var(...) */
}

section {
    position: relative;
}

nav {
    height: 40px;
    width: 100vw;
    z-index: 100;
    position: fixed;
    top: 0px;
    left: 0px;
    font-size: 20px;
    text-align: right;
    padding: 15px 15px;
}

nav a {
    /*border: 1px dotted var(--orange);*/
    padding: 2px;
    /*background: rgba(0, 0, 0, 0.05);*/
    border-radius: 5px;
    color: darkgrey;
}

nav a:hover {
    text-decoration: none;
    color: lightgray;
}

header {
    position: relative;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 25vh 60vh 15vh;
    height: 100vh;
    place-items: center;
    overflow: visible;
    z-index: 250;
    background-color: var(--bg);
}
/* Logo (řádek 1) – zůstává nahoře, posuneme ho kousek výš */
header .logo {
    grid-row: 1;
    align-self: end; /* sedí na spodu horního pásu */
    justify-self: center;
    margin-bottom: var(--gap-logo-bottom); /* ↑ jen rozestup, nic víc */
    max-height: 100%;
    max-width: 90vw;
    width: auto;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    z-index: 3;
}

/* Hero (řádek 2) – beze změny, pořád přesně uprostřed a 4:3 */
#hero {
    grid-row: 2;
    place-self: center; /* H + V střed v řádku */
    position: relative;
    width: clamp(320px, 50vw, 1100px);
    aspect-ratio: 4 / 3; /* šířka > výška */
    max-width: 96vw;
    max-height: 100%; /* nepřeroste 60vh */
    overflow: hidden;
    background: #000;
    border: none;
    border-radius: 3px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.19);
    contain: paint;
}

/* Carousel uvnitř hero – beze změny */
#hero .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 800ms ease;
    will-change: transform;
    backface-visibility: hidden;
    z-index: 1;
}
#hero .slide.active {
    transform: translateX(0);
    z-index: 2;
}
#hero .slide.leaving {
    transform: translateX(-100%);
    z-index: 2;
}
#hero .slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: none !important;
}
#hero .caption {
    position: absolute;
    left: 5%;
    bottom: 8%;
    max-width: 90%;
    z-index: 4;
    color: #fff;
    font-family: var(--font-headings);
    font-size: clamp(10px, 1.5vw, 18px);
    line-height: 1.25;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.6em 1em;
    border-radius: 6px;
    backdrop-filter: blur(1px);
}

/* Selector (řádek 3) – spodní pás; jen rozestupy, centrovaný vodorovně */
header .selector {
    grid-row: 3;
    justify-self: center;
    align-self: center; /* drží se dole v rámci 15vh pásu */
    margin-bottom: var(--gap-selector-bottom);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--selector-gap);
    padding: 0.25rem 0.5rem;
    max-width: 92vw;
    text-align: center;
    z-index: 10;
    font-family: var(--font-headings);
    text-transform: uppercase;
}

#sipka {
    height: 50px;
}

/* Jemné doladění mezer podle šířky (nehneme s layoutem) */
@media (max-width: 900px) {
    header .logo {
        margin-bottom: 0; /* místo var(--gap-logo-bottom) */
    }
    header .selector {
        margin-bottom: 0; /* místo var(--gap-selector-bottom) */
        gap: 6px; /* místo --selector-gap */
    }
}

/* <= 480px */
@media (max-width: 480px) {
    header .logo {
        margin-bottom: 0;
    }
    header .selector {
        margin-bottom: 0;
        gap: 5px;
    }
}

/* dekorativní obrázky v headeru, ať nepřekryjí selector */
#obr1,
#obr2 {
    position: absolute;
    z-index: 300;
}

.kontakt > li {
    list-style-type: none;
}

.odd,
.even {
    border: none;
    width: 100%;
    margin: 0;
    padding: 1em;
    min-height: 100vh;
}
.odd {
    background-color: var(--orange);
}
.odd a {
    color: var(--link);
}
.even {
    background-color: var(--bg);
}
.even a {
    color: var(--orange);
}

.banner {
    height: auto;
    min-height: 60svh;
    padding: 1em;
    text-align: center;
    font-family: var(--font-headings);
    background: var(--fg);
    color: var(--bg);
}

main {
    width: 100%;
}

footer {
    padding: 1em;
    background: var(--fg);
    color: var(--bg);
    font-size: clamp(0.8rem, 1rem, 1.2rem);
}

#obr1 {
    width: 100px;
    position: absolute;
    top: 25%;
    left: 8%;
    transform: rotate(15deg);
}

#obr2 {
    width: 100px;
    position: absolute;
    bottom: 15%;
    right: 8%;
}

#obr3,
#obr4,
#obr5,
#obr6 {
    width: 15%;
}

#obr3 {
    float: right;
    margin: 5%;
}

#obr4 {
    float: left;
    margin: 5%;
}

#obr5 {
    float: right;
    margin: 5%;
}

#obr6 {
    position: absolute;
    right: 20%; /* stejné „odsazení vpravo“ jako tvé margin:5% */
    bottom: 20%;
}

/* ===== Tablety (≤ 1024px) ===== */
@media (max-width: 900px) {
    body {
        font-size: 1.25em;
    }
    p {
        padding: 4px 0.9em;
    }

    .plakat {
        max-width: 800px;
    }
    .odd,
    .even,
    header {
        height: auto;
        min-height: 100svh;
        padding: 1.1em;
    }
    #obr1 {
        top: 7%;
        left: 10%;
        height: 8vh;
        width: auto;
    }

    #obr2 {
        top: 6%;
        right: 10%;
        height: 10vh;
        width: auto;
    }

    #hero {
        width: 100%;
        height: 55vh;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
        border-radius: 2px;
    }

    header {
        grid-template-rows: 15vh 60vh 25vh;
    }
}

/* ===== Malé mobily (≤ 480px) ===== */
@media (max-width: 480px) {
    #obr6 {
        width: 30vw;
        height: auto;
    }
    #obr3,
    #obr4,
    #obr5 {
        display: block; /* ať nejsou inline */
        margin: 1.2em auto; /* centrování + vertikální mezera */
        float: none !important; /* zruší případný globální float */
        clear: both; /* nesedají pod předchozí floaty */
        width: 20%; /* tvoje původní šířka */
        max-width: 100%;
        height: auto; /* drží poměr stran */
    }
    body {
        font-size: 1.05em;
    }
    h1 {
        font-size: 1.6em;
    }
    h2 {
        font-size: 1.35em;
    }
    h3 {
        font-size: 1.2em;
    }
    h4 {
        font-size: 1.05em;
    }

    p {
        padding: 4px 0.8em;
    }

    .odd,
    .even,
    header {
        height: auto;
        min-height: 100svh;
        padding: 1em;
    }

    .plakat {
        max-width: 80vw;
    }
}

/* ===== Footer loga ===== */
.footer-logos {
    background: #000; /* černé pozadí */
    color: #ddd;
    padding: 1.25rem 1rem 1.75rem;
}

.footer-logos__heading {
    margin: 0 auto 0.75rem;
    text-align: center;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    letter-spacing: 0.02em;
}

.footer-logos__row {
    /* centrování a rozložení */
    display: flex;
    flex-wrap: wrap; /* umožní zalomení na menších šířkách */
    justify-content: center; /* vodorovné centrování */
    align-items: center; /* svislé zarovnání */
    gap: clamp(12px, 3vw, 28px);
    max-width: min(
        1100px,
        92vw
    ); /* kontrola šířky a žádné „černé čáry“ z overflow */
    margin: 0 auto;
}

.footer-logos__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* každý „slot“ loga má max šířku, ale může růst/smrštit */
    flex: 0 1 auto;
    min-width: 120px;
}

.footer-logos__logo img {
    display: block; /* eliminuje podivné baseline mezery/čárky */
    max-height: 70px; /* výška log na desktopu */
    width: auto; /* drží poměr stran */
    height: auto;
    object-fit: contain;
    filter: brightness(1) contrast(1); /* jemný unify, můžeš klidně odstranit */
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* ===== Responsivita ===== */

/* Tablety (<= 1024px) */
@media (max-width: 1024px) {
    .footer-logos__row {
        gap: clamp(8px, 1.5vw, 18px); /* menší mezery na tabletu */
    }
    .footer-logos__logo img {
        max-height: 60px;
    }
}

/* Mobily (<= 640px) */
@media (max-width: 640px) {
    .footer-logos__row {
        gap: clamp(6px, 1vw, 12px); /* ještě menší mezery na mobilu */
    }
    .footer-logos__logo {
        min-width: 42%;
        flex: 1 1 42%;
    }
    .footer-logos__logo img {
        max-height: 50px;
    }
    header .selector {
        align-self: start;
        font-size: 0.8rem;
    }
}
