.main-navigation {
    background-color: #fbfaf9;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

a {
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--dl-color-theme-primary1);
    text-decoration: underline;
}

.logo a {
    text-decoration: none;
    font-weight: bold;
}

.logo-img {
    height: 50px;
}

/* --- DESKTOP MENU STYLES --- */
.main-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin-left: 2rem;
}

.main-menu li {
    margin: 0;
    line-height: 1;
}

.menu-link {
    text-decoration: none;
    color: var(--dl-color-theme-primary1);
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.menu-link:hover {
    color: var(--dl-color-theme-primary2);
    background-color: #f0f0f0;
}

/* Zrušení rámečku (outline) při focusu pro menu odkazy */
.menu-link:focus {
    outline: none;
    background-color: #f0f0f0; /* Stejné pozadí jako při hoveru, pro konzistentní vzhled */
}

/* Hide mobile buttons on desktop */
.hamburger-btn,
.close-btn {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
}

/* --- MOBILE & RESPONSIVE STYLES --- */
@media (max-width: 767.98px) {

    /* Show hamburger button */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        float: right;
        /* Position it to the right */
        padding: 0;
    }

    .hamburger-line {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Transform the entire menu for mobile view */
    /* Upravený kód v menu.css */
    .main-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 300px;
        max-width: 80vw;
        background-color: #fbfaf9;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);

        /* Layout changes */
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 60px;
        overflow-y: auto;
        /* Hide it off-screen by default */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    /* THE MAGIC: When body has .menu-open, slide the menu in */
    body.menu-open .main-menu {
        transform: translateX(0);
    }

    /* Style menu items for vertical layout */
    .menu-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .menu-link {
        display: block;
        padding: 20px 30px;
        width: 100%;
    }

    /* Show and style the close button */
    .close-btn-item {
        position: absolute;
        top: 10px;
        right: 15px;
        list-style: none;
        /* remove bullet point */
    }

    .close-btn {
        display: block;
        font-size: 2.5rem;
        line-height: 1;
        color: #333;
    }
}

/* Add a background overlay for when the menu is open */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    /* Below menu, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}