/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 顶部导航栏样式 */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo .logo-text {
    color: #7C4DFF;
    margin-right: 5px;
}

.logo .logo-english {
    color: #2c3e50;
    font-size: 1.2rem;
}

.logo-image {
    max-height: 50px;
    width: auto;
    display: block;
}

/* 桌面导航样式 */
.desktop-nav {
    display: block;
}

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

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 10px 0;
    position: relative;
}

.nav-links a:hover {
    color: #7C4DFF;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #7C4DFF;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-subtext {
    display: block;
    font-size: 0.7rem;
    color: #777;
    font-weight: normal;
    margin-top: 2px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 0 0 5px 5px;
    overflow: hidden;
}

.dropdown-content li {
    margin: 0;
}

.dropdown-content a {
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 移动端菜单按钮 */
.mobile-menu-button {
    display: none;
    cursor: pointer;
}

.mobile-menu-button .bar {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 移动端菜单 */
.mobile-nav {
    display: none;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    border-bottom: 1px solid #f1f1f1;
}

.mobile-nav a {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-nav a:hover {
    background-color: #f8f9fa;
}

.mobile-dropdown-content {
    display: none;
    background-color: #f8f9fa;
}

.mobile-dropdown-content a {
    padding-left: 40px;
}

/* 横幅样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../banner.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
    padding: 20px;
    margin-top: 0;
    margin-top: 70px; /* 为固定导航栏留出空间 */
}

.hero-content {
    max-width: 800px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-btn,
.btn {
    display: inline-block;
    background-color: #7C4DFF;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-btn:hover,
.btn:hover {
    background-color: #6A1B9A;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 公司简介样式 */
.about {
    padding: 100px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: #7C4DFF;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.about-text {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    min-width: 300px;
    margin-top: 30px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 产品部门样式 */
.departments {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.department-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.department-card {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.department-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.card-content p {
    margin-bottom: 20px;
    color: #555;
}

/* 优势展示样式 */
.advantages {
    padding: 100px 0;
    background-color: #fff;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.advantage-item:hover {
    transform: translateY(-10px);
    background-color: #7C4DFF;
    color: #fff;
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #7C4DFF;
    transition: color 0.3s ease;
}

.advantage-item:hover .advantage-icon {
    color: #fff;
}

.advantage-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.advantage-item:hover h3 {
    color: #fff;
}

.advantage-item p {
    color: #555;
    transition: color 0.3s ease;
}

.advantage-item:hover p {
    color: #fff;
}

/* 联系表单样式 */
.contact {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    color: #555;
}

.contact-info i {
    color: #7C4DFF;
    margin-right: 10px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    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: #7C4DFF;
}

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

/* 页脚样式 */
footer {
    background-color: #7C4DFF;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-column p {
    margin-bottom: 15px;
    color: #ddd;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #7C4DFF;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #9575CD;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #7C4DFF;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #9575CD;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .nav-links li {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    /* 隐藏桌面导航 */
    .desktop-nav {
        display: none;
    }
    
    /* 显示移动端菜单按钮 */
    .mobile-menu-button {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo .logo-english {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero {
        margin-top: 60px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo .logo-english {
        display: none;
    }
}

/* 回到顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #7C4DFF;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #6A1B9A;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(124, 77, 255, 0.4);
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        margin-right: 0;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: #fff;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .burger {
        display: block;
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .footer-column {
        min-width: 100%;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-btn {
        padding: 12px 25px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .about, .departments, .advantages, .contact {
        padding: 60px 0;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #7C4DFF;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6A1B9A;
}