/* 基础样式保持不变 */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

/* 导航栏 */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

nav a {
    margin: 5px 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #e9ecef;
}
/* 手机端导航栏优化 - 方案三：优化水平滚动 */
@media (max-width: 768px) {
    /* 导航栏容器优化 */
    nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        padding: 12px 15px;
        background-color: #f0f2f5;
        border-radius: 8px;
        margin: 0 1px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    /* 隐藏滚动条但保持可滚动（视觉上更干净） */
    nav::-webkit-scrollbar {
        height: 3px;
    }
    
    nav::-webkit-scrollbar-track {
        background: transparent;
    }
    
    nav::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.1);
        border-radius: 3px;
    }
    
    /* 导航按钮 - 适当大小，保证可读性 */
    nav a {
        flex: 0 0 auto; /* 不缩放，固定大小 */
        background-color: white;
        color: #2c3e50;
        padding: 10px 14px;
        margin: 0;
        border-radius: 6px;
        font-weight: 500;
        font-size: 0.85em;
        text-align: center;
        white-space: nowrap;
        box-shadow: 0 2px 5px rgba(0,0,0,0.08);
        border: 1px solid #e0e0e0;
        transition: all 0.3s ease;
        min-width: max-content; /* 根据内容调整最小宽度 */
    }
    
    /* 首页按钮样式 */
    nav a[href="index.html"] {
        background-color: #2c3e50;
        color: white;
        font-weight: 600;
    }
    
    /* 悬停效果 */
    nav a:hover, nav a:active {
        background-color: #3498db;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    }
    
    /* 添加导航提示（视觉提示可滚动） */
    nav::after {
        content: '';
        display: block;
        min-width: 20px;
        height: 100%;
    }
}
/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.button {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin: 10px 0;
}

.button:hover {
    background-color: #c0392b;
}
/* 手机端按钮响应式设计 */
@media (max-width: 768px) {
    /* 通用按钮样式优化 */
    .button {
        display: inline-block;
        min-width: 140px;
        max-width: 90vw; /* 使用视口单位限制最大宽度 */
        padding: 12px 20px;
        font-size: 0.95em;
        margin: 10px auto;
        text-align: center;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 25px; /* 圆角按钮更美观 */
    }
    
    /* Hero区域特殊处理 */
    .hero .button {
        min-width: 160px;
        padding: 14px 28px;
        font-size: 1.05em;
        font-weight: 600;
    }
    
    /* 确保按钮容器居中 */
    .hero-content,
    .services:last-of-type,
    section:has(.button):not(.hero) {
        text-align: center;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 防止按钮超出父容器 */
    .hero-content,
    .services,
    .faq + .services {
        max-width: 100%;
        overflow: hidden;
    }
}
/* 三个卡片区域优化 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 20px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    max-width: 80%;
    margin-bottom: 10px;
}

/* 服务流程优化 */
.services {
    padding: 40px 20px;
}

.service-process {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 30px;
}
/* 手机端服务流程优化 */
@media (max-width: 768px) {
    .services h2 {
        text-align: center;
        margin-bottom: 25px;
        position: relative;
        padding-bottom: 10px;
    }
    
    .services h2:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: #3498db;
        border-radius: 2px;
    }
    
    /* 服务流程改为居中对齐的网格布局 */
    .service-process {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
        justify-content: center;
        padding: 0 10%;
        overflow-x: visible;
    }
    
    /* 移除横向滚动，改为自适应布局 */
    .service-process:after {
        display: none;
    }
    
    .step {
        width: auto;
        min-height: 100px; /* 降低高度 */
        padding: 5px;
        margin-right: 0;
        border-left: 4px solid #3498db;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .step:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    }
    
    .step h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
        color: #2c3e50;
        line-height: 1.3;
        flex-shrink: 0;
    }
    
    .step p {
        font-size: 0.9em;
        color: #555;
        line-height: 1.5;
        flex-grow: 1;
        margin: 0;
    }
    
    /* 奇数步骤和偶数步骤颜色区分 */
    .step:nth-child(odd) {
        border-left-color: #e74c3c;
    }
    
    .step:nth-child(even) {
        border-left-color: #2ecc71;
    }
    
    /* 步骤编号 */
    .step:before {
        content: attr(data-step);
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 0.8em;
        font-weight: bold;
        color: #7f8c8d;
        background-color: #f8f9fa;
        padding: 2px 8px;
        border-radius: 12px;
    }
}
.step {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

/* FAQ区域优化 */
.faq {
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 40px 20px;
}

.faq ul {
    list-style: none;
    padding: 0;
}

.faq li {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.faq strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    padding: 15px;
    text-align: middle;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px;
    background-color: #2c3e50;
    color: white;
    margin-top: 40px;
}

/* 手机端优化 - 媒体查询 */
@media (max-width: 768px) {
    /* 导航栏调整为单行可滚动 */
    nav {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }
    
    nav a {
        margin: 5px 8px;
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    /* Hero区域调整 */
    .hero {
        padding: 40px 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    /* 三个卡片改为垂直排列 */
    .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 15px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 10px;
    }
    
    /* 服务流程改为垂直滚动布局 */
    .service-process {
        display: flex;
        flex-direction: column;
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .service-process::-webkit-scrollbar {
        height: 4px;
    }
    
    .service-process::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 2px;
    }
    
    .step {
        flex: 0 0 auto;
        width: 280px;
        padding: 20px;
        margin-right: 15px;
        min-height: 80px;
    }
    
    /* 避免服务流程过长，改为横向滚动 */
    .service-process:after {
        content: '';
        display: block;
        min-width: 20px;
    }
    
    /* FAQ区域增加边距 */
    .faq {
        padding: 30px 15px;
        margin: 30px 15px;
    }
    
    .faq li {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* 表格在手机端改为块级显示避免溢出 */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 调整所有section的内边距 */
    section {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 按钮大小调整 */
    .button {
        padding: 10px 25px;
        font-size: 0.95em;
    }
    
    /* 调整标题大小 */
    h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    h3 {
        font-size: 1.2em;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5em;
    }
    
    .card img {
        max-width: 80%;
    }
    
    .step {
        width: 250px;
        min-height: 180px;
        padding: 15px;
    }
    
    .faq li {
        padding: 12px;
    }
    
    .button {
        width: 100%;
        text-align: center;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-process {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .step:nth-child(4),
    .step:nth-child(5) {
        grid-column: span 1;
    }
}