/* ============================================================
   首页样式 - home.css  (现代化改版)
   ============================================================ */

:root {
    --primary: #4f46e5;
    --primary-2: #7c3aed;
    --accent: #06b6d4;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --line: #e2e8f0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(79, 70, 229, .18);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
}

/* ---------- 导航 ---------- */
.navbar {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: .75rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background .35s, padding .35s;
}
.navbar.scrolled {
    background: rgba(15, 23, 42, .96);
    padding: .5rem 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    letter-spacing: .5px;
}
.logo-icon {
    color: #c7d2fe;
    flex: 0 0 auto;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}
.nav-menu a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .98rem;
    font-weight: 500;
    padding: .4rem 0;
    position: relative;
    transition: color .3s;
}
.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width .3s;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 主视觉 / 轮播 ---------- */
.hero {
    position: relative;
    /* 与「联系我们」页头 .page-header 高度保持一致（内边距 7rem+3.5rem 撑出约 300-320px） */
    height: clamp(300px, 38vh, 340px);
    margin-top: 0;
    overflow: hidden;
    background: var(--ink);
}
.hero-carousel {
    position: absolute;
    inset: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
    transform: scale(1.04);
}
.hero-slide.active {
    opacity: 1;
    animation: kenburns 7s ease-out forwards;
}
.hero-slide.gradient-fallback {
    background: var(--gradient);
    opacity: 1;
}
.hero-slide-link {
    position: absolute;
    inset: 0;
    display: block;
}
@keyframes kenburns {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .55) 0%, rgba(15, 23, 42, .35) 50%, rgba(15, 23, 42, .6) 100%);
}
.hero-content {
    max-width: 820px;
    color: #fff;
    height:140px;
    animation: floatUp 1s ease both;
}
.hero-badge {
    display: inline-block;
    padding: .4rem 1rem;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 999px;
    font-size: .85rem;
    letter-spacing: 2px;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(4px);
}
.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}
.hero-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: .92;
    margin-bottom: 2rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .45;
    z-index: 1;
    pointer-events: none;
}
.blob-1 {
    width: 320px; height: 320px;
    background: var(--accent);
    top: -80px; left: -60px;
    animation: blobMove 9s ease-in-out infinite;
}
.blob-2 {
    width: 280px; height: 280px;
    background: #f0abfc;
    bottom: -90px; right: -40px;
    animation: blobMove 11s ease-in-out infinite reverse;
}
@keyframes blobMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 40px); }
}
@keyframes floatUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .3s, transform .3s;
}
.hero-arrow:hover { background: rgba(255, 255, 255, .35); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.hero-dots .dot {
    width: 10px; height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    border: 0;
    cursor: pointer;
    transition: width .3s, background .3s;
}
.hero-dots .dot.active {
    width: 26px;
    background: #fff;
}

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .8rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, background .25s, color .25s;
    border: 2px solid transparent;
}
.btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}
.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, .15);
    transform: translateY(-3px);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}
.btn-lg { padding: 1rem 2.4rem; font-size: 1.05rem; }

/* ---------- 核心数据 ---------- */
.stats {
    background: var(--bg-soft);
    padding: 3.2rem 20px;
}
.stats-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.stat-item {
    text-align: center;
    padding: 1.2rem;
}
.stat-icon {
    width: 60px; height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--gradient);
    box-shadow: var(--shadow-lg);
}
.stat-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    color: var(--muted);
    margin-top: .4rem;
    font-size: .95rem;
}

/* ---------- 区块标题 ---------- */
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem;
}
.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: .8rem;
    margin-bottom: .8rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--ink);
    font-weight: 800;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: "";
    display: block;
    width: 56px; height: 4px;
    border-radius: 4px;
    background: var(--gradient);
    margin: .9rem auto 0;
}
.section-sub {
    color: var(--muted);
    margin-top: 1rem;
    font-size: 1.02rem;
}

