/**
 * PopupGallery
 * Main stylesheet
 */

/* ===========================
   Gallery
=========================== */

.gallery-wrapper {
    width: 900px;
    max-width: 100%;
    margin: 0 auto;
}
.center_p {
	text-align:center;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gallery {
    width: 900px;
    margin: 0 auto 20px auto;
}

@media (max-width: 768px) {

    .gallery {
        width: 80%;
    }

}

.popup-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    cursor: pointer;

    border-radius: 6px;

    box-shadow: 0 3px 10px rgba(0,0,0,.20);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        opacity .25s ease;
}

.popup-img:hover {
    transform: scale(1.03);

    box-shadow: 0 8px 25px rgba(0,0,0,.35);
}

/* ===========================
   Modal
=========================== */

.pg-modal {

    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

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

    z-index: 999999;

}

.pg-modal.open {

    display: flex;

}

.pg-overlay {

    position: relative;

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

}

.pg-image {

    max-width: 90vw;

    max-height: 90vh;

    object-fit: contain;

    transition: transform .25s ease;

    user-select: none;

}

.pg-caption {

    position: absolute;

    bottom: 30px;

    left: 50%;

    transform: translateX(-50%);

    color: #fff;

    text-align: center;

    font-size: 15px;

}

.pg-counter {

    position: absolute;

    top: 20px;

    left: 20px;

    color: #fff;

    font-size: 15px;

}

/* ===========================
   Buttons
=========================== */

.pg-prev,
.pg-next,
.pg-close {

    position: absolute;

    border: none;

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

    color: #fff;

    cursor: pointer;

    transition: background .2s ease;

}

.pg-prev:hover,
.pg-next:hover,
.pg-close:hover {

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

}

.pg-prev,
.pg-next {

    top: 50%;

    transform: translateY(-50%);

    width: 56px;

    height: 56px;

    font-size: 34px;

    border-radius: 6px;

}

.pg-prev {

    left: 20px;

}

.pg-next {

    right: 20px;

}

.pg-close {

    top: 20px;

    right: 20px;

    width: 48px;

    height: 48px;

    font-size: 34px;

    border-radius: 50%;

}

/* ===========================
   Mobile
=========================== */

@media (max-width: 1024px) {

    .gallery-wrapper {

        width: 80%;

    }

    .gallery {

        grid-template-columns: 1fr;

    }

    .pg-prev,
    .pg-next {

        width: 44px;

        height: 44px;

        font-size: 26px;

    }

}