:root {
    --header-height: 88px;
    --img-overlap: 6px;
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html.no-scroll {
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    max-width: 1600px;
    margin: 0 auto;
    background-color: #f1f1f1;
    font-family: Raleway, Lato, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #757575;
}

a {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

header {
    display: flex;
    position: fixed;
    width: 100%;
    top: 0;
    padding: 10px 24px;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    z-index: 2;
}

header h2 {
    font-size: 24px;
    margin: 16px 0px;
}

header a {
    padding: 8px 16px;
    color: inherit;
    font-family: inherit;
    font-size: 24px;
    color: inherit;
    text-decoration: none;
    user-select: none;
}

#overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 4;
}

#overlay.animate-show {
    animation: show 0.4s;
}

@keyframes show {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#overlay.animate-hide {
    animation: hide 0.4s;
}

@keyframes hide {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

nav {
    position: fixed;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: #ffffff;
    text-align: center;
    overflow-y: auto;
    z-index: 8;
}

nav.animate-open {
    animation: open 0.4s;
}

@keyframes open {
    from {
        left: -300px;
        opacity: 0
    }

    to {
        left: 0;
        opacity: 1;
    }
}

nav.animate-close {
    animation: close 0.4s;
}

@keyframes close {
    from {
        left: 0;
        opacity: 1;
    }

    to {
        left: -300px;
        opacity: 0;
    }
}

nav h2 {
    padding: 64px 16px;
}

nav a {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-decoration: none;
}

nav a:hover,
header a:hover {
    background-color: #cccccc;
    color: #f1f1f1;
}

nav a.no_background:hover {
    background-color: transparent;
    color: inherit;
}

@media (min-width: 1024px) {
    header {
        display: none;
    }

    nav {
        display: block !important;
        animation: none !important;
    }
}

@media (max-width: 1023px) {
    nav {
        display: none;
    }

    main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

#header-space {
    height: var(--header-height);
}

@media (min-width: 1024px) {
    #header-space {
        display: none !important;
    }
}

main {
    margin-left: 300px;
    transition: margin-left 0.4s;
}

.video_section
{
    display: flex;
    flex-direction: column;
}

.video_section .section
{
    margin-bottom: 0;
}

.section {
    padding: 32px;
    background-color: #616161;
    color: #f1f1f1;
    scroll-margin-top: calc(0px - var(--img-overlap));
}

.section.home {
    display: grid;
    width: 100%;
    height: 100vh;
    padding-top: 128px;
    grid-template-columns: repeat(auto-fill, 1fr);
    background-color: #ffffff;
}

@media (max-width: 1023px) {
    .section {
        scroll-margin-top: calc(var(--header-height) - var(--img-overlap));
    }
}

.section.home img {
    width: 100%;
    object-fit: scale-down;
}

.section div {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, 1fr);
}

@media (min-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(33%, 1fr));
    }
}

.gallery div {
    position: relative;
    margin-bottom: calc(0px - var(--img-overlap));
}

.gallery img,
.gallery video {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 64px);
    opacity: 0.9;
    cursor: pointer;
    object-fit: cover;
}

.gallery img:hover {
    opacity: 1;
}

.gallery .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0 auto;
    padding: 8px;
    background-color: rgba(128, 128, 128, 0.6);
    text-align: center;
    color: #f1f1f1;
    z-index: 1;
}

#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    color: #f1f1f1;
    cursor: pointer;
    z-index: 16;
}

@media (max-width: 599px) {
    #modal {
        display: none !important;
    }

    .gallery img {
        cursor: default;
    }
}

#modal div {
    display: flex;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    padding: 60px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: zoom-in 0.4s;
}

#modal-caption {
    padding: 8px 16px;
    cursor: auto;
}

#modal span.close {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 0px 24px 4px 24px;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    z-index: 18;
}

#modal span.previous,
#modal span.next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    font-size: 48px;
    cursor: pointer;
    user-select: none;
    z-index: 18;
}

#modal span:hover{
    background-color: rgba(0, 0, 0, 0.5);
}

#modal .previous {
    left: 20px;
}

#modal .next {
    right: 20px;
}

#modal img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    user-select: none;
}

@keyframes zoom-in {
    from {
        transform: scale(0.5);
    }

    to {
        transform: scale(1);
    }
}