/**
 * 法律问题详情页专用样式 - 优化版
 * 现代化设计，参考文章详情页风格
 */

/* ==================== CSS变量 ==================== */
:root {
    --qa-primary: #1a3b5d;
    --qa-accent: #c9a961;
    --qa-text: #2c3e50;
    --qa-text-light: #6c757d;
    --qa-bg: #ffffff;
    --qa-bg-light: #f8f9fa;
    --qa-border: #e9ecef;
    --qa-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --qa-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --qa-transition: all 0.3s ease;
}

/* ==================== 页面布局 ==================== */

.qa-detail {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 400px);
}

.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 主布局 ==================== */

.qa-detail-layout {
    display: block;
}

.qa-main-content {
    width: 100%;
}

/* ==================== 左侧边栏 ==================== */

.qa-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.sidebar-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-title i {
    color: #c9a961;
    font-size: 1.125rem;
}

/* 热门问题列表 */
.hot-questions-list,
.related-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-question-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #c9a961;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-question-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
    border-left-color: #1a3b5d;
}

.sidebar-question-title {
    font-size: 0.875rem;
    color: #2c3e50;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-question-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.sidebar-question-meta i {
    font-size: 0.75rem;
}

/* 快速咨询区 */
.sidebar-cta {
    background: linear-gradient(135deg, #1a3b5d 0%, #2d5573 100%);
    color: #ffffff;
}

.sidebar-cta .sidebar-title {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.sidebar-cta .sidebar-title i {
    color: #c9a961;
}

.cta-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #c9a961;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.cta-button:hover {
    background: #b89647;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

.contact-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-info p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: #c9a961;
    font-size: 0.875rem;
}

.loading-placeholder {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 1rem 0;
}

/* ==================== 问题头部 ==================== */

.qa-detail-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    margin-bottom: 2rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.qa-detail-header:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* 顶部装饰条 */
.qa-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1a3b5d 0%, #c9a961 50%, #1a3b5d 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 元信息区域 - 隐藏分类标签 */
.qa-detail-meta {
    display: none;
}

.qa-detail-category {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #c9a961 0%, #d4b876 100%);
    color: #ffffff;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.qa-detail-meta span {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qa-detail-meta i {
    color: #c9a961;
}

/* 问题标题 */
.qa-detail-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #1a3b5d;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    letter-spacing: -0.02em;
}

/* 文章信息栏 */
.article-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    margin-top: 0;
    border-top: 2px solid #f0f0f0;
}

.article-info span {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.article-info span:hover {
    color: #1a3b5d;
}

.article-info i {
    color: #c9a961;
    font-size: 1rem;
}

/* ==================== 问题内容区域 ==================== */

/* 标题下方的内容区域布局：左侧边栏 + 右侧用户提问和律师解答 */
.qa-content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* 内容区左侧边栏 */
.qa-content-sidebar {
    position: sticky;
    top: 150px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-self: flex-start;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.content-sidebar-section {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.content-sidebar-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-sidebar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.content-sidebar-title i {
    color: #c9a961;
    font-size: 1rem;
}

/* 内容区热门问题和相关问题列表 */
.content-hot-questions-list,
.content-related-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.content-sidebar-question-item {
    padding: 0.625rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #c9a961;
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-sidebar-question-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
    border-left-color: #1a3b5d;
}

.content-sidebar-question-title {
    font-size: 0.8125rem;
    color: #2c3e50;
    line-height: 1.5;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-sidebar-question-meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.6875rem;
    color: #6c757d;
}

.content-sidebar-question-meta i {
    font-size: 0.6875rem;
}

/* 内容区快速咨询 */
.content-sidebar-cta {
    background: linear-gradient(135deg, #1a3b5d 0%, #2d5573 100%);
    color: #ffffff;
}

.content-sidebar-cta .content-sidebar-title {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.content-sidebar-cta .content-sidebar-title i {
    color: #c9a961;
}

.content-sidebar-cta .cta-text {
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.875rem;
}

.content-sidebar-cta .cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem;
    background: #c9a961;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.content-sidebar-cta .cta-button:hover {
    background: #b89647;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

.content-sidebar-cta .contact-info {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.content-sidebar-cta .contact-info p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-sidebar-cta .contact-info i {
    color: #c9a961;
    font-size: 0.8125rem;
}

/* 右侧主要内容包装器 */
.qa-content-main {
    min-width: 0;
}

.qa-detail-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 问题详情 */
.qa-detail-question {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 3px solid #f0f0f0;
    position: relative;
}

.qa-detail-question::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #c9a961 0%, #1a3b5d 100%);
}

.qa-detail-question h4 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qa-detail-question h4 i {
    color: #1a3b5d;
    font-size: 1.5rem;
}

.question-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    border-left: 5px solid #c9a961;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 12px rgba(201, 169, 97, 0.15);
    position: relative;
}

.question-content::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 3rem;
    color: rgba(201, 169, 97, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
}

.question-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #2c3e50;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    z-index: 1;
}

/* 律师解答 */
.qa-detail-answer {
    margin-top: 2.5rem;
}

.answer-header {
    margin-bottom: 2rem;
}

.qa-detail-answer h4 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qa-detail-answer h4 i {
    color: #c9a961;
    font-size: 1.5rem;
}

/* 律师信息卡片 */
.lawyer-info-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
    border-radius: 12px;
    border: 2px solid #f0e6d2;
    box-shadow: 0 2px 12px rgba(201, 169, 97, 0.15);
    margin-bottom: 2rem;
}

.lawyer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a961 0%, #d4b876 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.lawyer-avatar i {
    font-size: 2.5rem;
    color: #ffffff;
}

.lawyer-details {
    flex: 1;
}

.lawyer-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a3b5d;
    margin-bottom: 0.5rem;
}

