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

/* 根变量定义 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --text-color: #333;
    --text-light: #777;
    --white: #fff;
    --gray: #f5f5f5;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --section-padding: 80px 0;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* 列表样式 */
ul, ol {
    list-style: none;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a252f;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 部分标题样式 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 0;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 15px 0;
    background-color: var(--white);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.navbar .logo img {
    height: 40px;
    margin-right: 10px;
}

.navbar .logo span {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar .nav-links ul {
    display: flex;
    gap: 30px;
}

.navbar .nav-links a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

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

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--secondary-color);
}

.navbar .mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

.navbar .contact-btn {
    display: none;
}

/* 英雄区样式 */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 150px 0 100px;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('../images/hero-bg.svg') no-repeat center center;
    background-size: contain;
    opacity: 0.1;
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 500px;
}

.hero-content h1 {
    font-size: 50px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

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

.hero-image {
    flex: 1;
    max-width: 500px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 关于我们样式 */
.about {
    padding: var(--section-padding);
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

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

.about-text h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.company-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 20px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
    flex: 1;
    min-width: 100px;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat h4 {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat p {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 0;
}

.about-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

/* 服务项目样式 */
.services {
    padding: var(--section-padding);
    background-color: var(--gray);
}

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

.service-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
}

.learn-more i {
    margin-left: 5px;
    transition: var(--transition);
}

.learn-more:hover i {
    transform: translateX(5px);
}

/* 技术优势样式 */
.tech-advantages {
    padding: var(--section-padding);
    background-color: var(--white);
}

.advantages-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
    background-color: var(--gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.advantage-item:hover .advantage-icon {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

.advantage-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.advantage-item p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

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

.tech-stack h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.tech-stack-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.tech-icon {
    width: 60px;
    height: 60px;
    background-color: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
    transition: var(--transition);
}

.tech-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* 成功案例样式 */
.cases {
    padding: var(--section-padding);
    background-color: var(--gray);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.case-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.case-card:hover img {
    transform: scale(1.1);
}

.case-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px;
}

.case-card p {
    font-size: 16px;
    color: var(--text-light);
    margin: 0 20px 20px;
    line-height: 1.6;
}

/* 客户评价样式 */
.testimonials {
    padding: var(--section-padding);
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.testimonials::before,
.testimonials::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-color: var(--light-color);
    border-radius: 50%;
    opacity: 0.5;
}

.testimonials::before {
    top: -100px;
    left: -100px;
}

.testimonials::after {
    bottom: -100px;
    right: -100px;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.testimonial-slide.active {
    display: block;
}

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

.testimonial-content {
    background-color: var(--gray);
    padding: 40px;
    border-radius: var(--border-radius);
    position: relative;
}

.testimonial-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 40px;
    color: var(--secondary-color);
    opacity: 0.3;
}

.testimonial-content p::before {
    position: absolute;
    top: 20px;
    left: 20px;
}

.testimonial-content p::after {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 0;
    font-style: normal;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.prev-slide,
.next-slide {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border: 1px solid var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.prev-slide:hover,
.next-slide:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow);
}

/* 数据统计样式 */
.statistics {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    min-width: 150px;
}

.counter {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.stat-item p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

/* 联系我们样式 */
.contact {
    padding: var(--section-padding);
    background-color: var(--white);
}

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

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

.contact-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

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

.info-item i {
    font-size: 24px;
    color: var(--secondary-color);
    min-width: 24px;
    margin-top: 5px;
}

.info-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.info-item p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 0;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--gray);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
}

.footer-logo a {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul,
.footer-contact ul {
    line-height: 2.5;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact i {
    color: var(--secondary-color);
    min-width: 20px;
    margin-top: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    box-shadow: var(--shadow);
}

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

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
        max-width: 100%;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 30px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-text {
        order: 2;
    }
    
    .about-image {
        order: 1;
        margin-bottom: 30px;
    }
    
    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .section-header h2 {
        font-size: 30px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
        padding: 80px 20px;
    }
    
    .navbar .nav-links.active {
        right: 0;
    }
    
    .navbar .nav-links ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .navbar .mobile-menu {
        display: block;
        z-index: 1000;
    }
    
    .navbar .contact-btn {
        display: none;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-content {
        grid-template-columns: 1fr;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .company-stats {
        flex-direction: column;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    .service-card,
    .advantage-item {
        padding: 20px;
    }
    
    .case-card img {
        height: 150px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}