/* ============================= */
/* ParsMehrTeb Gallery Styles   */
/* Fully Scoped - No Conflict   */
/* ============================= */

.pm-gallery-section {
    padding: 80px 0;
    background: #f8fafc;
}

.pm-gallery-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

/* Header */

.pm-gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.pm-gallery-title {
    font-size: 38px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.pm-gallery-subtitle {
    font-size: 16px;
    color: #64748b;
}

/* Grid */

.pm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Card */

.pm-gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

    .pm-gallery-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    }

/* Image */

.pm-gallery-image-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.pm-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.pm-gallery-card:hover .pm-gallery-image {
    transform: scale(1.1);
}

/* Overlay */

.pm-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pm-gallery-card:hover .pm-gallery-overlay {
    opacity: 1;
}

.pm-gallery-overlay h3 {
    font-size: 18px;
    margin: 0;
}

/* ============================= */
/* Lightbox */
/* ============================= */

.pm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

    .pm-lightbox.active {
        visibility: visible;
        opacity: 1;
    }

.pm-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
}

.pm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    transform: scale(0.8);
    transition: transform 0.35s ease;
    z-index: 2;
}

.pm-lightbox.active .pm-lightbox-content {
    transform: scale(1);
}

.pm-lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    cursor: pointer;
}

/* ============================= */
/* Responsive */
/* ============================= */

@media (max-width: 992px) {
    .pm-gallery-title {
        font-size: 30px;
    }

    .pm-gallery-image-wrapper {
        height: 240px;
    }
}

@media (max-width: 576px) {

    .pm-gallery-section {
        padding: 50px 0;
    }

    .pm-gallery-image-wrapper {
        height: 200px;
    }

    .pm-lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }
}
