/* =========================================
   大禹节水 - 官网首页样式
   ========================================= */

/* ---------- 变量 / 基础重置 ---------- */
:root {
    --primary: #0c6638;          /* 主色绿 */
    --primary-dark: #166b3a;
    --primary-light: #2aa960;
    --header-h: 100px;           /* 头部总高度(与设计图一致) */
    --accent: #f5a623;
    --text: #2c3e50;
    --text-light: #5a6b7b;
    --text-muted: #8a99a8;
    --bg: #ffffff;
    --bg-soft: #f5f7f5;
    --bg-gray: #f0f2f3;
    --border: #e3e8ec;
    --dark: #1a2530;
    --dark-soft: #2a3643;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding:5px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(30, 142, 78, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline span{
    background: var(--primary);
    display: inline-block;
    height: 28px;
    line-height: 28px;
    text-align: center;
    color: #fff;
    width: 28px;
    border-radius: 14px;
}
.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline-light span{
    background: #fff;
    display: inline-block;
    height: 28px;
    line-height: 28px;
    text-align: center;
    color: var(--primary);
    width: 28px;
    border-radius: 14px;
}
.btn-outline-light:hover {
    background: #fff;
    color: var(--primary);
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.site-header.scrolled {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-img {
    height: 54px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: var(--transition);
}
.logo:hover .logo-img {
    transform: scale(1.04);
}
.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(30, 142, 78, 0.3);
    transition: var(--transition);
}
.logo:hover .logo-circle {
    transform: rotate(360deg);
}
.logo-mark {
    font-weight: 700;
    font-size: 18px;
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.logo-cn {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.logo-en {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.logo.light .logo-cn,
.logo.light .logo-en {
    color: #fff;
}

/* 导航 */
.nav-list {
    display: flex;
    gap: 36px;
}
.nav-link {
    position: relative;
    font-size: 15px;
    color: var(--text);
    padding: 6px 0;
    transition: color 0.25s;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 搜索 */
.search-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}
.search-btn:hover {
    background: var(--primary-dark);
    transform: rotate(15deg) scale(1.05);
}
.search-btn.active {
    background: var(--primary-dark);
}

/* 搜索面板(点击搜索按钮弹出) */
.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    padding: 22px 0;
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}
.search-panel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.search-panel-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-input {
    flex: 1;
    height: 46px;
    padding: 0 18px;
    font-size: 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 46px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-soft);
    font-family: inherit;
}
.search-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 142, 78, 0.12);
}
.search-submit {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.search-submit:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}
.search-close {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.search-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    padding: 4px;
    margin-left: auto; /* 移动端:靠右与搜索按钮相邻 */
}
.nav-toggle span {
    width: 20px;  /* 固定横线宽度,避免居中布局时被压缩 */
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 头部占位符 ---------- */
.header-spacer {
    height: var(--header-h);  /* 与头部同高,随响应式一起变化 */
}

/* ---------- Hero 区域 ---------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    max-height: 800px;
    margin-top: 0;
    overflow: hidden;
}
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: grab;              /* 提示可拖拽切换 */
    touch-action: pan-y;       /* 允许手势滑动切换,保留纵向滚动 */
    user-select: none;
}
.hero-slider.dragging {
    cursor: grabbing;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1s ease, transform 6s ease;
    pointer-events: none;
}
.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}
/* 首屏入场:第一张缓慢放大显现(仅页面进入时播放一次) */
.hero-slide.enter {
    animation: heroZoomIn 5s ease-out both;
}
@keyframes heroZoomIn {
    from { opacity: 0; transform: scale(1.15); }
    to   { opacity: 1; transform: scale(1); }
}

