/* News Insights List Page Styles */
.news-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.news-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #f8f9fa;
}

.news-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f3f5;
    color: #6c757d;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #6c757d;
}

.news-source {
    font-weight: 500;
}

.news-title {
    font-size: 1.25em;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
    color: #343a40;
}

.news-title-link {
    color: inherit;
    text-decoration: none;
}

.news-title-link:hover .news-title {
    color: #007bff;
}

.ai-insight-preview {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #495057;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    background-color: #e8f4f8;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
    flex-grow: 1;
}

.news-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0A2F5C;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    align-self: flex-start;
}

.news-link:hover {
    background-color: #051E3E;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.page-title {
    font-size: 2em;
    margin-bottom: 25px;
    color: #343a40;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #e9ecef;
}

.pagination span.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination span.disabled {
    color: #6c757d;
    pointer-events: none;
}

/* News Insight Detail Page Styles */
.insight-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

.insight-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.insight-title {
    font-size: 2em;
    margin-bottom: 15px;
    color: #303030;
    line-height: 1.3;
}

.insight-meta {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.insight-meta span {
    margin-right: 15px;
}

.insight-source {
    font-weight: 500;
}

.source-link {
    margin-left: 6px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
}

.source-link:hover {
    text-decoration: underline;
}

.insight-section {
    margin-bottom: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.insight-section h2 {
    font-size: 1.4em;
    color: #343a40;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.ai-insight {
    line-height: 1.7;
    font-size: 1.05em;
    color: #333;
}

.ai-insight p {
    margin-bottom: 1.2em;
}

/* Language Tabs */
.language-tabs {
    width: 100%;
}

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #343a40;
}

.tab-button.active {
    color: #17a2b8;
    border-bottom-color: #17a2b8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Markdown Styling */
.ai-insight h1, 
.ai-insight h2, 
.ai-insight h3, 
.ai-insight h4, 
.ai-insight h5, 
.ai-insight h6 {
    margin-top: 1.6em;
    margin-bottom: 0.8em;
    color: #343a40;
    font-weight: 600;
    line-height: 1.3;
}

.ai-insight h1 {
    font-size: 1.7em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.ai-insight h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.ai-insight h3 {
    font-size: 1.3em;
}

.ai-insight h4 {
    font-size: 1.1em;
}

.ai-insight ul, 
.ai-insight ol {
    margin-top: 0.5em;
    margin-bottom: 1.2em;
    padding-left: 2em;
}

.ai-insight li {
    margin-bottom: 0.5em;
}

.ai-insight blockquote {
    border-left: 3px solid #6c757d;
    padding: 0.8em 1em;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.2em;
    background-color: #f8f9fa;
    color: #495057;
    font-style: italic;
}

.ai-insight code {
    background-color: #f1f3f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
    font-size: 0.9em;
}

.ai-insight pre {
    background-color: #f1f3f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.2em;
}

.ai-insight pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    line-height: 1.5;
}

.ai-insight table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.2em;
}

.ai-insight table th, 
.ai-insight table td {
    border: 1px solid #dee2e6;
    padding: 0.6em;
}

.ai-insight table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

.ai-insight hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

.ai-insight strong, 
.ai-insight b {
    font-weight: 600;
    color: #333;
}

.ai-insight em, 
.ai-insight i {
    font-style: italic;
}

.navigation-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.back-link, .original-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.2s;
}

.back-link:hover, .original-link:hover {
    color: var(--primary-color-dark);
}

