/* ============================================================
   首页样式 - 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;
    /*
     * 高度改由 .hero-overlay 的内容撑开（原先写死 clamp(300px,38vh,340px)）。
     * 原因：导航 .navbar 是 position:fixed 不占流，而 hero 从 y=0 开始；
     * 内容在 0~300px 区间内垂直居中，实际内容约 310px 已溢出，
     * 顶部（badge + h1 首行）正好落进导航覆盖区被遮挡。
     * 现在 overlay 顶部预留导航高度 + 用 min-height 兜底，内容不再与导航重叠。
     */
    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，高度靠 .hero 写死的 height 决定，
     * 内容一多就会向上溢出、被 fixed 导航压住。改为相对定位参与文档流：
     * 由内容 + 上下 padding 撑开 hero 高度，min-height 只做兜底。
     * 顶部 padding 需大于导航高度（.navbar 约 70px），给 badge 与标题留出安全距离。
     */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 104px 20px 3.75rem;
    min-height: clamp(420px, 54vh, 510px);
    /*
     * 顶部加深到 .72：导航栏是 rgba(15,23,42,.55) 半透明，叠在较亮的轮播图上时
     * 分界线含糊、左右明暗还不一致。让 hero 顶部本身就是深色，导航与首屏自然衔接。
     */
    background: linear-gradient(180deg, rgba(15, 23, 42, .74) 0%, rgba(15, 23, 42, .34) 46%, rgba(15, 23, 42, .62) 100%);
}
.hero-content {
    max-width: 880px;
    color: #fff;
    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(1.9rem, 5vw, 3.4rem);
    line-height: 1.26;
    font-weight: 800;
    letter-spacing: .01em;
    margin-bottom: 1.15rem;
    /* 兜底：文案不含分隔符、单行放不下时，让浏览器均衡分配两行长度，避免末行只剩一两个字 */
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
/* 按「·」拆分后的每一行单独成行；行间靠 line-height 控制，不再额外加间距 */
.hero-title-line {
    display: block;
}
.hero-content p {
    /* 字号与限宽按"整句一行放下"标定：文案 39 字，1.55vw≈16.7px 时约 650px。
       限宽过窄会把"…税务等 / 服务。"断成末行 3 字，比一行更难读。 */
    font-size: clamp(.98rem, 1.55vw, 1.1rem);
    line-height: 1.75;
    opacity: .9;
    max-width: 720px;
    margin: 0 auto 1.85rem;
    /* 窄屏只能折两行时，让浏览器把两行长度分匀，避免断在"财 / 务"这类词中间 */
    text-wrap: balance;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
/*
 * 装饰光斑：只做氛围，不能抢戏。
 * 原来 blob-1 定位在 top:-80px left:-60px，正好压在导航栏左侧，
 * 半透明导航透出青色，左半青右半紫，顶部色带被割裂 —— 这是首屏"别扭"的主因之一。
 * 现在两个光斑都下移到内容区两侧、避开导航与文字，并降低不透明度 + 加大模糊。
 */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .28;
    z-index: 1;
    pointer-events: none;
}
.blob-1 {
    width: 380px; height: 380px;
    background: var(--accent);
    top: 34%; left: -170px;
    animation: blobMove 9s ease-in-out infinite;
}
.blob-2 {
    width: 320px; height: 320px;
    background: #f0abfc;
    bottom: -140px; right: -110px;
    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); }
/*
 * 箭头跟随内容块而不是死贴视口边缘：超宽屏下 left:20px 会把箭头甩到离标题很远的角落，
 * 显得孤立。内容块 max-width:880px，其左边缘在 calc(50% - 440px)，
 * 这里再外移 70px（箭头 46px + 24px 间隙），使箭头与文字边缘保持恒定距离。
 */
.hero-arrow.prev { left: max(20px, calc(50% - 510px)); }
.hero-arrow.next { right: max(20px, calc(50% - 510px)); }
.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;
    /* 窄屏下 max-width 失效、容器又是左右 0 padding，副标题会贴到屏幕边缘 */
    padding: 0 20px;
}
/*
 * eyebrow 与 section-title 原来都是 inline-block，两个行内块会并排挤在同一行，
 * 结果「OUR SERVICES」和「我们的服务」横向靠在一起、基线还错位，很难看。
 * 统一改成块级独占一行。
 */
.eyebrow {
    display: block;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: .8rem;
    margin-bottom: .7rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--ink);
    font-weight: 800;
    position: relative;
    display: 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;
    line-height: 1.7;
    text-wrap: balance;
}

/* ---------- 服务区 ---------- */
.services-section {
    padding: 5rem 0;
    background: #fff;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* 行高统一：不同行卡片内容多少不一，默认按各自行内容算高，两行高度会明显差一截 */
    grid-auto-rows: 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;
    /* 列向弹性：卡片被 grid 拉成等高后，让「了解更多」靠 margin-top:auto 统一贴底，
       否则描述行数不同的卡片（3 行 vs 2 行）链接会高低错落，一排看过去很散。 */
    display: flex;
    flex-direction: column;
}
.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;
    /* 贴底对齐；align-self 防止 flex 拉伸成整行宽的点击区 */
    margin-top: auto;
    align-self: flex-start;
}
.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));
    grid-auto-rows: 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;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.news-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.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;
    /* 标题最多两行，并固定占两行高度：否则一行标题的卡片会让日期/摘要整体上移，
       同一行卡片的内容层次全部错位。 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.45rem;
}
.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;
    /* 贴底对齐，让同一行卡片的「阅读更多」落在同一水平线 */
    margin-top: auto;
    align-self: flex-start;
}
.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; }
    /* 窄屏 h1 常换 3 行、按钮会换行，内容更高；顶部仍需让开 fixed 导航 */
    .hero-overlay { padding: 92px 16px 2.75rem; min-height: 380px; }
    /* 移动端收字号：按「·」拆行后每行最长 10 字，此尺寸可稳定单行放下 */
    .hero-content h1 { font-size: clamp(1.55rem, 6.4vw, 2.1rem); line-height: 1.3; }
    .hero-content p { max-width: 100%; font-size: 1rem; line-height: 1.7; }
    .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; }
}
