/* 正文图片放大查看（配合 static/image-optimize.js 使用）
   为什么放独立文件：课程详情、文章详情、招聘详情都 extends 了 users/base.html，
   只需在 base.html 引入一次即可全站生效。 */

/* 可点击放大的正文图：光标提示 + 轻微悬浮反馈 */
.content-img-zoomable {
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.content-img-zoomable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.content-img-zoomable:focus-visible {
    outline: 2px solid var(--skin-primary, #0d6efd);
    outline-offset: 2px;
}

/* 大图查看层：点击遮罩或按 Esc 关闭 */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
}

.image-viewer.is-open {
    display: flex;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background: #111;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.image-viewer-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.26);
}

/* 查看大图时锁住页面滚动 */
body.image-viewer-lock {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .image-viewer {
        padding: 8px;
    }

    .image-viewer-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}
