/* ============================================
   山西华研检测有限公司 - 官网设计系统
   主色调: #1F6E62 生态青绿色
   风格: 商务简约, 面向政府/工矿企业客户
   ============================================ */

/* ===== CSS 变量 ===== */
:root {
    --primary: #1F6E62;
    --primary-dark: #155249;
    --primary-light: #2A8A7B;
    --primary-lighter: #E8F4F2;
    --accent: #4ECDC4;
    --accent-warm: #F0A500;
    --text-dark: #1a2e2a;
    --text-body: #444;
    --text-light: #777;
    --text-white: #fff;
    --bg-white: #fff;
    --bg-light: #f7f9f9;
    --bg-gray: #eef2f1;
    --border: #e0e5e4;
    --shadow-sm: 0 2px 8px rgba(31, 110, 98, 0.06);
    --shadow-md: 0 4px 20px rgba(31, 110, 98, 0.1);
    --shadow-lg: 0 8px 40px rgba(31, 110, 98, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --header-height: 80px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-body);
    background: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ===== 容器 ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-white {
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
    border-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
}

.btn-white:hover {
    background: var(--text-white);
    color: var(--primary);
    border-color: var(--text-white);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
}

/* ===== 公共头部 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo .logo-img {
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

.header-logo .logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-logo .logo-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.header-logo .logo-sub {
    font-size: 0.65rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-body);
}

.header-phone .phone-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.header-phone .phone-number {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== 导航 ===== */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
}

.main-nav > li > a {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    position: relative;
}

.main-nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.main-nav > li > a:hover,
.main-nav > li > a.active {
    color: var(--primary);
}

.main-nav > li > a:hover::after,
.main-nav > li > a.active::after {
    width: 60%;
}

.nav-cta {
    background: var(--primary);
    color: var(--text-white) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.nav-cta::after {
    display: none !important;
}

/* ===== 移动端菜单按钮 ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== 移动端导航 ===== */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav li {
    border-bottom: 1px solid var(--border);
}

.mobile-nav li a {
    display: block;
    padding: 16px 12px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
}

.mobile-nav li a.active {
    color: var(--primary);
    font-weight: 700;
}

.mobile-nav .nav-cta {
    margin-top: 16px;
    text-align: center;
    background: var(--primary);
    color: var(--text-white) !important;
    border-radius: var(--radius-sm);
}

/* ===== 页面Banner (子页面通用) ===== */
.page-banner {
    margin-top: var(--header-height);
    padding: 80px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78,205,196,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-banner h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.page-banner .banner-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== 通用Section ===== */
section {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-title .title-line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 公共页脚 ===== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col p, .footer-col li {
    font-size: 0.9rem;
    line-height: 2;
    color: rgba(255,255,255,0.6);
}

.footer-col li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-col .footer-icon {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
}

.footer-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ===== 动画类 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .header-phone {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .main-nav, .header-phone {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .header-logo .logo-img {
        height: 38px;
    }

    .header-logo .logo-main {
        font-size: 1rem;
    }

    .header-logo .logo-sub {
        font-size: 0.55rem;
    }

    section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .page-banner {
        padding: 60px 0 40px;
    }

    .page-banner h1 {
        font-size: 1.8rem;
    }

    .page-banner .banner-subtitle {
        font-size: 0.95rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 14px 32px;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .header-logo .logo-sub {
        display: none;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .page-banner h1 {
        font-size: 1.5rem;
    }
}
