/* ==========================================
   GALLERY PAGE
========================================== */

.gallery-section {
    background: var(--background-color);
}

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

.gallery-btn {
    padding: 12px 26px;
    border: 2px solid var(--primary-color);
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-btn:hover,
.gallery-btn.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-grid {
    margin-top: 10px;
}

/* ==========================================
   CARD
========================================== */

.gallery-item {
    display: block;
    animation: galleryFade .45s ease;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   IMAGE
========================================== */

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    transition:
        transform .6s ease,
        filter .4s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
    filter: brightness(.75);
}

/* ==========================================
   OVERLAY
========================================== */

.gallery-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 28px;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .85),
        rgba(0, 0, 0, .45),
        rgba(0, 0, 0, .08)
    );

    color: var(--white);

    opacity: 0;

    transition: var(--transition);
}

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

/* ==========================================
   CATEGORY
========================================== */

.gallery-category {
    display: inline-block;
    width: fit-content;

    margin-bottom: 12px;
    padding: 6px 14px;

    border-radius: 999px;

    background: var(--primary-color);
    color: var(--white);

    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ==========================================
   TITLE
========================================== */

.gallery-overlay h5 {
    margin-bottom: 8px;

    color: var(--white);

    font-size: 1.35rem;
    font-weight: 700;
}

.gallery-overlay p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, .88);
}

.gallery-overlay p i {
    margin-right: 8px;
}

/* ==========================================
   VIEW BUTTON
========================================== */

.gallery-view {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    width: fit-content;

    padding: 10px 18px;

    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50px;

    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);

    color: var(--white);

    font-weight: 600;

    transition: var(--transition);
}

.gallery-card:hover .gallery-view {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.gallery-view i {
    transition: var(--transition);
}

.gallery-card:hover .gallery-view i {
    transform: rotate(20deg) scale(1.15);
}

/* ==========================================
   BEFORE & AFTER
========================================== */

.gallery-item.before-after .gallery-card {
    border: 3px solid var(--primary-color);
}

/* ==========================================
   ANIMATION
========================================== */

@keyframes galleryFade {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 991px) {

    .gallery-image img {
        height: 280px;
    }

}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .gallery-filter {
        gap: 10px;
    }

    .gallery-btn {
        padding: 10px 18px;
        font-size: .9rem;
    }

    .gallery-image img {
        height: 240px;
    }

    .gallery-overlay {
        opacity: 1;

        background: linear-gradient(
            to top,
            rgba(0, 0, 0, .75),
            rgba(0, 0, 0, .15)
        );
    }

    .gallery-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        padding: 26px;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.08)
        );
        color: var(--white);
        opacity: 0;
        transition: var(--transition);
    }

}