.gallery {
    display: flex;
    height: 35vw;
    margin: 30px -15px -15px 0;
}

.gallery > a {
    display: none;
}

.gallery-col {
    display: flex;
    flex-basis: 50%;
    flex-grow: 1;
}
.gallery-row {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    flex-grow: 1;
    position: relative;
}

.gallery-item {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 20px;
    display: flex;
    flex-shrink: 0;
}

.gallery-image,
.gallery-mobile-image {
    width: calc(100% - 15px);
    height: calc(100% - 15px);
    overflow: hidden;
    border-radius: 5px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 250ms ease-in-out;
}

.gallery-item img.placeholder {
    object-fit: contain;
    background-color: #f6f7f9;
}

.gallery-item:hover img:not(.placeholder) {
    transform: scale(1.05);
}

.gallery-4 > .gallery-col:first-of-type {
    flex-shrink: 0;
}
.gallery-4 > .gallery-row .gallery-item {
    height: 50%;
}
.gallery-5 > .gallery-col .gallery-row {
    height: 50%;
}

.gallery-more {
    position: absolute;
    right: 30px;
    bottom: 30px;
    background-color: var(--color-primary);
    opacity: 0.8;
    color: #fff;
    padding: 8px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.single-profiel .gallery-more {
    bottom: auto;
    top: 15px;
}

.sidebar {
    width: 100%;
    position: absolute;
    margin-top: -50px;

    z-index: 2;
    transition: all 500ms ease-in-out;
}

.sidebar-inner {
    background-color: #fff;
    padding: 25px;
    box-shadow: 0 7px 30px rgba(0,0,0,0.07);
    border-radius: 5px;
}

.content .sidebar h5 {
    margin: 0 0 30px 0;
}

.sidebar-footer {
    padding: 25px;
}

.content .sidebar-footer h7 {
    margin: 0 0 15px 0;
}

.fotos {
    display: flex;
    flex-wrap: wrap;
}
.fotos a {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.fotos a:after {
    content: '';
    display: block;
    padding-bottom: 100%;
}

.fotos a img {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
    object-position: 50% 50%;
    transition: all 250ms ease-in-out;
}

.fotos a:hover img {
    transform: scale(1.05);
}

.mobile-gallery {
    display: none;
    height: 75vw;
}

#sidebar-button {
    background-color: #fff;
    border-bottom: 1px solid var(--color-divider);
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    height: calc(60px + env(safe-area-inset-bottom));
    margin-top: 15px;
    padding-top: 5px;
    padding-bottom: env(safe-area-inset-bottom);
    font-weight: bold;
    position: relative;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.07);
}

#sidebar-button:before {
    content: '';
    display: block;
    background-color: var(--color-divider);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    position: absolute;
    top: 10px;
}

#sidebar-button i {
    margin-right: 10px;
}

#sidebar-visibility {
    display: none;
}

body:after {
    content: '';
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 102;
    background-color: var(--color-secondary);
    transition: all 0.5s ease-in-out;
}

body.has-overlay:after {
    opacity: 0.8;
    visibility: visible;
}

@media only screen and (max-width: 960px) {

    .inline-sidebar {
        position: static;
        margin: 0;
    }

    .inline-sidebar .sidebar-inner {
        padding: 0;
        margin-top: 50px;
        height: auto;
        overflow: visible;
    }

    .inline-sidebar .sidebar-footer {
        padding-left: 0;
    }

    #sidebar-button  {
        display: flex;
    }

    #sidebar-visibility:not(:checked) ~ #body .sidebar:not(.inline-sidebar) {
        transform: translateY(100%);
    }
    body.has-search .sidebar:not(.inline-sidebar),
    #mobile-menu-visibility:checked ~ #body .sidebar:not(.inline-sidebar) {
        transform: translateY(calc(100% + 75px))!important;
    }
    body.has-sidebar #sidebar-visibility:not(:checked) ~ #body .sidebar:not(.inline-sidebar) {
        transform: translateY(calc(100% - 75px - env(safe-area-inset-bottom)));
    }
    body.has-sidebar #mobile-menu-visibility:not(:checked) ~ #header-menu-button {
        bottom: calc(70px + env(safe-area-inset-bottom));
    }

    #body {
        position: static;
    }

    .gallery {
        display: none;
    }
    .mobile-gallery {
        display: flex;
    }

    .sidebar:not(.inline-sidebar) {
        position: fixed;
        margin: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 103;
        max-height: 100%;
    }

    .sidebar-inner {
        position: relative;
        border-radius: 0;
        box-shadow: none;
        overflow: auto;
        z-index: 2;
        height: calc(var(--win-height) - 65px + env(safe-area-inset-bottom));
        padding-bottom: calc(25px + env(safe-area-inset-bottom));
    }
}