/* ==========================================================================
   新闻列表与详情页专属样式 (news.css)
   说明：侧边栏及整体网格布局已交由 inner.css 接管
   ========================================================================== */

/* ================= 归档与详情页通用外层 ================= */
.yy-news-archive-wrapper {
    background-color: #f4f5f7;
    padding: 20px 0 50px 0;
}

/* ================= 1. 新闻列表页：右侧横向卡片 ================= */
.yy-news-cards { display: flex; flex-direction: column; gap: 20px; }
.yy-news-card { display: flex; background: #fff; padding: 20px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); gap: 25px; align-items: stretch; transition: var(--yy-transition); }
.yy-news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

.yy-news-thumb { flex: 0 0 280px; overflow: hidden; border-radius: 4px; }
.yy-news-thumb img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.yy-news-card:hover .yy-news-thumb img { transform: scale(1.05); }

.yy-news-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 0; }
.yy-news-title { margin: 0 0 10px 0; font-size: 20px; font-weight: 600; line-height: 1.4; }
.yy-news-title a { color: #222; transition: var(--yy-transition); }
.yy-news-title a:hover { color: var(--yy-primary); }
.yy-news-date { color: #999; font-size: 14px; margin-bottom: 15px; }
.yy-news-excerpt { color: #666; font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 列表页：分页组件 */
.yy-pagination ul { display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 40px 0 0 0; }
.yy-pagination li a, .yy-pagination li span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 15px; background: #fff; border: 1px solid #ddd; color: #444; border-radius: 4px; }
.yy-pagination li span.current, .yy-pagination li a:hover { background: var(--yy-primary); color: #fff; border-color: var(--yy-primary); }


/* ================= 2. 新闻详情页 (single.php) ================= */
.yy-article-box {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* 标题与元数据居中排版 */
.yy-article-header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.yy-article-title {
    font-size: 28px;
    color: #222;
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-weight: 600;
}
.yy-article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

/* 摘要虚线框 */
.yy-article-excerpt-box {
    background: #fafafa;
    border: 1px dashed #dcdfe6;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}
.yy-article-excerpt-box strong { color: #333; display: block; margin-bottom: 8px; font-size: 16px; }
.yy-article-excerpt-box p { margin: 0; }

/* 主图满宽显示 */
.yy-article-featured-img { margin-bottom: 30px; border-radius: 4px; overflow: hidden; }
.yy-article-featured-img img { width: 100%; height: auto; display: block; }

/* 正文排版优化 */
.yy-article-body { font-size: 16px; color: #444; line-height: 1.8; }
.yy-article-body p { margin-bottom: 20px; }
.yy-article-body img { max-width: 100%; height: auto; border-radius: 4px; }
.yy-article-body h2, .yy-article-body h3 { color: #222; margin-top: 30px; margin-bottom: 15px; }


/* ================= 3. 移动端响应式适配 ================= */
@media (max-width: 992px) {
    /* 列表页卡片在移动端变为上下图文结构 */
    .yy-news-card { flex-direction: column; padding: 15px; gap: 15px; }
    .yy-news-thumb { flex: auto; width: 100%; }
    .yy-news-thumb img { height: auto; aspect-ratio: 16/9; min-height: auto; }
}

@media (max-width: 768px) {
    /* 详情页移动端边距缩小 */
    .yy-article-box { padding: 20px; }
    .yy-article-title { font-size: 22px; }
    .yy-article-meta { flex-direction: column; gap: 8px; align-items: center; }

    /* 修复小屏幕下分页问题 */
    .yy-pagination ul {
        flex-wrap: wrap;
        gap: 5px;
    }
    .yy-pagination li a,
    .yy-pagination li span {
        padding: 0 10px;
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
