
/* =========================================================
   NEHA EYE CENTRE
   PHOTO GALLERY
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #f7fbfb;
    font-family: "Poppins", sans-serif;
    color: #263b40;
}


/* =========================================================
   MAIN GALLERY CONTAINER
   ========================================================= */

.gallery-page {
    width: 96%;
    margin: 0 auto;
    padding: 35px 0 50px;
}


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

.gallery-heading {
    text-align: center;
    margin: 5px auto 32px;
    max-width: 700px;
}

.gallery-heading-line {
    display: block;
    width: 55px;
    height: 4px;
    margin: 0 auto 13px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        #00a99d,
        #008fba
    );
}

.gallery-heading h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
    color: #087f83;
}

.gallery-heading p {
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #65777b;
}


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

.gallery-grid {
    display: grid;

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

    gap: 18px;

    width: 100%;
}


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

.gallery-item {
    position: relative;

    width: 100%;
    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #ffffff;

    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(0, 120, 130, 0.12);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 25px rgba(0, 120, 130, 0.20);
}


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

.gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}

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


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

.gallery-overlay {
    position: absolute;

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

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

    background: rgba(0, 150, 155, 0);

    transition:
        background 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0, 125, 135, 0.30);
}


/* =========================================================
   ZOOM ICON
   ========================================================= */

.gallery-zoom-icon {
    display: flex;

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

    width: 46px;
    height: 46px;

    border-radius: 50%;

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

    color: #008f91;

    font-size: 28px;
    font-weight: 400;

    line-height: 1;

    opacity: 0;

    transform: scale(0.7);

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

.gallery-item:hover .gallery-zoom-icon {
    opacity: 1;
    transform: scale(1);
}


/* =========================================================
   EMPTY GALLERY
   ========================================================= */

.gallery-empty {
    width: 100%;
    max-width: 600px;

    margin: 45px auto;

    padding: 45px 25px;

    text-align: center;

    background: #ffffff;

    border-radius: 15px;

    box-shadow:
        0 5px 20px rgba(0, 120, 130, 0.10);
}

.gallery-empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.gallery-empty h2 {
    margin: 0 0 7px;

    font-size: 20px;
    color: #087f83;
}

.gallery-empty p {
    margin: 0;

    font-size: 13px;
    color: #738286;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.gallery-lightbox {
    position: fixed;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    display: none;

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

    padding: 50px;

    background: rgba(12, 27, 31, 0.94);

    z-index: 99999;
}

.gallery-lightbox.active {
    display: flex;
}


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

.lightbox-image-container {
    display: flex;

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

    width: 100%;
    height: 100%;

    padding: 20px 70px;
}

.lightbox-image-container img {
    display: block;

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

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 6px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.40);
}


/* =========================================================
   LIGHTBOX CLOSE
   ========================================================= */

.lightbox-close {
    position: absolute;

    top: 18px;
    right: 22px;

    width: 44px;
    height: 44px;

    border: none;
    border-radius: 50%;

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

    color: #ffffff;

    font-size: 31px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    z-index: 3;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}


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

.lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 48px;
    height: 60px;

    border: none;

    border-radius: 10px;

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

    color: #ffffff;

    font-size: 30px;

    cursor: pointer;

    z-index: 3;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}


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

.lightbox-counter {
    position: absolute;

    left: 50%;
    bottom: 18px;

    transform: translateX(-50%);

    padding: 6px 13px;

    border-radius: 20px;

    background: rgba(0, 0, 0, 0.35);

    color: #ffffff;

    font-size: 12px;

    z-index: 3;
}


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

@media (max-width: 1100px) {

    .gallery-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 16px;
    }

}


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

@media (max-width: 800px) {

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

        gap: 14px;
    }

    .gallery-heading h1 {
        font-size: 27px;
    }

}


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

@media (max-width: 767px) {

    .gallery-page {
        width: 98%;
        padding: 25px 0 35px;
    }

    .gallery-heading {
        margin-bottom: 24px;
    }

    .gallery-heading h1 {
        font-size: 24px;
    }

    .gallery-heading p {
        padding: 0 10px;
        font-size: 13px;
    }

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

        gap: 10px;
    }

    .gallery-item {
        border-radius: 9px;
    }

    .gallery-zoom-icon {
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    /*
     * Always make the zoom icon slightly visible
     * on touch devices.
     */

    .gallery-overlay {
        background: rgba(0, 125, 135, 0.08);
    }

    .gallery-zoom-icon {
        opacity: 0.85;
        transform: scale(0.85);
    }


    /* Lightbox */

    .gallery-lightbox {
        padding: 20px;
    }

    .lightbox-image-container {
        padding: 20px 5px;
    }

    .lightbox-image-container img {
        max-width: 96vw;
        max-height: 82vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 48px;
        font-size: 23px;
    }

    .lightbox-prev {
        left: 7px;
    }

    .lightbox-next {
        right: 7px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;

        width: 40px;
        height: 40px;

        font-size: 27px;
    }

}


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

@media (max-width: 420px) {

    .gallery-grid {
        gap: 8px;
    }

    .gallery-heading h1 {
        font-size: 22px;
    }

    .gallery-heading p {
        font-size: 12px;
    }

}
