/* 优势手机端布局控制 */
@media (max-width: 767px) {
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 600px;
        overflow: hidden;
    }
}

/* 平板及以上设备布局 */
@media (min-width: 768px) and (max-width: 1023px) {
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PC端布局 */
@media (min-width: 1024px) {
    .advantage-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 服务流程手机端布局控制 */
@media (max-width: 640px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 900px;
        overflow: hidden;
    }
}

/* 平板布局优化 */
@media (min-width: 641px) and (max-width: 1023px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* FAQ 响应式优化 */
@media (max-width: 640px) {
    .faq-toggle {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-content.open {
        max-height: 300px;
    }
}

/* Banner 移动端优化 */
@media (max-width: 768px) {
    /* Banner 高度和内容调整 */
    .banner-section {
        min-height: 500px !important;
        height: auto !important;
    }
    
    .banner-content {
        padding: 1rem 0;
        min-height: 500px;
        justify-content: center;
    }
    
    .banner-text {
        margin-bottom: 1.5rem;
    }
    
    .banner-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .banner-subtitle {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
    
    /* 按钮布局优化 */
    .banner-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .banner-button {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 表单优化 */
    .banner-form-container {
        padding: 0.5rem;
        margin-top: 1.5rem;
        width: 100%;
    }
    
    .banner-form {
        padding: 1rem 1.25rem;
        border-radius: 0.75rem;
    }
    
    .banner-form h3 {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .banner-form input,
    .banner-form select {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .banner-form button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

/* 小屏手机进一步优化 */
@media (max-width: 480px) {
    .banner-title {
        font-size: 1.25rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .banner-form {
        padding: 0.875rem 1rem;
    }
    
    .banner-form h3 {
        font-size: 1rem;
    }
    
    /* 按钮在小屏保持同行，但缩小间距 */
    .banner-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .banner-button {
        flex: 1;
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .banner-button i {
        margin-right: 0.25rem;
    }
}

/* 关于我们图片比例样式 */
.about-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 23 / 16; /* 设置为 23:16 比例，您可以根据实际图片调整 */
    overflow: hidden;
    border-radius: 0.5rem;
}

.about-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image:hover {
    transform: scale(1.05);
}

/* 平板端关于我们优化 */
@media (min-width: 768px) and (max-width: 1024px) {
    .about-image-container {
        aspect-ratio: 4 / 3; /* 平板端使用 4:3 比例 */
    }
}

/* 移动端关于我们优化 */
@media (max-width: 767px) {
    .about-image-container {
        aspect-ratio: 16 / 12; /* 移动端使用 16:12 比例 */
    }
    
    .about-image-container.mt-8 {
        margin-top: 1rem; /* 减少移动端的上边距 */
    }
    
    .about-section .grid {
        gap: 0.75rem; /* 减少移动端图片间距 */
    }
}

/* 表单在移动端的进一步优化 */
@media (max-width: 640px) {
    .form-section {
        padding: 1rem;
    }
    
    .form-container {
        border-radius: 1rem;
        overflow: hidden;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-left-content {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .form-right-content {
        padding: 1.5rem 1rem;
    }
    
    .form-title {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    .form-description {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .form-features {
        margin-bottom: 1.5rem;
    }
    
    .form-feature-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .form-feature-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* 确保所有输入框在移动端可见 */
@media (max-width: 480px) {
    input, select, textarea {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-appearance: none;
        appearance: none;
    }
    
    select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
    }
}