/* ═══════════════════════════════════════════════════════════════════
   custom.css — 原创自定义样式（配合 tailwind.css + main.js）
   仅包含 Tailwind v2 预编译版无法内联的样式
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 基础重置 & 全局排版 ─── */
html { scroll-behavior: smooth; }
dl, dt, dd, ol, ul, li { margin: 0; padding: 0; }
:active, :focus { outline: none !important; }
::selection { background: #1abc9c; color: #fff; text-shadow: none; }

body {
    line-height: 1.5;
    color: #444;
    font-family: PingFangSC, "Microsoft Yahei", Helvetica, Tahoma, Arial,
                 "Hiragino Sans GB", "Hiragino Sans GB W3",
                 STXihei, STHeiti, Heiti, SimSun, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a   { text-decoration: none; color: #1abc9c; }
a:hover { color: #222; }
img { max-width: 100%; height: auto; }

/* 标题 — 匹配原版 */
h1, h2, h3, h4, h5, h6 {
    color: #444;
    font-weight: 500;
    line-height: 1.5;
}
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; margin: 0 0 5px; }
h5 { font-size: 14px; margin: 0 0 10px; }
h6 { font-size: 12px; margin: 0 0 10px; }

/* 段落间距 — 匹配原版 */
p { margin-bottom: 30px; }

/* ─── 灰色区块背景色修正 ───
   原版 .section { background-color: #f5f5f5 }
   Tailwind bg-gray-100 默认为 #f7fafc 或 #f3f4f6，不等于 #f5f5f5
   强制修正以精确匹配 ─── */
.bg-gray-100 { background-color: #f5f5f5 !important; }

/* ─── .site-box 响应式容器（替代 Bootstrap .container） ─── */
.site-box {
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    width: 100%;
}
@media (min-width: 768px)  { .site-box { max-width: 750px; } }
@media (min-width: 992px)  { .site-box { max-width: 970px; } }
@media (min-width: 1200px) { .site-box { max-width: 1170px; } }

/* ─── #app-root 页面加载过渡 ─── */
#app-root {
    opacity: 0;
    transition: opacity 0.4s ease;
}
#app-root.is-loaded {
    opacity: 1;
}
/* CSS 安全回退: 如果 JS 完全失败，8s 后自动显示页面 */
@keyframes forceShow {
    to { opacity: 1; }
}
#app-root {
    animation: forceShow 0s ease 8s forwards;
}

/* ─── 页面加载器动画 ─── */
#page-loader {
    gap: 6px;
}
.loader-dot {
    width: 18px;
    height: 18px;
    background-color: #ddd;
    border-radius: 50%;
    display: inline-block;
    animation: dotBounce 1.4s ease-in-out infinite both;
}
.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   Tailwind lg: 断点修正
   Tailwind lg = 1024px，原版 Bootstrap = 992px
   在 992-1023px 之间强制匹配原版桌面布局
   ═══════════════════════════════════════════════ */
@media (min-width: 992px) and (max-width: 1023px) {
    .hidden.lg\:block { display: block !important; }
    .lg\:hidden       { display: none  !important; }
    .lg\:w-1\/4       { width: 25%     !important; }
}

/* ═══════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════ */
.hd-h { height: 100px; }
.brand-img { max-height: 100px; }

/* 默认: 非 Hero 页 — 白底深色文字 */
#site-hd {
    background-color: #fff;
    border-bottom: none;
    z-index: 199;
    transition: background-color 0.4s ease,
                border-bottom 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.4s ease;
}
/* Header 内部元素过渡 */
.hd-h       { transition: height 0.4s ease; }
.brand-img  { transition: max-height 0.4s ease; }
.nav-lk     { transition: color 0.25s, padding 0.4s ease; }

/* Hero 页: 透明头部 */
.has-hero #site-hd {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: transparent;
    border-bottom: none;
}

/* 导航链接 — 匹配原版 #primary-menu ul li > a */
.nav-lk {
    color: #444;
    padding: 39px 15px;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 20px;
}
.nav-lk:hover { color: #1abc9c; }

/* Hero 页桌面端 — 白色导航 */
@media (min-width: 992px) {
    .has-hero #site-hd:not(.is-pinned) .nav-lk { color: #fff; }
    .has-hero #site-hd:not(.is-pinned) .nav-lk:hover { color: rgba(255,255,255,0.7); }
}

/* Sticky / 固定头部 — 带滑入动画 */
#site-hd.is-pinned {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    background-color: #fff !important;
    border-bottom: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 199;
    animation: slideDown 0.35s ease-out both;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
#site-hd.is-pinned .hd-h { height: 60px; }
#site-hd.is-pinned .brand-img { max-height: 60px; }
#site-hd.is-pinned .nav-lk {
    color: #444;
    padding: 19px 15px;
}
#site-hd.is-pinned .nav-lk:hover { color: #1abc9c; }

