/* ================= 基础重置 & 变量 (翡翠绿+深空灰) ================= */
:root {
    /* 主色调：深空灰 (用于标题、深色背景、导航) */
    --primary-dark: #1F2937; 
    --primary-light: #F3F4F6;
    
    /* 核心点缀色：翡翠绿 (按钮、高亮、图标) */
    --accent-green: #29924D; 
    --accent-hover: #1E7A3E; /* 深一点的绿，用于悬停 */
    
    /* 背景色：纯白 & 极浅绿灰 (增加层次) */
    --bg-white: #ffffff;
    --bg-soft-green: #F4F9F5; /* 带有微弱绿意的浅色背景 */
    --bg-gray: #F8FAFC;
    
    --text-dark: #222222;
    --text-gray: #555555;
    --text-light: #888888;
    --border-color: #E5E7EB;
    --container-width: 1440px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ================= 通用组件 & 背景修饰 ================= */
.section-padding { padding: 100px 0; position: relative; }

/* 纯白背景 */
.bg-pure-white { background-color: var(--bg-white); }

/* 浅绿灰背景修饰 (替换之前的灰底) */
.bg-soft-decor {
    background-color: var(--bg-soft-green);
    /* 增加微弱的几何纹理修饰，避免单调 */
    background-image: radial-gradient(circle at 10% 10%, rgba(41, 146, 77, 0.04) 0%, transparent 30%), radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px;
    position: relative;
}

/* 深空灰背景 (用于工程案例版块) */
.bg-dark-decor {
    background: linear-gradient(rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.98)), url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?q=80&w=1920&auto=format&fit=crop') center/cover fixed no-repeat;
    color: #fff;
}

.section-header { text-align: center; margin-bottom: 60px; position: relative; z-index: 2; }
.section-header h2 { font-size: 36px; font-weight: 700; color: var(--primary-dark); margin-bottom: 16px; line-height: 1.2; }
.section-header p { font-size: 16px; color: var(--text-gray); max-width: 600px; margin: 0 auto; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px; font-size: 15px; font-weight: 600; border-radius: 999px;
    cursor: pointer; transition: var(--transition); border: 2px solid transparent;
}
.btn-primary { background: var(--accent-green); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(41, 146, 77, 0.35); }
.btn-white { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--accent-green); }

/* ================= 顶部导航 ================= */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: #ffffff; z-index: 1000; border-bottom: 1px solid var(--border-color);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }

.logo { display: flex; flex-direction: column; justify-content: center; flex-shrink: 0; }
.logo .name { font-size: clamp(18px, 1.8vw, 24px); font-weight: 800; color: var(--primary-dark); letter-spacing: 1px; line-height: 1.1; white-space: nowrap; }
.logo .slogan { font-size: clamp(11px, 1vw, 13px); color: var(--text-gray); letter-spacing: 2px; margin-top: 4px; white-space: nowrap; }

.nav-menu { display: flex; align-items: center; height: 100%; margin: 0 20px; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-item > a { display: flex; align-items: center; padding: 0 18px; height: 100%; font-size: clamp(15px, 1.1vw, 18px); font-weight: 500; color: var(--text-dark); white-space: nowrap; }
/* 悬停显示绿色底部线条 */
.nav-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: var(--accent-green); transform: scaleX(0); transform-origin: center; transition: transform 0.3s ease; }
.nav-item:hover::after { transform: scaleX(1); }
.nav-item:hover > a { color: var(--accent-green); }

.header-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.header-hotline { display: flex; align-items: center; gap: 10px; color: var(--primary-dark); font-weight: 700; font-size: clamp(18px, 1.5vw, 22px); }
.header-hotline i { color: var(--accent-green); font-size: 18px; }

.mobile-toggle { display: none; font-size: 24px; color: var(--primary-dark); cursor: pointer; background: none; border: none; padding: 10px; z-index: 10002; }

/* ================= 手机/Pad端抽屉式导航 ================= */
.mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 10000;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

.mobile-drawer {
    position: fixed; top: 0; right: 0; width: 75%; max-width: 320px; height: 100%;
    background: #ffffff; z-index: 10001;
    transform: translateX(100%); transition: transform 0.3s ease;
    display: flex; flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.mobile-drawer.active { transform: translateX(0); }

.drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--border-color);
}
.drawer-title { font-size: 18px; font-weight: 700; color: var(--primary-dark); }
.drawer-close { background: none; border: none; font-size: 24px; color: var(--text-gray); cursor: pointer; padding: 5px; }

.drawer-nav { display: flex; flex-direction: column; padding: 10px 0; overflow-y: auto; }
.drawer-nav a {
    padding: 16px 24px; font-size: 16px; font-weight: 500; color: var(--text-dark);
    border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center;
}
.drawer-nav a:hover { color: var(--accent-green); background-color: var(--bg-soft-green); }
.drawer-nav i { color: var(--text-light); font-size: 14px; }

