* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: #111;
    background-color: #fff;
}

header {
    position: relative;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    border-bottom: 1px solid #e5e5e5;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
    color: #111;
    text-decoration: none;
}

/* ---------- MOBIL (základ) ---------- */
input#checkbox-menu,
input.sub-toggle {
    display: none;
}

/* hamburger */
label.checkbox-label {
    position: absolute;
    top: 17px;
    right: 5%;
    cursor: pointer;
    z-index: 20;
}

label.checkbox-label div {
    width: 28px;
    height: 3px;
    background-color: #111;
    margin: 5px 0;
    transform-origin: 0 1px;
    transition: 0.4s;
}

input#checkbox-menu:checked~.checkbox-label div:first-child {
    transform: rotate(45deg);
}

input#checkbox-menu:checked~.checkbox-label div:nth-child(2) {
    display: none;
}

input#checkbox-menu:checked~.checkbox-label div:last-child {
    transform: rotate(-45deg);
}

/* seznamy a odkazy */
nav ul,
nav li {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

nav a {
    display: block;
    padding: 12px 20px;
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
}

nav a:hover,
nav a:focus {
    color: #777;
}

/* rozbalovací nav */
nav {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    transform: scaleY(0);
    transform-origin: 0 0;
    transition: 0.2s;
    z-index: 10;
}

input#checkbox-menu:checked~nav {
    transform: scaleY(1);
    transition: 0.8s;
}

nav>ul>li {
    position: relative;
    border-top: 1px solid #eee;
}

nav>ul>li:first-child {
    border-top: none;
}

nav>ul>li>a {
    padding: 16px 60px 16px 5%;
}

/* šipka u podmenu */
label.sub-label {
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 52px;
    cursor: pointer;
}

label.sub-label::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 22px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
    transform: rotate(45deg);
    transition: 0.3s;
}

input.sub-toggle:checked~label.sub-label::after {
    transform: rotate(-135deg);
    top: 23px;
}

/* podmenu = akordeon */
nav li>ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
}

input.sub-toggle:checked~ul {
    max-height: 400px;
}

nav li li a {
    padding: 10px 5% 10px calc(5% + 16px);
    color: #666;
}

/* ---------- POČÍTAČ (přepisuje mobil) ---------- */
@media (min-width: 1001px) {

    label.checkbox-label,
    label.sub-label {
        display: none;
    }

    /* nav už není rozbalovací panel */
    nav {
        position: static;
        width: auto;
        background: none;
        border-bottom: none;
        transform: none;
        transition: none;
    }

    input#checkbox-menu:checked~nav {
        transform: none;
        transition: none;
    }

    nav>ul {
        flex-direction: row;
    }

    nav>ul>li {
        border-top: none;
    }

    nav>ul>li>a {
        height: 64px;
        display: flex;
        align-items: center;
        padding: 12px 20px;
    }

    /* podmenu = dropdown */
    nav li>ul {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 210px;
        padding: 6px 0;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        max-height: none;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    }

    input.sub-toggle:checked~ul {
        max-height: none;
    }

    nav li:hover>ul,
    nav li:focus-within>ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav li li a {
        white-space: nowrap;
        padding: 12px 20px;
        color: #111;
    }

    nav li li a:hover,
    nav li li a:focus {
        color: #777;
    }
}

/* article s textem*/

section {
    padding: 20px 5%;
    display: flex;
    flex-direction: column;  
}

article{
    padding: 15px;
    flex: 1 ;

}

.prvni h1, .clanky h1
{
    display: flex;
    justify-content:center;
}

.clanky article{
    background-color: #f0e9e9;
    margin:5px;
    border-radius: 6px;
}

img{
    width: 100%;
    max-width: 100%;
}

@media (min-width:1000px){
    .clanky, .foto, .korenar{
        display: flex;
        flex-direction: row;
    }
}



