/* ===========================================
   Global Styles - 全局样式
   包含所有页面通用的样式
   =========================================== */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background-color: #3498db;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-outline:hover {
    background-color: #2c3e50;
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

/* Flexbox */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-column {
    flex-direction: column;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* ===========================================
   Back to Top Button - 返回顶部按钮
   =========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10002;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* ===========================================
   Mobile Responsive Styles - 移动端响应式样式
   =========================================== */

/* 平板端优化 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 容器间距优化 */
    .container {
        padding: 0 15px;
    }
    
    /* 页面内容区域间距 */
    .site-main {
        padding: 0;
    }
    
    /* 区块间距优化 */
    .section {
        padding: 40px 0;
    }
    
    /* 标题字体大小调整 */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }
    
    /* 按钮移动端优化 */
    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
        min-height: 48px; /* 触摸友好 */
    }
    
    .btn-sm {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .btn-lg {
        padding: 18px 28px;
        font-size: 1rem;
        min-height: 52px;
    }
    
    /* 表单元素移动端优化 */
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS缩放 */
        min-height: 48px;
    }
    
    /* 间距工具类移动端调整 */
    .mb-4 { margin-bottom: 1.5rem; }
    .mt-4 { margin-top: 1.5rem; }
    .p-4 { padding: 1.5rem; }
    
    /* 返回顶部按钮移动端调整 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* 小屏幕移动端进一步优化 */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        padding: 0 5px;
    }
    
    /* 更紧凑的间距 */
    .mb-3 { margin-bottom: 1rem; }
    .mb-4 { margin-bottom: 1.2rem; }
    .mt-3 { margin-top: 1rem; }
    .mt-4 { margin-top: 1.2rem; }
    .p-3 { padding: 1rem; }
    .p-4 { padding: 1.2rem; }
    
    /* 表单进一步优化 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%; /* 移动端按钮全宽 */
        margin-bottom: 10px;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

.grecaptcha-badge { visibility: hidden; }