html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    background: #f8f8f9;
    padding-top: 3.5rem;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: bold;
    text-decoration: none;
}

.logo {
    height: 2rem;
}

/* Skrytí hamburgeru na velkých obrazovkách */
.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    padding: 1rem .5rem;
    display: block;
}

.hamburger {
    color: #bb9656;
}

.hamburger:hover {
    color: #5f4619;
}

/* --- RESPONZIVNÍ DESIGN PRO MOBILY S ANIMACÍ --- */
@media (max-width: 828px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .nav-header {
        width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .hamburger {
        display: block;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        background: #fff;
        
        /* Změny pro animaci místo display: none */
        max-height: 0; 
        overflow: hidden; 
        transition: max-height 0.4s ease-in-out; /* Nastavení plynulosti a rychlosti animace */
    }

    /* Když má menu třídu active, zvětšíme maximální výšku */
    nav ul.active {
        /* Hodnota musí být větší než skutečná výška rozevřeného menu. 
           500px je pro 6 položek bohatě dostačující. */
        max-height: 500px; 
    }

    nav ul li {
        width: 100%;
        text-align: center;
        border-top: 1px solid #eee;
    }
}

a:hover {
    color: #5f4619;
}

a {
    color: #bb9656;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
}

h1 {
    margin-top: 0;
}

h1, h2, h3 {
    color: #bb9656;
}

section {
    padding: 1rem 2rem;
    max-width: 900px;
    margin: 1rem auto;
    background: #eeeeef;
    border-radius: 8px;
    scroll-margin-top: 4.5rem;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 24rem;
    height: auto;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s;
    align-self: center;
}

section p:has(img) {
    width: 100%;
    display: flex;
    justify-content: center;
}

img:hover {
    transform: scale(1.02);
}

/* Lightbox CSS */
#lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    transform: none;
}

#lightbox.active {
    display: flex;
}