.insta-collage {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Default: 6 columns */
    grid-auto-rows: 180px;
    gap: 10px;
  }

  .collage-item {
    position: relative;
    overflow: hidden;
    background-color: #f3f3f3;
    width: 100%;
    height: 100%;
  }

  .collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers full box without stretching */
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
  }

  .collage-item:hover img {
    transform: scale(1.05);
  }

  /* Custom collage sizes */
  .collage-large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .collage-tall {
    grid-row: span 2;
  }

  .collage-wide {
    grid-column: span 2;
  }

  .collage-horizontal {
    grid-column: span 3;
  }

  .collage-vertical {
    grid-row: span 3;
  }

  /* Breakpoints to match layout with screen width */
  @media (max-width: 1440px) {
    .insta-collage {
      grid-template-columns: repeat(5, 1fr);
    }
  }

  @media (max-width: 1200px) {
    .insta-collage {
      grid-template-columns: repeat(4, 1fr);
      grid-auto-rows: 160px;
    }
      .collage-large,
    .collage-tall,
    .collage-wide,
    .collage-horizontal,
    .collage-vertical {
      grid-column: span 1 !important;
      grid-row: span 1 !important;
    }
  }

  @media (max-width: 992px) {
    .insta-collage {
      grid-template-columns: repeat(3, 1fr);
      grid-auto-rows: 150px;
    }
  }

  @media (max-width: 768px) {
    .insta-collage {
      grid-template-columns: repeat(2, 1fr);
      grid-auto-rows: 140px;
    }
    /* Remove spans for smaller screens */
    .collage-large,
    .collage-tall,
    .collage-wide,
    .collage-horizontal,
    .collage-vertical {
      grid-column: span 1 !important;
      grid-row: span 1 !important;
    }
  }

  @media (max-width: 480px) {
    .insta-collage {
      grid-template-columns: 1fr;
      grid-auto-rows: 180px;
    }
  }