.single-photo {
    display: flex;
    max-width: 300px;
    margin: auto;
}


.single-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-width: 350px;
    margin: auto;
}

.single-thumb .caption {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(100, 100, 100, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.5s;
}


img {
    width: 100%;
    border: 0;
}


.photos {
    grid-column: 2 / 4;
    display: grid;
    grid-gap: 10px;
    grid-auto-rows: 30vh;
}

.thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.thumb .caption {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(100, 100, 100, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.5s;
}

.thumb .thumb-image {
    display: block;
    object-fit: cover;
    position: absolute;
    width: 100%;
    height: 100%;
}

label figure {
    cursor: pointer;
}

.photo-date {
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
}

.photo-caption {
    display: block;
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 1.5em;
}

.modal-content .photo-date,
.modal-content .photo-caption {
    width: 80%;
    margin-left: -40%;
    color: #F6F6F6;
    opacity: 1;
    left: 50%;
    text-align: center;
}

.caption:hover {
    cursor: pointer;
}

.thumb:hover div {
    opacity: 1;
}

.single-thumb:hover div {
    opacity: 1;
}

.modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: left;
    background: rgba(0, 0, 0, 0.8);
    z-index: 98;
}

.modal-content {
    width: 100%;
    height: 100%;
}

.modal-photo {
    object-fit: scale-down;
    padding: 10px;
}

.modal-state {
    display: none;
}

.modal-state:checked + .modal {
    opacity: 1;
    visibility: visible;
}

@media screen and (min-width: 768px) {

    .modal-content .photo-date,
    .modal-content .photo-caption {
        width: 70%;
        margin-left: -35%;
    }
    .modal-arrow {
        font-size: 50px;
    }

}

@media screen and (min-width: 1300px) {

    .photos {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 0 0 0;
        grid-auto-rows: calc(0.3*100vw/2);
    }

    .modal-photo {
        width: 100%;
        height: 100%;
        position: relative;
        margin: auto;
        /*left: 50%;*/
        /*top: 0%;*/
        /*margin-left: -50%;*/
    }

}