/* ========================================
 * portal 模块前台样式
 * 独立平行模块，复用 mall 布局风格
 * ======================================== */

/* 面包屑 */
.portal-breadcrumb .breadcrumb { border-radius: 4px; padding: 12px 20px; }
.portal-breadcrumb .breadcrumb li a { color: #16587e; }

/* 页面布局 */
.portal-page-wrap {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* 左侧栏 */
.portal-sidebar { width: 220px; flex-shrink: 0; }
.portal-sidebar-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}
.portal-sidebar-box h3 {
    background: #16587e;
    color: #fff;
    font-size: 16px;
    padding: 12px 16px;
    margin: 0;
}
.portal-cat-list { list-style: none; padding: 0; margin: 0; }
.portal-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: all .2s;
}
.portal-cat-list li:last-child a { border-bottom: none; }
.portal-cat-list li a:hover,
.portal-cat-list li a.active {
    background: #16587e;
    color: #fff !important;
}
.portal-cat-list li a .cat-count {
    font-size: 12px;
    background: #e5e7eb;
    color: #666;
    padding: 1px 8px;
    border-radius: 10px;
}
.portal-cat-list li a:hover .cat-count,
.portal-cat-list li a.active .cat-count {
    background: rgba(255,255,255,.2);
    color: #fff;
}
/* 二级栏目样式 */
.portal-cat-list .cat-level-2 {
    list-style: none;
    padding: 0;
    margin: 0;
}
.portal-cat-list .cat-level-2 li a {
    padding-left: 32px;
    font-size: 13px;
    color: #888;
}
.portal-cat-list .cat-level-2 li a i {
    margin-right: 6px;
    color: #bbb;
}
.portal-cat-list .cat-level-2 li a:hover i,
.portal-cat-list .cat-level-2 li a.active i {
    color: #fff;
}

/* 右侧主区 */
.portal-main { flex: 1; min-width: 0; }

