/****/
/* ===== 文章页图片画廊 ===== */
.xy-gallery { max-width: 800px; margin: 0 auto 30px;}

/* 大图区：高度改这里；object-position: center top 保留图片顶部文字不裁 */
.xy-gallery-main { position: relative; background: #111; overflow: hidden;}
.xy-gallery-main img { display: block; width: 100%; height: 520px; object-fit: cover; object-position: center top;}

/* 左右箭头：半透明黑块，悬停变主题红 */
.xy-gprev, .xy-gnext {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 66px; border: 0; padding: 0;
    background: rgba(0, 0, 0, 0.45); color: #fff;
    font-size: 26px; line-height: 66px; text-align: center;
    cursor: pointer; user-select: none; transition: background 0.3s;}
.xy-gprev { left: 0;}
.xy-gnext { right: 0;}
.xy-gprev:hover, .xy-gnext:hover { background: #a90c0c;}

/* 当前图片标题 */
.xy-gallery-cap { text-align: center; font-size: 16px; color: #333; margin: 16px 0 20px;}

/* 缩略图行：选中带红框 */
.xy-gallery-thumbs { text-align: center; font-size: 0;}
.xy-thumb {
    display: inline-block; width: 104px; height: 70px;
    margin: 0 6px; cursor: pointer; opacity: 0.7;
    border: 2px solid transparent; transition: all 0.3s;}
.xy-thumb em { display: block; width: 100%; height: 100%; background-size: cover; background-position: center top;}
.xy-thumb:hover { opacity: 1;}
.xy-thumb.is-active { opacity: 1; border-color: #a90c0c;}

/* 页码计数 */
.xy-gallery-count { text-align: center; color: #999; font-size: 13px; margin-top: 10px;}

/* 手机端适配 */
@media (max-width: 768px) {
    .xy-gallery-main img { height: 240px;}
    .xy-gprev, .xy-gnext { width: 32px; height: 50px; line-height: 50px; font-size: 20px;}
    .xy-thumb { width: 72px; height: 48px; margin: 0 4px;}
}


