/* ============================================================
   PROJECT MODAL  —  pm-* namespace
   ============================================================ */

/* ---------- Backdrop ---------- */
.pm-backdrop {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.pm-backdrop.pm-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Card ---------- */
.pm-card {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(16px) scale(0.985);
    transition: transform 250ms ease;
    margin: auto;
}

.pm-backdrop.pm-open .pm-card {
    transform: translateY(0) scale(1);
}

/* ---------- Banner ---------- */
.pm-banner {
    background: linear-gradient(135deg, #06C167 0%, #048A4F 100%);
    color: #fff;
    padding: 18px 24px 22px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 20px 20px 0 0;
}

.pm-banner-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-banner-year {
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    border-radius: 100px;
    padding: 3px 10px;
    letter-spacing: 0.04em;
}

.pm-banner-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    padding: 3px 10px;
}

.pm-banner-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 4px 0 0;
}

.pm-banner-subtitle {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.82;
    margin: 0;
}

/* ---------- Close button ---------- */
.pm-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-left: auto;
    border: none;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    font-size: 17px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.25s ease;
    line-height: 1;
}

.pm-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
}

/* ---------- Body grid ---------- */
.pm-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ---------- Gallery ---------- */
.pm-gallery {
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pm-swiper {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.pm-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
}

.pm-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    display: block;
}

/* Subtle circular arrow buttons */
.pm-gallery .swiper-button-next,
.pm-gallery .swiper-button-prev {
    --swiper-navigation-size: 15px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    color: #1E1E1E;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    transition: background 0.15s ease;
}

.pm-gallery .swiper-button-next:hover,
.pm-gallery .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
}

.pm-gallery .swiper-pagination-bullet-active {
    background: #048A4F;
}

/* ---------- Info panel ---------- */
.pm-info {
    padding: 28px 32px 36px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Meta chips row */
.pm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-chip {
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    background: #1E1E1E;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Sections */
.pm-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-section-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #048A4F;
}

.pm-section-body {
    font-size: 14px;
    color: #545454;
    line-height: 1.65;
    white-space: pre-line;
}

/* Tech chips */
.pm-tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-tech-chip {
    background: #EEEEEE;
    color: #1E1E1E;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #DDDDDD;
}

/* ---------- Lightbox ---------- */
.pm-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.pm-lightbox.pm-lb-open {
    display: flex;
}

.pm-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    pointer-events: none;
}

/* ==========================================================
   MOBILE  ≤ 820px
   ========================================================== */
@media (max-width: 820px) {
    .pm-backdrop {
        padding: 0;
        align-items: flex-start;
    }

    .pm-card {
        max-width: 100%;
        border-radius: 0;
        min-height: 100dvh;
        max-height: none;
    }

    .pm-banner {
        padding: 14px 18px 18px;
        gap: 6px;
        border-radius: 0;
    }

    .pm-banner-title {
        font-size: 20px;
    }

    .pm-banner-subtitle {
        font-size: 12px;
    }

    /* Stack gallery above info */
    .pm-body {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .pm-swiper {
        aspect-ratio: 4 / 3;
    }

    .pm-swiper .swiper-slide {
        padding: 12px;
    }

    .pm-swiper .swiper-slide img {
        border-radius: 6px;
        box-shadow: none;
        cursor: default;
    }

    /* Hide nav arrows on mobile — swipe only */
    .pm-gallery .swiper-button-next,
    .pm-gallery .swiper-button-prev {
        display: none;
    }

    .pm-gallery .swiper-pagination {
        bottom: 10px;
    }

    .pm-info {
        padding: 20px 18px 28px;
        gap: 16px;
        overflow-y: visible;
    }
}
