/* --- 基本重置和容器样式 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin: 0; padding: 0; box-sizing: border-box; background-color: #f8f8f8;
}
*, *::before, *::after { box-sizing: inherit; }

.tpm-hero2 {
    position: relative; width: 100%;
    overflow: visible;
    padding-bottom: 20px;
}

/* --- 主要轮播区域 --- */
.tpm-hero2__main {
    position: relative;
    width: 100%; max-width: 1920px; margin: 0 auto;
    height: 500px; background-color: #f0f2f5;
    overflow: hidden; /* <<< Crucial for slide effect */
    margin-bottom: 0;
    cursor: grab;
}
.tpm-hero2__main.is-grabbing {
    cursor: grabbing;
}

/* --- List Styles for Fade Effect (Modified) --- */
.tpm-hero2__list {
     list-style: none; padding: 0; margin: 0;
     position: relative; width: 100%; height: 100%;
     display: block;
     /* transition: transform 0.6s ease-in-out;  <-- Removed for fade */
}
/* --- Item Styles for Fade Effect (Modified) --- */
.tpm-hero2__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; height: 100%;
    z-index: 1; background-color: #ccc; /* Fallback */
    contain: layout style paint;
    overflow: hidden; /* Hide content overflow during animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
}

.tpm-hero2__item.is-active {
    opacity: 1;
    z-index: 2;
    visibility: visible;
}

.tpm-hero2__item-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; position: relative; }
.tpm-hero2__item-bg-wrap {
    position: absolute; /* Changed from default to ensure video positioning works */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Keep below content */
    overflow: hidden; /* Hide anything spilling out */
}
.tpm-hero2__item-bg {
     width: 100%; height: 100%;
     background-size: cover;
     background-position: center center;
     background-repeat: no-repeat;
     position: absolute; /* Ensure it fills the wrap if it's a div */
     top: 0; left: 0;
}

/* --- Video Background Styles --- */
.tpm-hero2__item-bg--video {
    position: absolute; /* Position within the wrap */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Make video cover the area, cropping if needed */
    z-index: 1; /* Ensure it's behind the content */
    background-color: #ccc; /* Optional: Fallback background color */
}

/* Optional: If you ever mix video and image divs in the same wrap, hide the non-video one */
.tpm-hero2__item[data-bg-type="video"] .tpm-hero2__item-bg:not(.tpm-hero2__item-bg--video) {
    display: none;
}

