@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    background-color: #f4f4f4;
}

.wrapper{
    height: auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gallery {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 25px;
}

.wrapper h1{
    text-align: center;
    margin: 20px 0;
    font-size: 2.5rem;
    color: rgb(51, 51, 51);
}

.card{
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.card img{
    width: 100%;
    height: 100%;
    filter: grayscale(100%);
    box-shadow: 0 0 20px #333;
    object-fit: cover;
}

.card:hover{
    transform: scale(1.03);
    filter: drop-shadow(0 0 10px #333);
    transition: 0.3s;
    
}

.card:hover img{
    filter: grayscale(0%);
}

.card figcaption{
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 25px;
    width: 100%;
    height: 20%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    opacity: 0;
    
}

.card:hover figcaption{
    transform: scale(1.03);
    opacity: 1;
    transition: 0.3s;
}

@media (min-width:768px) {
    #image9, #image5, #image12{
        grid-column: span 2;
    }
}



@media (max-width:768px) and (min-width:500px){
    .gallery{
        grid-template-columns: repeat(2,1fr);
        justify-content: baseline;
        align-content: baseline;
    }
    #image5, #image12{
        grid-column: span 2;
    }
}

@media (max-width:500px){
    .gallery{
        grid-template-columns: 1fr;
    }
}