:root {
    --primary-color: #f1502f;
    --secondary-color: #cccccc;
    --hover-color: #555555;
}

img {
    max-height: 50vh;
}

nav {
    min-width: 200px;
}

.sidebar {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    box-sizing: border-box;
    float: left;
    height: auto;
    margin: 10px 0 0 0;
    overflow: auto;
    padding: 0;
    width: 200px;
}

.sidebar .menu-icon {
    display: none;
}

.sidebar a {
    color: black;
    display: block;
    padding: 16px;
    text-decoration: none;
}

.nav-list {
    font-weight: bold;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.nav-list a.navhome {
    background-color: var(--primary-color);
    color: white;
}

.nav-list li {
    margin: 0;
}

.nav-list li.active {
    background-color: #ececec;
}

.nav-list a.active {
    background-color: var(--secondary-color);
}

.nav-list a:hover:not(.active) {
    background-color: var(--hover-color);
    color: white;
}

.sub-nav-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.sub-nav-list a {
    font-weight: normal;
    padding-left: 26px;
}

.sub-nav-list a.navhome {
    background-color: var(--primary-color);
    color: white;
}

.sub-nav-list a.active {
    background-color: var(--secondary-color);
}

.sub-nav-list a:hover:not(.active) {
    background-color: var(--hover-color);
    color: white;
}

.gb3dviewer {
    border: 2px solid #000;
    padding: 0;
}

.gallery-thumb img {
    border: 4px solid var(--secondary-color);
    box-sizing: border-box;
    height: 80px;
    margin: 10px 10px 10px 0;
    padding: 1px;
    width: auto;
}

.gallery-thumb img:hover {
    border: 4px solid var(--primary-color);
    cursor: pointer;
}

.gallery-show {
    width: 100%;
    height: 50vh;
    max-height: min(40vw, 450px);
    display: flex;
    align-items: center;
}

.gallery-show img {
    box-sizing: border-box;
    border: 4px solid #444;
    height: auto;
    max-height: 100%;
    padding: 0;
    width: auto;
    max-width: 100%;
    background: #aaa;
}


#nav-search {
    padding: 10px;
}

#nav-search input {
    border: 1px solid #aaa;
    border-radius: 5px;
    padding-left: 14px;
    height: 30px;
    max-width: 89%;
}

#nav-search input:focus {
    outline: none;
}

.search-result-popout input {
    margin-bottom: 20px;
    max-width: 100%;
}

.search-result-popout .first-result {
    color: white !important;
    background-color: #555;
}

.search-result-popout {
    position: absolute;
    background: white;
    border: 1px solid #aaa;
    border-radius: 0px 5px 5px 5px;
    padding: 2em;
    z-index: 1;
}

.search-result>p {
    color: grey;
    font-size: 10pt;
    max-width: 40vw;
}

.search-result>p>span.highlight {
    background-color: var(--primary-color);
    color: white;
}

.search-result:hover p {
    color: lightgrey;
}

@media screen and (max-width: 600px) {
    nav {
        min-width: 0;
    }

    .site-header {
        padding-left: 0;
    }

    .sidebar {
        background-color: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 5px;
        height: auto;
        margin: 0;
        padding: 10px;
        width: auto;
    }

    .wrapper {
        max-width: 600px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .sidebar .menu-icon {
        display: block;
        float: left;
        height: 20px;
        line-height: 0;
        padding: 0;
        text-align: center;
        width: 20px;
    }

    .sidebar .menu-icon>svg {
        height: 15px;
        width: 18px;
    }

    .sidebar .menu-icon>svg path {
        fill: #424242;
    }

    .sidebar .nav-list {
        clear: both;
        display: none;
    }

    .sidebar:hover .nav-list {
        display: block;
        padding-bottom: 5px;
    }
}

.details-thumb img {
    max-height: 30vh;
}