* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

body {
    background-color: #f9fafc;
    line-height: 1.5;
    color: #1e293b;
}

/* ----- 固定头部 ----- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 40, 80, 0.1);
}

.site-header-content {
    width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    color: #334155;
    padding: 0.5rem 0.2rem;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-menu a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.nav-menu a:hover {
    color: #1e40af;
}

/* ----- 滚动区块锚点补偿 ----- */
.scroll-section {
    scroll-margin-top: 70px;
}

/* ----- 图片模块样式 ----- */
.image-module {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.image-module:nth-child(even) {
    background-color: #f8fafc;
}

.module-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.module-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
    border-left: 6px solid #3b82f6;
    padding-left: 1.5rem;
}

/* 图片包装器 */
.image-wrapper {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 20px 30px -10px rgba(0, 20, 40, 0.2);
    transition: box-shadow 0.3s;
    width: 100%;
}

.image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    will-change: transform, opacity;
    /* 默认完全可见，动画触发时执行透明/位移变化 */
}

.img-caption {
    text-align: center;
    font-size: 1.1rem;
    color: #475569;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
}

/* ----- 产品九宫格专用样式 (覆盖/新增) ----- */
.product-grid-section .module-container {
    gap: 1.5rem; /* 调整间距 */
}

.grid-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 三列 */
    gap: 1.5rem;
    margin: 0.5rem 0 1rem 0;
}

.grid-item {
    background-color: #f1f5f9;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 25px -8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 9; /* 统一比例，显得整齐 */
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
    animation: none; /* 初始无动画 */
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* 查看更多按钮容器: 使用flex布局将按钮推到右下角 */
.more-btn-wrapper {
    display: flex;
    justify-content: flex-end; /* 右对齐 */
    margin-top: 0.5rem;
    padding-right: 0.25rem;
}

.more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 10px 18px -6px #1e3a8a;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.more-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.more-btn:hover {
    background: linear-gradient(145deg, #1d4ed8, #1e40af);
    box-shadow: 0 15px 22px -6px #0f2b6f;
    transform: scale(1.02);
}

.more-btn:hover i {
    transform: translateX(6px);
}

/* ----- 底部联系人模块 ----- */
/* 页脚整体样式 */
.footer.full-width.opacity {
    width: 100%;
    background-color: #2a2a2a;  /* 深色背景，与常见安防科技风格匹配 */
    color: #aaa;                /* 灰色文字 */
    padding: 30px 0 20px;
    font-family: '微软雅黑', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    transition: all 0.3s ease;
    /* opacity 已经在行内设置为1, bottom 为0，故此处无需重复 */
}

/* 内部容器：宽度1200px，居中 */
.foot-con.width-1200 {
    width: 1200px;
    margin: 0 auto;
    display: flex;           /* 使用flex布局实现左侧二维码和右侧信息并排 */
    flex-wrap: wrap;         /* 适配小屏 */
    justify-content: space-between;
}

/* 左侧二维码区域 */
.foot-con .qrcode {
    width: 140px;            /* 适当宽度 */
    margin-right: 40px;
    text-align: center;
    color: #ccc;
}

.foot-con .qrcode dt {
    width: 140px;
    height: 140px;
    background: #fff;        /* 二维码背景白色 */
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    box-sizing: border-box;
}

.foot-con .qrcode dt img {
    width: 100%;
    height: 100%;
    display: block;          /* 去除图片底部间隙 */
    border-radius: 4px;
}

.foot-con .qrcode dd {
    font-size: 14px;
    letter-spacing: 1px;
}

/* 右侧信息区域 */
.foot-con .infobox {
    flex: 1;                 /* 占据剩余宽度 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 地图信息/公司地址部分 */
.mapInfo {
    margin-bottom: 20px;
}

.mapInfo dl.first {
    margin-bottom: 10px;
}

.mapInfo dl.first dt {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 8px;
    border-left: 4px solid #fff; /* 红色装饰条 */
    padding-left: 12px;
}

.mapInfo dl.first dd {
    font-size: 14px;
    margin-left: 16px;       /* 与dt左对齐缩进统一 */
    padding: 2px 0;
    color: #bbb;
}

/* 24小时服务热线 */
.num {
    font-size: 15px;
    color: #ddd;
    margin: 15px 0 5px;
    padding-left: 16px;
}

.num span {
    font-size: 24px;
    font-weight: 600;
    margin-left: 15px;
    letter-spacing: 1px;
}

/* 底部版权信息行 */
.btmInfo {
    border-top: 1px solid #3c3c3c; /* 浅色分割线 */
    padding-top: 18px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: #888;
}

.btmInfo span {
    margin-right: 25px;
    line-height: 1.8;
}

.btmInfo a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.btmInfo a:hover {
    color: #c60b1e;
    text-decoration: underline;
}

/* 网站建设友情链接 */
.btmInfo .link a {
    margin-left: 10px;
    padding: 0 2px;
}

/* ----- 新图片动画：位移+透明度 (进入视口时触发) ----- */
/* 模块1：从上至下移动 + 透明渐变 */
#section1.in-view .image-wrapper img {
    animation-name: bounceInDown;
    animation-duration: 2s;
    animation-fill-mode: both;
}
#section11.in-view .image-wrapper .img1 {
    animation-name: softBounce;
    animation-duration: 2s;
    animation-fill-mode: both;
}
#section11.in-view .image-wrapper .img2 {
    animation-name: gentleSpin;
    animation-duration: 2s;
    animation-fill-mode: both;
}

