/* ==========================================================
   Photo Gallery section + Lightbox
   All classes prefixed "pgal-" so they never clash with the
   existing fancybox gallery (.drjasp_btm_section / .drj_list)
   ========================================================== */

.pgal-section {
    padding: 70px 0 60px;
    background: linear-gradient(180deg, #f3fbfc 0%, #ffffff 100%);
}

.pgal-head {
    text-align: center;
    margin-bottom: 10px;
}

.pgal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pgal-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #e3e6e7;
    cursor: zoom-in;
    aspect-ratio: 4 / 5;
    box-shadow: 0 8px 24px rgba(6, 27, 76, 0.10);
    transition: transform .35s ease, box-shadow .35s ease;
}

.pgal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .6s ease;
}

.pgal-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(180deg, rgba(6, 27, 76, 0) 45%, rgba(6, 27, 76, 0.85) 100%);
    opacity: 0;
    transition: opacity .35s ease;
}

.pgal-zoom {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #26c0cc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transform: scale(.6);
    transition: transform .35s ease;
}

.pgal-zoom svg {
    width: 22px;
    height: 22px;
}

.pgal-caption {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.pgal-item:hover,
.pgal-item:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(6, 27, 76, 0.20);
    outline: none;
}

.pgal-item:focus-visible {
    box-shadow: 0 0 0 3px #26c0cc, 0 16px 36px rgba(6, 27, 76, 0.20);
}

.pgal-item:hover img,
.pgal-item:focus-visible img {
    transform: scale(1.06);
}

.pgal-item:hover .pgal-overlay,
.pgal-item:focus-visible .pgal-overlay {
    opacity: 1;
}

.pgal-item:hover .pgal-zoom,
.pgal-item:focus-visible .pgal-zoom {
    transform: scale(1);
}

/* ---------- Lightbox ---------- */

.pgal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000; /* above sticky header & mobile Call/WhatsApp bar */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 12, 34, 0.97);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.pgal-lightbox.pgal-open {
    opacity: 1;
    visibility: visible;
}

.pgal-stage {
    position: relative;
    max-width: 90vw;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pgal-lb-img {
    max-width: 90vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    transform: scale(.94);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.pgal-lb-img.pgal-loaded {
    transform: scale(1);
    opacity: 1;
}

.pgal-lb-info {
    margin-top: 14px;
    color: #fff;
    text-align: center;
    font-size: 15px;
}

.pgal-lb-counter {
    display: inline-block;
    margin-left: 10px;
    color: #26c0cc;
    font-weight: 600;
}

.pgal-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
    z-index: 2;
}

.pgal-btn svg {
    width: 24px;
    height: 24px;
}

.pgal-btn:hover,
.pgal-btn:focus-visible {
    background: #26c0cc;
    outline: none;
}

.pgal-close {
    top: 20px;
    right: 20px;
}

.pgal-close:hover {
    transform: rotate(90deg);
}

.pgal-prev {
    left: 24px;
    top: 50%;
    margin-top: -26px;
}

.pgal-next {
    right: 24px;
    top: 50%;
    margin-top: -26px;
}

.pgal-btn[hidden] {
    display: none;
}

body.pgal-noscroll {
    overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .pgal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 575px) {
    .pgal-section {
        padding: 50px 0 40px;
    }

    .pgal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Show caption always on touch screens (no hover) */
    .pgal-overlay {
        opacity: 1;
        background: linear-gradient(180deg, rgba(6, 27, 76, 0) 65%, rgba(6, 27, 76, 0.8) 100%);
    }

    .pgal-zoom {
        display: none;
    }

    .pgal-btn {
        width: 44px;
        height: 44px;
    }

    /* Arrows move below the photo on phones so they don't cover it */
    .pgal-prev,
    .pgal-next {
        top: auto;
        bottom: 24px;
        margin-top: 0;
        background: rgba(255, 255, 255, 0.16);
    }

    .pgal-prev {
        left: calc(50% - 64px);
    }

    .pgal-next {
        right: calc(50% - 64px);
    }

    .pgal-stage {
        margin-top: -40px;
    }

    .pgal-lb-img {
        max-height: 70vh;
    }

    .pgal-close {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pgal-item,
    .pgal-item img,
    .pgal-lightbox,
    .pgal-lb-img,
    .pgal-btn {
        transition: none;
    }
}
