/* ===== 全局重置 & 变量 ===== */
:root {
    --primary: #1e3a5f;
    --primary-light: #2a4f7a;
    --primary-dark: #142b44;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.02);
    --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-base: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
    font-family: var(--font-base);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== 通用按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== 导航栏 ===== */
#header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
    color: var(--accent);
}

#main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

#main-nav ul {
    display: flex;
    gap: 1.8rem;
}

#main-nav ul li a {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 4px;
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    border-radius: 2px;
}

#main-nav ul li a:hover,
#main-nav ul li a.active {
    color: var(--primary);
}

#main-nav ul li a:hover::after,
#main-nav ul li a.active::after {
    width: 100%;
}

.nav-cta .btn {
    font-size: 0.85rem;
    padding: 0.4rem 1.2rem;
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem;
}

/* ===== Hero ===== */
#hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 1.2rem;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-image {
    flex: 0 0 420px;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ===== 通用section ===== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ===== 加盟优势卡片 ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--bg-white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.advantage-card .card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: var(--accent);
    font-size: 1.6rem;
    transition: var(--transition);
}

.advantage-card:hover .card-icon {
    background: var(--accent);
    color: var(--primary-dark);
}

.advantage-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.advantage-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== 加盟流程 ===== */
#process {
    background: var(--bg-white);
}

.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: center;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 180px;
    padding: 2rem 1rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    box-shadow: 0 8px 20px rgba(30,58,95,0.2);
}

.step h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 200px;
    margin: 0 auto;
}

/* ===== 加盟表单 ===== */
#join {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2.5rem 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

#join-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(30,58,95,0.08);
}

.form-group .error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    min-height: 1.2rem;
}

.full-width {
    margin-bottom: 1.2rem;
}

.form-submit {
    text-align: center;
    margin: 1.5rem 0 0.8rem;
}

.form-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-tip i {
    margin-right: 0.3rem;
}

#form-success {
    text-align: center;
    padding: 2rem 0;
    display: none;
}

#form-success i {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 1rem;
}

#form-success h3 {
    font-size: 1.6rem;
    color: var(--primary);
}

#form-success p {
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ===== 联系我们 ===== */
.contact-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 4px;
}

.info-item h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.info-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-map {
    flex: 0 0 400px;
}

.map-placeholder {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px dashed #cbd5e1;
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 0.8rem;
}

.map-placeholder p {
    font-weight: 600;
    color: var(--text-dark);
}

.map-placeholder span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 页脚 ===== */
footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    max-width: 260px;
}

.footer-brand .logo {
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.footer-brand .logo i {
    color: var(--accent);
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--accent);
}

.footer-links ul li {
    margin-bottom: 0.4rem;
}

.footer-links ul li a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.footer-contact p i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding: 1.2rem 0;
    color: #64748b;
    font-size: 0.85rem;
}

/* ===== 回到顶部 ===== */
#back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-light);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

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

#back-to-top:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }
    .hero-image {
        flex: 0 0 auto;
        max-width: 400px;
    }
    .contact-content {
        flex-direction: column;
    }
    .contact-map {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1.5rem 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: var(--transition);
        gap: 1.2rem;
        z-index: 999;
    }
    #main-nav.open {
        transform: translateY(0);
    }
    #main-nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    #main-nav ul li a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }
    .nav-cta {
        width: 100%;
    }
    .nav-cta .btn {
        width: 100%;
        justify-content: center;
    }
    #menu-toggle {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .process-steps {
        flex-direction: column;
        align-items: center;
    }
    .step {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    #join-form .form-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    .form-wrapper {
        padding: 1.5rem;
    }
    .contact-info {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand {
        max-width: 100%;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
    .btn-lg {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .stat-num {
        font-size: 1.4rem;
    }
    .container {
        padding: 0 1rem;
    }
    section {
        padding: 60px 0;
    }
}