.lawyer-title {
    font-size: 0.9375rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.lawyer-expertise {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.expertise-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #ffffff;
    color: #c9a961;
    border: 1px solid #e0d4b8;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.expertise-tag:hover {
    background: #c9a961;
    color: #ffffff;
    border-color: #c9a961;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.qa-detail-answer-content {
    font-size: 17px;
    line-height: 1.8;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Source Han Sans CN", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
    letter-spacing: 0.3px;
    padding: 0.5rem 0;
}

.qa-detail-answer-content p {
    margin: 0.5rem 0;
    text-align: justify;
    line-height: 1.8;
    color: #2c3e50;
    font-size: 17px;
}

/* 首段不缩进 */
.qa-detail-answer-content > p:first-of-type {
    margin-top: 0;
    text-indent: 0;
    font-weight: 500;
    color: #1a3b5d;
}

/* 其他段落缩进 */
.qa-detail-answer-content p:not(:first-of-type) {
    text-indent: 2em;
}

.qa-detail-answer-content h1,
.qa-detail-answer-content h2,
.qa-detail-answer-content h3,
.qa-detail-answer-content h4,
.qa-detail-answer-content h5,
.qa-detail-answer-content h6 {
    color: #1a3b5d;
    font-weight: 600;
    margin: 2.5rem 0 1.25rem;
    text-indent: 0;
    line-height: 1.4;
    position: relative;
    padding-left: 1.25rem;
    letter-spacing: 0.5px;
}

.qa-detail-answer-content h1::before,
.qa-detail-answer-content h2::before,
.qa-detail-answer-content h3::before,
.qa-detail-answer-content h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(180deg, #c9a961 0%, #1a3b5d 100%);
    border-radius: 3px;
}

.qa-detail-answer-content h1 {
    font-size: 1.875rem;
    margin-top: 3rem;
}

.qa-detail-answer-content h2 {
    font-size: 1.625rem;
}

.qa-detail-answer-content h3 {
    font-size: 1.375rem;
}

.qa-detail-answer-content h4 {
    font-size: 1.25rem;
}

.qa-detail-answer-content h5 {
    font-size: 1.125rem;
    padding-left: 0.75rem;
}

.qa-detail-answer-content h6 {
    font-size: 1rem;
    padding-left: 0.75rem;
}

.qa-detail-answer-content ul,
.qa-detail-answer-content ol {
    margin: 2rem 0;
    padding-left: 2.5rem;
}

.qa-detail-answer-content li {
    margin: 1rem 0;
    line-height: 1.8;
    color: #2c3e50;
    text-indent: 0;
}

.qa-detail-answer-content ul li {
    list-style-type: none;
    position: relative;
}

.qa-detail-answer-content ul li::before {
    content: '●';
    color: #c9a961;
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
    font-size: 0.875rem;
}

.qa-detail-answer-content ol li {
    list-style-type: decimal;
    list-style-position: outside;
    color: #2c3e50;
}

.qa-detail-answer-content ol li::marker {
    color: #c9a961;
    font-weight: 600;
}

.qa-detail-answer-content strong,
.qa-detail-answer-content b {
    font-weight: 600;
    color: #1a3b5d;
    background: linear-gradient(180deg, transparent 60%, rgba(201, 169, 97, 0.2) 60%);
}

.qa-detail-answer-content em,
.qa-detail-answer-content i {
    font-style: italic;
    color: #495057;
}

.qa-detail-answer-content a {
    color: #3182ce;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.qa-detail-answer-content a:hover {
    color: #c9a961;
}

.qa-detail-answer-content blockquote {
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #c9a961;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    font-size: 16px;
    line-height: 1.75;
}

.qa-detail-answer-content blockquote p {
    text-indent: 0;
    margin: 0.5rem 0;
}

.qa-detail-answer-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e53e3e;
}

