/* ============================================================
   SnIMS Ophthalmology Portal - Inner Pages Stylesheet
   频道页 / 列表页 / 详情页 通用样式
   依赖: portal.css (CSS变量定义在此)
   ============================================================ */

/* ===== Page Header Banner ===== */
.page-banner {
    background: linear-gradient(135deg, #1a3a5c 0%, #1a5680 50%, #1a6db5 100%);
    padding: 32px 0;
    color: #fff;
}
.page-banner .breadcrumb { font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.page-banner .breadcrumb a { color: rgba(255,255,255,0.8); }
.page-banner .breadcrumb a:hover { color: #fff; }
.page-banner .breadcrumb span { margin: 0 6px; }
.page-banner .banner-title { font-size: 28px; font-weight: 700; }
.page-banner .banner-desc { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 6px; }
.page-banner .banner-stats { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 8px; }

/* ===== Breadcrumb (light version, for non-banner areas) ===== */
.breadcrumb-bar {
    padding: 12px 0;
    font-size: 13px;
    color: var(--c-text3);
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
}
.breadcrumb-bar a { color: var(--c-text2); }
.breadcrumb-bar a:hover { color: var(--c-blue); }
.breadcrumb-bar span { margin: 0 6px; color: var(--c-text4); }

/* ===== Sub-Nav / Channel Tabs ===== */
.subnav-bar {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 66px;
    z-index: 99;
}
.subnav-bar .subnav-list { display: flex; gap: 0; flex-wrap: wrap; }
.subnav-bar .subnav-list a {
    display: block;
    padding: 12px 22px;
    font-size: 14px;
    color: var(--c-text2);
    border-bottom: 2px solid transparent;
    transition: var(--trans);
    font-weight: 500;
}
.subnav-bar .subnav-list a:hover,
.subnav-bar .subnav-list a.active {
    color: var(--c-blue);
    border-bottom-color: var(--c-blue);
}

/* ===== Page Layout ===== */
.page-body-inner { padding: 24px 0; }
.page-grid-inner { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }

/* ===== Filter Bar ===== */
.filter-bar {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-bar .filter-label { font-size: 13px; font-weight: 600; color: var(--c-text); flex-shrink: 0; }
.filter-bar .filter-options { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-bar .filter-options a {
    display: inline-block; padding: 4px 14px;
    border-radius: 14px; font-size: 12px;
    color: var(--c-text2); border: 1px solid var(--c-border);
    transition: var(--trans);
}
.filter-bar .filter-options a:hover,
.filter-bar .filter-options a.active {
    color: var(--c-blue); border-color: var(--c-blue); background: var(--c-blue-light);
}
.filter-bar .filter-sort { margin-left: auto; display: flex; gap: 8px; }
.filter-bar .filter-sort a { font-size: 12px; color: var(--c-text3); }
.filter-bar .filter-sort a.active,
.filter-bar .filter-sort a:hover { color: var(--c-blue); font-weight: 600; }

/* ===== Article List (for list page) ===== */
.article-list { background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.article-list .art-item {
    display: flex; gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f1f3;
    transition: var(--trans);
    cursor: pointer;
}
.article-list .art-item:last-child { border-bottom: none; }
.article-list .art-item:hover { background: #fafbfc; }
.article-list .art-item .art-thumb {
    width: 200px; min-height: 130px; flex-shrink: 0;
    border-radius: 4px;
    background: linear-gradient(135deg, #e8edf2 0%, #dce3ea 100%);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.art-thumb .am-icon { font-size: 40px; color: #b0bfcc; }
.article-list .art-item .art-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.art-body .art-title { font-size: 18px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-body .art-title:hover { color: var(--c-blue); }
.art-body .art-desc { font-size: 13px; color: var(--c-text3); line-height: 1.7; margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-body .art-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--c-text4); flex-wrap: wrap; }
.art-body .art-meta .art-cat { color: var(--c-blue); }
.art-body .art-meta .art-tag { padding: 1px 8px; background: var(--c-accent-light); color: var(--c-accent); border-radius: 2px; font-size: 11px; }

/* List without thumbnail (text-only) */
.article-list-text .art-item { padding: 14px 20px; }
.article-list-text .art-item .art-body .art-title { font-size: 15px; }
.article-list-text .art-item .art-body .art-desc { -webkit-line-clamp: 1; }

/* ===== Pagination ===== */
.pagination-wrap {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 28px 0 12px;
}
.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px;
    padding: 0 10px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    font-size: 13px; color: var(--c-text2);
    transition: var(--trans);
    background: var(--c-white);
}
.pagination-wrap a:hover { border-color: var(--c-blue); color: var(--c-blue); }
.pagination-wrap .pg-active {
    background: var(--c-blue); border-color: var(--c-blue);
    color: #fff; font-weight: 600;
}
.pagination-wrap .pg-disabled { color: var(--c-text4); cursor: not-allowed; opacity: 0.5; }
.pagination-wrap .pg-info { border: none; color: var(--c-text3); font-size: 12px; }

/* ===== Channel Featured Grid ===== */
.channel-featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 20px; }
.channel-featured .cf-main {
    background: var(--c-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    cursor: pointer;
}
.channel-featured .cf-main:hover { box-shadow: var(--shadow); }
.cf-main .cfm-thumb {
    width: 100%; height: 280px;
    background: linear-gradient(135deg, #e8edf2 0%, #d0dae6 100%);
    display: flex; align-items: center; justify-content: center;
}
.cfm-thumb .am-icon { font-size: 56px; color: #a0b0c0; }
.cf-main .cfm-body { padding: 18px 20px; }
.cf-main .cfm-body h2 { font-size: 20px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-main .cfm-body h2:hover { color: var(--c-blue); }
.cf-main .cfm-body p { font-size: 13px; color: var(--c-text3); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-main .cfm-body .cfm-meta { font-size: 12px; color: var(--c-text4); margin-top: 10px; display: flex; gap: 12px; }

.channel-featured .cf-side {
    display: flex; flex-direction: column; gap: 10px;
}
.cf-side .cfs-item {
    background: var(--c-white);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    cursor: pointer;
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
}
.cf-side .cfs-item:hover { box-shadow: var(--shadow); }
.cf-side .cfs-item h3 { font-size: 15px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-side .cfs-item h3:hover { color: var(--c-blue); }
.cf-side .cfs-item .cfs-meta { font-size: 11px; color: var(--c-text4); margin-top: 6px; }

/* ===== Three-col card grid (for channel sections) ===== */
.channel-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }

/* ===== Section Title (for page content areas) ===== */
.section-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.section-title-bar .st-title {
    font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.section-title-bar .st-title::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--c-blue);
    border-radius: 2px;
}
.section-title-bar .st-more { font-size: 12px; color: var(--c-text3); }
.section-title-bar .st-more:hover { color: var(--c-blue); }

/* ===== Article Detail ===== */
.detail-main { background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Article Header */
.detail-header { padding: 32px 32px 0; }
.detail-header h1 { font-size: 28px; font-weight: 700; line-height: 1.45; color: var(--c-text); }
.detail-header .dh-meta {
    display: flex; align-items: center; gap: 16px;
    margin-top: 16px; padding-bottom: 18px;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px; color: var(--c-text3);
    flex-wrap: wrap;
}
.detail-header .dh-meta .dh-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #d0dae6 0%, #bcc8d6 100%);
    display: flex; align-items: center; justify-content: center;
}
.dh-avatar .am-icon { font-size: 18px; color: #8090a0; }
.detail-header .dh-meta .dh-author { font-weight: 600; color: var(--c-text); }
.detail-header .dh-meta .dh-dot { color: var(--c-text4); }
.detail-header .dh-meta .dh-source { color: var(--c-blue); }

/* Article Body */
.detail-body { padding: 24px 32px; }
.detail-body .article-content { font-size: 16px; line-height: 1.9; color: var(--c-text); }
    .detail-body .article-content p:not(:has(img)) {
        margin-bottom: 18px;
        text-indent: 2em;
    }
.detail-body .article-content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; color: var(--c-text); }
.detail-body .article-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--c-text); }
.detail-body .article-content blockquote {
    margin: 20px 0; padding: 16px 20px;
    background: var(--c-bg); border-left: 4px solid var(--c-blue);
    color: var(--c-text2); font-size: 15px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.detail-body .article-content ul,
.detail-body .article-content ol { margin: 12px 0 18px 2em; }
.detail-body .article-content li { margin-bottom: 6px; list-style: disc; }
.detail-body .article-content ol li { list-style: decimal; }
.detail-body .article-content img {
    max-width: 100%; border-radius: var(--radius-sm);
    margin: 16px 0;
}
.detail-body .article-content .art-img-caption {
    font-size: 12px; color: var(--c-text4); text-align: center; margin-top: -10px; margin-bottom: 18px;
}

/* Article tags */
.detail-tags {
    padding: 0 32px 20px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.detail-tags .tags-label { font-size: 13px; color: var(--c-text3); }
.detail-tags a {
    display: inline-block; padding: 4px 14px;
    background: var(--c-bg); border-radius: 16px;
    font-size: 12px; color: var(--c-text2);
    transition: var(--trans);
}
.detail-tags a:hover { background: var(--c-blue-light); color: var(--c-blue); }

/* Article actions */
.detail-actions {
    padding: 0 32px 24px;
    display: flex; align-items: center; gap: 16px;
    border-bottom: 1px solid var(--c-border);
}
.detail-actions .da-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 18px;
    border: 1px solid var(--c-border);
    border-radius: 20px;
    font-size: 13px; color: var(--c-text2);
    cursor: pointer;
    transition: var(--trans);
    background: var(--c-white);
}
.detail-actions .da-btn:hover { border-color: var(--c-blue); color: var(--c-blue); }
.detail-actions .da-btn.liked { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-light); }

/* Statement / disclaimer */
.detail-statement {
    margin: 20px 32px;
    padding: 14px 18px;
    background: var(--c-bg);
    border-radius: var(--radius-sm);
    font-size: 12px; color: var(--c-text3);
    line-height: 1.8;
}

/* Related articles (inside detail) */
.detail-related { padding: 0 32px 28px; }
.detail-related .dr-title {
    font-size: 17px; font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-border);
}
.detail-related .dr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* Comment section */
.comment-section { padding: 0 32px 32px; }
.comment-section .cmt-title {
    font-size: 17px; font-weight: 700;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.comment-section .cmt-title .cmt-count { font-size: 13px; color: var(--c-text3); font-weight: 400; }
.comment-section .cmt-input-wrap {
    display: flex; gap: 12px;
    padding: 16px;
    background: var(--c-bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.cmt-input-wrap .cmt-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #d0dae6 0%, #bcc8d6 100%);
    display: flex; align-items: center; justify-content: center;
}
.cmt-avatar .am-icon { font-size: 20px; color: #8090a0; }
.cmt-input-wrap .cmt-input {
    flex: 1;
    display: flex; flex-direction: column; gap: 10px;
}
.cmt-input-wrap .cmt-input textarea {
    width: 100%; min-height: 80px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px; resize: vertical;
    font-family: inherit;
    outline: none;
}
.cmt-input-wrap .cmt-input textarea:focus { border-color: var(--c-blue); }
.cmt-input-wrap .cmt-input .cmt-submit {
    align-self: flex-end;
    padding: 8px 22px;
    background: var(--c-blue);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px; cursor: pointer;
    transition: var(--trans);
}
.cmt-input-wrap .cmt-input .cmt-submit:hover { background: var(--c-primary); }

/* Comment list */
.comment-list .cmt-item {
    display: flex; gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f5;
}
.comment-list .cmt-item .cmt-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #d0dae6 0%, #bcc8d6 100%);
    display: flex; align-items: center; justify-content: center;
}
.comment-list .cmt-body { flex: 1; }
.comment-list .cmt-body .cmt-user { font-size: 14px; font-weight: 600; }
.comment-list .cmt-body .cmt-user .cmt-time { font-size: 11px; color: var(--c-text4); font-weight: 400; margin-left: 10px; }
.comment-list .cmt-body .cmt-text { font-size: 14px; color: var(--c-text2); margin-top: 4px; line-height: 1.7; }
.comment-list .cmt-body .cmt-reply { font-size: 12px; color: var(--c-text3); margin-top: 6px; cursor: pointer; }
.comment-list .cmt-body .cmt-reply:hover { color: var(--c-blue); }

/* ===== Sidebar Widgets (shared across inner pages) ===== */
/* Author card (for detail page) */
.side-widget .author-card { text-align: center; padding: 20px 16px; }
.author-card .ac-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #d0dae6 0%, #bcc8d6 100%);
    display: flex; align-items: center; justify-content: center;
}
.ac-avatar .am-icon { font-size: 34px; color: #8090a0; }
.author-card .ac-name { font-size: 16px; font-weight: 700; }
.author-card .ac-title { font-size: 12px; color: var(--c-text3); margin: 4px 0 10px; }
.author-card .ac-stats { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: var(--c-text3); margin-bottom: 12px; }
.author-card .ac-stats strong { display: block; font-size: 16px; color: var(--c-text); }
.author-card .ac-btn-follow {
    display: inline-block; padding: 7px 28px;
    background: var(--c-blue); color: #fff;
    border-radius: 20px; font-size: 13px; font-weight: 500;
    transition: var(--trans);
}
.author-card .ac-btn-follow:hover { background: var(--c-primary); }

/* ===== Side Section Title ===== */
.side-section-title {
    font-size: 14px; font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-blue);
    display: flex; align-items: center; gap: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .channel-card-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-related .dr-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .page-grid-inner { grid-template-columns: 1fr; }
    .channel-featured { grid-template-columns: 1fr; }
    .cf-main .cfm-thumb { height: 200px; }
    .cf-side { flex-direction: row; }
    .cf-side .cfs-item { flex: 1; }
}
@media (max-width: 767px) {
    .page-banner { padding: 20px 0; }
    .page-banner .banner-title { font-size: 20px; }
    .subnav-bar .subnav-list a { padding: 10px 14px; font-size: 12px; }
    .article-list .art-item { flex-direction: column; }
    .article-list .art-item .art-thumb { width: 100%; min-height: 160px; }
    .art-body .art-title { font-size: 16px; }
    .channel-card-grid { grid-template-columns: 1fr; }
    .detail-header { padding: 20px 16px 0; }
    .detail-header h1 { font-size: 20px; }
    .detail-body { padding: 16px; }
    .detail-body .article-content { font-size: 15px; }
    .detail-body .article-content h2 { font-size: 18px; }
    .detail-tags { padding: 0 16px 16px; }
    .detail-actions { padding: 0 16px 16px; }
    .detail-statement { margin: 16px; }
    .detail-related { padding: 0 16px 20px; }
    .detail-related .dr-grid { grid-template-columns: 1fr; }
    .comment-section { padding: 0 16px 24px; }
    .cf-side { flex-direction: column; }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .filter-bar .filter-sort { margin-left: 0; }
}
