/* 响应式布局和居中修复 */

/* 全局容器居中 */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 确保所有区域居中对齐 */
section {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.hero-content, 
.feature-grid, 
.advantages-grid, 
.scenario-section,
.atlas-gallery {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* 真正响应式网格布局 */
.feature-grid, 
.advantages-grid, 
.scenario-section,
.atlas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

/* 响应式调整 */
@media screen and (max-width: 1200px) {
    .hero-content, 
    .feature-grid, 
    .advantages-grid, 
    .scenario-section,
    .atlas-gallery {
        max-width: 95%;
    }
    
    /* 微调大屏幕下的网格项目尺寸 */
    .feature-grid, 
    .advantages-grid, 
    .scenario-section,
    .atlas-gallery {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    /* 中等屏幕下微调网格项目尺寸 */
    .feature-grid, 
    .advantages-grid, 
    .scenario-section,
    .atlas-gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .hero-content h1 {
        font-size: 2.4em !important;
    }
    
    /* 优化卡片内边距 */
    .feature-item, 
    .advantage-item, 
    .scenario-card, 
    .atlas-item {
        padding: 20px !important;
    }
}

@media screen and (max-width: 768px) {
    /* 平板屏幕下调整为两列布局 */
    .feature-grid, 
    .advantages-grid, 
    .scenario-section,
    .atlas-gallery {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
    }
    
    .hero-content h1 {
        font-size: 2em !important;
    }
    
    .hero-content p {
        font-size: 1em !important;
    }
    
    .hero-image {
        max-width: 100% !important;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 手机屏幕尺寸特别处理 */
@media screen and (max-width: 576px) {
    .feature-grid, 
    .advantages-grid, 
    .scenario-section,
    .atlas-gallery {
        grid-template-columns: 1fr; /* 手机上强制单列 */
        gap: 10px;
    }
    
    section {
        padding: 3em 1em !important;
    }
    
    .hero-content h1 {
        font-size: 1.8em !important;
    }
    
    .advantage-item, 
    .feature-item, 
    .scenario-card,
    .atlas-item {
        padding: 1.5em !important;
    }
}

/* 确保图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block; /* 防止图片底部出现间隙 */
}

/* 卡片容器优化 */
.feature-item, 
.advantage-item, 
.scenario-card, 
.atlas-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* 卡片内图标和图片优化 */
.feature-item .icon,
.advantage-item .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.2em;
}

.atlas-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* 使卡片底部对齐 */
.scenario-card p:last-child,
.atlas-content p:last-child {
    margin-bottom: 0;
    margin-top: auto;
}

/* 修复导航栏在移动设备上的显示 */
@media screen and (max-width: 768px) {
    header nav ul {
        width: 100%;
        right: 0;
        left: 0;
        text-align: center;
    }
    
    header nav ul.active {
        padding-top: 60px;
    }
    
    header nav ul li {
        width: 100%;
    }
    
    header nav ul li a {
        width: 100%;
        display: block;
        padding: 15px 0;
    }
}

/* 确保每个部分的内容居中显示 */
#hero-atlas, 
#value-proposition-atlas, 
.advantages-section, 
#application-scenarios-atlas, 
#atlas-showcase, 
#cta-atlas {
    text-align: center;
}

/* 场景卡片文本左对齐 */
.scenario-card {
    text-align: left;
} 