.qa-detail-answer-content pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.qa-detail-answer-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.qa-detail-answer-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qa-detail-answer-content table th,
.qa-detail-answer-content table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.qa-detail-answer-content table th {
    background: linear-gradient(135deg, #1a3b5d 0%, #2d5573 100%);
    color: #ffffff;
    font-weight: 600;
}

.qa-detail-answer-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.qa-detail-answer-content table tr:hover {
    background: #f1f5f9;
}

.qa-detail-answer-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9a961 50%, transparent 100%);
    margin: 3rem 0;
}

.qa-detail-answer-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 确保所有文本元素都有正确的颜色 */
.qa-detail-answer-content * {
    color: inherit;
}

/* 解答元信息 */
.qa-detail-answer-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    border-left: 5px solid #22c55e;
    flex-wrap: wrap;
}

.qa-detail-answer-meta .answer-label {
    color: #15803d;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qa-detail-answer-meta .answer-label i {
    color: #22c55e;
    font-size: 1.25rem;
}

.qa-detail-answer-meta span {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qa-detail-answer-meta i {
    color: #c9a961;
}

/* ==================== 返回按钮 ==================== */

.detail-actions {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: #ffffff;
    color: #1a3b5d;
    border: 2px solid #1a3b5d;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-link:hover {
    background: #1a3b5d;
    color: #ffffff;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(26, 59, 93, 0.3);
}

.back-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-4px);
}

/* ==================== 合规信息区域 ==================== */

.qa-compliance {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 2rem;
}

.compliance-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.compliance-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.compliance-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.compliance-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compliance-section h3 i {
    color: #c9a961;
    font-size: 1.25rem;
}