/* 模块2：从左至右移动 + 透明渐变 */
#section2.in-view .image-wrapper img {
    animation-name: bounceInLeft;
    animation-duration: 2s;
    animation-fill-mode: both;
}

/* 模块3：从右至左移动 + 透明渐变 */
#section3.in-view .image-wrapper img {
    animation-name: bounceInRight;
    animation-duration: 2s;
    animation-fill-mode: both;
}

/* 模块3：从右至左移动 + 透明渐变 */
#section4.in-view .image-wrapper img {
    animation-name: bounceInDown;
    animation-duration: 2s;
    animation-fill-mode: both;
}

@keyframes bounceInDown {
    0%, 60%, 75%, 90%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: translate3d(0, -3000px, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(0, 25px, 0);
    }
    75% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, 5px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes bounceInLeft {
    0%, 60%, 75%, 90%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: translate3d(-3000px, 0, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(25px, 0, 0);
    }
    75% {
        transform: translate3d(-10px, 0, 0);
    }
    90% {
        transform: translate3d(5px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes bounceInRight {
    0%, 60%, 75%, 90%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: translate3d(3000px, 0, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(-25px, 0, 0);
    }
    75% {
        transform: translate3d(10px, 0, 0);
    }
    90% {
        transform: translate3d(-5px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes softBounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
    60% { transform: translateY(4px); }
    100% { transform: translateY(0); }
}

@keyframes gentleSpin {
    0% { transform: rotate(0deg) scale(1); }
    40% { transform: rotate(4deg) scale(1.02); }
    70% { transform: rotate(-2deg) scale(0.98); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes breathPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

/* 确保图片初始无动画，且动画只播放一次 */
.image-wrapper img {
    animation: none;
}

/* 响应式微调 */
@media (max-width: 800px) {
    .nav-menu ul { gap: 1.2rem; }
    .logo { font-size: 1.4rem; }
    .module-container h2 { font-size: 2rem; }
}
@media (max-width: 600px) {
    .site-header { padding: 0 4%; }
    .nav-menu a { font-size: 0.95rem; }
    .contact-grid { gap: 1.5rem; }
    .contact-item { padding: 1.5rem; }
}

/* 防止图片拖拽 */
img {
    user-select: none;
    pointer-events: none;
}