/* ==========================================================================
   图片灯箱 —— 点击查看项目图片全图
   沿用站点视觉语言：深色底 #080a0d、金色强调 #c6a756、大圆角、衬线标题
   ========================================================================== */

/* ---------- 遮罩层 ---------- */
.pj-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: rgba(4, 5, 7, 0.94);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.pj-lightbox.is-open {
    display: flex;
    opacity: 1;
}

/* ---------- 图片容器 ---------- */
.pj-lb-figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: min(1400px, 100%);
    max-height: 100%;
    transform: scale(0.96);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.pj-lightbox.is-open .pj-lb-figure {
    transform: scale(1);
}

.pj-lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(198, 167, 86, 0.22);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    background: #0d1219;
}

.pj-lb-img {
    display: block;
    max-width: min(1400px, calc(100vw - 48px));
    max-height: calc(100vh - 190px);
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.22s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* 放大状态：允许 1:1 查看细节 */
.pj-lightbox.is-zoomed .pj-lb-img {
    cursor: zoom-out;
    transform-origin: center center;
}

.pj-lightbox.is-zoomed .pj-lb-stage {
    overflow: auto;
    cursor: move;
    -webkit-overflow-scrolling: touch;
}

.pj-lightbox.is-zoomed .pj-lb-img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
}

/* ---------- 说明文字 ---------- */
.pj-lb-caption {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    text-align: center;
}

.pj-lb-title {
    font-family: var(--font-serif);
    font-size: 1.06rem;
    color: #fff7eb;
}

.pj-lb-note {
    font-size: 0.82rem;
    color: var(--muted);
}

.pj-lb-hint {
    font-size: 0.78rem;
    color: rgba(255, 247, 235, 0.5);
    letter-spacing: 0.06em;
}

.pj-lb-hint kbd {
    display: inline-block;
    padding: 1px 7px;
    margin: 0 2px;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    color: rgba(255, 247, 235, 0.82);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---------- 缩放比例显示 ---------- */
.pj-lb-zoomval {
    min-width: 52px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--accent-soft);
}

/* ---------- 关闭按钮 ---------- */
.pj-lb-close {
    position: fixed;
    top: 22px;
    right: 26px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    color: #fff7eb;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(18, 22, 28, 0.86);
    border: 1px solid rgba(198, 167, 86, 0.28);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.pj-lb-close:hover {
    transform: rotate(90deg);
    background: rgba(198, 167, 86, 0.18);
    border-color: rgba(198, 167, 86, 0.55);
}

/* ---------- 翻页按钮 ---------- */
.pj-lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 1.6rem;
    color: #fff7eb;
    cursor: pointer;
    background: rgba(18, 22, 28, 0.8);
    border: 1px solid rgba(198, 167, 86, 0.24);
    border-radius: 16px;
    transition: background 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.pj-lb-nav:hover {
    background: rgba(198, 167, 86, 0.18);
    border-color: rgba(198, 167, 86, 0.55);
}

.pj-lb-nav.is-prev { left: 22px; }
.pj-lb-nav.is-next { right: 22px; }
.pj-lb-nav[hidden] { display: none; }

/* ---------- 缩放控制 ---------- */
.pj-lb-zoom {
    position: fixed;
    left: 26px;
    top: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(18, 22, 28, 0.86);
    border: 1px solid rgba(198, 167, 86, 0.24);
}

.pj-lb-zoom button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 1.05rem;
    color: #fff7eb;
    cursor: pointer;
    border-radius: 10px;
    background: transparent;
    transition: background 0.2s ease;
}

.pj-lb-zoom button:hover { background: rgba(198, 167, 86, 0.2); }

/* ---------- 缩略图条 ---------- */
.pj-lb-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: min(1000px, 90vw);
    padding: 0 4px;
}

.pj-lb-thumbs button {
    width: 62px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1219;
    border: 1px solid rgba(198, 167, 86, 0.18);
    opacity: 0.52;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pj-lb-thumbs button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.pj-lb-thumbs button.is-on {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(198, 167, 86, 0.5);
}

.pj-lb-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- 可点击图片的视觉提示 ---------- */
.pj-zoomable {
    cursor: zoom-in;
}

.pj-card .pc-media::after,
.gal-item::after {
    content: '⤢ 查看大图';
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 11px;
    font-size: 0.74rem;
    color: #fff7eb;
    border-radius: 999px;
    background: rgba(6, 9, 14, 0.8);
    border: 1px solid rgba(198, 167, 86, 0.32);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
}

.pj-card .pc-media,
.gal-item {
    position: relative;
}

.pj-card:hover .pc-media::after,
.gal-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端触摸设备无 hover，常驻显示提示 */
@media (hover: none) {
    .pj-card .pc-media::after,
    .gal-item::after {
        opacity: 1;
        transform: none;
    }
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 760px) {
    .pj-lightbox {
        padding: 64px 14px 24px;
    }

    .pj-lb-img {
        max-width: calc(100vw - 28px);
        max-height: calc(100vh - 250px);
    }

    /* 超宽图（如园区航拍横幅）在窄屏上按宽度铺满，避免缩成一条细带 */
    .pj-lb-stage.is-wide {
        width: calc(100vw - 28px);
        max-width: 100%;
    }

    .pj-lb-stage.is-wide .pj-lb-img {
        max-height: none;
        width: 100%;
    }

    .pj-lb-nav {
        width: 40px;
        height: 52px;
        font-size: 1.3rem;
    }

    .pj-lb-nav.is-prev { left: 8px; }
    .pj-lb-nav.is-next { right: 8px; }

    .pj-lb-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }

    .pj-lb-zoom {
        left: 12px;
        top: 12px;
    }

    .pj-lb-thumbs { display: none; }
}

/* ---------- 无障碍：尊重减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .pj-lightbox,
    .pj-lb-figure,
    .pj-lb-img,
    .pj-lb-close,
    .pj-lb-nav {
        transition: none;
    }
}