/* 标题+搜索栏容器 */
.portal-header-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-header-wrap h2 { font-size: 20px; margin: 0; color: #333; }
.portal-search-form { display: flex; gap: 8px; }
.portal-search-input {
    width: 240px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.portal-search-btn {
    padding: 6px 16px;
    background: #16587e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.portal-search-btn:hover { background: #0d4a6e; }

/* 文章列表卡片 */
.portal-article-list { background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; }
.portal-article-card {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s;
}
.portal-article-card:hover { background: #fafbfc; }
.portal-article-card:last-child { border-bottom: none; }
.portal-article-img {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}
.portal-article-img img { width: 100%; height: 100%; object-fit: cover; }
.portal-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 40px;
}
.portal-article-info { flex: 1; min-width: 0; }
.portal-article-info h3 { font-size: 18px; margin: 0 0 8px; }
.portal-article-info h3 a { color: #333; }
.portal-article-info h3 a:hover { color: #16587e; }
.portal-article-summary {
    color: #888; font-size: 14px; line-height: 1.6;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.portal-article-meta { color: #aaa; font-size: 13px; }
.portal-article-meta span { margin-right: 16px; }

/* 下载列表（卡片布局） */
.portal-download-list { background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; }
.portal-download-card {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s;
}
.portal-download-card:hover { background: #fafbfc; }
.portal-download-card:last-child { border-bottom: none; }
.portal-download-img {
    width: 160px;
    height: 100px;
    flex-shrink: 0;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}
.portal-download-img img { width: 100%; height: 100%; object-fit: cover; }
.portal-download-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-download-info h3 { font-size: 18px; margin: 0 0 8px; }
.portal-download-info h3 a { color: #333; }
.portal-download-info h3 a:hover { color: #16587e; }
.portal-download-summary {
    color: #888; font-size: 14px; line-height: 1.6;
    margin: 0 0 10px; flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.portal-download-meta { color: #aaa; font-size: 13px; margin-bottom: 10px; }
.portal-download-meta span { margin-right: 16px; }
.portal-download-action { margin-top: auto; }

/* 下载表格（保留旧样式用于兼容性） */
.portal-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.portal-table { width: 100%; border-collapse: collapse; }
.portal-table thead th {
    background: #f5f7fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
}
.portal-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
    vertical-align: middle;
}
.portal-table tbody tr:hover { background: #fafbfc; }
.portal-table .col-title a { color: #333; }
.portal-table .col-title a:hover { color: #16587e; }
.portal-table .col-download { text-align: center; }
.portal-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding: 9px 22px;
    background: #16587e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
}
.portal-download-btn:hover { background: #0d4a6e; color: #fff; }
.portal-download-btn:active { transform: scale(.98); }
.portal-download-btn.portal-no-file { background: #6c757d; }
.portal-download-btn.portal-no-file:hover { background: #5a6268; }

/* 详情页 */
.portal-detail-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 30px;
}
.portal-detail-title { font-size: 24px; margin: 0 0 16px; color: #333; }
.portal-detail-meta {
    color: #999; font-size: 13px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
.portal-detail-meta span { margin-right: 20px; }
.portal-detail-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    background: #f5f7fa;
    border-left: 3px solid #16587e;
    border-radius: 0 4px 4px 0;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.portal-detail-cover { margin-bottom: 20px; text-align: center; }
.portal-detail-cover img { max-width: 100%; border-radius: 4px; }
.portal-detail-content { font-size: 15px; line-height: 1.8; color: #444; margin-top: 8px; }
.portal-detail-content img { max-width: 100%; }
.portal-detail-content h3 {
    font-size: 18px; font-weight: 600; color: #1a202c;
    margin: 24px 0 12px; padding-left: 12px;
    border-left: 4px solid #16587e;
}
.portal-detail-content p { margin: 0 0 14px; }
.portal-detail-content ul { margin: 0 0 16px; padding-left: 22px; }
.portal-detail-content li { margin: 4px 0; }

/* 下载区域 */
.portal-download-area {
    margin-top: 30px;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 4px;
    text-align: center;
}
.portal-download-area .btn-primary {
    background: #16587e;
    border-color: #16587e;
}
.portal-file-info { margin-bottom: 14px; color: #888; font-size: 14px; }
.portal-download-form { display: inline-block; text-align: left; }
.portal-captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.portal-captcha-input {
    width: 160px; height: 38px; padding: 0 12px;
    border: 1px solid #d1d5db; border-radius: 4px; font-size: 15px;
    letter-spacing: 3px; outline: none; box-sizing: border-box;
}
.portal-captcha-input:focus { border-color: #16587e; }
.portal-captcha-img {
    height: 38px; width: 110px; border-radius: 4px;
    cursor: pointer; border: 1px solid #d1d5db;
}
.portal-download-btn { width: auto; }
.portal-download-msg { display: block; margin-top: 10px; font-size: 13px; min-height: 18px; }
/* 无下载文件提示 */
.portal-download-area.portal-no-file { padding: 16px; background: #f5f7fa; }
.portal-no-file-tip { color: #9aa3b2; font-size: 14px; }
.portal-no-file-tip .fa { margin-right: 4px; color: #c0c6d0; }

/* 上下篇 */
.portal-prev-next {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.portal-prev-next .prev,
.portal-prev-next .next { padding: 6px 0; }
.portal-prev-next a { color: #16587e; }

/* 相关推荐 */
.portal-related { margin-top: 30px; }
.portal-related h3 { font-size: 18px; margin-bottom: 12px; }
.portal-related ul { list-style: none; padding: 0; }
.portal-related li { padding: 6px 0; }
.portal-related a { color: #555; }
.portal-related a:hover { color: #16587e; }

/* 分页 */
.portal-pagination { text-align: center; margin-top: 20px; }
.portal-pagination .pagination { display: inline-block; }

/* 单页 */
.portal-single-wrap .portal-detail-box { min-height: 400px; }
