/* 全局样式与变量定义 */

:root {
    --primary-color: #32228b;
    --primary-dark: #120064;
    --secondary-color: #4a3abf;
    --light-color: #f8f9fa;
    --gray-color: #666;
    --dark-gray: #333;
    --success-color: #32228b;
    --success-light: rgba(34, 139, 34, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-color);
}

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

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-link {
    color: var(--primary-color);
    text-decoration: underline;
    padding: 0;
    background-color: transparent;
    font-weight: normal;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.center-button {
    text-align: center;
    margin-top: 50px;
}


/* 导航栏样式 */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin: 0 15px;
    position: relative;
}

.main-nav ul li a {
    color: var(--dark-gray);
    padding: 5px 0;
    font-size: 1.1rem;
    position: relative;
    display: block;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.main-nav ul li a.active {
    color: var(--primary-color);
    font-weight: 500;
}


/* 下拉菜单样式 */

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 4px;
    padding: 8px 0;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}


/* 移动端菜单 */

.navbar {
    display: none;
    /* 桌面端导航默认隐藏，移动端不显示 */
}


/* 顶部固定导航（移动端） */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    /* 确保在内容上方 */
}

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

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}


/* 菜单按钮样式 */

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    z-index: 1000;
}


/* 侧边栏导航 */

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    /* 默认隐藏在右侧 */
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1001;
    /* 高于遮罩层和导航栏 */
    padding-top: 70px;
    /* 预留顶部导航高度 */
}

.sidebar.active {
    right: 0;
    /* 显示侧边栏 */
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

.nav-list {
    padding: 0 20px;
}

.nav-list li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.nav-list a {
    color: #333;
    font-size: 1rem;
    display: block;
    padding: 5px 0;
}

.nav-list a.active {
    color: #32228b;
    font-weight: bold;
}


/* 移动端子菜单样式 */

.nav-list .dropdown-menu {
    margin-left: 20px;
    margin-top: 10px;
    position: static;
    box-shadow: none;
    min-width: auto;
    padding: 0;
}


/* 遮罩层 */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    /* 高于内容，低于侧边栏 */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* 英雄区域 */

.hero {
    height: 80vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}


/* 案例展示区样式 */

.case-filters {
    background-color: var(--white-color);
    padding: 30px 0;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.case {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.case:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.case h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.case h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.case p {
    margin-bottom: 20px;
    color: var(--gray-color);
    line-height: 1.8;
}

.case img {
    margin-top: 15px;
    transition: var(--transition);
}

.case img:hover {
    transform: scale(1.02);
}


/* 联系我们 */

.contact {
    padding: 100px 0;
    background-color: white;
}

.contact-content {
    display: flex;
    gap: 60px;
}

.contact-info {
    flex-basis: 40%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(34, 139, 34, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: #32228b;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text h3 {
    font-size: 1.2rem;
    color: #32228b;
    margin-bottom: 5px;
}

.info-text p {
    color: #666;
}

.contact-form {
    flex-basis: 60%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #32228b;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}


/* 页脚 */

.footer {
    background-color: #333;
    color: white;
    padding: 80px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-logo p {
    color: #ccc;
}

.footer-links h3,
.footer-products h3,
.footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul,
.footer-products ul,
.footer-contact ul {
    list-style: none;
}

.footer-links ul li,
.footer-products ul li,
.footer-contact ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-products ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover,
.footer-products ul li a:hover {
    color: #32228b;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
}

.footer-contact ul li i {
    margin-right: 10px;
    color: #32228b;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #ccc;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 35px;
    height: 35px;
    background-color: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #32228b;
}


/* 响应式设计 */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
    .navbar {
        padding: 15px 30px;
    }
    .navbar.scrolled {
        padding: 10px 30px;
    }
    .main-nav {
        display: none;
    }
    .mobile-menu-button {
        display: block;
    }
    .mobile-menu {
        display: block;
    }
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .advantages-grid,
    .products-grid,
    .cases-grid,
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .about {
        padding: 80px 0;
    }
    .about::after {
        display: none;
    }
    .about-content {
        max-width: 100%;
        margin-bottom: 40px;
    }
    .about-image {
        position: static;
        transform: none;
        width: 100%;
    }
    .contact-content {
        flex-direction: column;
    }
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 响应式调整：桌面端显示传统导航 */

@media (min-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
    }
    .header {
        display: none;
        /* 桌面端隐藏移动端导航 */
    }
    .sidebar,
    .overlay {
        display: none;
        /* 桌面端隐藏侧边栏和遮罩层 */
    }
    .main-nav .nav-links {
        display: flex;
        gap: 25px;
    }
    .main-nav a {
        color: #333;
        font-size: 1rem;
    }
    .main-nav a.active {
        color: #32228b;
        font-weight: bold;
    }
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        min-width: 200px;
        display: none;
    }
    .dropdown {
        position: relative;
    }
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    .main {
        margin-top: 70px;
        /* 适配桌面端导航高度 */
    }
}


/* 典型案例区域基础样式 */

.case-filters {
    padding: 80px 0;
    /* 增加上下内边距，提升页面呼吸感 */
    background-color: var(--light-color);
    /* 使用浅色背景，区分不同区域 */
}


/* 案例标题样式优化 */

.cases-main-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 60px;
    /* 增加与下方案例的间距 */
    position: relative;
}

.cases-main-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    /* 下划线居中显示 */
}


/* 单个案例容器样式 */

.case {
    background-color: white;
    border-radius: 10px;
    /* 增加圆角弧度，更显现代感 */
    box-shadow: var(--shadow);
    padding: 35px;
    margin-bottom: 40px;
    /* 增加案例之间的间距 */
    transition: all 0.3s ease;
    /* 平滑过渡效果 */
    overflow: hidden;
    /* 防止内容溢出圆角 */
}

.case:hover {
    transform: translateY(-5px);
    /* 悬停时轻微上浮 */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    /* 增强阴影效果 */
}


/* 案例标题栏样式 */

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* 确保在小屏幕上标题和标签不会重叠 */
}

.case h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
    /* 移除默认margin，避免与容器间距冲突 */
    line-height: 1.3;
    /* 优化行高，确保标题易读 */
}


