/* ===== СТИЛИ ДЛЯ МОДАЛЬНОЙ ГАЛЕРЕИ ===== */
.pg-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    overflow: hidden;
    animation: pgFadeIn 0.3s ease;
}
.pg-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.pg-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
    line-height: 1;
    background: none;
    border: none;
}
.pg-modal-close:hover {
    transform: rotate(90deg);
    color: #ff6b6b;
}
.pg-modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    display: block;
}
.pg-modal-prev,
.pg-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 32px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.pg-modal-prev:hover,
.pg-modal-next:hover {
    background: rgba(255, 255, 255, 0.30);
    transform: translateY(-50%) scale(1.05);
}
.pg-modal-prev {
    left: 30px;
}
.pg-modal-next {
    right: 30px;
}
.pg-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 400;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    z-index: 10;
}
@keyframes pgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.pg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.pg-gallery-thumb {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pg-gallery-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(0,0,0,0.16);
}
.pg-gallery-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .pg-modal-prev,
    .pg-modal-next {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .pg-modal-prev { left: 10px; }
    .pg-modal-next { right: 10px; }
    .pg-modal-close {
        top: 16px;
        right: 20px;
        font-size: 36px;
    }
}