/* ==================================================
   GALLERY SECTION
================================================== */

.gallery-section {

    position: relative;

    overflow: hidden;

    padding: 100px 8%;

    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #eef5ff 52%,
            #ffffff 100%
        );
}


/* ==================================================
   BACKGROUND GLOW
================================================== */

.gallery-section::before {

    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    top: -230px;
    right: -190px;

    border-radius: 50%;

    background:
        rgba(59, 130, 246, 0.09);

    filter: blur(85px);

    pointer-events: none;
}


.gallery-section::after {

    content: "";

    position: absolute;

    width: 480px;
    height: 480px;

    bottom: -230px;
    left: -190px;

    border-radius: 50%;

    background:
        rgba(96, 165, 250, 0.07);

    filter: blur(85px);

    pointer-events: none;
}


/* ==================================================
   CONTAINER
================================================== */

.gallery-container {

    position: relative;

    z-index: 2;

    max-width: 1250px;

    margin: 0 auto;
}


/* ==================================================
   HEADER
================================================== */

.gallery-heading {

    max-width: 760px;

    margin: 0 auto 65px;

    text-align: center;
}


.gallery-label {

    display: inline-block;

    margin-bottom: 12px;

    color: #2563eb;

    font-size: 0.85rem;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.gallery-heading h1 {

    margin: 0 0 18px;

    color: #0f172a;

    font-size: clamp(
        2.3rem,
        4vw,
        3.3rem
    );

    font-weight: 800;

    line-height: 1.2;

    letter-spacing: -1px;
}


.gallery-heading h1 span {

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #3b82f6
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.gallery-heading p {

    max-width: 680px;

    margin: 0 auto;

    color: #64748b;

    font-size: 1rem;

    line-height: 1.8;
}


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

.gallery-category {

    position: relative;

    margin-bottom: 70px;
}


.gallery-category:last-child {

    margin-bottom: 0;
}


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

.gallery-category-heading {

    display: flex;

    align-items: center;

    gap: 18px;

    margin-bottom: 25px;
}


.gallery-category-heading::after {

    content: "";

    flex: 1;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            rgba(37, 99, 235, 0.25),
            transparent
        );
}


.gallery-category-heading h2 {

    margin: 0;

    color: #0f172a;

    font-size: 1.55rem;

    font-weight: 750;
}


/* ==================================================
   GALLERY GRID
================================================== */

.gallery-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 22px;
}


/* ==================================================
   GALLERY ITEM
================================================== */

.gallery-item {

    position: relative;

    height: 280px;

    overflow: hidden;

    border-radius: 18px;

    background:
        #dbeafe;

    border:
        1px solid
        rgba(59, 130, 246, 0.10);

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.07);

    cursor: pointer;

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}


.gallery-item:hover {

    transform:
        translateY(-8px);

    border-color:
        rgba(37, 99, 235, 0.25);

    box-shadow:
        0 22px 45px
        rgba(15, 23, 42, 0.14);
}


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

.gallery-item img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.7s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        );
}


.gallery-item:hover img {

    transform:
        scale(1.08);
}


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

.gallery-overlay {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 65px 20px 20px;

    background:
        linear-gradient(
            to top,
            rgba(15, 23, 42, 0.88),
            rgba(15, 23, 42, 0.35),
            transparent
        );

    color: #ffffff;

    transform:
        translateY(10px);

    opacity: 0;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}


.gallery-item:hover .gallery-overlay {

    opacity: 1;

    transform:
        translateY(0);
}


.gallery-overlay h4 {

    margin: 0 0 6px;

    color: #ffffff;

    font-size: 1.05rem;

    font-weight: 700;
}


.gallery-overlay p {

    margin: 0;

    color:
        rgba(255, 255, 255, 0.82);

    font-size: 0.82rem;

    line-height: 1.5;
}


/* ==================================================
   FEATURED BADGE
================================================== */

.gallery-badge {

    position: absolute;

    top: 14px;
    right: 14px;

    z-index: 3;

    padding: 6px 11px;

    border-radius: 999px;

    background:
        rgba(37, 99, 235, 0.92);

    color: #ffffff;

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 0.3px;

    box-shadow:
        0 5px 15px
        rgba(37, 99, 235, 0.25);
}


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

.gallery-grid .empty {

    grid-column: 1 / -1;

    padding: 55px 30px;

    text-align: center;

    border:
        2px dashed
        #bfdbfe;

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.65);
}


.gallery-grid .empty h3 {

    margin: 0 0 8px;

    color: #0f172a;

    font-size: 1.3rem;
}


.gallery-grid .empty p {

    margin: 0;

    color: #64748b;

    font-size: 0.9rem;
}


/* ==================================================
   FULL EMPTY STATE
================================================== */

.gallery-empty {

    max-width: 650px;

    margin: 0 auto;

    padding: 65px 30px;

    text-align: center;

    background:
        rgba(255, 255, 255, 0.75);

    border:
        1px solid
        rgba(59, 130, 246, 0.12);

    border-radius: 22px;

    box-shadow:
        0 15px 40px
        rgba(15, 23, 42, 0.07);
}


.gallery-empty-icon {

    width: 70px;
    height: 70px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    border-radius: 20px;

    background:
        #eff6ff;

    font-size: 2rem;
}


.gallery-empty h3 {

    margin: 0 0 10px;

    color: #0f172a;

    font-size: 1.5rem;
}


.gallery-empty p {

    max-width: 500px;

    margin: 0 auto;

    color: #64748b;

    line-height: 1.7;
}


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

@media (max-width: 768px) {

    .gallery-section {

        padding:
            75px 1.5rem;
    }


    .gallery-heading {

        margin-bottom: 45px;
    }


    .gallery-heading h1 {

        font-size: 2.2rem;
    }


    .gallery-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 16px;
    }


    .gallery-item {

        height: 240px;
    }


    .gallery-category {

        margin-bottom: 50px;
    }

}


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

@media (max-width: 520px) {

    .gallery-section {

        padding:
            60px 1.2rem;
    }


    .gallery-heading h1 {

        font-size: 2rem;
    }


    .gallery-heading p {

        font-size: 0.9rem;
    }


    .gallery-grid {

        grid-template-columns: 1fr;
    }


    .gallery-item {

        height: 280px;
    }


    /*
       Keep overlay visible on mobile
       because there is no hover.
    */

    .gallery-overlay {

        opacity: 1;

        transform: translateY(0);
    }


    .gallery-category-heading h2 {

        font-size: 1.3rem;
    }

}