/** {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}*/

.grid-gallery {
  width: 100%;
 /* max-width: 1200px;*/
  margin: 0 auto;
 /* padding: 50px 20px;*/
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  grid-gap: 20px;
}

.grid-gallery .grid-item {
  position: relative;
  background-color: #efefef;
  overflow: hidden;

}

.grid-gallery .grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.grid-gallery .grid-item:hover img {
  transform: scale(1.1);
}

.grid-gallery .grid-item a {
  cursor: pointer;
}


    .grid-gallery .grid-item {
        grid-column: span 1;
        grid-row: span 1;
    }

        .grid-gallery .grid-item:first-child {
            grid-column: span 2;
            grid-row: span 2;
        }

/*.grid-gallery .grid-item:nth-child(3n - 2) {
  grid-column: span 2;
  grid-row: span 2;
}
*/
/* Let's make it responsive */
@media (max-width: 768px) {
  .grid-gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
  }

  .grid-gallery .grid-item:nth-child(3n - 2) {
    grid-column: unset;
    grid-row: unset;
  }
   

   /* .image-text {
        width: 100%;
        background: #fff;
        padding-top: 10px;
        min-height: 75px;
    }*/
}


.grid-gallery .grid-item .image-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: black;
    padding: 10px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
    opacity: 1; /* Initially hide the text */
}

/* Adjust the hover effect to show the text */
.grid-gallery .grid-item:hover .image-text {
    opacity: 2;
}