/* ================================================================
   common.css - 通测检测公共样式（修复版）
   包含：CSS变量、全局重置、顶部栏、导航、Banner、底部、浮动按钮、卡片网格、详情组件（作用域限定）
   ================================================================ */

/* ===== CSS Variables ===== */
:root {
    --primary: #1f87e8;
    --primary-dark: #166fc7;
    --primary-light: #4fc3f7;
    --bg-dark: #0b1929;
    --bg-footer: #14212e;
    --text-light: #b0b8c0;
    --text-muted: #7a8a9a;
    --border-light: #e0e4ea;
    --card-bg: #f7f9fc;
    --white: #fff;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 36px rgba(31, 135, 232, 0.10);
    --radius: 12px;
    --transition: 0.3s ease;
}

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}
ul {
    list-style: none;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================================
   顶部工具栏
   ================================================================ */
.top-bar {
    background: #1a2a3a;
    color: #ccc;
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar .lang-switch a {
    color: #ccc;
    margin-left: 12px;
    font-size: 13px;
}
.top-bar .lang-switch a.active,
.top-bar .lang-switch a:hover {
    color: #fff;
}
.top-bar .lang-switch .divider {
    color: #555;
    margin: 0 6px;
}

/* ================================================================
   头部导航
   ================================================================ */
.header {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.logo img {
    height: 54px;
    display: block;
}
.main-nav ul {
    display: flex;
    gap: 6px;
}
.main-nav ul li a {
    display: block;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #4b4b4b;
    border-radius: 4px;
    transition: all var(--transition);
    cursor: pointer;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary);
    background: rgba(31, 135, 232, 0.08);
}
.main-nav ul li a.active {
    font-weight: 600;
}

/* ================================================================
   首页 Banner 轮播
   ================================================================ */
.banner {
    position: relative;
    height: 560px;
    overflow: hidden;
    background-color: #0b1929;
}
.banner-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
}
.banner-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #0b1929;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    position: relative;
}
.banner-slide > div {
    padding: 20px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}
.banner-slide h1 {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.banner-slide p {
    font-size: 20px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}
.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}
.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}
.banner-dots span.active {
    background: var(--primary);
    border-color: #fff;
    transform: scale(1.2);
}

/* ================================================================
   内页 Banner
   ================================================================ */
.inner-banner {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    color: #fff;
    background-color: #0b1929;
    background-size: cover;
    background-position: center;
}
.inner-banner .container {
    position: relative;
    z-index: 2;
}
.inner-banner h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}
.inner-banner h1 span {
    color: #4fc3f7;
}
.inner-banner p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}
.inner-banner .breadcrumb {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.inner-banner .breadcrumb a {
    color: #4fc3f7;
}
.inner-banner .breadcrumb a:hover {
    text-decoration: underline;
}

/* ================================================================
   通用标题
   ================================================================ */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}
.section-title h2 {
    font-size: 30px;
    font-weight: 700;
    color: #222;
    letter-spacing: 1px;
}
.section-title h2 span {
    color: var(--primary);
}
.section-title p {
    color: #888;
    font-size: 16px;
    margin-top: 8px;
}

/* ================================================================
   卡片网格（为什么需要检测 + 服务优势）
   ================================================================ */
.why-grid,
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.why-card,
.advantage-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px 20px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f2f5;
    transition: all var(--transition);
}
.why-card:hover,
.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #dbe6f0;
}
.why-card .icon,
.advantage-card .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}
.why-card h4,
.advantage-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}
.why-card p,
.advantage-card p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ================================================================
   底部
   ================================================================ */
.footer {
    background: var(--bg-footer);
    color: #ccc;
    padding: 50px 0 30px;
}
.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col p,
.footer-col a {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}
.footer-col a:hover {
    color: var(--primary);
}
.footer-col .contact-phone {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}
.footer-col .contact-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 12px;
}
.footer-col .address {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.footer-links a {
    font-size: 14px;
    color: var(--text-light);
    transition: color var(--transition);
}
.footer-links a:hover {
    color: var(--primary);
}
.footer-bottom {
    border-top: 1px solid #1e2e3e;
    padding-top: 20px;
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: #6a7a8a;
}
.footer-bottom a {
    color: #6a7a8a;
}
.footer-bottom a:hover {
    color: var(--primary);
}

/* ================================================================
   右侧浮动按钮
   ================================================================ */
.float-side {
    position: fixed;
    right: 20px;
    bottom: 120px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.float-side .btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
}
.float-side .btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(31, 135, 232, 0.20);
    background: var(--primary);
    color: #fff;
}
.float-side .btn .tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a2a3a;
    color: #fff;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.float-side .btn:hover .tooltip {
    opacity: 1;
}

/* ================================================================
   详情页通用组件（作用域限定在 .detail-section 内）
   ================================================================ */
