* {
    box-sizing: border-box;
    border: 0;
    margin: 0;
    padding: 0;
    outline: none;
    color: inherit;
    text-decoration: none;
    line-height: 1.5;
}

body {
    background: linear-gradient(to right, #136a8a, #267871);
}

.flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flx-dir {
    flex-direction: column;
}

img {
    width: 100%;
}

a {
    transition: .3s;
}

a.active {
    opacity: 0.4;
}

.photo-viewer {
    position: relative;
    height: 400px;
    overflow: hidden;
    max-width: 580px;
    width: calc(100% - 40px);
    margin: 20px auto 20px auto;
    border-radius: 0 0 10px 10px;
}

.photo-viewer img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
}

.photo-viewer.is-loading:after {
    content :url('img/photo-1554730501-8dd4db2b18cc.jpg');
    position: absolute;
    top: 0;
    right: 0;
}

.thumbnails {
    max-width: 600px;
    width: calc(100% - 20px);
    margin: 20px auto;
}

.thumbnails img {
    border-radius: 10px;
    transition: .4s;
    margin: 5px;
    height: 140px;
    max-width: 140px;
    width: calc(100% - 4px);
}

.thumbnails img:hover {
    transform: scale(1.04);
}