/* 分享按钮样式 */
.share-buttons {
    display: flex;
    align-items: center;
    position: relative;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.share-btn:hover {
    background-color: var(--primary-color-dark);
}

.share-btn i {
    margin-right: 6px;
}

/* 分享通知样式 */
.share-notification {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

/* 显示分享通知的动画类 */
.share-notification.show {
    opacity: 1;
}

.image-container {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-image {
    width: 100%;
    display: block;
}

/* JSON内容样式 */
.summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 3px solid #17a2b8;
    font-size: 1.05em;
}

.conclusion {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin-top: 25px;
    border-left: 3px solid #28a745;
    font-size: 1.05em;
}

/* 确保在窄屏幕上也有良好的显示效果 */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-meta {
        flex-direction: column;
    }
    
    .insight-meta > div {
        margin-bottom: 10px;
    }
    
    .insight-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .insight-section {
        padding: 15px 10px;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .summary, .conclusion {
        padding: 12px;
    }

    .ai-insight {
        font-size: 0.95em;
        line-height: 1.6;
    }

    .insight-title {
        font-size: 1.7em;
    }

    .ai-insight h1 {
        font-size: 1.5em;
    }

    .ai-insight h2 {
        font-size: 1.3em;
    }

    .ai-insight h3 {
        font-size: 1.2em;
    }

    .ai-insight h4 {
        font-size: 1.05em;
    }

    /* 减小移动端内容区的内边距，提供更好的可读性 */
    .ai-insight blockquote {
        padding: 0.6em 0.8em;
        margin-bottom: 1em;
    }
    
    .ai-insight ul, 
    .ai-insight ol {
        padding-left: 1.5em;
        margin-bottom: 1em;
    }
    
    /* 减小移动端代码块的内边距 */
    .ai-insight pre {
        padding: 0.8em;
        margin-bottom: 1em;
        font-size: 0.85em;
    }
    
    .ai-insight code {
        font-size: 0.85em;
    }
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 内容样式优化 */
.content {
    line-height: 1.7;
    margin: 20px 0;
}

.content p {
    margin-bottom: 16px;
}

.content h1, 
.content h2, 
.content h3, 
.content h4, 
.content h5, 
.content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.content h1 {
    font-size: 1.7em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.content h3 {
    font-size: 1.3em;
}

.content h4 {
    font-size: 1.1em;
}

.content ul, 
.content ol {
    margin-top: 0.5em;
    margin-bottom: 1.2em;
    padding-left: 2em;
}

.content li {
    margin-bottom: 0.5em;
}

.content blockquote {
    border-left: 3px solid #6c757d;
    padding: 0.8em 1em;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.2em;
    background-color: #f8f9fa;
    color: #495057;
    font-style: italic;
}

.content code {
    background-color: #f1f3f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
    font-size: 0.9em;
}

.content pre {
    background-color: #f1f3f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.2em;
}

.content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    line-height: 1.5;
}

.content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.2em;
}

.content table th, 
.content table td {
    border: 1px solid #dee2e6;
    padding: 0.6em;
}

.content table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

.content hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

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

.content em, 
.content i {
    font-style: italic;
}

/* 修改insights-grid为3列布局 */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.insights-grid .news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.insights-grid .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.insights-grid .news-image-link {
    display: block;
    height: 200px;
    overflow: hidden;
}

.insights-grid .news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.insights-grid .news-image:hover {
    transform: scale(1.05);
}

.insights-grid .no-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-style: italic;
}

.insights-grid .news-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.insights-grid .news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666;
}

.insights-grid .news-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.insights-grid .news-title-link {
    color: #333;
    text-decoration: none;
}

.insights-grid .news-title-link:hover {
    color: #1a73e8;
}

.insights-grid .ai-insight-preview {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.insights-grid .news-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #0A2F5C;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.insights-grid .news-link:hover {
    background-color: #051E3E;
}

/* Read More Insights按钮样式 */
.read-more-insights {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.read-more-insights-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #0A2F5C;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.read-more-insights-btn:hover {
    background-color: #051E3E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.read-more-insights-btn i {
    margin-left: 8px;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* 更精细的移动端断点 */
@media (max-width: 576px) {
    .insight-container {
        padding: 10px 8px;
    }
    
    .insight-section {
        padding: 12px 8px;
        margin-bottom: 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    
    .insight-title {
        font-size: 1.5em;
        margin-bottom: 10px;
    }
    
    .insight-meta {
        font-size: 0.8em;
    }
    
    .navigation-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .share-buttons {
        order: -1;
        margin-bottom: 5px;
    }
    
    .tab-buttons {
        justify-content: center;
    }

    .tab-button {
        padding: 6px 10px;
        font-size: 0.85em;
    }

    /* 调整内容区域的所有表格，使其可以水平滚动 */
    .tab-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 优化移动端的图片显示 */
    .ai-insight img {
        max-width: 100%;
        height: auto;
    }
    
    /* 移动端缩小代码和引用块的字体 */
    .ai-insight code,
    .ai-insight pre,
    .ai-insight blockquote {
        font-size: 0.8em;
    }
} 