body {
    margin: 0;
    font-family: sans-serif;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    position: relative;
    max-width: 1200px;
    margin: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 48px;
}

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

nav li {
    margin: 0;
    padding: 0;
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Мобильный вид */
@media (max-width: 600px) {
    nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #ccc;
        border-radius: .25rem;
        padding: .5rem 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        padding: .75rem 1rem;
    }

    nav a:hover {
        background: #f2f2f2;
    }

    .menu-toggle {
        display: block;
    }
}

/* Animated underscore for links on */
@media (min-width: 601px) {
    a {
        position: relative;
    }

    a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0.3rem;
        width: 0;
        height: 2px;
        background: black;
        transition: width 0.3s ease;
    }

    a:hover::after,
    a:focus::after {
        width: 100%;
    }
}