﻿/*==========================================
            Gallery Section
==========================================*/

.gallery-section {
    position: relative;
    padding: 140px 0;
    background: linear-gradient(180deg,#ffffff 0%,#f7faff 100%);
    overflow: hidden;
}

    .gallery-section::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(circle at 15% 20%, rgba(37,71,244,.08), transparent 28%), radial-gradient(circle at 85% 70%, rgba(124,58,237,.08), transparent 30%);
    }

/*==========================================
            Grid
==========================================*/

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 28px;
    position: relative;
    z-index: 2;
}

/*==========================================
            Card
==========================================*/

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    aspect-ratio: 1/1;
    isolation: isolate;
    transform: translateY(0);
    transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 12px 35px rgba(15,23,42,.08), 0 2px 10px rgba(15,23,42,.05);
}

    /* Gradient Border */

    .gallery-item::before {
        content: "";
        position: absolute;
        inset: 0;
        padding: 1.5px;
        border-radius: inherit;
        background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(37,71,244,.45), rgba(124,58,237,.45), rgba(255,255,255,.7));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: .8;
        pointer-events: none;
    }

    /* Hover Overlay */

    .gallery-item::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to top, rgba(15,23,42,.35), transparent 55% );
        opacity: 0;
        transition: .45s;
    }

    /*==========================================
            Image
==========================================*/

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .9s cubic-bezier(.22,1,.36,1), filter .8s;
        will-change: transform;
    }

    /*==========================================
            Hover
==========================================*/

    .gallery-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 30px 70px rgba(30,41,59,.16), 0 10px 35px rgba(59,130,246,.18);
    }

        .gallery-item:hover img {
            transform: scale(1.12);
            filter: saturate(1.08) contrast(1.05);
        }

        .gallery-item:hover::after {
            opacity: 1;
        }

    /*==========================================
            Active
==========================================*/

    .gallery-item:active {
        transform: scale(.985);
    }

/*==========================================
            Responsive
==========================================*/

@media(max-width:1200px) {

    .gallery-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(max-width:992px) {

    .gallery-section {
        padding: 100px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 22px;
    }
}

@media(max-width:576px) {

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-item {
        border-radius: 22px;
    }
}
