body{
    font-family:monospace;
}
.title{
    text-align: center;
    font-size: 2em;
}
.gallery-container{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    grid-auto-rows: 240px;
    justify-content: center;
    gap: 5px;
}
.gallery-item{
   
    position: relative;
}
.gallery-item h3{
    position: absolute;
    bottom: 0;
    left: 0;
    color: #fff;
    margin: 0;
    background: linear-gradient(to top,rgba(0, 0, 0, 0.685),rgba(0, 0, 0, 0));
    width: 100%;
    font-size: 17px;
    text-align: center;
}
.gallery-item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* modal styles */
.modal{
    display: none;
}
.modal:target{
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.8);
    transition: all 1s;
}
.modal h3{
    color: #eee;
    text-align: center;
}
.image{
    width: 100%;
    height: 70%;

    display: flex;
    justify-content: center;
    align-items: center;
}
.image a{
    color: #eee;
    text-decoration: none;
    font-size: 2rem;
    margin: 0 5px;
}
.image a:nth-child(2){
    margin: 0;
    height: 100%;
    border: 5px solid #fff;
}
.image img{
    height: 100%;
    width: 700px;
    max-width: 100%;
    object-fit: cover;
}
.close{
    display: block;
    color: #000;
    text-decoration: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-top: 1px;
    text-align: center;
    margin: 15px auto;
    font-size: 1.5rem;
    background-color: rgba(255, 255, 255, 0.841);
}