/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #1a5fb4;
    color: white;
}

.btn-primary:hover {
    background: #1856a3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #1a5fb4;
    border: 2px solid #1a5fb4;
}

.btn-secondary:hover {
    background: #1a5fb4;
    color: white;
    transform: translateY(-2px);
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #1a5fb4;
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    font-size: 12px;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li {
    position: relative;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 8px;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 0;
    background-color: #1a5fb4;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav ul li a:hover::after,
.nav ul li a.active::after {
    width: 100%;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #1a5fb4;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav ul.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    z-index: 999;
}

.nav ul.show li {
    margin: 10px 0;
    text-align: center;
}

.nav ul.show li a {
    display: block;
    padding: 10px 20px;
    position: relative;
}

.nav ul.show li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #1a5fb4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav ul.show li a:hover::after,
.nav ul.show li a.active::after {
    width: 80%;
}

/* 主页横幅 */
.hero {
    background: linear-gradient(135deg, #1a5fb4 0%, #184d96 100%);
    color: white;
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons .btn {
    margin: 0 10px;
}

/* 通用章节样式 */
section {
    padding: 50px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 90px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 关于我们 */
.about {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.about-text h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.experience {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.exp-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.exp-item h4 {
    font-size: 2.5rem;
    color: #1a5fb4;
    margin-bottom: 5px;
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-item i {
    font-size: 2.5rem;
    color: #1a5fb4;
    margin-bottom: 15px;
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    color: #666;
}

/* 产品服务 */
.services {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-item {
    text-align: center;
    padding: 40px 30px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-item:hover {
    background: #1a5fb4;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

.service-item:hover i,
.service-item:hover h3 {
    color: white;
}

.service-item i {
    font-size: 3rem;
    color: #1a5fb4;
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.service-item p {
    color: #666;
}

.service-item:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* 产品展示 */
.products {
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item:hover {
    transform: translateY(-10px);
}

.product-img {
    overflow: hidden;
    height: 200px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-img img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0 0 10px 0;
}

.product-content p {
    color: #666;
    margin: 0 0 15px 0;
    flex: 1;
}

.product-link {
    display: inline-flex;
    align-items: center;
    color: #1a5fb4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #1856a3;
}

.product-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.product-link:hover i {
    transform: translateX(3px);
}

/* 案例展示 */
.cases {
    background: #f8f9fa;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.case-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-item:hover {
    transform: translateY(-10px);
}

.case-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.case-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-item:hover .case-img img {
    transform: scale(1.05);
}

.case-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-content h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.case-content p {
    color: #666;
    margin: 0 0 15px 0;
    flex: 1;
    font-size: 0.9rem;
}

.case-link {
    display: inline-flex;
    align-items: center;
    color: #1a5fb4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.case-link:hover {
    color: #1856a3;
}

.case-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.case-link:hover i {
    transform: translateX(3px);
}

/* 联系我们 */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #1a5fb4;
    margin-right: 15px;
    min-width: 20px;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 5px;
}

.contact-item p {
    color: #666;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contactForm input,
#contactForm textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#contactForm input:focus,
#contactForm textarea:focus {
    outline: none;
    border-color: #1a5fb4;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #1a5fb4;
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: white;
    color: #1a5fb4;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1199px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* 防止页面在移动端出现水平滚动 */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* 确保移动端导航正常显示 */
    .header .container {
        padding: 10px 15px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .logo p {
        font-size: 10px;
    }
    
    .nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav ul.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        background: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        z-index: 999;
    }
    
    /* 移动端菜单项划线效果 */
    .nav ul.show li {
        position: relative;
    }
    
    .nav ul.show li a {
        display: block;
        padding: 10px 20px 12px 20px;
        position: relative;
    }
    
    .nav ul.show li a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 2px;
        left: 50%;
        background-color: #1a5fb4;
        transition: all 0.3s ease;
        transform: translateX(-50%);
        border-radius: 2px;
    }
    
    /* 确保移动端菜单项在激活状态时划线效果正确 */
    .nav ul.show li a {
        transition: color 0.3s ease;
    }
    
    .nav ul.show li a:hover::after,
    .nav ul.show li a.active::after {
        width: 80%;
    }
    
    /* 优化移动端内容间距 */
    section {
        padding: 60px 0 40px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-item {
        height: auto;
    }
    
    .case-item {
        height: auto;
    }
    
    .hero-buttons .btn {
        display: block;
        margin: 10px 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .exp-item {
        min-width: 100px;
        padding: 15px 10px;
    }
    
    .exp-item h4 {
        font-size: 2rem;
    }
    
    /* 优化移动端图片 */
    .product-img {
        height: 150px;
    }
    
    .case-img {
        height: 150px;
    }
    
    /* 优化移动端表单 */
    .contact-form input,
    .contact-form textarea {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* 优化移动端按钮 */
    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}