/* ===== 新闻详情页专属样式 ===== */

/* 文章容器 */
.article-container {
    background: #ffffff;
    border-radius: 28px;
    padding: 40px 44px;
    border: 1px solid #edf2f9;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
    width: 100%;
}
.article-header {
    margin-bottom: 32px;
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 20px;
}
.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2e3a;
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin-bottom: 14px;
}
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: #7e95aa;
    margin-top: 8px;
    flex-wrap: wrap;
}
.article-meta i {
    margin-right: 6px;
    font-size: 0.75rem;
    color: #2563eb;
}

/* 文章内容 */
.article-content {
    font-size: 0.92rem;
    color: #2d3e4e;
    line-height: 1.85;
    margin-bottom: 22px;
    letter-spacing: 0.01em;
}
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.85;
}
.article-content p:last-child {
    margin-bottom: 0;
}
.article-content p:first-of-type {
    margin-top: 0;
}
.article-content a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(transparent 62%, #dbeafe 62%);
    padding: 0 2px;
    border-radius: 4px;
    transition: all 0.25s ease;
    border-bottom: 1px dotted rgba(37, 99, 235, 0.4);
    cursor: pointer;
}
.article-content a:hover {
    color: #1e40af;
    background: linear-gradient(transparent 50%, #93c5fd 50%);
    border-bottom-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}
.article-content a:active {
    transform: translateY(0);
    box-shadow: none;
}
.article-content a:visited {
    color: #4f46e5;
}
.article-content a:visited:hover {
    color: #1e40af;
}

/* ===== 图片链接专用样式（自动匹配含 img 的链接，也可手动加 .img-link）===== */
.article-content a:has(img),
.article-content a.img-link {
    display: inline-block !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) !important;
}
.article-content a:has(img):hover,
.article-content a.img-link:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}
.article-content a:has(img) img,
.article-content a.img-link img {
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    border-radius: 16px !important;
    border: 1px solid #e8edf5 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1) !important;
    margin: 0 auto !important;
}
.article-content a:has(img):hover img,
.article-content a.img-link:hover img {
    transform: scale(1.03) translateY(-3px) !important;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18), 0 4px 10px rgba(15, 23, 42, 0.06) !important;
    border-color: #93c5fd !important;
}
@media (max-width: 768px) {
    .article-content a:has(img) img,
    .article-content a.img-link img {
        border-radius: 12px !important;
    }
}
.article-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.1px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fbff 100%);
    border-radius: 14px;
    border-left: 4px solid #2563eb;
    position: relative;
    line-height: 1.4;
}
.article-content h2::before {
    content: '\f022';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
    color: #2563eb;
    opacity: 0.85;
}
.article-content h2:first-of-type {
    margin-top: 0;
}
.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.1px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fbff 100%);
    border-radius: 14px;
    border-left: 4px solid #2563eb;
    position: relative;
    line-height: 1.4;
}
.article-content h3::before {
    content: '\f022';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
    color: #2563eb;
    opacity: 0.85;
}
.article-content h3:first-of-type {
    margin-top: 0;
}
.article-content strong {
    background: linear-gradient(135deg, #eff6ff, #e0edff);
    color: #1e40af;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.9em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: all 0.2s ease;
    border: 1px solid #dbeafe;
}
.article-content strong:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e3a5f;
}
.article-content blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 2rem;
    background: #f0f9ff;
    border-left: 5px solid #2563eb;
    border-radius: 20px;
    font-style: normal;
    color: #1e3a5f;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    position: relative;
    transition: all 0.2s;
    line-height: 1.7;
}
.article-content blockquote p {
    margin-bottom: 0;
    line-height: 1.7;
}
.article-content blockquote::before {
    content: "\201C";
    font-family: serif;
    font-size: 2.4rem;
    color: #2563eb;
    opacity: 0.4;
    position: absolute;
    left: 16px;
    top: -4px;
}
.article-content blockquote strong {
    background: #dbeafe;
    color: #1e40af;
}

/* 表格美化 */
.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid #c5d4e8;
    font-size: 0.88rem;
    background: #ffffff;
}
.article-content table th {
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0fe 100%);
    color: #1e3a5f;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid #b8cfee;
    text-align: left;
    vertical-align: middle;
}
.article-content table td {
    padding: 11px 16px;
    border-bottom: 1px solid #e8edf5;
    text-align: left;
    vertical-align: middle;
    background-color: #ffffff;
    color: #2d3e4e;
}
.article-content table tbody tr:nth-child(even) td {
    background-color: #f8fafc;
}
.article-content table tbody tr:hover td {
    background-color: #f0f6ff !important;
    transition: background 0.2s ease;
}
.article-content table tbody tr:last-child td {
    border-bottom: none;
}
.article-content table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 14px;
}
.article-content table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 14px;
}
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.2rem 0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.article-content ul,
.article-content ol {
    padding-left: 1.8rem;
    margin: 1rem 0;
}
.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.85;
}

/* 底部产品标签 */
.article-footer {
    margin-top: 32px;
}
.article-footer .product-tags-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eef2f8;
}
.article-footer .tags-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.article-footer .tags-prefix {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    padding: 8px 18px 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    white-space: nowrap;
}
.article-footer .tags-prefix i {
    font-size: 0.95rem;
    color: #2563eb;
}
.article-footer .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.article-footer .tag-item {
    display: inline-block;
    background: #f3f7fc;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #4a5b6e;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.article-footer .tag-item:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* 新闻详情页响应式 */
@media (max-width: 992px) {
    .news-layout {
        grid-template-columns: 220px 1fr;
        gap: 32px;
    }
}
@media (max-width: 768px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .news-sidebar {
        position: static;
        width: 100%;
        padding: 20px;
        display: block;
    }
    .news-sidebar .sidebar-block {
        margin-bottom: 28px;
    }
    .news-sidebar .sidebar-block:last-child {
        margin-bottom: 0;
    }
    .article-container {
        padding: 28px 24px;
    }
    .article-header h1 {
        font-size: 1.6rem;
    }
}
@media (max-width: 600px) {
    .news-sidebar {
        display: block;
    }
}
@media (max-width: 480px) {
    .article-container {
        padding: 20px 16px;
    }
    .article-header h1 {
        font-size: 1.3rem;
    }
    .article-meta {
        gap: 12px;
        font-size: 0.7rem;
    }
    .article-content table {
        font-size: 0.8rem;
    }
    .article-content table th,
    .article-content table td {
        padding: 10px 12px;
    }
}