/* ================= 首屏海报 ================= */
.hero {
    margin-top: 72px;  
    min-height: 800px; /* PC端Banner高度调高至800px */
    display: flex; align-items: center;
    /* 深空灰遮罩 */
    background: linear-gradient(to right, rgba(31, 41, 55, 0.95) 0%, rgba(31, 41, 55, 0.85) 50%, rgba(31, 41, 55, 0.6) 100%), url('/images/banner.jpg') center right / cover no-repeat;
    color: #fff; position: relative;
}
.hero-content { max-width: 800px; padding: 40px 0; }
/* 【修改点】将 line-height 从 1.15 增加到 1.3，使两行文字之间更宽松 */
.hero h1 { font-size: clamp(32px, 4vw, 56px); font-weight: 700; line-height: 1.3; margin-bottom: 24px; }
.hero h1 span { color: var(--accent-green); } /* 翡翠绿高亮 */
.hero p { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; margin-bottom: 40px; opacity: 0.9; }
.hero-btns { display: flex; gap: 20px; flex-wrap: wrap; }

/* ================= 关于芯进 ================= */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.about-text h3 { font-size: 32px; font-weight: 700; color: var(--primary-dark); margin-bottom: 24px; }
.about-text p { color: var(--text-gray); margin-bottom: 20px; font-size: 16px; line-height: 1.8; text-align: justify; }
.about-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 30px; }
.feature-item { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text-dark); font-size: 15px; }
.feature-item i { color: var(--accent-green); font-size: 18px; }

/* ================= 网格卡片 ================= */
.grid-4-3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 2; }
.card-43 { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border-color); }
.card-43:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--accent-green); }
.card-43 .img-box { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.card-43 .img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card-43:hover .img-box img { transform: scale(1.05); }
.card-43 .text-box { padding: 20px; flex-grow: 1; background: #fff; }
.card-43 .text-box h4 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; transition: color 0.3s; }
.card-43:hover .text-box h4 { color: var(--accent-green); }
.card-43 .text-box p { color: var(--text-gray); font-size: 14px; line-height: 1.6; }

/* ================= 合作流程 ================= */
.process-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; position: relative; z-index: 2; }
.process-grid::before { content: ''; position: absolute; top: 40px; left: 10%; right: 10%; height: 2px; background: var(--border-color); z-index: 1; }
.step-item { position: relative; z-index: 2; text-align: center; }
.step-num { width: 80px; height: 80px; margin: 0 auto 20px; background: var(--bg-white); border: 2px solid var(--accent-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--accent-green); transition: var(--transition); box-shadow: var(--shadow-sm); }
.step-item:hover .step-num { background: var(--accent-green); color: #fff; transform: scale(1.1); box-shadow: var(--shadow-md); }
.step-item h4 { font-size: 16px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
.step-item p { font-size: 13px; color: var(--text-gray); }

/* ================= 工程案例 ================= */
.cases-section .section-header h2 { color: #fff; }
.cases-section .section-header p { color: rgba(255,255,255,0.7); }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; z-index: 2; }
.case-item { background: rgba(255, 255, 255, 0.08); padding: 25px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.15); display: flex; align-items: center; gap: 16px; font-size: 16px; font-weight: 500; transition: var(--transition); backdrop-filter: blur(5px); }
.case-item:hover { background: rgba(255, 255, 255, 0.15); border-color: var(--accent-green); transform: translateY(-4px); }
.case-item i { color: var(--accent-green); font-size: 20px; }

/* ================= 技术问答 ================= */
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; position: relative; z-index: 2; }
.qa-card { display: flex; flex-direction: column; justify-content: space-between; background: #fff; padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); transition: var(--transition); }
.qa-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-green); }
.qa-card h4 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 12px; transition: color 0.3s; }
.qa-card:hover h4 { color: var(--accent-green); }
.qa-card .desc { font-size: 14px; color: var(--text-gray); line-height: 1.7; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-card .meta { font-size: 13px; color: var(--text-light); display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border-color); padding-top: 15px; }
.qa-card .meta i { color: var(--accent-green); margin-right: 6px; }

