/* ==================== Hero Carousel ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: #00152a;
}
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: auto;
}
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}
.carousel-slide-link {
    position: absolute;
    inset: 0;
    display: block;
    color: inherit;
    text-decoration: none;
}
/* 默认所有幻灯片在右侧待命 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
/* 当前展示 */
.carousel-slide.active {
    transform: translateX(0);
    z-index: 2;
}
/* 推出到左侧 */
.carousel-slide.leaving {
    transform: translateX(-100%);
    z-index: 2;
}
/* 上一张：从左侧进入 / 向右侧离开 */
.carousel-slide.reset-prev {
    transition: none;
    transform: translateX(-100%);
    z-index: 1;
}
.carousel-slide.leaving-prev {
    transform: translateX(100%);
    z-index: 2;
}
/* 动画完成后隐藏（无动画瞬移） */
.carousel-slide.reset {
    transition: none;
    transform: translateX(100%);
    z-index: 1;
}
/* 首屏就位：不播横向切换，仅播文字入场 */
.carousel-slide.instant-pos {
    transition: none;
    transform: translateX(0);
    z-index: 2;
}
.carousel-slide .media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 6s ease-out;
}
.carousel-slide .media-fill {
    display: none;
}
.carousel-slide.active .media {
    transform: scale(1.15);
}
.carousel-slide.active[data-media-type="video"] .media {
    transform: none;
    transition: none;
}
.carousel-slide.active .media-fill {
    transform: none;
}
.carousel-slide video.media {
    object-fit: cover;
}
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}
.video-play-btn[hidden] {
    display: none;
}
.video-play-btn span {
    display: block;
    width: 0;
    height: 0;
    margin: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 16px solid #fff;
    transform: translateX(2px);
}
.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translate(-50%, -50%) scale(1.06);
}
.video-play-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    max-width: 94%;
    z-index: 3;
    color: var(--white);
    display: flex;
    flex-direction: column;
}
.carousel-slide.is-video-active .hero-content {
    opacity: 0;
    pointer-events: none;
}
.hero-content.is-left {
    align-items: flex-start;
    text-align: left;
}
.hero-content.is-right {
    align-items: flex-end;
    text-align: right;
}
.hero-content.is-right .hero-btns {
    justify-content: flex-end;
}
.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 13px;
    border-radius: 16px;
    margin-bottom: 24px;
    letter-spacing: 2px;
}
.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: 2px;
}
.hero-title span {
    color: var(--accent);
}
.hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.8;
}
.hero-btns {
    display: flex;
    gap: 16px;
}
/* 文字入场：从左/右缓缓飘入 */
.hero-anim {
    opacity: 0;
    will-change: transform, opacity;
    transition:
        opacity 1.2s ease,
        transform 1.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-content.is-left .hero-anim {
    transform: translateX(-72px);
}
.hero-content.is-right .hero-anim {
    transform: translateX(72px);
}
.carousel-slide.active .hero-anim {
    opacity: 1;
    transform: translateX(0);
}
.carousel-slide.active .hero-anim:nth-child(1) {
    transition-delay: 0.28s;
}
.carousel-slide.active .hero-anim:nth-child(2) {
    transition-delay: 0.48s;
}
.carousel-slide.active .hero-anim:nth-child(3) {
    transition-delay: 0.68s;
}
.carousel-slide.active .hero-anim:nth-child(4) {
    transition-delay: 0.88s;
}
.carousel-slide.leaving .hero-anim {
    opacity: 0;
    transition-delay: 0s;
    transition-duration: 0.45s;
}
.carousel-slide.leaving .hero-content.is-left .hero-anim {
    transform: translateX(-40px);
}
.carousel-slide.leaving .hero-content.is-right .hero-anim {
    transform: translateX(40px);
}
.carousel-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}
.carousel.is-video-active .carousel-dots {
    opacity: 0;
    pointer-events: none;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition);
}
.carousel-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

/* ==================== Product ==================== */
.product {
    padding: 80px 0;
    background: var(--bg-gray);
}
.product-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.product-tab {
    padding: 8px 22px;
    border: 1px solid #1d78bd;
    background: var(--white);
    color: #1d78bd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}
.product-tab:hover,
.product-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    width: 100%;
    max-width: 360px;
    height: 412px;
    margin: 0 auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 10px;
    padding: 18px 18px 28px 18px;
    transition: var(--transition);
    border: 2px solid #f5f5f5;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0px 9px 28px 4px rgba(0, 0, 0, 0.1);
    border: 3px solid #1d78bd;
}
.product-card .img-wrap {
    height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 6px;
    background: #f8fafc;
}
.product-card img {
    max-height: 100%;
    transition: var(--transition);
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card .more {
    margin-top: auto;
    font-size: 13px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.product-card .more i {
    transition: var(--transition);
}
.product-card:hover .more i {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .product-card .img-wrap {
        height: 270px;
    }
}

/* ==================== News ==================== */
.news {
    padding: 80px 0;
    background: var(--white);
}
.news-wrap {
    display: grid;
    grid-template-columns: 1fr 668px;
    gap: 24px;
    align-items: stretch;
}
.news-feature {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    height: 100%;
    min-height: calc(139px * 3 + 8px * 2);
}
.news-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-feature .label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.news-item {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 139px;
    box-sizing: border-box;
    padding: 12px 28px;
    background: #f8f8f8;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}
.news-item:hover,
.news-item.active {
    background: #1d78bd;
}
.news-date {
    position: relative;
    flex-shrink: 0;
    width: 90px;
    padding-right: 20px;
    margin-right: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.news-date::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 116px;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
}
.news-item:hover .news-date::after,
.news-item.active .news-date::after {
    border-color: #ffffff;
}
.news-date .day {
    font-size: 32px;
    font-weight: 700;
    color: #1d78bd;
    line-height: 1;
    transition: var(--transition);
}
.news-date .ym {
    font-size: 12px;
    color: #1d78bd;
    margin-top: 6px;
    transition: var(--transition);
}
.news-body {
    flex: 1;
    min-width: 0;
}
.news-body h4 {
    font-size: 15px;
    color: #1d78bd;
    margin-bottom: 8px;
    font-weight: 600;
    transition: var(--transition);
}
.news-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}
.news-item:hover .news-date .day,
.news-item.active .news-date .day,
.news-item:hover .news-date .ym,
.news-item.active .news-date .ym,
.news-item:hover .news-body h4,
.news-item.active .news-body h4,
.news-item:hover .news-body p,
.news-item.active .news-body p {
    color: #ffffff;
}

/* ==================== Stats ==================== */
.stats {
    padding: 60px 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: var(--white);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stats-item .num {
    width: 190px;
    margin: 0 auto 26px;
    font-family: MiSans, "Microsoft YaHei", sans-serif;
    font-weight: bold;
    font-size: 48px;
    color: #ffffff;
    line-height: 1;
    white-space: nowrap;
}
.stats-item .num span {
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}
.stats-item .label {
    width: 124px;
    margin: 0 auto;
    font-family: "Alibaba PuHuiTi 3.0", "Microsoft YaHei", sans-serif;
    font-weight: normal;
    font-size: 21px;
    color: #fefefe;
    line-height: 1;
    white-space: nowrap;
}