/* 左右切换按钮 */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: var(--transition);
    cursor: pointer;
}
.hero-arrow.prev {
    left: 32px;
}
.hero-arrow.next {
    right: 32px;
}
.hero-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}
.hero-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Hero 文字层 */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: linear-gradient(180deg, rgba(15, 80, 45, 0.55), rgba(15, 80, 45, 0.35));
    pointer-events: none;
}
.hero-eyebrow {
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.hero-title {
    color: #fff;
    font-size: clamp(32px, 4.6vw, 60px);
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* 轮播指示点 */
.hero-dots {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}
.dot {
    width: 16px;
    height: 21px;
    border: 0;
    padding: 0;
    background: url('../images/dot.png') no-repeat center / contain;
    cursor: pointer;
    transition: width 0.35s ease, height 0.35s ease, transform 0.3s ease;
}
.dot:hover {
    transform: scale(1.15);
}
.dot.active {
   
    background-image: url('../images/dot-active.png');
}
.dot.active:hover {
    transform: none;
}

/* ---------- 通用 Section ---------- */
.section {
    padding: 80px 0;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}
.section-eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.lite-title{
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(22px, 2.6vw, 40px);
    color: var(--text);
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 20px;
}
.section-title.light {
    color: #fff;
}
.section-title strong{
    color: var(--primary);
}

/* ---------- 公司简介 ---------- */
.about {
    background: #fff;
}
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 80px;
    align-items: center;
}
.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
}
.about-text .btn {
    margin-top: 16px;
}
.about-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.about-image:hover img {
    transform: scale(1.05);
}

