/* ==========================================================================
   解决方案 (yy_case) 列表与详情页专属样式 (case.css)
   ========================================================================== */

/* -----------------------------------------
   1. 列表页：网格与卡片UI
----------------------------------------- */
.yy-case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.yy-case-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.04); transition: var(--yy-transition); }
.yy-case-card:hover { transform: translateY(-6px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }

.yy-case-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.yy-case-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.yy-case-card:hover .yy-case-thumb img { transform: scale(1.06); }

.yy-case-title { font-size: 16px; font-weight: 600; margin: 0; padding: 20px 15px; text-align: center; }
.yy-case-title a { color: #222; transition: var(--yy-transition); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yy-case-title a:hover { color: var(--yy-primary); }

/* 列表页：顶部专属独立搜索框排版 */
.yy-case-topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.yy-topbar-search { width: 250px; }


/* -----------------------------------------
   2. 详情页：单页内容区UI
----------------------------------------- */
.yy-case-article-box { background: #fff; padding: 40px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }

.yy-case-article-header { text-align: center; border-bottom: 1px solid #eee; padding-bottom: 20px; margin-bottom: 30px; }
.yy-case-article-title { font-size: 28px; color: #222; margin: 0 0 15px 0; line-height: 1.4; font-weight: 600; }
.yy-case-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-case-featured-img { margin-bottom: 30px; border-radius: 4px; overflow: hidden; }
.yy-case-featured-img img { width: 100%; height: auto; display: block; }

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


/* -----------------------------------------
   3. 响应式断点统一管理
----------------------------------------- */
@media (max-width: 1200px) {
    .yy-case-grid { grid-template-columns: repeat(3, 1fr); gap: 25px; }
}

@media (max-width: 992px) {
    .yy-case-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    /* 列表页手机端 */
    .yy-case-grid { grid-template-columns: 1fr; }
    .yy-case-topbar-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .yy-topbar-search { width: 100%; }

    /* 详情页手机端 */
    .yy-case-article-box { padding: 20px; }
    .yy-case-article-title { font-size: 22px; }
    .yy-case-article-meta { flex-direction: column; gap: 8px; align-items: center; }
    .yy-article-excerpt-box { padding: 15px; font-size: 14px; }
}
