/* Gallery Section Bento Grid */
.gallery-section {
    padding: 100px 0;
    background-color: var(--off-white);
    overflow: hidden; /* Prevent any section overflow */
}

.bento-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
}

.bento-gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    width: 100%;
    aspect-ratio: 1 / 1; /* Force square shape */
}

.bento-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Bento Spans removed for uniform grid */
.bento-gallery-item.big,
.bento-gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
}

/* Purple Overlay Gradient */
.bento-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(108, 63, 197, 0.7) 0%, rgba(108, 63, 197, 0) 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Align content to bottom */
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 25px;
    text-align: center;
    color: var(--white);
    z-index: 2;
}

.bento-gallery-item:hover .bento-gallery-overlay {
    opacity: 1;
}

.bento-gallery-item:hover img {
    transform: scale(1.1);
}

.bento-gallery-overlay i {
    font-size: 24px;
    margin-bottom: 8px;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.bento-gallery-overlay span {
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(10px);
    transition: transform 0.4s ease 0.1s;
}

.bento-gallery-item:hover .bento-gallery-overlay i,
.bento-gallery-item:hover .bento-gallery-overlay span {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bento-gallery-grid {
        grid-template-columns: 1fr;
    }
}