.compliance-section p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #495057;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .qa-detail {
        padding: 1rem 0 2rem;
    }

    .detail-container {
        padding: 0 15px;
    }

    /* 移动端：左侧边栏和主内容垂直排列 */
    .qa-content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .qa-content-sidebar {
        position: static;
    }

    .content-sidebar-section {
        padding: 1rem;
    }

    .qa-detail-header {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .qa-detail-title {
        font-size: 1.5rem;
    }

    .qa-detail-content {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .question-content {
        padding: 1.5rem 1.75rem;
    }

    .question-content p {
        font-size: 1rem;
    }

    .lawyer-info-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .lawyer-avatar {
        width: 70px;
        height: 70px;
    }

    .lawyer-avatar i {
        font-size: 2rem;
    }

    .lawyer-expertise {
        justify-content: center;
    }

    .qa-detail-answer-content {
        font-size: 16px;
        padding: 1rem 0;
    }

    .qa-detail-answer-content p {
        font-size: 16px;
        margin: 1.5rem 0;
    }

    .qa-detail-answer-content h1 {
        font-size: 1.5rem;
    }

    .qa-detail-answer-content h2 {
        font-size: 1.375rem;
    }

    .qa-detail-answer-content h3 {
        font-size: 1.25rem;
    }

    .qa-detail-answer-content h4 {
        font-size: 1.125rem;
    }

    .qa-detail-answer-content ul,
    .qa-detail-answer-content ol {
        padding-left: 2rem;
    }

    .qa-detail-answer-content blockquote {
        padding: 1.25rem 1.5rem;
        font-size: 15px;
    }

    .qa-detail-answer-content table {
        font-size: 14px;
    }

    .qa-detail-answer-content table th,
    .qa-detail-answer-content table td {
        padding: 0.75rem;
    }

    .qa-detail-answer-meta {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }

    .compliance-content {
        grid-template-columns: 1fr;
    }

    .back-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .qa-detail-header {
        padding: 1.25rem;
    }

    .qa-detail-content {
        padding: 1.25rem;
    }

    .qa-detail-meta {
        gap: 0.75rem;
    }

    .article-info {
        gap: 1rem;
    }

    .question-content {
        padding: 1.25rem 1.5rem;
    }

    .question-content::before {
        font-size: 2rem;
        top: 0.75rem;
        left: 0.75rem;
    }

    .lawyer-info-card {
        padding: 1.25rem;
    }

    .lawyer-avatar {
        width: 60px;
        height: 60px;
    }

    .lawyer-avatar i {
        font-size: 1.75rem;
    }

    .lawyer-name {
        font-size: 1.125rem;
    }

    .lawyer-title {
        font-size: 0.875rem;
    }

    .expertise-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .qa-detail-answer-content {
        font-size: 15px;
    }

    .qa-detail-answer-content p {
        font-size: 15px;
        margin: 1.25rem 0;
        text-indent: 1.5em;
    }

    .qa-detail-answer-content h1 {
        font-size: 1.375rem;
        padding-left: 1rem;
    }

    .qa-detail-answer-content h2 {
        font-size: 1.25rem;
        padding-left: 1rem;
    }

    .qa-detail-answer-content h3 {
        font-size: 1.125rem;
        padding-left: 1rem;
    }

    .qa-detail-answer-content h4 {
        font-size: 1rem;
        padding-left: 0.75rem;
    }

    .qa-detail-answer-content ul,
    .qa-detail-answer-content ol {
        padding-left: 1.5rem;
        margin: 1.5rem 0;
    }

    .qa-detail-answer-content blockquote {
        padding: 1rem 1.25rem;
        font-size: 14px;
        margin: 1.5rem 0;
    }

    .qa-detail-answer-content table {
        font-size: 13px;
    }

    .qa-detail-answer-content table th,
    .qa-detail-answer-content table td {
        padding: 0.5rem;
    }

    .qa-detail-answer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ==================== 打印样式 ==================== */

@media print {
    .qa-detail {
        background: #ffffff;
        padding: 0;
    }

    .qa-detail-header,
    .qa-detail-content {
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }

    .qa-detail-header::before {
        display: none;
    }

    .detail-actions,
    .qa-compliance,
    .qa-content-sidebar {
        display: none;
    }
}

/* ==================== 现代化优化 ==================== */

/* 页面淡入动画 */
.qa-detail-header,
.qa-detail-content,
.content-sidebar-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 列表项渐进动画 */
.content-sidebar-question-item {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.content-sidebar-question-item:nth-child(1) { animation-delay: 0.1s; }
.content-sidebar-question-item:nth-child(2) { animation-delay: 0.2s; }
.content-sidebar-question-item:nth-child(3) { animation-delay: 0.3s; }
.content-sidebar-question-item:nth-child(4) { animation-delay: 0.4s; }
.content-sidebar-question-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 优化焦点样式（无障碍） */
*:focus-visible {
    outline: 2px solid var(--qa-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 链接悬停效果增强 */
.content-sidebar-question-item {
    position: relative;
    overflow: hidden;
}

.content-sidebar-question-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--qa-accent) 0%, var(--qa-primary) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.content-sidebar-question-item:hover::before {
    transform: scaleY(1);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--qa-accent) 0%, #d4b876 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--qa-primary) 0%, #2d5573 100%);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(26, 59, 93, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* 阅读进度条 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--qa-primary) 0%, var(--qa-accent) 100%);
    width: 0%;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px rgba(201, 169, 97, 0.5);
}

/* 内容区域微交互 */
.qa-detail-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qa-detail-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 问题内容引用样式增强 */
.question-content {
    position: relative;
    transition: all 0.3s ease;
}

.question-content:hover {
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.2);
}

/* 侧边栏卡片悬停效果 */
.content-sidebar-section {
    transition: all 0.3s ease;
}

.content-sidebar-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 快速咨询按钮脉冲动画 */
.content-sidebar-cta .cta-button {
    position: relative;
    overflow: hidden;
}

.content-sidebar-cta .cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.content-sidebar-cta .cta-button:hover::after {
    width: 300px;
    height: 300px;
}

/* 标题装饰线动画 */
.qa-detail-header::before {
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 响应式优化 - 移动端 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }

    .reading-progress {
        height: 2px;
    }
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .back-to-top,
    .reading-progress-bar {
        transition: none !important;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    :root {
        --qa-bg: #1a1a1a;
        --qa-text: #e0e0e0;
        --qa-border: #333;
    }
}



/* ==================== 修复QA详情页侧边栏内容被遮挡 ==================== */

.qa-detail .content-sidebar-cta {
    overflow: visible !important;
    padding-bottom: 1.75rem !important;
}

.qa-detail .content-sidebar-cta .contact-info {
    margin-top: 1.25rem !important;
    padding-top: 1.25rem !important;
    padding-bottom: 0.5rem !important;
}

.qa-detail .content-sidebar-cta .contact-info p {
    font-size: 0.8125rem !important;
    margin: 0.625rem 0 !important;
    line-height: 1.6 !important;
    word-break: break-all !important;
    white-space: normal !important;
}

.qa-detail .content-sidebar-section {
    min-height: fit-content !important;
}


/* ==================== 删除QA详情页侧边栏滚动条 ==================== */

.qa-content-sidebar {
    max-height: none !important;
    overflow-y: visible !important;
}

.qa-content-sidebar::-webkit-scrollbar {
    display: none !important;
}