/* 图片上的播放按钮 */
.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.3s;
}
/* 外圈:细圆环 + 一道高亮光弧,沿轨道匀速扫描 */
.video-play::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: conic-gradient(from 0deg,
        transparent 0deg 300deg,
        rgba(255, 255, 255, 0.85) 345deg,
        transparent 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    animation: spin 3.2s linear infinite;
    pointer-events: none;
    z-index: 0;
}
/* 外圈:柔和脉冲光晕 */
.video-play::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    animation: pulse 2.4s infinite;
    z-index: 0;
    pointer-events: none;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes pulse {
    0%   { transform: scale(0.92); opacity: 1; }
    70%  { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}
.video-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}
.video-play:hover::before {
    animation-play-state: paused;
}
.video-play:hover svg {
    transform: scale(1.12);
}
.video-play svg {
    position: relative;
    z-index: 1;
    margin-left: 4px; /* 视觉居中三角形 */
    transition: transform 0.3s;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* ---------- 全产业链智慧水务服务商 ---------- */
.products {
    background: linear-gradient(135deg, #1e8e4e 0%, #166b3a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.products::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../images/pro_bg.jpg') center/cover;
    opacity: 0.8;
    pointer-events: none;
}

/* 产品视口:横向一排卡片;大屏时视口延伸至屏幕右缘,露出下一张的一半并贴边 */
.service-viewport {
    overflow: hidden;
    position: relative;
    /* 从容器内容左缘(container 1400px、padding 20px)延伸到屏幕右缘 */
    width: calc((100vw + 1400px) / 2 - 20px);
}
.service-track {
    display: flex;
    gap: 24px;
    transition: transform 0.65s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}
.service-card {
    /* 卡片宽随屏宽计算,保证第 2 张卡片右缘正好贴屏幕右边缘 */
    flex: 0 0 calc((100vw + 1400px) / 4 - 22px);
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1.15fr;   /* 文字在左,图片在右 */
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    color: var(--text);
    transition: box-shadow var(--transition);
}
.service-card:hover {
    box-shadow: var(--shadow-lg);
}

/* 卡片文字区 */
.sc-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 26px;
}
.sc-tag {
    align-self: flex-start;
    font-size: 12px;
    color: var(--primary);
    background: rgba(30, 142, 78, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.sc-info h3 {
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 12px;
}
.sc-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 18px;
}
.sc-info .btn {
    align-self: flex-start;
}

/* 卡片图片区 */
.sc-img {
    position: relative;
    overflow: hidden;
}
.sc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.service-card:hover .sc-img img {
    transform: scale(1.06);
}

/* 下方一行:左侧进度条(占满剩余宽度)+ 右侧上一页/下一页 */
.service-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 34px;
    position: relative;
}
/* 底部进度条:一条轨道线 + 一格宽的滑块,随翻页滑动 */
.service-progress {
    flex: 1;
    position: relative;
    height: 2px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    cursor: pointer;
}
/* 滑块:宽度 = 一格(1/总页数),在轨道内从左滑到右 */
.sp-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transition: left 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* 上一页/下一页按钮 */
.service-nav {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.service-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
    cursor: pointer;
}
.service-arrow:hover {
    background: #fff;
    /*color: var(--primary);*/
    transform: translateY(-2px);
}
.service-arrow:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ---------- 跨领域案例:3D 倾斜轮播 ---------- */
.cases {
    background: #fff;
    overflow: hidden;   /* 防止 3D 卡片透视延伸产生横向滚动条 */
}
.case-slider {
    position: relative;
    height: 480px;
    perspective: 1600px;
    margin-top: 56px;
}
/* 大屏(>1400px):轮播铺满整个屏幕宽度 */
@media (min-width: 1401px) {
    .case-slider {
        width: 100vw;
        margin-left: calc((1400px - 100vw) / 2 - 20px);
    }
}
.case-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}
/* 案例数据容器:由 HTML 维护,仅供 JS 读取,不参与展示 */
.case-data {
    display: none;
}
/* 三张卡片同位堆叠,JS 按状态分配 prev / active / next 三个 class */
.case-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(680px, 60vw);
    height: 380px;
    /* 垂直居中交给 transform 里的 translateY(-50%),这里不再用 margin-top,
       否则两个 -190px 叠加会把卡片顶出轮播区 */
    margin-left: calc(min(680px, 60vw) / -2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    background: var(--bg-gray);
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.33, 1, 0.68, 1),
                opacity 0.7s ease,
                box-shadow 0.5s ease;
    will-change: transform, opacity;
}
.case-card-link {
    position: absolute;
    inset: 0;
    display: block;
    cursor: pointer;
}
.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;   /* 悬停缩放 */
}
/* 鼠标悬停:图片轻微放大、卡片阴影加深,增强交互感 */
.case-card:hover img {
    transform: scale(1.07);
}
.case-card:hover {
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}
.case-card figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 22px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
    pointer-events: none;   /* 文字不拦截点击,整卡任意位置都能触发链接 */
}
/* 当前:正中、放大、无旋转 */
.case-active {
    transform: translate(0, -50%) scale(1) rotateY(0);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22);
}
/* 上一张:向左偏移 + 轻微 3D 倾斜,左边缘贴近屏幕左缘,与中间卡留出间隙 */
.case-prev {
    transform: translate(-112%, -50%) rotateY(14deg) scale(0.9);
    transform-origin: right center;
    opacity: 0.85;
    z-index: 1;
}
/* 下一张:向右偏移 + 轻微 3D 倾斜,右边缘贴近屏幕右缘,与中间卡留出间隙 */
.case-next {
    transform: translate(112%, -50%) rotateY(-14deg) scale(0.9);
    transform-origin: left center;
    opacity: 0.85;
    z-index: 1;
}
/* 绕回卡片"隐形传送"辅助类:先取消过渡并隐藏,瞬移到目标站位后再淡入 */
.case-card.case-no-transition { transition: none !important; }
.case-card.case-hidden { opacity: 0 !important; }
/* 绕回卡沿滚动方向滚出屏幕(模拟滚出视口),在屏幕外换好新图后才从对侧出现 */
.case-card.case-leave-prev {
    transform: translate(-200%, -50%) rotateY(16deg) scale(0.88);
    opacity: 0;
    transition: transform 0.42s ease-in, opacity 0.38s ease;
    pointer-events: none;
}
.case-card.case-leave-next {
    transform: translate(200%, -50%) rotateY(-16deg) scale(0.88);
    opacity: 0;
    transition: transform 0.42s ease-in, opacity 0.38s ease;
    pointer-events: none;
}
/* 左右翻页按钮:圆形图标,上下留空,垂直居中,位于卡片间隙 */
.case-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    color: var(--brand-green);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transition: all 0.3s ease;
}
.case-arrow:hover {
    background: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}
/* 向前:位于第一张与第二张(当前)之间的间隙正中,与两边卡片保持距离 */
.case-arrow-prev {
    left: calc(50% - min(680px, 60vw) * 0.59 - 6px);
}
/* 向后:位于第二张(当前)与第三张之间的间隙正中,与两边卡片保持距离 */
.case-arrow-next {
    right: calc(50% - min(680px, 60vw) * 0.59 - 6px);
}