/* 案例标签样式（新增） */

.case-tag {
    background-color: rgba(50, 34, 139, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    /* 在小屏幕上标签会换行，增加顶部间距 */
}


/* 案例描述文本样式 */

.case p {
    color: var(--gray-color);
    line-height: 1.8;
    /* 增加行高，提升可读性 */
    margin-bottom: 25px;
    /* 增加与图片的间距 */
    font-size: 1rem;
}


/* 案例图片容器样式 */

.case-image-container {
    display: flex;
    gap: 20px;
    /* 图片之间的间距 */
    width: 100%;
    overflow: hidden;
    /* 防止图片溢出容器 */
}


/* 案例图片样式 */

.case img {
    width: 100%;
    height: 300px;
    /* 固定图片高度，确保同组图片高度一致 */
    object-fit: cover;
    /* 保持图片比例，裁剪多余部分 */
    border-radius: 6px;
    /* 图片添加圆角 */
    transition: transform 0.5s ease;
    /* 平滑缩放过渡 */
}

.case img:hover {
    transform: scale(1.03);
    /* 悬停时轻微放大，增强交互感 */
}


/* 分设备响应式调整 */


/* 移动端设备（<768px） */

@media (max-width: 767px) {
    .case-filters {
        padding: 60px 0;
        /* 减少移动端上下内边距 */
    }
    .cases-main-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    .case {
        padding: 25px 20px;
        /* 减少移动端内边距 */
        margin-bottom: 30px;
    }
    .case h2 {
        font-size: 1.5rem;
        /* 减小标题字体 */
    }
    .case p {
        font-size: 0.95rem;
        /* 调整文本大小 */
        margin-bottom: 20px;
    }
    .case-image-container {
        flex-direction: column;
        /* 移动端图片垂直排列 */
        gap: 15px;
        /* 减小垂直间距 */
    }
    .case img {
        height: 220px;
        /* 降低移动端图片高度，避免页面过长 */
    }
}


/* 平板设备（768px-1023px） */

@media (min-width: 768px) and (max-width: 1023px) {
    .case-image-container {
        flex-direction: column;
        /* 平板设备也采用垂直排列，确保图片清晰 */
        gap: 18px;
    }
    .case img {
        height: 280px;
        /* 平板图片高度适中 */
    }
}


/* 桌面设备（≥1024px） */

@media (min-width: 1024px) {
    .case-image-container {
        flex-direction: row;
        /* 桌面端图片水平排列 */
    }
    .case img {
        flex: 1;
        /* 图片平均分配宽度 */
        height: 320px;
        /* 桌面端图片高度稍大，展示更清晰 */
    }
}


/* 超大型设备（≥1440px） */

@media (min-width: 1440px) {
    .container {
        max-width: 1300px;
        /* 限制最大宽度，避免在超宽屏幕上内容过宽 */
    }
    .case img {
        height: 350px;
        /* 超大型设备上图片高度进一步增加 */
    }
}