/* =========================
   Fixed header
========================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;

    width: 100%;

    background-color: #333;
}

header main {
    position: relative;

    width: 100%;

    background-color: #333;
}

header main nav {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    padding: 15px;

    background-color: #333;
}


/* =========================
   Logo
========================= */

header main nav .logo {
    display: block;

    width: 200px;
    height: 65px;
    margin: 0;

    background:
        url("/uploads/svg/logo.png")
        no-repeat
        left center / contain;
}


/* =========================
   Desktop menu
========================= */

header main nav .menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

header main nav .menu a {
    color: #fff;
    text-decoration: none;
}

header main nav .menu a:hover {
    text-decoration: underline;
}


/* =========================
   Search form
========================= */

header main nav .search-form {
    margin: 0;
}

header main nav .search-form input {
    width: 200px;
    padding: 8px;

    border: 0;
    border-radius: 4px;

    font: inherit;
}


/* =========================
   Menu button
========================= */

header main nav .menu-toggle {
    display: none;
}


/* =========================
   Prevent content overlap
========================= */

body {
    padding-top: 80px;
}


/* =========================
   Mobile navigation
========================= */

@media (max-width: 768px) {

    body {
        padding-top: 64px;
    }

    header main nav {
        padding: 10px 15px;
    }

    header main nav .logo {
        width: 150px;
        height: 50px;
    }

    header main nav .menu-toggle {
        display: block;

        width: 44px;
        height: 44px;
        padding: 10px;

        border: 0;
        border-radius: 4px;

        background-color: #fff;

        cursor: pointer;
    }

    header main nav .menu-toggle span {
        display: block;

        width: 100%;
        height: 2px;
        margin: 5px 0;

        background-color: #333;

        transition:
            transform 0.3s ease,
            opacity 0.3s ease;
    }

    header main nav .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    header main nav .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    header main nav .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    header main nav .menu {
        position: absolute;
        top: 100%;
        left: 0;

        display: block;

        width: 100%;
        max-height: 0;
        padding: 0 15px;

        overflow: hidden;
        visibility: hidden;
        opacity: 0;

        background-color: #333;

        transition:
            max-height 0.4s ease,
            padding 0.4s ease,
            opacity 0.4s ease;
    }

    header main nav .menu.open {
        max-height: 500px;
        padding: 15px;

        visibility: visible;
        opacity: 1;
    }

    header main nav .search-form {
        width: 100%;
        margin: 0 0 10px;
    }

    header main nav .search-form input {
        display: block;
        width: 100%;
    }

    header main nav .menu a {
        display: block;

        width: 100%;
        padding: 10px 0;

        color: #fff;
        text-align: left;
    }
}