/* ============================================================
 *  首页交互/动画样式（仿车与家官网风格）
 *  仅作视觉与交互增强，不改变页面信息结构
 * ============================================================ */

/* —— 基础动画关键帧 —— */
@keyframes chyFadeUp {
    from { opacity: 0; transform: translate3d(0, 40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes chyFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes chyFadeLeft {
    from { opacity: 0; transform: translate3d(-40px, 0, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes chyFadeRight {
    from { opacity: 0; transform: translate3d(40px, 0, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes chyKenBurns {
    0%   { transform: scale(1)    translate(0, 0); }
    50%  { transform: scale(1.08) translate(-1%, -1%); }
    100% { transform: scale(1)    translate(0, 0); }
}

@keyframes chyPulse {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(1.05); opacity: 0.9; }
}

/* —— 通用滚动触发：默认隐藏，加 .is-visible 后入场 —— */
.chy-reveal {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.chy-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.chy-reveal-left  { transform: translate3d(-40px, 0, 0); }
.chy-reveal-right { transform: translate3d(40px, 0, 0);  }
.chy-reveal-zoom  { transform: scale(0.92); }
.chy-reveal-left.is-visible,
.chy-reveal-right.is-visible,
.chy-reveal-zoom.is-visible {
    transform: translate3d(0, 0, 0) scale(1);
}

/* 阶梯延迟：让多元素错峰入场 */
.chy-delay-1 { transition-delay: 0.10s; }
.chy-delay-2 { transition-delay: 0.20s; }
.chy-delay-3 { transition-delay: 0.30s; }
.chy-delay-4 { transition-delay: 0.40s; }
.chy-delay-5 { transition-delay: 0.50s; }
.chy-delay-6 { transition-delay: 0.60s; }

/* ============================================================
 *  Hero 首屏
 * ============================================================ */
.hero,
.hero1,
.hero2,
.hero3,
.hero4 {
    position: relative;
    overflow: hidden;
}

.hero .hero-content {
    animation: chyFadeUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Ken Burns 缓慢呼吸缩放——给 hero1 主屏背景 */
.hero1 .hero-content1 {
    animation: chyKenBurns 18s ease-in-out infinite;
    transform-origin: center center;
}

/* PC 端用视频代替背景图，关掉容器 Ken Burns，避免视频跟着缩 */
@media (min-width: 769px) {
    .hero1 .hero-content1 {
        animation: none;
    }
    .hero1 .hero1-video {
        /* animation: chyKenBurns 24s ease-in-out infinite; */
        transform-origin: center center;
    }
    /* 视频左侧标题覆盖层：左滑淡入（独立关键帧，不破坏 translateY(-50%) 居中） */
    .hero1 .hero1-overlay {
        animation: chyOverlayFadeLeft 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

@keyframes chyOverlayFadeLeft {
    from { opacity: 0; transform: translateY(-50%) translateX(-40px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0);     }
}

/* hero1 内文：标题/段落/数据块依次入场 */
.hero1 h1   { animation: chyFadeUp 0.9s 0.20s cubic-bezier(0.22,1,0.36,1) both; }
.hero1 > .hero-content1 > .hero1-inner > p { animation: chyFadeUp 0.9s 0.35s cubic-bezier(0.22,1,0.36,1) both; }

.hero1-btns > div {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.hero1-btns.is-visible > div { opacity: 1; transform: translate3d(0, 0, 0); }
.hero1-btns.is-visible > div:nth-child(1) { transition-delay: 0.05s; }
.hero1-btns.is-visible > div:nth-child(2) { transition-delay: 0.15s; }
.hero1-btns.is-visible > div:nth-child(3) { transition-delay: 0.25s; }
.hero1-btns.is-visible > div:nth-child(4) { transition-delay: 0.35s; }
.hero1-btns.is-visible > div:nth-child(5) { transition-delay: 0.45s; }
.hero1-btns.is-visible > div:nth-child(6) { transition-delay: 0.55s; }

.hero1-btns > div {
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1),
                background-color 0.3s ease;
    border-radius: 8px;
    padding: 10px 6px;
}
.hero1-btns > div:hover {
    transform: translate3d(0, -4px, 0) !important;
    background-color: rgba(255,255,255,0.08);
}

.hero1-btns span {
    transition: color 0.3s ease, transform 0.3s ease;
}
.hero1-btns > div:hover span {
    color: var(--primary, #f5c244);
}
/* PC 端用视频代替背景图，关掉容器 Ken Burns，避免视频跟着缩 */
@media (max-width: 769px) {
    .hero1-btns > div {
        border-radius: 0;
        padding: 30px 6px;
    }
    /* 移动端禁用 hover 上浮和颜色变化 */
    .hero1-btns > div:hover {
        transform: none !important;
        background-color: transparent;
    }
    .hero1-btns > div:hover span {
        color: #fff;
    }
}
/* hero2 数据：错峰入场 + 悬浮 */
.hero2-btns > div {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
    border-radius: 8px;
    padding: 8px;
}
.hero2-btns.is-visible > div { opacity: 1; transform: translate3d(0, 0, 0); }
.hero2-btns.is-visible > div:nth-child(1) { transition-delay: 0.05s; }
.hero2-btns.is-visible > div:nth-child(2) { transition-delay: 0.15s; }
.hero2-btns.is-visible > div:nth-child(3) { transition-delay: 0.25s; }
.hero2-btns.is-visible > div:nth-child(4) { transition-delay: 0.35s; }
.hero2-btns.is-visible > div:nth-child(5) { transition-delay: 0.45s; }

.hero2-btns > div:hover {
    transform: translate3d(0, -4px, 0) !important;
    background-color: rgba(0,0,0,0.04);
}

.hero2-btns span {
    transition: transform 0.3s ease;
    display: inline-block;
}
.hero2-btns > div:hover span {
    transform: scale(1.08);
}

/* 移动端禁用 hero2-btns hover 上浮和颜色变化 */
@media (max-width: 769px) {
    .hero2-btns > div:hover {
        transform: none !important;
        background-color: transparent;
    }
    .hero2-btns > div:hover span {
        transform: none;
    }
}

/* hero3 多块图：分别缩放入场 */
.hero3 .hero-content3,
.hero3 .hero-content4,
.hero3 .hero-content5 {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1s cubic-bezier(0.22,1,0.36,1),
                transform 1s cubic-bezier(0.22,1,0.36,1);
}
.hero3 .hero-content3.is-visible,
.hero3 .hero-content4.is-visible,
.hero3 .hero-content5.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* hero4 */
.hero4 .hero4-content {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 1s cubic-bezier(0.22,1,0.36,1),
                transform 1s cubic-bezier(0.22,1,0.36,1);
}
.hero4 .hero4-content.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ============================================================
 *  成功案例 Banner
 * ============================================================ */
.section .section-header {
    margin: 0 auto;
}
.section .section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.section .section-header h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--primary, #f5c244);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.8s cubic-bezier(0.22,1,0.36,1);
}
.section .section-header.is-visible h2::after {
    width: 48px;
}

.banner-card {
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.banner-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.16);
    transform: translateY(-4px);
}

/* 让 banner 在切换时淡入 */
.banner-content {
    overflow: hidden;
}
.banner-item {
    display: flex !important;          /* 始终参与布局 */
    background: #fff;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0; left: 0; right: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.banner-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
}

.banner-img {
    overflow: hidden;
}
.banner-img,
.banner-item.active .banner-img {
    transition: transform 0.6s ease;
}
.banner-item.active:hover .banner-img {
    transform: scale(1.04);
}

.banner-text h3 {
    transition: color 0.3s ease;
}
.banner-item.active:hover .banner-text h3 {
    color: var(--primary, #f5c244);
}

.banner-arrow {
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.banner-arrow:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(245,194,68,0.4);
}
.banner-arrow:active {
    transform: scale(0.95);
}

/* ============================================================
 *  导航栏滚动效果
 * ============================================================ */
.navbar {
    transition: background-color 0.35s ease,
                box-shadow 0.35s ease,
                padding 0.35s ease;
}
.navbar.is-scrolled {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.nav-links a {
    position: relative;
}
.nav-links > li > a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary, #f5c244);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}
.nav-links > li > a:hover::after {
    width: 80%;
}

.logo img {
    transition: transform 0.4s ease;
}
.logo:hover img {
    transform: scale(1.08) rotate(-2deg);
}

/* 下拉菜单淡入 */
.nav-dropdown .dropdown-menu {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.nav-dropdown .dropdown-menu.is-show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
 *  返回顶部按钮
 * ============================================================ */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease;
    z-index: 9999;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary, #f5c244);
    transform: translateY(-4px);
}
.back-to-top img {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}
.back-to-top:hover img {
    transform: translateY(-2px);
}

/* ============================================================
 *  数字计数器（用脚本插入实际值，CSS 仅做基础呈现）
 * ============================================================ */
[data-count] {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* ============================================================
 *  动效降级：当用户系统启用「减少动效」
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
 *  其它内页通用增强
 *  - 关于我们 / 加盟合作 / 服务支持 / 售后服务 / 新闻 / 详情
 * ============================================================ */

/* —— 通用：图片悬停柔放大 —— */
.company-banner img,
.news-banner img,
.banner img,
.service-banner img,
.staff-imgs img {
    transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), filter 0.6s ease;
    will-change: transform;
}
.company-banner img.is-visible,
.news-banner img.is-visible,
.banner img.is-visible,
.service-banner img.is-visible {
    animation: chyFadeIn 1s cubic-bezier(0.22,1,0.36,1) both;
}
.staff-imgs:hover img {
    transform: scale(1.02);
}

/* —— 通用模块标题：金色下划线展开 —— */
.module-title,
.market-title,
.store-title,
.form-title,
.honor-title {
    position: relative;
    display: inline-block;
}
.chy-reveal.module-title.is-visible::after,
.chy-reveal.market-title.is-visible::after,
.chy-reveal.store-title.is-visible::after,
.chy-reveal.form-title.is-visible::after,
.chy-reveal.honor-title.is-visible::after {
    width: 40px;
}
.chy-reveal.module-title::after,
.chy-reveal.market-title::after,
.chy-reveal.store-title::after,
.chy-reveal.form-title::after,
.chy-reveal.honor-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 3px;
    background: #ff8c00;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.8s 0.2s cubic-bezier(0.22,1,0.36,1);
}

/* ============================================================
 *  关于我们：企业历程 时间轴动画
 * ============================================================ */
.history-item {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.history-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.history-item::before {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.history-item.is-visible::before {
    animation: chyPulse 2s ease-in-out 0.5s 1;
    box-shadow: 0 0 0 4px rgba(255,140,0,0.18);
}
.history-year {
    transition: color 0.3s ease, transform 0.3s ease;
}
.history-item:hover .history-year {
    transform: translateX(4px);
}
.history-more {
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.history-more:hover {
    color: #ff8c00;
    letter-spacing: 1px;
}

/* 公司荣誉：进入视口时整体淡入 */
.company-honor {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ============================================================
 *  加盟合作：市场分析卡片
 * ============================================================ */
.market-item {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.market-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.market-item:hover {
    box-shadow: 0 8px 24px rgba(255,146,72,0.18);
    transform: translate3d(0, -4px, 0);
}
.market-item-icon img {
    transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.market-item:hover .market-item-icon img {
    transform: scale(1.08) rotate(-3deg);
}
.market-item-content p span {
    transition: color 0.3s ease;
}
.market-item:hover .market-item-content p span {
    color: #ff6b1f;
}

/* 优势板块背景视差感（轻量） */
.advantage-section,
.advantage-section1 {
    transition: background-position 0.6s ease;
}

/* 门店展示 */
.store-section {
    overflow: hidden;
}
.store-slide {
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.store-slide img {
    transition: transform 0.5s ease, box-shadow 0.3s ease;
}
.store-slide img:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
    z-index: 1;
}
.store-dot {
    transition: width 0.3s ease, background 0.3s ease;
}
.store-dot.active {
    background: #ff8c00;
}

/* 加盟表单 */
.form-section {
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.form-item {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
                transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.form-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.form-item input {
    /* transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; */
}
.form-item input:focus {
    border-color: #ff8c00 !important;
    box-shadow: none;
    outline: none;
}
.form-btn {
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(51, 51, 51, 0.35);
}
.form-btn:active {
    transform: translateY(0);
}
.radio-label {
    /* transition: color 0.3s ease; */
}
.radio-label:hover {
    color: #ff8c00;
}

/* ============================================================
 *  售后 / 服务支持
 * ============================================================ */
.service-banner img,
.company-banner img {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1),
                transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.service-banner img.is-visible,
.company-banner img.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ============================================================
 *  新闻资讯
 * ============================================================ */
.news-item {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
                transform 0.6s cubic-bezier(0.22,1,0.36,1),
                background 0.3s ease,
                box-shadow 0.3s ease;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
}
.news-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.news-item:hover {
    background: #fafafa;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translate3d(0, -2px, 0);
}
.news-item .news-title {
    transition: color 0.3s ease;
}
.news-item:hover .news-title {
    color: #ff8c00;
}
.news-item img {
    transition: transform 0.5s ease;
}
.news-multi-img:hover .news-imgs img,
.news-single-img:hover .news-img {
    transform: scale(1.03);
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.pagination-btn:hover {
    background: #ff8c00;
    color: #fff;
    transform: scale(1.08);
}

/* ============================================================
 *  详情页
 * ============================================================ */
.detail-panel {
    opacity: 1;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1),
                transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.detail-panel.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.detail-title {
    opacity: 1;
    transform: translate3d(0, 10px, 0);
    animation: chyFadeUp 0.9s 0.15s cubic-bezier(0.22,1,0.36,1) both;
}
.detail-meta {
    opacity: 1;
    animation: chyFadeIn 0.9s 0.35s ease both;
}
.rich-content {
    opacity: 1;
    transform: translate3d(0, 16px, 0);
    animation: chyFadeUp 0.9s 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.rich-content img {
    transition: transform 0.5s ease, box-shadow 0.3s ease;
    border-radius: 6px;
}
.rich-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ============================================================
 *  图片查看器：进入动画
 * ============================================================ */
.image-viewer.active {
    animation: chyFadeIn 0.3s ease both;
}
.image-viewer.active img {
    animation: chyZoomIn 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes chyZoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1);    }
}