/* ─── Mobile header (≤991px) — 匹配原版 responsive.min.css ─── */
@media (max-width: 991px) {
    /* 移动端 Hero 页头部：叠在 Banner 上方，避免与内容分离 */
    .has-hero #site-hd {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: transparent;
        border-bottom: none;
    }
    /* 非 Hero 页移动端头部保持原版深色背景 #2a302e */
    #app-root:not(.has-hero) #site-hd {
        position: relative;
        background: #2a302e !important;
    }
    #app-root:not(.has-hero) #nav-trigger {
        color: #fff;
    }

    /* 非 Hero 页移动端头部去边框 */
    #site-hd:not(.is-pinned) {
        border-bottom: none;
    }

    .hd-h { height: auto; min-height: 60px; }
    .brand-img { max-height: 60px; width: 130px; }

    /* 移动端不启用 sticky fixed，保持 position: relative */
    #site-hd.is-pinned {
        position: relative !important;
        animation: none !important;
        box-shadow: none !important;
    }

    /* 汉堡按钮颜色 — 默认深色（非 Hero 页白底头部） */
    #nav-trigger { color: #444; font-size: 22px; }
    /* Hero 页: 深色头部白色按钮 */
    .has-hero #nav-trigger { color: #fff; }

    /* 移动端导航覆盖层 — 匹配原版 overlay-menu */
    #nav-menu > ul {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 299;
        background: rgba(0,0,0,0.92);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 0;
        padding-top: 30%;
    }
    #nav-menu > ul.is-open {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }
    /* 匹配原版 overlay-menu 链接样式 */
    #nav-menu > ul.is-open .nav-lk {
        font-size: 18px;
        padding: 25px 15px;
        color: #fff;
        letter-spacing: 2px;
        text-transform: none;
    }

    /* 关闭按钮 — 匹配原版 #overlay-menu-close 定位 */
    #nav-closer {
        position: fixed;
        top: 3px;
        right: 1px;
        width: 48px;
        height: 48px;
        line-height: 48px;
        text-align: center;
        z-index: 300;
        font-size: 24px;
    }

    /* 移动端 logo — 匹配原版 retina-logo */
    #brand a { height: 60px; }
}

/* ═══════════════════════════════════════════════
   Hero Banner
   ═══════════════════════════════════════════════ */
.hero-h { height: 500px; }
.hero-pad { padding-top: 210px; }

/* 轮播暗色蒙版 — 保证白色文字可读 */
.swiper-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
/* 轮播文字层浮于蒙版之上 */
.swiper-slide .site-box {
    position: relative;
    z-index: 2;
}
/* 分页点容器 */
.swiper-container .swiper-pagination {
    z-index: 5;
    bottom: 20px;
}

/* 轮播标题 — 匹配原版 .slider-caption.slider-caption-center h2 */
.hero-pad h2 {
    font-size: 38px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: normal;
    line-height: 1;
    margin-bottom: 0;
    color: #fff;
}
/* 轮播描述 — 匹配原版 .slider-caption p */
.hero-pad p {
    font-size: 16px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

/* 轮播文字入场动画 */
.swiper-slide-active .hero-pad h2,
.swiper-slide-active .hero-pad p {
    animation: captionFadeUp 0.8s ease-out both;
}
.swiper-slide-active .hero-pad p {
    animation-delay: 0.2s;
}
@keyframes captionFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
    .hero-h { height: 420px !important; }
    .hero-pad { padding-top: 120px; }
    .hero-pad h2 { font-size: 22px !important; }
    .hero-pad p {
        margin-bottom: 0;
        margin-top: 20px;
        font-size: 14px;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* 移动端 slider-caption 居中定位 — 匹配原版 */
    .hero-pad {
        position: relative;
        max-width: 800px;
        text-align: center;
        margin: 0 auto;
        left: 0;
        right: 0;
    }
}

/* ═══════════════════════════════════════════════
   内容区块
   ═══════════════════════════════════════════════ */
.sec-pad   { padding: 70px 0; }
.feat-pad  { padding-top: 120px; padding-bottom: 120px; }
.feat-top  { padding-top: 100px; }
.feat-left { padding-left: 60px; }

/* 区块标题 — 匹配原版 .heading-block */
.sec-title {
    margin-bottom: 60px;
    text-align: center;
}
.sec-title h2 {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444;
}

/* 介绍区域标题 — 匹配原版 .intro h2 */
.feat-top h2,
.feat-left h2 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 16px;
}
/* 介绍区域段落 — 匹配原版 .intro p { color: #666 } */
.feat-top p,
.feat-left p {
    font-size: 16px;
    color: #666;
}

