/* ===== Gallery Scoped Styles ===== */
#gallery .gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  #gallery .gallery-container .grid {
    flex: 1 1 calc(33.333% - 10px); /* 3 per row on all screens */
    max-width: calc(33.333% - 10px);
    box-sizing: border-box;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
    position: relative;
  }
  
  #gallery .gallery-container .grid.show {
    opacity: 1;
    transform: scale(1);
  }
  
  /* Make images responsive inside gallery */
  #gallery .gallery-container .grid img {
    width: 100%;
    display: block;
    border-radius: 5px;
    cursor: pointer;
  }
  
  /* Icon overlay for fancybox */
  #gallery .gallery-container .grid .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  #gallery .gallery-container .grid:hover .icon {
    opacity: 1;
  }
  
  /* Optional: adjust spacing on very small screens */
  @media screen and (max-width: 480px) {
    #gallery .gallery-container {
      gap: 5px;
    }
    #gallery .gallery-container .grid {
      flex: 1 1 calc(33.333% - 5px);
      max-width: calc(33.333% - 5px);
    }
  }