/* 全局基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

:root {
    --main: #7B61FF;
    --main-deep: #5A42E8;
    --main-light: #9b88ff;
    --text-dark: #222;
    --text-gray: #666;
    --bg-light: #f8f9ff;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(123, 97, 255, 0.15);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 92%;
    max-width: 1240px;
    margin: 0 auto;
}

/* 元素滚动渐入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 导航栏 - 全局统一渐变背景 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    z-index: 999;
    background: linear-gradient(135deg, #7B61FF 0%, #5A42E8 100%);
    transition: box-shadow 0.3s ease;
}

.header.active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* ========== 图文 Logo 样式（新增） ========== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
}

.logo img {
    height: 32px;
    /* 控制图片高度，根据你的图片自行调整 */
    width: auto;
    object-fit: contain;
}

.logo span {
    color: #fff;
}

/* 导航文字 永久白色 */
.nav-list {
    display: flex;
    gap: 45px;
}

.nav-list li a {
    font-size: 16px;
    color: var(--white);
    position: relative;
    transition: all 0.3s ease;
    padding: 0 4px;
}

/* 导航下划线样式 */
.nav-list li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 选中/悬浮态 */
.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 100%;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--white);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    font-size: 24px;
    color: var(--white);
    cursor: pointer;
}

/* 首页横幅 */
.banner {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #7B61FF 0%, #5A42E8 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 72px;
}

.banner-text {
    color: var(--white);
}

.banner-text h1 {
    font-size: 52px;
    margin-bottom: 22px;
    line-height: 1.2;
    animation: textFade 1s ease;
}

.banner-text p {
    font-size: 18px;
    opacity: 0.92;
    margin-bottom: 35px;
    line-height: 1.8;
    animation: textFade 1.2s ease;
}

@keyframes textFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 通用按钮 弹性动效 */
.btn {
    display: inline-block;
    padding: 14px 38px;
    background: var(--white);
    color: var(--main);
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.35);
}

.btn-primary {
    background: var(--main);
    color: #fff;
}

.btn-primary:hover {
    background: var(--main-light);
}

/* 通用标题模块 */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.section-title p {
    color: var(--text-gray);
    font-size: 16px;
}

/* 产品板块 & 卡片悬浮动效 */
.product-wrap {
    padding: 100px 0;
    background: var(--bg-light);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow);
}

.card-top {
    height: 220px;
    background: linear-gradient(145deg, #f0ecff, #e8e2ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-top i {
    font-size: 70px;
    color: var(--main);
    transition: transform 0.4s ease;
}

.product-card:hover .card-top i {
    transform: scale(1.1) rotate(5deg);
}

.card-body {
    padding: 28px;
}

.card-body h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.card-body p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 22px;
}

.card-link {
    color: var(--main);
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}

.card-link:hover {
    gap: 12px;
}

/* 关于模块 */
.about-wrap {
    padding: 100px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    height: 340px;
    background: var(--bg-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--main);
    transition: transform 0.4s;
}

.about-img:hover {
    transform: scale(1.02);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-gray);
    line-height: 2;
    margin-bottom: 16px;
    font-size: 16px;
}

/* 功能/联系卡片列表 */
.func-wrap {
    padding: 100px 0;
    background: var(--bg-light);
}

.func-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.func-item {
    background: #fff;
    padding: 36px 24px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.func-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.func-item i {
    font-size: 52px;
    color: var(--main);
    margin-bottom: 22px;
    transition: transform 0.3s;
}

.func-item:hover i {
    transform: rotate(10deg) scale(1.1);
}

.func-item h4 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.func-item p {
    color: var(--text-gray);
    line-height: 1.7;
}

/* 详情页通用头部 */
.page-banner {
    width: 100%;
    height: 420px;
    background: linear-gradient(135deg, #7B61FF 0%, #5A42E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 72px;
}

.page-banner h1 {
    font-size: 44px;
    margin-bottom: 18px;
    animation: textFade 1s ease;
}

.page-banner p {
    font-size: 18px;
    opacity: 0.9;
    animation: textFade 1.2s ease;
}

/* 内容区块通用 */
.section {
    padding: 90px 0;
}

.section-bg {
    background: var(--bg-light);
}

/* 底部页脚 */
.footer {
    background: #252540;
    color: #ccc;
    text-align: center;
    padding: 40px 0;
}

.footer p {
    line-height: 1.8;
    font-size: 15px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-list {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .banner-text h1 {
        font-size: 36px;
    }

    .about-content {
        flex-direction: column;
    }

    .page-banner {
        height: 300px;
    }

    .page-banner h1 {
        font-size: 32px;
    }

    .product-list,
    .func-list {
        grid-template-columns: 1fr;
    }

    /* 移动端缩小Logo图片 */
    .logo img {
        height: 36px;
    }

    .logo {
        font-size: 22px;
    }
}

/* 轮播图专属样式 */
.swiper-wrap {
    position: relative;
    width: 900px;
    /* 限制最大宽度 */
    height: 520px;
    /* 固定高度 */
    margin: 0 auto;
    /* 水平居中 */
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.swiper-list {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.swiper-item {
    min-width: 100%;
    height: 100%;
}

.swiper-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    /* 等比例缩放，完整显示图片，不留拉伸 */
    background: #f5f5f5;
    /* 图片留白处底色 */
}

/* 左右切换按钮 */
.swiper-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.swiper-btn:hover {
    background: rgba(123, 97, 255, 0.7);
}

.swiper-prev {
    left: 15px;
}

.swiper-next {
    right: 15px;
}

/* 底部指示器 */
.swiper-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.swiper-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.swiper-dot.active {
    background: #fff;
}

/* 移动端适配：小屏自动缩小轮播 */
@media (max-width: 992px) {
    .swiper-wrap {
        width: 95%;
        height: auto;
        aspect-ratio: 16 / 9;
        /* 按16:9比例自适应高度 */
    }
}
