/**
 * 绿翊合规 - faq 问答首页样式
 * 适用于 faq/index.php
 * 包含：Hero、分类筛选、搜索、问答列表、分页、侧栏
 */

/* ===== Hero 顶部标题区 ===== */
.faq-hero {
    background: linear-gradient(135deg, #0a2463 0%, #1c499e 100%);
    color: #fff;
    padding: 56px 20px 48px;
    margin-top: 64px;
}
.faq-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.faq-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 1px;
}
.faq-hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
    max-width: 760px;
    margin: 0 auto 24px;
    line-height: 1.9;
}
.faq-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.faq-hero-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #ffd54f;
}
.faq-hero-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

/* ===== 主容器 ===== */
.faq-main {
    max-width: 1200px;
    margin: 32px auto 40px;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.faq-content { flex: 1; min-width: 0; }
.faq-sidebar { width: 300px; flex-shrink: 0; }

/* ===== 搜索框 ===== */
.faq-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.faq-search-form {
    display: flex;
    gap: 10px;
}
.faq-search-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    min-width: 0;
}
.faq-search-input:focus {
    outline: none;
    border-color: #1c499e;
}
.faq-search-btn {
    background: #1c499e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 22px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.faq-search-btn:hover { background: #0a2463; }

/* ===== 分类筛选标签 ===== */
.faq-categories {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.faq-categories-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.faq-categories-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #1c499e;
    border-radius: 2px;
}
.faq-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.faq-cat-tag {
    display: inline-block;
    padding: 7px 16px;
    background: #f5f7fa;
    color: #555;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.faq-cat-tag:hover {
    background: #eef3ff;
    color: #1c499e;
}
.faq-cat-tag.active {
    background: #1c499e;
    color: #fff;
}
.faq-cat-count {
    font-size: 11px;
    margin-left: 4px;
    opacity: 0.75;
}

/* ===== 问答列表 ===== */
.faq-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 4px;
}
.faq-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.faq-list-count {
    font-size: 13px;
    color: #888;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.faq-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.25s;
    border-left: 4px solid transparent;
}
.faq-card:hover {
    box-shadow: 0 6px 24px rgba(28, 73, 158, 0.12);
    border-left-color: #1c499e;
    transform: translateY(-2px);
}
.faq-card-cat {
    display: inline-block;
    font-size: 12px;
    color: #1c499e;
    background: #eef3ff;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 500;
}
.faq-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.5;
}
.faq-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.faq-card-title a:hover { color: #1c499e; }
.faq-card-answer {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.faq-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}
.faq-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.faq-card-kw {
    color: #1c499e;
    background: #f5f7fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.faq-card-date { font-size: 12px; }

/* ===== 分页 ===== */
.faq-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.faq-pagination a,
.faq-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}
.faq-pagination a:hover {
    border-color: #1c499e;
    color: #1c499e;
}
.faq-pagination .current {
    background: #1c499e;
    color: #fff;
    border-color: #1c499e;
}
.faq-pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* ===== 空状态 ===== */
.faq-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    color: #999;
}
.faq-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.faq-empty-text { font-size: 15px; }

/* ===== 侧栏 ===== */
.faq-sidebar-box {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.faq-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eefc;
    display: flex;
    align-items: center;
    gap: 6px;
}
.faq-sidebar-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #1c499e;
    border-radius: 2px;
}
.faq-hot-list { list-style: none; padding: 0; margin: 0; }
.faq-hot-list li {
    margin-bottom: 10px;
}
.faq-hot-list li:last-child { margin-bottom: 0; }
.faq-hot-list a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.6;
    transition: color 0.2s;
}
.faq-hot-list a:hover { color: #1c499e; }
.faq-hot-rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #eef0f5;
    color: #888;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-hot-list li:nth-child(1) .faq-hot-rank { background: #ff4d4f; color: #fff; }
.faq-hot-list li:nth-child(2) .faq-hot-rank { background: #ff7a45; color: #fff; }
.faq-hot-list li:nth-child(3) .faq-hot-rank { background: #ffa940; color: #fff; }

/* 侧栏咨询卡 */
.faq-consult-card {
    background: linear-gradient(135deg, #1c499e, #0a2463);
    border-radius: 12px;
    padding: 22px 20px;
    color: #fff;
    text-align: center;
}
.faq-consult-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}
.faq-consult-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    line-height: 1.7;
}
.faq-consult-btn {
    display: inline-block;
    background: #ffd54f;
    color: #0a2463;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.faq-consult-btn:hover {
    background: #ffca28;
    transform: translateY(-1px);
}

/* ===== 移动端适配 ===== */
@media (max-width: 960px) {
    .faq-hero { padding: 40px 20px 32px; }
    .faq-hero h1 { font-size: 24px; }
    .faq-hero-desc { font-size: 14px; }
    .faq-hero-stats { gap: 24px; }
    .faq-hero-stat-num { font-size: 22px; }

    .faq-main { flex-direction: column; padding: 0 16px; }
    .faq-sidebar { width: 100%; position: static; order: 2; }
    .faq-content { order: 1; }

    .faq-card { padding: 18px 16px; }
    .faq-card-title { font-size: 15px; }
    .faq-card-answer { font-size: 13px; -webkit-line-clamp: 2; }
}

@media (max-width: 480px) {
    .faq-hero h1 { font-size: 20px; }
    .faq-hero-stats { gap: 16px; }
    .faq-search-form { flex-direction: column; }
    .faq-search-btn { padding: 11px; }
    .faq-pagination a,
    .faq-pagination span { min-width: 34px; height: 34px; padding: 0 8px; font-size: 13px; }
}
