html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.wrapper {
    position: relative;
    background-image: url(./img/background.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    height: 100vh;
    margin: 0;
    padding: 0;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
}

.wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .15);
}

.wrapper.fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
}

a, a:link, a:visited, a:focus, a:hover, a:active {
    color: inherit;
    text-decoration: none;
}

header {
    display: flex;
    justify-content: center;
    width: calc(100% - 50px);
    padding: 25px 25px 0 25px;
    color: #333;
}

footer a,
header a {
    margin: 0 15px;
    background: transparent;
    border: 1px solid white;
    border-radius: 25rem;
    padding: 10px 25px;
    color: white !important;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, .25);
    transition: all .15s ease;
}

footer a.active {
    background: white;
    color: #333 !important;
}

header a.active {
    color: white !important;
}

footer a:hover,
header a:hover {
    opacity: .95;
}

header,
main,
footer {
    position: relative;
    z-index: 15;
}

footer {
    display: flex;
    justify-content: center;
    position: fixed;
    left: 0;
    bottom: 25px;
    width: 100%;
}

header a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 100px;
    font-weight: 600;
    text-align: center;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    color: white !important;
}

main .close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -60px;
    right: 30px;
    z-index: 5;
    width: 15px;
    height: 15px;
    object-fit: contain;
    padding: 10px;
    border-radius: 50%;
    background: white;
    transition: all .15s ease;
}

main .close img {
    width: 100%;
    height: 100%;
}

.gallery {
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin: 50px;
    height: 50vh;
    overflow: hidden;
    overflow-y: auto;
}

.gallery.docs {
    max-height: 50vh;
    height: auto;
}

.gallery h2 {
    font-size: 1.25rem;
    color: #585858;
    padding-bottom: 15px;
    border-bottom: 1px solid rgb(0 0 0 / 15%);
}

.gallery .list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(256px, 1fr));
    grid-gap: 15px;
    margin: 0;
    padding: 0;
}

.gallery.docs .list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.gallery .list li {
    width: 100%;
    height: 196px;
    list-style: none;
}

.gallery.docs .list li {
    position: relative;
    background: #efefef;
    border-radius: 5px;
    transition: all .15s ease;
}

.gallery.docs .list li:hover {
    background: #d0d0d0;
}

.gallery.video .list li {
    flex-grow: 1;
}

.gallery.video .list li a {
    position: relative;
}

.gallery.video .list li a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 8;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent,#253e8e52);
    border-radius: 5px;
}

.gallery.video .list li a::before {
    content: '';
    position: absolute;
    top: calc(50% - 16px);
    left: calc(50% - 16px);
    z-index: 10;
    width: 32px;
    height: 32px;
    background: url('./img/play.svg');
    background-size: contain;
}

.gallery .list li a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: all .15s ease;
}

main .close:hover,
.gallery .list li a:hover {
    opacity: .75;
}

.gallery .list li a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.gallery.docs .list li a img {
    transition: all .15s ease;
}

.gallery.docs .list li a p {
    opacity: .25;
    color: black;
    font-weight: 600;
    padding: 0 25px;
    text-align: center;
    transition: all .15s ease;
}

.gallery.docs .list li:hover a p,
.gallery.docs .list li:hover a img {
    opacity: .75;
}

@media only screen and (max-width: 768px) {
    .gallery {
        margin: 25px;
        max-height: 55vh;
    }

    footer {
        flex-direction: column;
    }

    header a {
        text-align: center;
    }

    footer a {
        margin: 10px 25px;
        text-align: center;
    }

    header a {
        font-size: 46px;
    }
}

@media only screen and (max-height: 925px) {
    .gallery {
        margin: 25px;
        max-height: 65vh;
    }

    .gallery.video {
        height: 65vh;
    }

    header a {
        font-size: 46px;
    }
}

@media only screen and (max-width: 480px) and (max-height: 925px) {
    .gallery {
        margin: 25px;
        max-height: 40vh !Important;
    }
}

@media only screen and (max-height: 780px), only screen and (max-width: 480px) {
    header a {
        font-size: 28px;
    }
}

@media only screen and (max-width: 480px) and (max-height: 768px) {
    .gallery {
        grid-template-columns: 1fr !important;
    }

    .gallery .list li a {
        min-height: auto;
    }

    .gallery.docs .list li a p {
        bottom: 0;
        font-size: .875rem;
    }

    header a {
        font-size: 24px;
    }

    footer a {
        margin: 5px 25px;
        padding: 6px 15px;
        font-size: 1rem;
    }
}

@media only screen and (max-width: 480px) and (max-height: 650px) {
    .gallery {
        margin: 25px;
        max-height: 30vh !important;
    }
}

@media only screen and (max-width: 480px) and (max-height: 650px) {
    .gallery {
        margin: 25px;
        max-height: 20vh !important;
    }
}

@media only screen and (max-width: 480px) {
    .gallery .list {
        grid-template-columns: 1fr !important;
    }

    .gallery .list li {
        height: auto;
        padding: 15px 0 0 0;
    }

    .gallery h2 {
        margin-bottom: 0;
    }
}