/* ==========================================================================
   全局样式设置 (Global Styles)
   包含变量定义、重置和通用排版设置
   ========================================================================== */

/* 全局选择器 - 重置默认边距和盒模型 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 确保 padding 不会撑大元素宽度 */
}

/* 页面主体设置 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; /* 优先使用 Inter 字体 */
    line-height: 1.6;
    color: #333; /* 主要文字颜色 */
    background-color: #fff;
}

/* 通用容器 - 限制内容最大宽度并居中 */
.container {
    max-width: 1400px; /* 增加容器最大宽度，以便适应更宽的表单 */
    margin: 0 auto;
    padding: 0 20px; /* 移动端左右留白 */
}

/* 链接默认样式 (如果需要可添加，此处参考原样式主要用于 email) */
a {
    transition: color 0.3s ease;
}

/* ==========================================================================
   页面头部 (Header)
   ========================================================================== */
.header {
    background-color: #0a0a0a;
    padding: 20px 0;
    position: sticky; /* 吸顶效果 */
    top: 0;
    z-index: 100; /* 确保头部在最上层 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px; /* logo 图片和文字间距 */
}

/* GSS Logo 样式 (未使用图片时的备用样式) */
.logo-gss {
    background-color: #d32f2f; /* GSS 品牌红 */
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
}

.logo-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ==========================================================================
   首屏区域 (Hero Section)
   ========================================================================== */
.hero {
    /* 渐变背景：从灰色过渡到品牌红 */
    background: linear-gradient(135deg, #6d6d6d 0%, #d32f2f 100%);
    color: white;
    padding: 80px 0;
    min-height: 80vh; /* 至少占据 80% 视口高度 */
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1200px; /* 虽然有 .container，但这部分用了单独的 grid 布局 */
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右各占 50% */
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.1;
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover; /* 裁剪图片以填充容器 */
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); /* 强烈的阴影增加立体感 */
}

/* 行动号召按钮 (CTA Button) */
.cta-button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.cta-button:hover {
    background-color: #b71c1c; /* 悬停颜色加深 */
    transform: translateY(-2px); /* 轻微上浮 */
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.3);
}

/* ==========================================================================
   使命愿景部分 (Mission Section)
   ========================================================================== */
.mission {
    padding: 100px 0;
    background-color: #f8f9fa; /* 浅灰白背景区分 */
}

/* 章节通用标题 */
.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #6d6d6d;
    text-align: center;
}

.mission-text {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px; /* 限制文字宽度提高可读性 */
    margin: 0 auto 40px;
    color: #555;
}

.mission .cta-button {
    display: block; /* 覆盖 grid/flex 属性，使其独占一行 */
    margin: 0 auto; /* 居中 */
    width: fit-content;
}

/* ==========================================================================
   服务介绍部分 (Services Section)
   ========================================================================== */
.services {
    padding: 100px 0;
    background-color: #6d6d6d;
    color: white;
}

.services .section-title {
    color: white;
}

.services-intro {
    font-size: 1.1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
    opacity: 0.9;
}

.services-grid {
    display: grid;
    /* 响应式网格：每列最小 300px，自动填充剩余空间 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

/* 服务卡片 */
.service-card {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px); /* 毛玻璃效果 (仅部分浏览器支持) */
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-card p {
    line-height: 1.6;
    opacity: 0.9;
}

/* ==========================================================================
   合作伙伴部分 (Partners Section)
   ========================================================================== */
.partners {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.partners-grid {
    display: grid;
    /* 强制5列布局，符合第二张图效果 */
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    /* 移除 align-items: center，或者显式使用 stretch 也可以，但我们会给子元素固定高度 */
    margin-top: 50px;
}

.partner-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* 稍微减小内边距 */
    height: 120px; /* 固定高度，确保所有方格大小一致 */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    width: 100%; /* 确保填满网格单元 */
}

.partner-logo:hover {
    transform: translateY(-5px);
}

.partner-logo img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain; /* 保证 Logo 比例正确不被拉伸 */
}

/* ==========================================================================
   成功案例数据部分 (Success Section)
   ========================================================================== */
.success {
    padding: 100px 0;
    background-color: #6d6d6d;
    color: white;
}

.success .section-title {
    color: #d32f2f;
}

.success-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}

.success-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.success-stats {
    display: flex;
    flex-direction: column;
    gap: 40px; /* 统计数字垂直间距 */
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #d32f2f;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.stat-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   联系方式部分 (Contact Section)
   ========================================================================== */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    text-align: center;
}

.contact-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.email {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* 下划线效果 */
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

.email:hover {
    border-bottom-color: white;
}

.wechat {
    display: none; /* 默认隐藏，JS 控制显示 */
    margin-top: 10px;
}

.wechat-img {
    width: 120px;
    height: auto;
}

/* ==========================================================================
   嵌入式联系表单 (Embedded Contact Form)
   ========================================================================== */
.contact-form-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.contact-card {
    background-color: #fff;
    padding: 0;
    border-radius: 12px;
    width: 800px; /* 设置固定初始宽度，不再依赖 100% 拉伸 */
    max-width: 95%; /* 保证在小屏幕上不会溢出 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: #333;
    text-align: left;
}

/* 嵌入表单内部步骤区域 */
#contactFormStep, #contactLoadingStep, #contactSuccessStep {
    padding: 40px;
}

#contactFormStep h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 表单项间距 */
}

/* 复用 .form-group 和 .submit-btn 等样式 */
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
    /* 修复 box-sizing 问题，确保 padding 不会撑大宽度 */
    box-sizing: border-box; 
    color: #333;
    background-color: #fff;
}

.form-group textarea {
    resize: none; /* 禁止手动拖动调整大小 */
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d32f2f; /* 聚焦颜色 */
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.submit-btn {
    margin-top: 10px;
    width: 100%;
    background-color: #d32f2f;
    color: white;
    /* 继承 .cta-button 的基础样式，但需覆盖宽度等 */
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.submit-btn:hover {
    background-color: #b71c1c;
}

/* 加载状态 */
#contactLoadingStep {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d32f2f; /* 旋转部分颜色 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功状态 */
#contactSuccessStep {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #4CAF50; /* 成功绿 */
    color: white;
    font-size: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#contactSuccessStep h3 {
    color: #333;
    margin-bottom: 10px;
}

#contactSuccessStep p {
    color: #666;
    margin-bottom: 25px;
}

/* ==========================================================================
   语言选择器 (Language Selector)
   ========================================================================== */
.language-selector {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.language-selector select {
    background-color: #000000;
    color: white;
    border: 2px solid #d32f2f;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background-color: #283593; /* 悬停变为蓝色 */
    transform: translateY(-2px);
}

.language-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.3);
}

/* 语言切换平滑过渡效果 */
[data-en], [data-zh] {
    transition: opacity 0.3s ease;
}

.language-switching {
    opacity: 0.7;
}

/* ==========================================================================
   响应式设计 (Responsive Design)
   ========================================================================== */

/* 平板尺寸 (Max 768px) */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr; /* 改为单列布局 */
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .success-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .partners-grid {
        /* 更紧凑的 Logo 排列 */
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .language-selector {
        bottom: 20px;
        right: 20px;
    }
}

/* 手机尺寸 (Max 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .mission, .services, .success {
        padding: 60px 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
