.main-top {
  height: 100%;
}

.header {
  background: #393939a6;
}

.collection-section {
  margin-top: 3.5rem;
}

.collection-section h4 {
  color: #7f7a66;
  font-size: 1.688rem;
  line-height: 30px;
  font-weight: 400;
}

.collection-section h2 {
  color: #231f20;
  font-size: 3.563rem;
  line-height: 70px;
  font-weight: 400;
}

/* Gallery container */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1; /* Maintain aspect ratio for all items */
}

.gallery-item:hover:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgb(0 0 0 / 37%), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1 / 1; /* Maintain aspect ratio for large items */
}

.collection-title {
  position: absolute;
  bottom: 0px;
  /* left: 10px; */
  padding: 10px;
  color: white;
  font-size: 1.3rem;
  /* background: rgb(0 0 0 / 18%); */
  /* border-radius: 5px; */
  opacity: 0;
  width: 100%;
  transition: opacity 0.3s;
  /* box-shadow: -20px 13px 20px 17px rgba(0, 0, 0, 0.3); */
  z-index: 4;
}

.gallery-item:hover .collection-title {
  opacity: 1; /* Show on hover */
}

.load-more {
  width: 10rem !important;
}

/* Responsive design for medium screens */
@media (max-width: 900px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: auto; /* Allow large images to adjust in row */
  }

  .icons {
    color: #231f20;
  }
  .gallery-item::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgb(0 0 0 / 37%), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 1;
  }
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
  .load-more {
    width: 8rem !important;
  }
  .header {
    background: #f5f2e9;
  }
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-item img {
    aspect-ratio: auto; /* Allow images to fit within their containers */
  }

  .collection-section h4 {
    font-size: 1.2rem;
    line-height: 20px;
    text-align: center;
  }

  .collection-section {
    margin-top: 5rem;
  }
  .collection-title {
    opacity: 1;
    font-size: 1rem;
  }
}