/* ---------- 服务区 ---------- */
.services-section {
    padding: 5rem 0;
    background: #fff;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.service-card {
    background: #fff;
    padding: 2.2rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .35s, box-shadow .35s, border-color .35s;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-soft);
    color: var(--primary);
    margin-bottom: 1.2rem;
    transition: transform .4s, background .4s, color .4s;
}
.service-icon svg { width: 32px; height: 32px; }
.service-card:hover .service-icon {
    background: var(--gradient);
    color: #fff;
    transform: rotate(-6deg) scale(1.05);
}
.service-card h3 {
    color: var(--ink);
    margin-bottom: .7rem;
    font-size: 1.25rem;
}
.service-card p {
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.service-link {
    color: var(--primary);
    font-weight: 600;
    font-size: .95rem;
    transition: letter-spacing .3s;
}
.service-card:hover .service-link { letter-spacing: 1px; }

/* ---------- 为什么选择我们 ---------- */
.features {
    padding: 5rem 0;
    background: var(--bg-soft);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.feature-card {
    background: #fff;
    padding: 2rem 1.6rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .3s;
}
.feature-card:hover { transform: translateY(-6px); }
.feature-icon {
    width: 68px; height: 68px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--gradient);
    transition: transform .4s;
}
.feature-card:hover .feature-icon { transform: scale(1.08) rotate(6deg); }
.feature-card h3 { color: var(--ink); margin-bottom: .6rem; }
.feature-card p { color: var(--muted); font-size: .94rem; line-height: 1.7; }

/* ---------- 新闻区 ---------- */
.news-section {
    padding: 5rem 0;
    background: #fff;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.news-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .35s, box-shadow .35s;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.news-body { padding: 1.6rem; }
.news-tag {
    display: inline-block;
    background: var(--gradient-soft);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .8rem;
    border-radius: 999px;
    margin-bottom: .9rem;
}
.news-card h3 {
    margin-bottom: .7rem;
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.5;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: .8rem;
}
.news-summary {
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: letter-spacing .3s;
}
.news-card:hover .read-more { letter-spacing: 1px; }
.news-more { text-align: center; margin-top: 2.6rem; }

.empty-tip {
    color: var(--muted);
    text-align: center;
    width: 100%;
    padding: 2rem;
}

/* ---------- CTA ---------- */
.cta {
    padding: 4.5rem 20px;
    background: var(--gradient);
    color: #fff;
}
.cta-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.cta-inner h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 1rem;
}
.cta-inner p {
    opacity: .9;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}
.cta .btn-primary {
    background: #fff;
    color: var(--primary);
}

/* ---------- 页脚增强 ---------- */
.footer-section h3.footer-h3-gap { margin-top: 1.4rem; }
.footer-brand p { color: #cbd5e1; font-size: .92rem; line-height: 1.7; margin-top: .6rem; }
.footer-social { margin-top: 1.2rem; display: flex; gap: .6rem; }
.social-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    cursor: pointer;
    transition: background .3s, transform .3s;
}
.social-dot:hover { background: var(--accent); transform: translateY(-3px); }

/* 页脚微信二维码缩略图（hover/聚焦放大展开） */
.footer-qr {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .45rem .7rem .45rem .45rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    cursor: pointer;
    transition: background .3s, border-color .3s, transform .35s;
}
.footer-qr:hover,
.footer-qr:focus {
    background: rgba(255, 255, 255, .12);
    border-color: #22c55e;
    transform: translateY(-2px);
    outline: none;
}
.footer-qr-img {
    width: 80px; height: 80px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    transition: transform .35s ease;
}
.footer-qr:hover .footer-qr-img,
.footer-qr:focus .footer-qr-img {
    transform: scale(1.08) rotate(-3deg);
}
.footer-qr-text { display: flex; flex-direction: column; line-height: 1.35; }
.footer-qr-text strong { color: #fff; font-size: .9rem; }
.footer-qr-text span { color: rgba(255, 255, 255, .65); font-size: .78rem; }

/* 触屏/聚焦后浮起放大版 QR（footer 区域紧凑，不适合弹窗；用户已可点击联系页大图） */
@media (max-width: 600px) {
    .footer-qr { padding: .4rem .55rem .4rem .4rem; gap: .6rem; }
    .footer-qr-img { width: 48px; height: 48px; }
    .footer-qr-text span { font-size: .72rem; }
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
    opacity: 1;
    transform: none;
}
/* 网格内错落入场 */
.services-grid .reveal:nth-child(2),
.features-grid .reveal:nth-child(2),
.news-grid .reveal:nth-child(2) { transition-delay: .08s; }
.services-grid .reveal:nth-child(3),
.features-grid .reveal:nth-child(3),
.news-grid .reveal:nth-child(3) { transition-delay: .16s; }
.services-grid .reveal:nth-child(4),
.features-grid .reveal:nth-child(4),
.news-grid .reveal:nth-child(4) { transition-delay: .24s; }
.services-grid .reveal:nth-child(5),
.news-grid .reveal:nth-child(5) { transition-delay: .32s; }
.services-grid .reveal:nth-child(6),
.news-grid .reveal:nth-child(6) { transition-delay: .4s; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(15, 23, 42, .98);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease, padding .35s ease;
    }
    .nav-menu.open { max-height: 320px; padding: .5rem 0; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-menu a { display: block; padding: .9rem 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .hero-arrow { display: none; }
    .services-section,
    .features,
    .news-section { padding: 3.2rem 0; }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
}