/* ---------- 资讯新闻 ---------- */
.news {
    background: var(--bg-soft);
}
.news-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.news-tab {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    background: #fff;
    color: var(--text-light);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.news-tab:hover,
.news-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 资讯列表:横向无缝滚动(卡片由 JS 克隆一份循环,悬浮/触屏暂停) */
.news-viewport {
    position: relative;
    overflow: hidden;
    padding: 8px 0;   /* 为卡片悬浮上浮和投影留出空间,避免被遮罩裁边 */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.news-track {
    display: flex;
    gap: 24px;
    will-change: transform;
}
.news-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 48px) / 3);   /* 桌面默认 3 列 */
    min-width: 0;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.news-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.news-title {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    margin-bottom: 16px;
    flex: 1;   /* 撑开空间,让图片始终贴底对齐 */
    transition: color 0.3s;
}
.news-card:hover .news-title {
    color: var(--primary);
}
.news-meta {
    font-size: 12px;
    margin-bottom: 16px;
    
}
.news-meta span{
    color: var(--primary);
    border:1px solid  var(--primary);
    display: inline-block;
    padding: 0 10px;
    height: 28px;
    line-height: 28px;
    border-radius: 14px;
    box-sizing: border-box;
}
/* 新闻图:缓慢推近缩放的呼吸动画 + 悬浮定格并浮现绿色光罩 */
.news-media {
    position: relative;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
}
.news-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(30, 142, 78, 0.30) 0%, rgba(30, 142, 78, 0.05) 55%, transparent 75%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
.news-card:hover .news-media::after {
    opacity: 1;
}
.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center;
    animation: newsImgZoom 9s ease-in-out infinite alternate;
    will-change: transform;
}
.news-card:hover .news-img {
    animation-play-state: paused;   /* 悬浮时定格呼吸,配合上浮/光罩 */
}
@keyframes newsImgZoom {
    from { transform: scale(1.02); }
    to   { transform: scale(1.13); }
}

/* ---------- 底部 ---------- */
.site-footer {
    background: #252525;
    color: #cdd6df;
    padding-top: 60px;
}
/* 顶部一行:logo + 电话 + 地址,与下方用淡色边框隔开 */
.footer-top {
    display: flex;
    align-items: center;
    gap: 36px;
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 26px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: space-between;
}
.footer-top .footer-contact {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    white-space: nowrap;
    padding-left: 36px;
}
.footer-top .footer-contact li {
    list-style: none;
}
/* 顶部主区域:左 logo + 多列链接,右联系方式 + 二维码 */
.footer-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 40px;
    flex-wrap: wrap;
}
/* 底部 logo(图片形式,适配深色背景) */
.footer-logo {
    display: inline-block;
}
.footer-logo img {
    height: 48px;
    width: auto;
    display: block;
}
/* 左侧:logo 上方,链接列下方 */
.footer-main {
    /* flex: 1; */
    min-width: 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px 50px;
    margin-top: 0;
}
.footer-col h4 {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 14px;
    position: relative;
    padding-left: 10px;
}
.footer-col h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-col a {
    font-size: 13px;
    color: #cdd6df;
    transition: color 0.3s;
}
.footer-col a:hover {
    color: var(--primary-light);
}

/* 右侧:联系方式 + 二维码 */
.footer-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    flex-shrink: 0;
    text-align: right;
}
.footer-contact {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    white-space: nowrap;
}
.footer-contact li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-contact li img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
}
/* 社交平台图标:微信 / 快手 / 抖音,悬浮或点击弹出对应二维码 */
.footer-social {
    display: flex;
    gap: 14px;
}
.social-item {
    position: relative;
}
.social-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.social-btn.wechat {
    background: #07C160;
}
.social-btn.kuaishou {
    background: #FF6A00;
}
.social-btn.douyin {
    background: #1d1d1d;
}
.social-btn img {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}
.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.qr-pop {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 8px;
    padding: 10px 10px 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1000;
}
.qr-pop::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top: 0;
    border-bottom-color: #fff;
}
.qr-pop img {
    width: 110px;
    max-width: none;
    height: 110px;
    display: block;
    border-radius: 4px;
}
.qr-pop p {
    font-size: 12px;
    color: #333;
    text-align: center;
    margin-top: 6px;
}
.social-item:hover .qr-pop,
.social-item.open .qr-pop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 底部版权行 */
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* text-align: center; */
}
.copyright {
    font-size: 12px;
    color: #7a8590;
}

