/* ============================================================
   LWWM HOMEPAGE PHOTO GALLERY
============================================================ */

:root {
    --lwwm-blue: #00A2D3;
    --lwwm-blue-dark: #007FA6;
    --lwwm-gold: #E2B547;
    --lwwm-dark: #17242D;
    --lwwm-text: #64717A;
}


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

.home-gallery-section {
    position: relative;

    width: 100%;

    overflow: hidden;

    padding: 95px 0;

    background:
        linear-gradient(
            135deg,
            #EEF9FC 0%,
            #E4F5FA 48%,
            #F7FCFD 100%
        );
}


/* Decorative circle */

.home-gallery-section::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: -190px;
    right: -160px;

    background:
        rgba(0, 162, 211, .07);

    border-radius: 50%;

    pointer-events: none;
}


.home-gallery-section::after {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    left: -150px;
    bottom: -190px;

    background:
        rgba(226, 181, 71, .08);

    border-radius: 50%;

    pointer-events: none;
}


.home-gallery-section > .container {
    position: relative;

    z-index: 2;
}


/* ============================================================
   HEADING
============================================================ */

.gallery-heading {
    margin-bottom: 14px;

    color: var(--lwwm-dark);

    font-size: 43px;
    line-height: 1.15;

    font-weight: 800;
}


.gallery-heading span {
    color: var(--lwwm-blue);
}


.gallery-intro {
    max-width: 690px;

    margin: 0;

    color: var(--lwwm-text);

    font-size: 16px;
    line-height: 1.8;
}


.gallery-view-all {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--lwwm-blue);

    text-decoration: none;

    font-weight: 700;

    transition: all .3s ease;
}


.gallery-view-all:hover {
    color: var(--lwwm-blue-dark);

    transform: translateX(4px);
}


/* ============================================================
   IMPORTANT - BOOTSTRAP GALLERY ROW
============================================================ */

.home-gallery-grid {
    position: relative;

    display: flex;

    flex-wrap: wrap;
}


/*
   Ensure Bootstrap columns remain normal flow elements.
   This prevents gallery items from overlapping.
*/

.home-gallery-grid > [class*="col-"] {
    position: relative;

    float: none;

    display: block;
}


/* ============================================================
   GALLERY ITEMS
============================================================ */

.gallery-item {
    position: relative;

    display: block;

    width: 100%;
    height: 285px;

    overflow: hidden;

    cursor: pointer;

    text-decoration: none;

    background: #DCE7EB;

    border-radius: 16px;

    box-shadow:
        0 15px 35px
        rgba(23, 55, 70, .10);

    isolation: isolate;
}


/* Image */

.gallery-item > img {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;

    object-fit: cover;

    z-index: 1;

    transition:
        transform .55s ease;
}


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


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

.gallery-overlay {
    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

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

    background:
        linear-gradient(
            180deg,
            rgba(0, 20, 30, .03),
            rgba(0, 34, 47, .70)
        );

    opacity: 0;

    transition:
        opacity .3s ease;
}


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


.gallery-overlay > div {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

    color: #FFFFFF;

    transform: translateY(10px);

    transition:
        transform .3s ease;
}


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


.gallery-overlay i {
    width: 50px;
    height: 50px;

    display: flex;

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

    color: #FFFFFF;

    background:
        rgba(255, 255, 255, .18);

    border:
        1px solid
        rgba(255, 255, 255, .40);

    border-radius: 50%;

    font-size: 20px;
}


.gallery-overlay span {
    font-size: 13px;

    font-weight: 700;
}


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

.gallery-bottom-button {
    width: 100%;

    margin-top: 45px;

    text-align: center;
}


.gallery-more-btn {
    padding: 12px 25px;

    color: #FFFFFF !important;

    background: var(--lwwm-blue);

    border:
        2px solid
        var(--lwwm-blue);

    border-radius: 7px;

    font-weight: 700;

    transition:
        all .3s ease;
}


.gallery-more-btn:hover {
    color: #FFFFFF !important;

    background: var(--lwwm-blue-dark);

    border-color: var(--lwwm-blue-dark);

    transform: translateY(-3px);

    box-shadow:
        0 12px 28px
        rgba(0, 162, 211, .20);
}


/* ============================================================
   PHOTO MODAL
============================================================ */

#photoGalleryModal {
    z-index: 1080;
}


#photoGalleryModal .modal-dialog {
    max-width: 1150px;
}


#photoGalleryModal .modal-content {
    position: relative;

    overflow: hidden;

    background: #10171B;

    border: 0;

    border-radius: 18px;

    box-shadow:
        0 35px 100px
        rgba(0, 0, 0, .50);
}


