/* Custom Gallery Styles */
.custom-gallery-container {
    max-width: 1040px; 
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
}

.custom-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.custom-gallery-item {
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center;  
    max-width: 150px;
    width: 100%;
    aspect-ratio: 1/1; /* Square by default, but images will override */
    /*  overflow: hidden; */
    position: relative;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin: 0 auto; /* Center items in their grid cells */
}

.custom-gallery-item img {
   max-width: 100%;        /* Ensures image doesn't overflow */
  max-height: 100%;
   /* height: 100%;
    object-fit: cover; */
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.custom-gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}