.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 200px;
    gap: 10px;
  }
  
  .masonry-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .section{
    width: 100vw;
    display: flex;
    justify-content: center;
  }

  .outside1{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 90vw;
    height:auto;
    gap: 2vw;
  }

  .inside1, .inside2, .inside3, .inside4>{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30vw;
    height: 30vh;
  }
  
  .inside3, .inside4>.card{
    -webkit-box-shadow:0px 0px 85px 2px rgba(255,255,255,0.69);
-moz-box-shadow: 0px 0px 85px 2px rgba(255,255,255,0.69);
box-shadow: 0px 0px 85px 2px rgba(255,255,255,0.69);
  }

  .inside1, .inside2{
    -webkit-box-shadow:0px 0px 85px 2px rgba(221,224,71,0.69);
-moz-box-shadow: 0px 0px 85px 2px rgba(221,224,71,0.69);
box-shadow: 0px 0px 85px 2px rgba(221,224,71,0.69);
  }

  .inside > .card > .img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensures the image maintains its aspect ratio */
  }
  
  .card {
    position: relative;
    width: 20vw;
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
  }
  
  .card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

.card::before,
.card::after {
  position: absolute;
  content: "";
  width: 20%;
  height: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  font-weight: bold;
  background-color: #dde047;
  transition: all 0.5s;
}

.card::before {
  top: 0;
  right: 0;
  border-radius: 0 15px 0 100%;
}

.card::after {
  bottom: 0;
  left: 0;
  border-radius: 0 100%  0 15px;
}

.card:hover::before,
.card:hover:after {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  transition: all 0.5s;
}

.card1:hover:after {
  content: "Engagement";
}
.card2:hover:after {
  content: "Wedding";
}
.card3:hover:after {
  content: "Birthday Parties";
}
.card4:hover:after {
  content: "Housewarming Ceremony";
}
.card5:hover:after {
  content: "Casual Events";
}
.card6:hover:after {
  content: "Formal Events";
}
.card7:hover:after {
  content: "Flower Decorations";
}
.card8:hover:after {
  content: "Balloon Decorations";
}

/* Responsiveness */
@media screen and (max-width: 1200px) {
  .outside1 {
      gap: 1.5vw;
  }
  
  .card {
      width: 22vw;
  }
}

@media screen and (max-width: 992px) {
  .card {
      width: 25vw;
      height: 25vh;
  }
  
  .outside1 {
      width: 95vw;
      gap: 1vw;
  }
}

@media screen and (max-width: 768px) {
  .section {
      width: 100%;
  }

  .outside1 {
      flex-wrap: wrap;
      justify-content: center;
      gap: 2vh;
  }

  .card {
      width: 40vw;
      height: 20vh;
  }

  .inside {
      width: auto;
      height: auto;
  }
}

@media screen and (max-width: 480px) {
  .card {
      width: 80vw;
      height: 25vh;
  }

  .outside1 {
      gap: 3vh;
  }

  p[style*="font-size: 1.2rem"] {
      font-size: 1rem !important;
  }
}

/* Fix for very small screens */
@media screen and (max-width: 320px) {
  .card {
      width: 90vw;
      height: 20vh;
  }
}