/* --- Content Positioning & Entry Animation --- */
.tpm-hero2__item-content {
    position: absolute; bottom: 90px; left: 100px; z-index: 3; max-width: 45%; padding-right: 50px; color: #111;
}
.tpm-hero2__item-tag,
.tpm-hero2__item-title,
.tpm-hero2__item-desc,
.tpm-hero2__item-btns {
    /* Initial state for animation */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
/* Animation delay for staggered effect */
.tpm-hero2__item.is-active .tpm-hero2__item-tag {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}
.tpm-hero2__item.is-active .tpm-hero2__item-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}
.tpm-hero2__item.is-active .tpm-hero2__item-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}
.tpm-hero2__item.is-active .tpm-hero2__item-btns {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}
/* Base styles */
.tpm-hero2__item-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #cc4f4f;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 2px;
    margin-bottom: 15px;
    line-height: 1.2;
}
.tpm-hero2__item-title { font-size: 36px; margin: 0 0 18px 0; font-weight: bold; }
.tpm-hero2__item-desc { font-size: 18px; margin: 0 0 30px 0; line-height: 1.7; color: #333; }
.tpm-hero2__item-btns { margin-top: 30px; }
.tpm-btn { display: inline-block; padding: 14px 35px; font-size: 18px; cursor: pointer; border: none; border-radius: 4px; text-align: center; transition: background-color 0.3s ease; }
.tpm-btn--primary { background-color: #0052D9; color: #fff; }
.tpm-btn--primary:hover { background-color: #003CAB; }

/* --- 左侧导航栏 --- */
.tpm-hero2__ctrl {
    position: absolute;
    top: 50%;
    left: 100px;
    transform: translateY(-50%);
    z-index: 10;
    width: 240px;
    background-color: transparent;
    padding: 15px 0; /* 父容器的上下内边距 */
}

.tpm-hero2__ctrl-list {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%; /* 确保列表填满容器 */
    /* MODIFIED: 白色分隔线宽度调整为2px */
    border-right: 2px solid #ffffff;
}

.tpm-hero2__ctrl-item-line {
    position: absolute;
    /* MODIFIED: 调整 right 值以使2px蓝色线覆盖2px白色线 */
    right: -2px;
    top: 0; /* JS会动态更新此值 */
    width: 2px; /* 蓝色线宽度保持2px */
    background-color: #0052D9;
    border-radius: 1px 0 0 1px; /* 圆角适应2px宽度 */
    transition: top 0.3s ease-in-out, height 0.3s ease-in-out; /* 过渡效果保持 */
    z-index: 3; /* 线条在最上层 */
}

.tpm-hero2__ctrl-item {
    position: relative; /* 为::before伪元素定位和堆叠上下文 */
    cursor: pointer;
    padding: 14px 20px 14px 20px;
    color: #555;
    font-size: 15px;
    transition: color 0.2s ease; /* 仅文字颜色过渡 */
    z-index: 2; /* 导航项在蓝色线条之下，但为其伪元素提供堆叠上下文 */
    display: block;
    line-height: 1.5;
    border-radius: 4px; /* 导航项圆角 */
    background-color: transparent; /* 导航项本身背景透明 */
    overflow: hidden; /* 防止::before溢出（保险措施） */
}

.tpm-hero2__ctrl-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
        to right, /* 渐变方向 */
        rgba(255, 255, 255, 0) 0%,       /* 左侧完全透明 */
        rgba(255, 255, 255, 0.1) 25%,  /* 射线淡入效果 */
        rgba(255, 255, 255, 0.65) 60%, /* 主要高亮颜色和透明度 */
        rgba(255, 255, 255, 0.65) 100% /* 右侧边缘高亮颜色 */
    );
    background-repeat: no-repeat;
    border-radius: inherit; /* 继承父元素的圆角 */
    opacity: 0; /* 初始隐藏 */
    transition: opacity 0.3s ease-in-out; /* 平滑的淡入淡出动画 */
    z-index: -1; /* 背景在文字内容之下 */
}

.tpm-hero2__ctrl-item:hover {
    color: #0052D9;
}

.tpm-hero2__ctrl-item.is-active {
    color: #333;
    font-weight: 600;
}

.tpm-hero2__ctrl-item.is-active::before {
    opacity: 1; /* 激活时显示背景 */
}

.tpm-hero2__ctrl-item-tit {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.tpm-hero2__ctrl-item-tag {
    background-color: #cc4f4f;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 2px;
    margin-right: 8px;
    line-height: 1.1;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.tpm-hero2__ctrl-item-tittext {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
    display: block;
}

/* --- Pagination Indicators --- */
.tpm-hero2__pagination {
    display: none; /* Hidden by default, shown in mobile */
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 5;
    padding: 5px 0;
    line-height: 0;
}
.tpm-hero2__pagination-dot {
    display: inline-block;
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
     vertical-align: middle;
}
.tpm-hero2__pagination-dot.is-active {
    background-color: #0052D9;
}
.tpm-hero2__pagination-dot:active {
    transform: scale(0.9);
}

/* --- 底部入口区块容器样式 --- */
.tpm-hero2__entries-wrap {
    margin-top: -60px; position: relative; z-index: 15; padding: 0 20px;
    max-width: 1600px; margin-left: auto; margin-right: auto;
}
.tpm-hero2__entries-inner {
    display: flex; justify-content: space-around; padding: 0;
    flex-wrap: nowrap; /* Removed gap: 30px */
}

/* --- ========== 响应式调整 ========== --- */
 @media (max-width: 1200px) {
     .tpm-hero2__entries-wrap { max-width: 95%; }
     /* Removed inner/entry overrides */
 }

 @media (max-width: 1024px) {
     .tpm-hero2__ctrl { display: none; } /* Hide side controls */
     .tpm-hero2__item-content { left: 50px; max-width: 65%; bottom: 70px; }
     .tpm-hero2__item-title { font-size: 30px; }
     .tpm-hero2__item-desc { font-size: 16px; }
     .tpm-hero2__entries-wrap { margin-top: -50px; max-width: 90%; }
     /* Removed inner/entry overrides */
 }

/* --- 移动端优化 --- */
@media (max-width: 768px) {
    .tpm-hero2__main {
         height: 460px;
         margin-bottom: 0;
    }
    .tpm-hero2__item-content {
        bottom: 100px;
        left: 15px; right: 15px; max-width: calc(100% - 30px); width: auto; padding-right: 0;
        text-align: center;
    }
    .tpm-hero2__item-title { font-size: 22px; margin-bottom: 10px; }
    .tpm-hero2__item-desc { font-size: 14px; margin-bottom: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
    .tpm-hero2__item-btns { display: none; } /* Hide buttons on mobile */

    .tpm-hero2__pagination {
        display: block; /* Show pagination on mobile */
        bottom: 55px;
    }
    /* Removed entries/inner/entry overrides - new CSS handles them */
}

@media (max-width: 480px) {
    .tpm-hero2__main {
        height: 420px;
    }
     .tpm-hero2__item-content {
         bottom: 95px;
     }
     .tpm-hero2__item-title { font-size: 20px; }
     .tpm-hero2__item-desc { font-size: 13px; -webkit-line-clamp: 1;} /* Show only 1 line */

    .tpm-hero2__pagination {
         display: block;
         bottom: 50px;
     }
     /* Removed entries overrides */
}

/* --- OPTIMIZED ENTRY STYLES --- */
.tpm-hero2__entry {
    display: block;
    margin-right: 20px;
    background-image: linear-gradient(0deg, #fff, #f3f5f8);
    border: 2px solid #fff;
    box-shadow: 8px 8px 20px 0 rgba(55, 99, 170, .1);
    border-radius: 4px;
    box-sizing: border-box;
    -ms-flex: 1;
    flex: 1;
    width: 1px;
    max-width: none;
    height: auto;
    padding: 18px;
    position: relative;
    pointer-events: auto
}

@media screen and (min-width:769px) {
    .tpm-hero2__entry {
        transition: box-shadow .3s ease-in-out
    }
}

.tpm-hero2__entry:last-child {
    margin-right: 0
}

.tpm-hero2__entry-title {
    margin-bottom: 4px;
    font-size: 18px;
    font-weight: 500;
    color: #181818;
    line-height: 26px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* ADDED: To make icon and title sit on same line in Desktop */
    display: inline-block;
}

@media screen and (min-width:769px) {
    .tpm-hero2__entry-title {
        transition: color .3s ease-in-out
    }
}

.tpm-hero2__entry-icon {
    display: inline-block;
    vertical-align: -5.5px;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: contain;
    margin-right: 12px
}

.tpm-hero2__entry-desc {
    max-height: 44px;
    line-height: 22px;
    font-size: 14px;
    color: #4b5b76;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2
}

.tpm-hero2__entry-mobile {
    display: none
}

.tpm-hero2__entry:hover {
    box-shadow: 8px 8px 20px 0 rgba(55, 99, 170, .2)
}

.tpm-hero2__entry:hover .tpm-hero2__entry-title {
    color: #0052d9
}

.tpm-hero2--with-3d .tpm-hero2__entry,
.tpm-hero2--with-3d .tpm-hero2__entry:hover {
    box-shadow: 8px 8px 20px 0 rgba(55, 99, 170, .1)
}

@media screen and (min-width:1440px) {
    .tpm-view-l .tpm-hero2__entries-wrap {
        padding-left: 40px;
        padding-right: 40px
    }

    .tpm-view-l .tpm-hero2__entries-inner {
        max-width: 1420px
    }

    .tpm-view-l .tpm-hero2__entry-desc {
        -webkit-line-clamp: 1
    }
}

@media screen and (max-width:1200px) {
    .tpm-hero2__entries-inner {
        -ms-flex-pack: center;
        justify-content: center
    }

    .tpm-hero2__entry {
        -ms-flex: 1;
        flex: 1;
        max-width: none
    }
}

@media screen and (max-width:768px) {
    .tpm-hero2__entries-wrap {
        padding: 0;
        margin-top: -45px;
        pointer-events: auto
    }

    .tpm-hero2__entries-inner {
        padding: 0 16px;
        -ms-flex-pack: center;
        justify-content: center
    }

    .tpm-hero2__entry {
        margin-right: 8px;
        padding: 12px 8px 8px;
        height: auto;
        min-height: 68px;
        -ms-flex: 1;
        flex: 1;
        width: 1px;
        text-align: center
    }

    .tpm-hero2__entry:last-child {
        margin-right: 0
    }

    .tpm-hero2__entry-icon {
        margin-bottom: 4px
    }

    .tpm-hero2__entry-title {
        display: none;
        margin-bottom: 0;
        font-size: 14px;
        line-height: 20px
    }

    .tpm-hero2__entry-desc {
        display: none
    }

    .tpm-hero2__entry-mobile,
    .tpm-hero2__entry-mobile .tpm-hero2__entry-title {
        display: block
    }

    .tpm-hero2__entry-icon {
        display: block;
        margin: 0 auto 4px
    }

    .tpm-hero2__entries--with-media .tpm-hero2__entry:nth-child(3) {
        margin-right: 0
    }
}

@media screen and (max-width:600px) {
    .tpm-hero2__entries-inner {
        -ms-flex-pack: start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .tpm-hero2__entry {
        display: flex;
        align-items: center;
        -ms-flex: none;
        flex: none;
        margin-bottom: 8px;
        padding: 10px 12px;
        min-height: auto;
        width: calc(50% - 4px);
        text-align: left
    }

    .tpm-hero2__entry:nth-child(n+5) {
        display: flex
    }

    .tpm-hero2__entry:nth-child(2n) {
        margin-right: 0
    }

    .tpm-hero2__entry-title {
        line-height: 24px
    }
    
    .tpm-hero2__entry-mobile {
        flex: 1;
    }

    .tpm-hero2__entry-icon {
        display: block;
        margin: 0 8px 0 0;
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .tpm-hero2__entries--with-media .tpm-hero2__entry {
        margin-bottom: 0
    }
}

/* 隐藏左侧导航栏（电脑端） */
@media screen and (min-width: 1025px) {
    .tpm-hero2__ctrl {
        display: none !important;
    }
}

/* 轮播图切换箭头样式 */
.tpm-hero2__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0; /* 默认隐藏，鼠标悬停时显示 */
}

.tpm-hero2__main:hover .tpm-hero2__arrow {
    opacity: 1;
}

.tpm-hero2__arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.tpm-hero2__arrow--prev {
    left: 20px;
}

.tpm-hero2__arrow--next {
    right: 20px;
}

.tpm-hero2__arrow::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.tpm-hero2__arrow--prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.tpm-hero2__arrow--next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* 移动端隐藏箭头，使用滑动 */
@media screen and (max-width: 600px) {
    .tpm-hero2__arrow {
        display: none;
    }
}