/* ============================================================
   MODAL IMAGE AREA
============================================================ */

#photoGalleryModal .modal-body {
    position: relative;
}


#photoGalleryModal .gallery-modal-image-wrap {
    position: relative;

    width: 100%;

    min-height: 520px;

    display: flex;

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

    overflow: hidden;

    background: #0D1215;

    touch-action: pan-y;
}


#photoGalleryModal #galleryModalImage {
    position: relative;

    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 78vh;

    margin: auto;

    object-fit: contain;

    opacity: 1;

    transition:
        opacity .18s ease;
}


/*
   IMPORTANT:
   No position:absolute on the modal image.
   Only one image remains in normal flow.
*/

#photoGalleryModal #galleryModalImage.gallery-changing {
    opacity: .15;
}


/* ============================================================
   PREVIOUS / NEXT BUTTONS
============================================================ */

#photoGalleryModal .gallery-nav {
    position: absolute;

    top: 50%;

    z-index: 30;

    width: 56px;
    height: 56px;

    display: flex;

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

    padding: 0;

    color: var(--lwwm-blue);

    background:
        rgba(255, 255, 255, .92);

    border: 0;

    border-radius: 50%;

    box-shadow:
        0 8px 28px
        rgba(0, 0, 0, .28);

    font-size: 25px;

    transform:
        translateY(-50%);

    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}


#photoGalleryModal .gallery-nav:hover {
    color: #FFFFFF;

    background: var(--lwwm-blue);

    transform:
        translateY(-50%)
        scale(1.06);
}


#photoGalleryModal .gallery-prev {
    left: 20px;
}


#photoGalleryModal .gallery-next {
    right: 20px;
}


/* ============================================================
   MODAL CLOSE
============================================================ */

#photoGalleryModal .gallery-modal-close {
    position: absolute;

    z-index: 50;

    top: 17px;
    right: 17px;

    width: 40px;
    height: 40px;

    padding: 10px;

    background-color: #FFFFFF;

    border-radius: 50%;

    opacity: .95;

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, .25);
}


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

#photoGalleryModal .gallery-counter {
    position: absolute;

    z-index: 20;

    left: 50%;
    bottom: 18px;

    padding: 7px 14px;

    color: #FFFFFF;

    background:
        rgba(0, 0, 0, .60);

    border:
        1px solid
        rgba(255, 255, 255, .20);

    border-radius: 30px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: .5px;

    transform:
        translateX(-50%);
}


/* ============================================================
   MODAL CAPTION
============================================================ */

#photoGalleryModal .gallery-modal-caption {
    position: relative;

    padding:
        20px 25px 23px;

    background: #FFFFFF;
}


#photoGalleryModal .gallery-modal-caption small {
    display: block;

    margin-bottom: 5px;

    color: var(--lwwm-blue);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.2px;

    text-transform: uppercase;
}


#photoGalleryModal .gallery-modal-caption h5 {
    margin: 0;

    color: var(--lwwm-dark);

    font-size: 17px;

    font-weight: 700;
}


/* ============================================================
   BACKDROP
============================================================ */

.modal-backdrop.show {
    opacity: .82;
}


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

@media (max-width: 991.98px) {

    .home-gallery-section {
        padding:
            80px 0;
    }


    .gallery-heading {
        font-size: 37px;
    }


    .gallery-item {
        height: 265px;
    }

}


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

@media (max-width: 767.98px) {

    .home-gallery-section {
        padding:
            65px 0;
    }


    .gallery-heading {
        font-size: 31px;
    }


    .gallery-item {
        height: 260px;
    }


    #photoGalleryModal .modal-dialog {
        margin: 10px;
    }


    #photoGalleryModal .gallery-modal-image-wrap {
        min-height: 320px;
    }


    #photoGalleryModal .gallery-nav {
        width: 44px;
        height: 44px;

        font-size: 20px;
    }


    #photoGalleryModal .gallery-prev {
        left: 8px;
    }


    #photoGalleryModal .gallery-next {
        right: 8px;
    }


    #photoGalleryModal .gallery-counter {
        bottom: 10px;

        padding:
            6px 11px;

        font-size: 11px;
    }

}


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

@media (max-width: 480px) {

    .gallery-heading {
        font-size: 28px;
    }


    .gallery-item {
        height: 235px;
    }


    #photoGalleryModal .gallery-nav {
        width: 40px;
        height: 40px;

        font-size: 18px;
    }

}