/* ==================== IBS问答页面样式 ==================== */

/* Hero区域 */
.qa-hero {
    background: linear-gradient(135deg, #4A90E2 0%, #7CB342 100%);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.qa-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.qa-hero .subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* 问答容器 */
.qa-container {
    padding: 60px 0;
    max-width: 1000px;
}

/* 专家徽章 */
.expert-badge {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #F9F9F9;
    border-left: 3px solid #D0D0D0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.badge-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    opacity: 0.6;
}

.badge-content h3 {
    color: #888;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.badge-content p {
    line-height: 1.6;
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.badge-content p strong {
    font-weight: 500;
    color: #888;
}

/* 搜索和筛选区域 */
.qa-search-section {
    margin-bottom: 50px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
    border: 2px solid #4A90E2;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    background: #4A90E2;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1.2rem;
}

.search-box button:hover {
    background: #357ABD;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #E0E0E0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #4A90E2;
    color: #4A90E2;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #4A90E2;
    color: white;
    border-color: #4A90E2;
}

/* 问答分类 */
.qa-category {
    margin-bottom: 50px;
}

.category-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4A90E2;
    display: inline-block;
}

/* 问答项目 */
.qa-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.3s;
    scroll-margin-top: 100px; /* 为锚点跳转留出导航栏空间 */
}

.qa-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.qa-question {
    display: flex;
    align-items: center;
    padding: 25px 30px;
    gap: 15px;
    background: white;
    transition: background 0.3s;
}

.qa-question:hover {
    background: #F8F9FA;
}

.qa-number {
    background: linear-gradient(135deg, #4A90E2, #7CB342);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.qa-title-link {
    color: #333;
    text-decoration: none;
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.qa-title-link:hover {
    color: #4A90E2;
}

.qa-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    color: #4A90E2;
    font-size: 1.2rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

/* 问答答案 */
.qa-answer {
    padding: 0 30px 30px;
    background: #FAFBFC;
    border-top: 1px solid #E0E0E0;
}

.answer-content {
    line-height: 1.9;
    color: #444;
    margin-bottom: 20px;
}

/* 问答元数据 */
.qa-meta {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #E0E0E0;
}

.qa-keywords {
    margin-bottom: 25px;
}

.qa-keywords strong {
    color: #4A90E2;
    font-size: 16px;
    display: block;
    margin-bottom: 12px;
}

.keyword-tag {
    display: inline-block;
    background: #F5F5F5;
    color: #666;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin: 4px 6px 4px 0;
    font-weight: 400;
    border: 1px solid #E0E0E0;
}

.keyword-tag:hover {
    background: #EBEBEB;
    color: #555;
}

.qa-references {
    margin-top: 15px;
}

.qa-references strong {
    color: #7CB342;
    font-size: 16px;
    display: block;
    margin-bottom: 12px;
}

.qa-references ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qa-references li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid #F0F0F0;
}

.qa-references li:last-child {
    border-bottom: none;
}

.qa-references li:before {
    content: "📄";
    position: absolute;
    left: 0;
    top: 10px;
}

/* 引用来源链接样式 */
.reference-link {
    color: #4A90E2;
    text-decoration: none;
    border-bottom: 1px dashed #4A90E2;
    transition: all 0.3s ease;
}

.reference-link:hover {
    color: #7CB342;
    border-bottom-color: #7CB342;
    border-bottom-style: solid;
}

.qa-references ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 医学免责声明 */
.medical-disclaimer {
    background: #FFF9E6;
    border: 2px solid #FFB800;
    border-radius: 12px;
    padding: 30px;
    margin-top: 50px;
}

.medical-disclaimer h3 {
    color: #D97706;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.medical-disclaimer p {
    line-height: 1.8;
    color: #666;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qa-hero {
        padding: 80px 0 60px;
    }

    .qa-hero h1 {
        font-size: 2rem;
    }

    .qa-hero .subtitle {
        font-size: 1rem;
    }

    .expert-badge {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    .badge-icon {
        font-size: 2rem;
    }

    .badge-content h3 {
        font-size: 1.2rem;
    }

    .search-box {
        margin: 0 20px 20px;
    }

    .category-filters {
        padding: 0 20px;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .qa-item {
        margin: 0 20px 20px;
    }

    .qa-question {
        padding: 20px;
        gap: 10px;
    }

    .qa-title-link {
        font-size: 1rem;
    }

    .qa-number {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .qa-answer {
        padding: 0 20px 20px;
    }

    .keyword-tag {
        font-size: 12px;
        padding: 5px 12px;
        margin: 3px 4px 3px 0;
    }

    .qa-keywords strong,
    .qa-references strong {
        font-size: 14px;
    }

    .qa-references li {
        font-size: 13px;
        padding-left: 25px;
    }

    .medical-disclaimer {
        margin: 50px 20px 0;
        padding: 20px;
    }

    .medical-disclaimer h3 {
        font-size: 1.2rem;
    }
}

/* 答案内容段落优化 */
.answer-content p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.answer-content h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
}

.answer-content h4 {
    margin-top: 16px;
    margin-bottom: 10px;
    color: #444;
    font-size: 1rem;
}

.answer-content ul, .answer-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.answer-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.answer-content strong {
    color: #333;
    font-weight: 600;
}

/* 减少答案内容中过大的间距 */
.answer-content > *:first-child {
    margin-top: 0;
}

.answer-content > *:last-child {
    margin-bottom: 0;
}