/* ================= 底部多列信息 ================= */
footer { background: #111827; color: #9ca3af; padding: 60px 0 20px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 2.5fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 18px; margin-bottom: 20px; font-weight: 600; }
.footer-col p { margin-bottom: 12px; line-height: 1.8; display: flex; align-items: flex-start; gap: 10px; }
.footer-col p i { margin-top: 5px; color: var(--accent-green); }
.footer-col a, .footer-bottom a { color: #9ca3af; transition: color 0.3s; }
.footer-col a:hover, .footer-bottom a:hover { color: #ffffff !important; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { display: inline-block; width: fit-content; }
.footer-qr { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; }
.footer-qr img { width: 120px; height: 120px; border-radius: 8px; border: 2px solid #374151; padding: 4px; background: #fff; margin-bottom: 10px; }
.footer-qr p { margin-bottom: 0; justify-content: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ================= 右侧浮动工具栏 ================= */
.floating-sidebar { position: fixed; right: 30px; bottom: 100px; z-index: 9999; display: flex; flex-direction: column; gap: 15px; }
.sidebar-wrapper { position: relative; }
.sidebar-btn { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; font-size: 22px; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); cursor: pointer; transition: all 0.3s ease; }

.item-phone { background: var(--accent-green); }
.sidebar-wrapper:hover .item-phone { transform: scale(1.05); background: var(--accent-hover); }
.item-wechat { background: #07C160; }
.sidebar-wrapper:hover .item-wechat { transform: scale(1.05); background: #06a050; }
.item-top { background: var(--primary-dark); opacity: 0; visibility: hidden; }
.item-top:hover { transform: scale(1.05); background: #000; }

.phone-popup, .wx-popup {
    position: absolute; right: 65px; top: 50%; transform: translateY(-50%) translateX(20px);
    background: #ffffff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000; pointer-events: none;
}
.sidebar-wrapper:hover .phone-popup,
.sidebar-wrapper:hover .wx-popup {
    opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); pointer-events: auto;
}
.phone-popup::before, .wx-popup::before {
    content: ''; position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
    border-width: 8px 0 8px 8px; border-style: solid; border-color: transparent transparent transparent #ffffff;
}
.phone-popup { padding: 16px; width: max-content; text-align: left; }
.popup-title { font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f3f4f6; }
.popup-link { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: #4b5563; font-size: 15px; font-weight: 600; transition: color 0.2s; }
.popup-link:hover { color: var(--accent-green); }
.icon-bg { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-soft-green); display: flex; align-items: center; justify-content: center; color: var(--accent-green); transition: all 0.2s; }
.popup-link:hover .icon-bg { background: var(--accent-green); color: #fff; }

.wx-popup { padding: 12px; width: 150px; text-align: center; }
.wx-popup img { width: 100%; border-radius: 6px; margin-bottom: 8px; }
.wx-popup p { font-size: 13px; color: #374151; font-weight: 600; margin: 0; }

/* ================= 响应式设计 ================= */
@media (max-width: 1024px) {
    .header-inner { height: 80px; }
    .mobile-toggle { display: block; }
    .header-hotline { display: none; }
    .nav-menu { display: none; }

    .about-wrap { grid-template-columns: 1fr; gap: 30px; }
    .about-img { order: -1; width: 100%; height: 350px; }
    .about-features { grid-template-columns: repeat(2, 1fr); }

    .grid-4-3 { grid-template-columns: repeat(2, 1fr); }
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
    .process-grid::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-nav { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 15px; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .section-padding { padding: 50px 0; }
    
    .hero { 
        min-height: 500px; /* 移动端高度保持500px */
        margin-top: 80px; 
        background: linear-gradient(to bottom, rgba(31, 41, 55, 0.95) 0%, rgba(31, 41, 55, 0.9) 100%), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat; 
    }
    /* 手机端也稍微增加一点行距 */
    .hero h1 { line-height: 1.3; }
    .hero-btns { flex-direction: row; flex-wrap: nowrap; gap: 10px; width: 100%; }
    .btn { flex: 1; padding: 12px 0; font-size: 14px; white-space: nowrap; }
    .btn i { display: none; }

    .about-img { height: 220px; }
    
    .grid-4-3 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .card-43 .text-box { padding: 15px; }
    .card-43 .text-box h4 { font-size: 16px; }
    .card-43 .text-box p { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .step-num { width: 60px; height: 60px; font-size: 20px; }

    .cases-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .case-item { padding: 15px; font-size: 14px; flex-direction: column; text-align: center; gap: 10px; }

    .qa-grid { grid-template-columns: 1fr; gap: 15px; }
    .qa-card { padding: 18px 20px; }
    .qa-card .desc { display: none; } 
    .qa-card .meta { display: none; } 
    .qa-card h4 { font-size: 15px; margin-bottom: 0; text-align: left; line-height: 1.5; font-weight: 500;}

    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-col p { justify-content: center; text-align: left; }
    .footer-nav { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 15px; }
    
    .floating-sidebar { right: 15px; bottom: 80px; gap: 10px; } 
    .sidebar-btn { width: 45px; height: 45px; font-size: 20px; }
}