.detail-section {
    padding: 40px 0 60px;
    background: #fff;
}
.detail-section .detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.detail-section .detail-main {
    min-width: 0;
}
.detail-section .detail-main .breadcrumb {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.detail-section .detail-main .breadcrumb a {
    color: var(--primary);
    transition: color 0.2s;
}
.detail-section .detail-main .breadcrumb a:hover {
    text-decoration: underline;
}
.detail-section .detail-main .breadcrumb .sep {
    color: #ccc;
}
.detail-section .detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin-bottom: 8px;
}
.detail-section .detail-subtitle {
    font-size: 18px;
    color: #666;
    font-weight: 400;
    margin-bottom: 16px;
}
.detail-section .detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 12px 0 18px;
    border-bottom: 2px solid #f0f2f5;
    margin-bottom: 28px;
    font-size: 14px;
    color: #888;
}
.detail-section .detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-section .detail-meta .meta-item .icon {
    font-size: 16px;
}
.detail-section .detail-meta .meta-item .tag {
    background: #e8f0fe;
    color: var(--primary);
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.detail-section .detail-meta .meta-item .tag.hot {
    background: #fde8e8;
    color: #e74c3c;
}
.detail-section .detail-body {
    font-size: 16px;
    color: #444;
    line-height: 1.9;
}
.detail-section .detail-body p {
    margin-bottom: 18px;
}
.detail-section .detail-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 32px 0 14px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
}
.detail-section .detail-body h4 {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin: 20px 0 8px;
}
.detail-section .detail-body ul,
.detail-section .detail-body ol {
    padding-left: 24px;
    margin-bottom: 18px;
}
.detail-section .detail-body ul li,
.detail-section .detail-body ol li {
    margin-bottom: 6px;
}
.detail-section .detail-body ul li::marker {
    color: var(--primary);
}
.detail-section .detail-body .highlight-box {
    background: #f0f6fe;
    border-left: 4px solid var(--primary);
    padding: 18px 24px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
}
.detail-section .detail-body .highlight-box p {
    margin-bottom: 0;
    color: #1a2a3a;
    font-weight: 500;
}
.detail-section .detail-body .img-wrapper {
    margin: 28px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #f7f9fc;
}
.detail-section .detail-body .img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}
.detail-section .detail-body .img-wrapper:hover img {
    transform: scale(1.02);
}
.detail-section .detail-body .img-wrapper .caption {
    padding: 12px 20px;
    font-size: 14px;
    color: #888;
    text-align: center;
    background: #fafbfc;
    border-top: 1px solid #f0f2f5;
}
.detail-section .detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.detail-section .sidebar-card {
    background: #f7f9fc;
    border-radius: var(--radius);
    padding: 24px 22px;
    border: 1px solid #f0f2f5;
    transition: all 0.3s ease;
}
.detail-section .sidebar-card:hover {
    border-color: #dbe6f0;
}
.detail-section .sidebar-card .card-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8ecf1;
}
.detail-section .sidebar-card .card-title .icon {
    font-size: 20px;
}

/* ================================================================
   加载骨架屏
   ================================================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f2f5 25%, #e0e4ea 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1200px) {
    .detail-section .detail-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 32px;
    }
}
@media (max-width: 992px) {
    .detail-section .detail-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .detail-section .detail-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .detail-section .detail-title {
        font-size: 26px;
    }
    .footer .container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .banner {
        height: 420px;
    }
    .inner-banner {
        padding: 80px 0 60px;
    }
    .banner-slide h1 {
        font-size: 36px;
    }
    .inner-banner h1 {
        font-size: 34px;
    }
    .banner-slide p {
        font-size: 18px;
    }
    .inner-banner p {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
    }
    .logo img {
        height: 40px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
        margin-top: 6px;
    }
    .main-nav ul li a {
        padding: 6px 12px;
        font-size: 14px;
    }
    .banner {
        height: 320px;
    }
    .inner-banner {
        padding: 60px 0 50px;
    }
    .banner-slide h1 {
        font-size: 24px;
    }
    .inner-banner h1 {
        font-size: 26px;
    }
    .banner-slide p {
        font-size: 15px;
    }
    .inner-banner p {
        font-size: 15px;
    }
    .footer .container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .top-bar .container {
        flex-direction: column;
        gap: 4px;
        font-size: 12px;
    }
    .float-side {
        right: 12px;
        bottom: 80px;
    }
    .float-side .btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .section-title h2 {
        font-size: 24px;
    }
    .inner-banner .breadcrumb {
        font-size: 12px;
    }
    .why-grid,
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .detail-section .detail-sidebar {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .banner {
        height: 240px;
    }
    .inner-banner {
        padding: 50px 0 40px;
    }
    .banner-slide h1 {
        font-size: 18px;
    }
    .inner-banner h1 {
        font-size: 20px;
    }
    .banner-slide p {
        font-size: 13px;
    }
    .inner-banner p {
        font-size: 13px;
    }
    .footer .container {
        grid-template-columns: 1fr;
    }
    .inner-banner .breadcrumb {
        font-size: 11px;
    }
    .why-grid,
    .advantage-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .why-card,
    .advantage-card {
        padding: 16px 12px;
    }
    .why-card .icon,
    .advantage-card .icon {
        font-size: 24px;
    }
    .why-card h4,
    .advantage-card h4 {
        font-size: 14px;
    }
    .why-card p,
    .advantage-card p {
        font-size: 12px;
    }
}
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 32px;
    }
    .inner-banner {
        padding: 120px 0 90px;
    }
    .inner-banner h1 {
        font-size: 48px;
    }
    .inner-banner p {
        font-size: 20px;
    }
    .banner {
        height: 620px;
    }
    .banner-slide h1 {
        font-size: 52px;
    }
    .banner-slide p {
        font-size: 24px;
    }
    .why-grid,
    .advantage-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    .footer .container {
        gap: 50px;
    }
    .float-side {
        right: 32px;
        bottom: 140px;
    }
}