/**
 * ================================================================
 *  layout.css — 极简现代风格布局（结合精美动画）
 * ================================================================
 */

/* ==== 1. 设计Token ==== */
:root {
    --primary: #008800;
    --primary-dark: #006600;
    --primary-light: #e6f5e6;
    --accent: #FF9955;
    --accent-dark: #E68A3D;
    --accent-light: #FFF3E8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --border: #e5e5e5;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 8px;
}

/* ==== 2. 站点头部（毛玻璃导航）==== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    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.06);
    transition: all 0.3s ease;
    overflow: visible;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    transition: height 0.3s ease;
    overflow: visible;
}

.site-header.scrolled .container {
    height: 60px;
}

.logo img {
    height: 52px;
    transition: height 0.3s ease;
}

.site-header.scrolled .logo img {
    height: 46px;
}

/* ==== 3. 主导航 ==== */
.main-nav ul {
    display: flex;
    gap: 36px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* 导航下划线动画 */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

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

/* 导航按钮（橙色预约按钮） */
.nav-btn {
    background: var(--accent) !important;
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 100px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.nav-btn::after {
    display: none !important;
}

.nav-btn:hover {
    background: var(--accent-dark) !important;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(255, 153, 85, 0.4);
}

/* 头部联系电话 */
.header-contact .phone {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-contact .phone:hover {
    opacity: 0.8;
}

/* ==== 4. Hero 横幅区 ==== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero .tagline {
    font-size: 17px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 28px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.hero-stat .stat-text {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-content {
    flex: 1;
    max-width: 560px;
    color: white;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero .tagline {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Hero浮动图形动画 */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::before {
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    top: -50px;
    right: 10%;
    animation-delay: 0s;
}

.hero::after {
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    bottom: -30px;
    left: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ==== 5. 按钮样式 ==== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 153, 85, 0.4);
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

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

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 8px;
}

.btn-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.btn-link:hover {
    gap: 10px;
}

/* ==== 6. 数据亮点条（信任条）==== */
.trust-bar {
    background: var(--primary-light);
    padding: 48px 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.trust-item {
    text-align: center;
    padding: 24px;
}

.trust-number {
    font-size: 42px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.trust-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==== 7. 核心服务区 ==== */
.core-services {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.service-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary);
    transform: scale(1.05);
}

.service-icon svg {
    width: 36px;
    height: 36px;
    fill: var(--primary);
    transition: fill 0.3s ease;
}

.service-card:hover .service-icon svg {
    fill: white;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

/* ==== 8. 为什么选择我们（深色背景）==== */
.why-us {
    padding: 100px 0;
    background: var(--primary);
    color: white;
}

.why-us .section-header h2 {
    color: white;
}

.why-us .section-header p {
    color: rgba(255, 255, 255, 0.8);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.advantage-item {
    text-align: center;
    padding: 32px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.advantage-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.advantage-item:hover .advantage-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.advantage-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.advantage-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.advantage-item p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

/* ==== 9. 社区精选区 ==== */
.community-preview {
    padding: 100px 0;
    background: var(--bg-light);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.community-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.community-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.community-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ==== 10. CTA横幅 ==== */
.cta-section {
    padding: 100px 0;
    background: var(--accent);
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn {
    background: white;
    color: var(--accent);
}

.cta-section .btn:hover {
    background: var(--text-primary);
    color: white;
}

/* ==== 11. 页脚 ==== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: #888;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-column p {
    color: #888;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* ==== 12. 响应式 ==== */
@media (max-width: 768px) {
    .site-header .container {
        height: 50px;
        overflow: visible !important;
    }

    .site-header {
        overflow: visible !important;
    }

    .logo img {
        height: 38px !important;
    }

    .main-nav {
        display: flex;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 24px;
        z-index: 999;
        overflow-y: visible;
        flex-direction: column;
        max-height: calc(100vh - 50px);
        transform: translateY(-10%);
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.3s ease;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
        font-size: 16px;
    }

    .main-nav a::after {
        display: none;
    }

    .header-contact {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 28px;
        height: 28px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* 菜单遮罩层 */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 998;
        pointer-events: none;
        transition: background 0.35s ease;
    }

    .menu-overlay.active {
        background: rgba(0, 0, 0, 0.5);
        pointer-events: auto;
    }

    .hero {
        padding: 40px 0 50px;
    }

    .hero .container {
        flex-direction: column;
        gap: 32px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero .tagline {
        font-size: 15px;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats {
        justify-content: center;
        gap: 24px;
    }

    .hero-stat .stat-num {
        font-size: 20px;
    }

    .trust-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .trust-number {
        font-size: 28px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero .tagline {
        font-size: 16px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 28px;
    }
}