/* 响应式:链接列在窄屏变成 2-3 列,右侧移到下方 */
@media (max-width: 900px) {
    .footer-cols {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (max-width: 600px) {
    .footer-wrap {
        flex-direction: column;
        gap: 32px;
    }
    .footer-cols {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    .footer-aside {
        align-items: center;
        text-align: center;
    }
}

/* ---------- 视频弹窗 ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.video-modal.open {
    opacity: 1;
    visibility: visible;
}
.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.video-modal-content {
    position: relative;
    width: min(880px, 94vw);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-modal.open .video-modal-content {
    transform: scale(1) translateY(0);
}
.video-modal-content video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}
.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.video-modal-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

/* ---------- 返回顶部 ---------- */
.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(30, 142, 78, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}
.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ---------- 滚动进入动画 ---------- */
.reveal {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal[data-reveal="up"] {
    transform: translateY(40px);
}
.reveal[data-reveal="left"] {
    transform: translateX(-40px);
}
.reveal[data-reveal="right"] {
    transform: translateX(40px);
}
.reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .case-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-card {
        flex-basis: calc((100% - 24px) / 2);   /* 新闻:2 列 */
    }
    .about-wrap {
        gap: 40px;
    }

    /* 案例轮播:缩小尺寸 */
    .case-slider { height: 380px; }
    .case-card { height: 320px; }

    /* 服务商区块:缩小卡片内边距 */
    .sc-info { padding: 24px 20px; }
    .sc-info h3 { font-size: 17px; }
}

/* 容器已占满全宽的屏幕(≤1400px)恢复普通双卡布局 */
@media (max-width: 1400px) {
    .service-viewport {
        width: 100%;
    }
    .service-card {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    :root { --header-h: 70px; }  /* 手机端头部高度适当调小 */
    .section { padding: 60px 0; }

    /* 移动端导航 */
    .nav-toggle {
        display: flex;
        width: 38px;
        height: 38px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border);
        border-radius: 50%;
    }
    .logo-img { height: 42px; max-width: 160px; }
    .nav-list li { border-bottom: 1px solid var(--border); }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        transform: translateY(-200%);
        transition: transform 0.3s;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .main-nav.open {
        transform: translateY(0);
    }
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
    }
    .nav-link {
        display: block;
        padding: 14px 24px;
    }
    .nav-link::after { display: none; }

    /* 搜索面板移动端样式 */
    .search-btn { width: 38px; height: 38px; }
    .search-panel { padding: 14px 0; }

    /* Hero */
    .hero { height: 80vh; min-height: 480px; }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-arrow.prev { left: 14px; }
    .hero-arrow.next { right: 14px; }

    /* Section */
    .about-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .about-text { order: 2; }
    .about-image { order: 1; }

    .case-grid {
        grid-template-columns: 1fr;
    }
    .news-card {
        flex-basis: 100%;   /* 新闻:单列 */
    }

    /* 案例轮播:手机端禁用 3D 倾斜,只显示当前卡片 */
    .case-slider { height: 280px; perspective: none; }
    .case-card { height: 220px; width: 86vw; margin-left: -43vw; }
    .case-prev, .case-next { display: none; }
    .case-arrow-prev { left: 12px; }
    .case-arrow-next { right: 12px; }

    /* 服务商区块:手机端每屏显示 1 张,卡片内文字图片上下排 */
    .service-card {
        flex-basis: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .sc-img {
        min-height: 220px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Footer */
    .footer-wrap {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand {
        align-items: center;
    }
    .footer-contact {
        align-items: center;
    }
    .footer-bottom-wrap {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { height: 70vh; min-height: 420px; }
    .hero-arrow { width: 36px; height: 36px; }
    .hero-arrow svg { width: 18px; height: 18px; }
    .section-title { font-size: 22px; }
    .sc-info { padding: 20px 18px; }
    .sc-info h3 { font-size: 17px; }
    .sc-img { min-height: 180px; }
    .service-track { gap: 16px; }
    .service-footer { margin-top: 24px; }
    .news-card { padding: 18px; }
    .news-date { position: static; text-align: left; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
    .news-date .day { display: inline-block; font-size: 20px; }
    .news-title { padding-right: 0; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