/* 移动端介绍区域 — 匹配原版 responsive.min.css */
.mob-intro { padding: 0; text-align: center; }
.mob-intro h3 { font-size: 18px; margin: 0 0 20px; }
.mob-intro h5 {
    font-size: 12px;
    color: #999;
    margin-bottom: 30px;
    text-align: left;
}

/* 业务范围图片 */
.scope-img {
    width: 220px;
    border-radius: 3px;
}

/* 内容段落 */
#page-body p {
    line-height: 1.8;
    word-break: break-word;
}

@media (max-width: 991px) {
    .sec-pad   { padding: 40px 0 50px; }
    .feat-pad  { padding: 40px 0; }
    .feat-top  { padding-top: 10px; }
    .feat-left { padding-left: 0; }
    .site-box  { padding-left: 20px; padding-right: 20px; }

    /* 移动端 section h2 — 匹配原版 */
    .sec-title h2 { font-size: 22px; margin: 0 0 20px; }
    .sec-title { margin-bottom: 30px; }

    .feat-top h2,
    .feat-left h2 {
        font-size: 18px !important;
    }
    .feat-top p,
    .feat-left p {
        font-size: 14px;
    }

    /* 移动端 .qr-section .intro h5 匹配原版 */
    .mob-intro h5 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ═══════════════════════════════════════════════
   Footer — 匹配原版 dark footer 色彩
   原版 footer#footer.dark，dark.min.css 层叠:
   #footer.dark { background-color:#333; color:#CCC; border-top-color:rgba(0,0,0,0.2) }
   .dark a:hover { color: #EEE }
   ═══════════════════════════════════════════════ */
#site-ft {
    color: #CCC;
    border-top: 5px solid rgba(0,0,0,0.2);
}
#site-ft a      { color: #CCC; }
#site-ft a:hover { color: #999; }

/* 版权区域 — 原版 dark.min.css:
   .dark #copyrights { background-color: rgba(0,0,0,0.2); color: rgba(255,255,255,0.25) }
   style.min.css #copyrights { padding: 20px 0; font-size: 14px; line-height: 1.8 } */
#ft-copy {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.25);
}
#ft-copy a      { color: rgba(255,255,255,0.25); }
#ft-copy a:hover { color: rgba(255,255,255,0.35); }

@media (max-width: 991px) {
    #ft-copy { font-size: 12px; }
}

/* ─── 回到顶部 ─── */
#go-top {
    z-index: 299;
    background-color: rgba(0,0,0,0.3);
    display: none;             /* 初始隐藏，由 JS 控制显示 */
}
#go-top:hover { background-color: #e8452f; }

/* ─── 在线客服 ─── */
#cs-widget {
    z-index: 9999;
    display: none;             /* 初始隐藏，由 JS 控制显示 */
}

.cs-trigger {
    width: 36px;
    height: 120px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    background: url(../img/online_kf2.jpg) no-repeat;
    background-size: 36px;
    border: none;
    cursor: pointer;
}
.cs-arrow {
    display: block;
    width: 13px;
    height: 16px;
    background: url(../img/online_kf_arrow.png) no-repeat;
    position: absolute;
    right: -13px;
    top: 26px;
}

/* cs-panel 初始隐藏，由 JS toggleCS 控制 */
#cs-panel {
    display: none;
}

@media (max-width: 991px) {
    #cs-widget { margin-top: -50px; }
    #cs-panel  { top: -30px; }
    .cs-trigger {
        background: url(../img/online_kf2@2x.jpg) no-repeat;
        background-size: 36px;
    }
}

/* ─── Swiper 分页点 — 匹配原版 .swiper-pagination span ─── */
.swiper-pagination-bullet {
    display: inline-block;
    cursor: pointer;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.swiper-pagination-bullet:hover,
.swiper-pagination-bullet-active {
    background-color: #fff !important;
}

/* ─── 文章页 ─── */
.art-wrap { padding: 0; }
.art-wrap h1 {
    font-size: 36px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.5;
    color: #444;
}
.art-meta {
    padding-bottom: 20px;
    margin-bottom: 0;
    font-size: 14px;
    color: #777;
}
.art-meta .art-gap { margin-left: 12px; }
.art-body { padding-top: 0; }
.art-body img { max-width: 100%; height: auto; }
