/* ============================================================
   gaobeicms 通用模块组件（文章/图集/单页/招聘 主题）
   ============================================================ */

/* 两栏布局：主内容 + 侧栏 */
.mat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.mat-main { min-width: 0; }
.mat-aside { min-width: 0; }

/* 列表页头：标题 + 计数 */
.mat-list-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px;
}
.mat-title { font-size: 22px; font-weight: 700; }
.mat-count { flex-shrink: 0; font-size: 13px; color: var(--text-2); }
.mat-count b { color: var(--primary); font-weight: 700; }

/* 横排卡片 */
.mat-card {
    display: flex; gap: 16px; padding: 16px 2px;
    border-bottom: 1px dashed var(--border);
}
.mat-card:last-child { border-bottom: none; }
.mat-card-thumb {
    width: 180px; height: 120px; border-radius: 4px; overflow: hidden;
    flex-shrink: 0; position: relative; background: #eef2f7;
}
.mat-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.mat-card:hover .mat-card-thumb img { transform: scale(1.06); }
.mat-card-thumb .ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 42px; color: #b8c2d4; background: linear-gradient(135deg, #eef2f7, #e3eaf3);
}
.mat-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* 卡片头栏：标题 + 右侧发布时间/浏览量 */
.mat-card-tbar {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; min-width: 0; flex-wrap: wrap;
}
.mat-card-tbar .mat-card-title { flex: 1; min-width: 0; }
.mat-card-title {
    font-size: 17px; font-weight: 600; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mat-card-title a:hover { color: var(--primary); }
.mat-card-title .flag {
    display: inline-block; flex-shrink: 0; font-size: 11px; font-weight: 600;
    color: #fff; background: #e5484d; border-radius: 4px; padding: 1px 6px;
    margin-right: 6px; vertical-align: 2px;
}
.mat-card-desc {
    font-size: 14px; color: var(--text-2); margin-top: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mat-card-foot { margin-top: 10px; }
.mat-card-meta { margin-top: auto; font-size: 13px; color: #a0a9ba; padding-top: 8px; }
.mat-card-tbar .mat-card-meta {
    flex-shrink: 0; margin-top: 4px; padding-top: 0; white-space: nowrap;
}
.mat-card-act {
    flex-shrink: 0; align-self: center; text-align: center;
    display: flex; flex-direction: column; gap: 6px; align-items: center;
}

/* 标签 / 徽标 */
.mat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 11px; border-radius: 20px; font-size: 12px;
    color: #4a5a78; background: #f1f4fb; border: 1px solid #e2e8f4; line-height: 1.6;
}
.mat-tag b { font-weight: 600; color: #5c7aa0; }
.mat-tag.accent { color: #d1600a; background: #fdf2e7; border-color: #f8e0c4; }
.mat-tag.accent b { color: #d1600a; }

/* 按钮 */
.mat-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 22px; border-radius: 8px; background: var(--primary);
    color: #fff !important; font-size: 14px; font-weight: 500;
    border: 1px solid var(--primary); transition: background .2s;
}
.mat-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.mat-btn.ghost { background: #fff; color: var(--text) !important; border-color: var(--border); }
.mat-btn.ghost:hover { border-color: var(--primary); color: var(--primary) !important; }

/* 信息格（字段展示） */
.mat-keygrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.mat-kg-cell { background: #f7f9fd; border: 1px solid var(--border); border-radius: 4px; padding: 10px 13px; min-width: 0; }
.mat-kg-cell span { display: block; font-size: 12px; color: #8b96ab; margin-bottom: 2px; }
.mat-kg-cell b {
    display: block; font-size: 14px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 详情封面 */
.art-cover { border-radius: 4px; overflow: hidden; margin-bottom: 16px; background: #eef2f7; }
.art-cover img { width: 100%; }

/* 侧栏排行（带缩略图） */
.mat-rank { list-style: none; padding-left: 0; margin: 0; }
.mat-rank li a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.mat-rank-thumb { flex-shrink: 0; width: 46px; height: 46px; border-radius: 4px; overflow: hidden; background: #eef2f7; }
.mat-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mat-rank .no {
    flex-shrink: 0; width: 18px; text-align: center; font-size: 13px; font-style: normal;
    color: #aab4c6; font-weight: 700;
}
.mat-rank .no.top { color: var(--accent); }
.mat-rank em {
    flex: 1; min-width: 0; font-style: normal; font-size: 14px; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mat-rank b { flex-shrink: 0; font-size: 12px; color: #a5aec0; font-weight: 400; }
.mat-rank a:hover em { color: var(--primary); }

/* 侧栏信息/提示 */
.mat-tips li { padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.mat-tips li:last-child { border-bottom: none; }
.mat-tips li i { font-style: normal; color: var(--text-2); flex-shrink: 0; }
.mat-tips li span { flex: 1; min-width: 0; word-break: break-all; }
.mat-note { margin-top: 14px; padding: 12px 14px; background: #f7f9fd; border-radius: 4px; color: var(--text-2); font-size: 13px; line-height: 1.8; }

/* 图片墙 + 灯箱 */
.gallery-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-wall .g-item { display: block; border-radius: 4px; overflow: hidden; aspect-ratio: 16/10; background: #eef2f7; }
.gallery-wall .g-item img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; box-shadow: none; transition: transform .35s; cursor: zoom-in; }
.gallery-wall .g-item:hover img { transform: scale(1.06); }

.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(8, 12, 20, .92); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 82vh; border-radius: 4px; box-shadow: 0 12px 50px rgba(0, 0, 0, .55); }
.lightbox .lb-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    color: #fff; background: rgba(255, 255, 255, .12); font-size: 26px; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lightbox .lb-prev { left: 4vw; }
.lightbox .lb-next { right: 4vw; }
.lightbox .lb-close { position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); font-size: 22px; line-height: 1; }
.lightbox .lb-close:hover { background: rgba(255, 255, 255, .26); }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #cfd6e2; font-size: 13px; }
.lightbox .lb-title { position: absolute; bottom: 46px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; padding: 0 20px; }

/* 响应式 */
@media (max-width: 980px) {
    .mat-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .mat-card { gap: 12px; padding: 14px 2px; }
    .mat-card-thumb { width: 128px; height: 86px; }
    .mat-card-act { display: none; }
    .gallery-wall { grid-template-columns: repeat(2, 1fr); }
    .mat-list-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .mat-title { font-size: 20px; }
}
@media (max-width: 560px) {
    .mat-card { gap: 10px; padding: 12px 2px; }
    .mat-card-thumb { width: 100px; height: 74px; }
    .mat-card-title { font-size: 15px; }
    .mat-card-desc { font-size: 12px; -webkit-line-clamp: 1; }
    .mat-card-tbar .mat-card-meta { width: 100%; white-space: normal; }
    .mat-card-meta { font-size: 12px; }
    .mat-tag { padding: 2px 9px; font-size: 11px; }
    .mat-keygrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .mat-kg-cell { padding: 8px 11px; }
    .mat-kg-cell b { font-size: 13px; }
    .gallery-wall { grid-template-columns: 1fr; }
    .lightbox .lb-prev { left: 8px; }
    .lightbox .lb-next { right: 8px; }
}

/* ============================================================
   文章详情页（经典企业站版式）
   ============================================================ */
.art-panel { padding: 40px 46px 34px; }

/* 大标题（居中） */
.art-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    letter-spacing: .5px;
    word-break: break-word;
}

/* 元信息行（居中灰字） */
.art-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin: 20px 0 0;
    padding: 11px 0;
    border-top: 1px solid #f1f3f7;
    border-bottom: 1px solid #f1f3f7;
    font-size: 13.5px;
    color: #98a0b0;
}
.art-meta span { white-space: nowrap; }

/* 正文排版 */
.art-panel .article-body { margin-top: 26px; }

/* Tag 标签区 */
.art-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.art-tags b { font-size: 14px; font-weight: 600; color: #8b93a3; }
.art-tags a {
    font-size: 13px;
    color: #4a5a78;
    background: #f1f4fb;
    border: 1px solid #e2e8f4;
    border-radius: 4px;
    padding: 3px 11px;
    line-height: 1.6;
    transition: all .2s;
}
.art-tags a:hover { color: #fff; background: #5c7aa0; border-color: #5c7aa0; }

/* 返回列表（置于上下篇区域右侧） */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    font-size: 14px;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 18px;
    transition: all .2s;
    background: #fff;
}
.back-btn:hover { color: var(--primary); border-color: var(--primary); }

/* 上一篇 / 下一篇（随正文同卡片，一段整体背景；返回列表居右侧） */
.art-pn {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.art-pn-links { flex: 1; min-width: 0; }
.art-pn p {
    padding: 7px 0;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}
.art-pn a { color: #3a4557; }
.art-pn a:hover { color: var(--primary); }
.art-pn .no { color: #a6adbb; }

/* ---------- 侧栏板块 ---------- */
.side-panel { padding: 22px 20px; }
.side-title {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: #242b3a;
    padding-bottom: 12px;
    margin-bottom: 6px;
    position: relative;
}
.side-title::before {
    content: "";
    flex: none;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--primary);
    margin-right: 10px;
}
.side-title::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: #eef0f4;
}

/* 随便看看（标题列表） */
.side-list li a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0 10px 14px;
    position: relative;
}
.side-list li a::before {
    content: "";
    position: absolute;
    left: 0; top: 17px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #c3cad8;
    transition: background .2s;
}
.side-list li a:hover::before { background: var(--primary); }
.side-list li a em {
    flex: 1;
    min-width: 0;
    font-style: normal;
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s;
}
.side-list li a:hover em { color: var(--primary); }
.side-list li a span { flex: none; font-size: 12px; color: #a6adbb; }
.side-list li + li { border-top: 1px dashed #eef1f6; }

/* 产品推荐（图 + 名 + 价格） */
.side-pro li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
}
.side-pro li + li { border-top: 1px dashed #eef1f6; }
.side-pro-thumb {
    flex: none;
    width: 88px;
    height: 66px;
    border-radius: 4px;
    overflow: hidden;
    background: #eef2f7;
}
.side-pro-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.side-pro li a:hover .side-pro-thumb img { transform: scale(1.06); }
.side-pro-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.side-pro-info em {
    font-style: normal;
    font-size: 14px;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}
.side-pro li a:hover .side-pro-info em { color: var(--primary); }
.side-pro-info b {
    font-size: 15px;
    font-weight: 700;
    color: #e5302c;
}

/* ============================================================
   图集网格卡片：封面占位与置顶角标
   ============================================================ */
.img-card { display: block; }
.img-card .img-ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 46px; color: #b8c2d4; background: linear-gradient(135deg, #eef2f7, #e3eaf3);
}
.img-card .img-cnt {
    position: absolute; right: 8px; top: 8px; z-index: 2;
    font-size: 11px; color: #fff; background: rgba(20, 30, 50, .55);
    padding: 1px 8px; border-radius: 20px;
}
.img-card .img-flag {
    position: absolute; left: 8px; top: 8px; z-index: 2;
    font-size: 11px; font-weight: 600; color: #fff; background: #e5484d;
    padding: 1px 7px; border-radius: 4px;
}

/* 详情页移动端细化 */
@media (max-width: 720px) {
    .art-panel { padding: 26px 22px 24px; }
    .art-title { font-size: 23px; }
    .art-meta { gap: 6px 14px; font-size: 12.5px; }
    .side-panel { padding: 18px 16px; }
}
@media (max-width: 560px) {
    .art-title { font-size: 20px; }
    .art-pn { flex-wrap: wrap; gap: 12px; }
    .art-pn-links { flex-basis: 100%; }
    .art-tags b { display: none; }
    .side-pro li a { align-items: flex-start; }
    .side-pro-thumb { width: 78px; height: 58px; }
}
