/* =========================================
   1. Global Adjustments for this page
   ========================================= */
body {
    font-family: var(--font-work);
    color: #444;
    background-color: #fff;
}

/* =========================================
   2. Gallery Page Styles
   ========================================= */
.gallery-page-section {
    padding: 80px 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f5f5f5;
    border: 1px solid #eee;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    color: #666;
    transition: 0.3s;
    cursor: pointer;
    font-family: var(--font-outfit);
}

.filter-btn:hover, .filter-btn.active {
    background: #6C5CE7;
    color: #fff;
    border-color: #6C5CE7;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* Masonry Column Layout */
.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

@media (max-width: 991px) {
    .section { padding: 80px 0; }
    .gallery-filters { margin-bottom: 30px; }
    .masonry-gallery { column-count: 2; }
}

@media (max-width: 576px) {
    .masonry-gallery { column-count: 1; }
    .filter-btn { padding: 8px 15px; font-size: 14px; }
}

.gallery-item {
    display: block;
    position: relative;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    break-inside: avoid; /* Prevents splitting across columns */
    cursor: pointer;
    animation: fadeInScale 0.4s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(108, 92, 231, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.4s;
}

.item-overlay i {
    color: #fff;
    font-size: 2rem;
    transform: translateY(20px);
    transition: 0.4s;
}

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

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

/* Lightbox customization to match theme */
.lg-backdrop {
    background-color: rgba(0, 0, 0, 0.95);
}

.lg-outer .lg-thumb-item.active, 
.lg-outer .lg-thumb-item:hover {
    border-color: #6C5CE7;
}
