/* ========================================
   独立命名空间 - 避免与原页面样式冲突
   所有class都以 scroll-nav- 或 scroll-section- 前缀
======================================== */

/* 重置容器内的样式 */
.scroll-nav-page,
.scroll-nav-page * {
    box-sizing: border-box;
}

.scroll-nav-page {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   左侧索引导航
======================================== */
.scroll-nav-sidebar {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
}

.scroll-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.scroll-nav-item {
    margin: 20px 0;
    position: relative;
}

.scroll-nav-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

/* 导航圆点 */
.scroll-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #999;
    background: transparent;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

/* 导航文字 */
.scroll-nav-text {
    margin-left: 15px;
    font-size: 14px;
    font-weight: 500;
    font-family: Arial, 'Microsoft YaHei', sans-serif;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* 激活状态 */
.scroll-nav-item.active .scroll-nav-dot {
    background: #02669c;
    border-color: #02669c;
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(2, 102, 156, 0.2);
}

.scroll-nav-item.active .scroll-nav-text {
    opacity: 1;
    transform: translateX(0);
    color: #02669c;
}

.scroll-nav-item.active .scroll-nav-dot::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 悬浮状态 */
.scroll-nav-item:hover .scroll-nav-dot {
    background: #34b6fd;
    border-color: #34b6fd;
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(52, 182, 253, 0.2);
}

.scroll-nav-item:hover .scroll-nav-text {
    opacity: 1;
    transform: translateX(0);
    color: #34b6fd;
}

/* 连接线 */
.scroll-nav-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 32px;
    width: 2px;
    height: 20px;
    background: #ddd;
    transition: all 0.3s ease;
}

.scroll-nav-item.active:not(:last-child)::before {
    background: rgba(2, 102, 156, 0.3);
}

/* ========================================
   主内容区域
======================================== */
.scroll-nav-main {
    margin: 0;
    padding: 0;
    width: 100%;
}

.scroll-nav-section {
    min-height: 100vh;
    padding: 0;
    position: relative;
    scroll-margin-top: 0;
}

/* ========================================
   顶部横幅样式（左侧淡入）
======================================== */
.scroll-section-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw; /* 使用视口宽度 */
    max-width: 50%;
    height: 80px;
    display: flex;
    align-items: center;
    padding-left: 60px;
    margin: 0; /* 清除任何margin */
    overflow: hidden;
    background: linear-gradient(to right, #02669c, #34b6fd);
    z-index: 999;
    
    /* 左侧淡入效果 */
    opacity: 0;
    animation: scrollNavFadeInLeft 0.8s ease-out forwards;
}

@keyframes scrollNavFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 横幅装饰元素 - 左侧渐变光效 */
.scroll-section-banner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%);
    pointer-events: none;
}

/* 横幅装饰元素 - 右侧三角切角 */
.scroll-section-banner::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 80px 60px 0 0;
    border-color: #f5f5f5 transparent transparent transparent;
}

.scroll-banner-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    font-family: Arial, 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Section内容样式
======================================== */
.scroll-section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 80px 80px 180px;
}

.scroll-section-content h1 {
    font-size: 36px;
    font-family: Arial, 'Microsoft YaHei', sans-serif;
    color: #02669c;
    margin: 0 0 30px 0;
    padding: 0;
    font-weight: 700;
}

.scroll-section-content p {
    font-size: 16px;
    font-family: Arial, 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #666;
    margin: 0 0 20px 0;
    padding: 0;
}

/* 不同section的背景色 */
#scroll-section1 {
    background-color: #fff;
}

#scroll-section2 {
    background-color: #fafafa;
}

#scroll-section3 {
    background-color: #fff;
}

#scroll-section4 {
    background-color: #f7f8f9;
}

#scroll-section5 {
    background-color: #fff;
}

/* section背景色对应的横幅切角颜色 */
#scroll-section1 .scroll-section-banner::after {
    border-color: #fff transparent transparent transparent;
}

#scroll-section2 .scroll-section-banner::after {
    border-color: #fafafa transparent transparent transparent;
}

#scroll-section3 .scroll-section-banner::after {
    border-color: #fff transparent transparent transparent;
}

#scroll-section4 .scroll-section-banner::after {
    border-color: #f7f8f9 transparent transparent transparent;
}

#scroll-section5 .scroll-section-banner::after {
    border-color: #fff transparent transparent transparent;
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 1280px) {
    .scroll-nav-sidebar {
        left: 30px;
    }
    
    .scroll-section-content {
        padding: 40px 60px 60px 150px;
    }
}

@media (max-width: 1024px) {
    .scroll-nav-sidebar {
        left: 20px;
    }
    
    .scroll-section-banner {
        width: 60%;
        padding-left: 40px;
    }
    
    .scroll-banner-title {
        font-size: 24px;
    }
    
    .scroll-section-content {
        padding: 40px 60px 60px 120px;
    }
    
    .scroll-section-content h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .scroll-nav-sidebar {
        left: 15px;
        transform: translateY(-50%) scale(0.9);
    }
    
    .scroll-nav-item {
        margin: 15px 0;
    }
    
    .scroll-nav-dot {
        width: 10px;
        height: 10px;
    }
    
    .scroll-nav-text {
        font-size: 12px;
        margin-left: 12px;
    }
    
    .scroll-section-banner {
        width: 70%;
        height: 60px;
        padding-left: 30px;
    }
    
    .scroll-section-banner::after {
        border-width: 60px 45px 0 0;
    }
    
    .scroll-banner-title {
        font-size: 20px;
    }
    
    .scroll-section-content {
        padding: 30px 40px 50px 80px;
    }
    
    .scroll-section-content h1 {
        font-size: 28px;
    }
    
    .scroll-section-content p {
        font-size: 14px;
    }
}

@media (max-width: 560px) {
    .scroll-nav-sidebar {
        left: 10px;
    }
    
    .scroll-nav-text {
        display: none !important;
        opacity: 0 !important;
    }
    
    .scroll-section-banner {
        width: 85%;
        height: 50px;
        padding-left: 20px;
    }
    
    .scroll-section-banner::after {
        border-width: 50px 35px 0 0;
    }
    
    .scroll-banner-title {
        font-size: 16px;
    }
    
    .scroll-section-content {
        padding: 20px 30px 40px 60px;
    }
    
    .scroll-section-content h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .scroll-section-content p {
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .scroll-nav-sidebar {
        left: 8px;
    }
    
    .scroll-nav-dot {
        width: 9px;
        height: 9px;
    }
    
    .scroll-section-banner {
        width: 90%;
        height: 45px;
        padding-left: 15px;
    }
    
    .scroll-section-banner::after {
        border-width: 45px 30px 0 0;
    }
    
    .scroll-banner-title {
        font-size: 14px;
    }
    
    .scroll-section-content {
        padding: 15px 20px 30px 50px;
    }
    
    .scroll-section-content h1 {
        font-size: 20px;
    }
}

/* ========================================
   滚动平滑效果
======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   可选：自定义滚动条
======================================== */
.scroll-nav-page::-webkit-scrollbar {
    width: 8px;
}

.scroll-nav-page::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scroll-nav-page::-webkit-scrollbar-thumb {
    background: #02669c;
    border-radius: 4px;
}

.scroll-nav-page::-webkit-scrollbar-thumb:hover {
    background: #034d77;
}
section:has(.scroll-section-banner) {
    position: relative !important;
}

/* 如果浏览器不支持:has，使用通用选择器 */
section.section-video-showcase,
section.section-product-showcase,
section.section-products,
section.section-partners,
section.section-news,
section[id^="section-"] {
    position: relative !important;
}

/* 如果浏览器不支持:has */
section.section-video-showcase > .inner,
section.section-product-showcase > .inner,
section.section-products > .inner,
section.section-partners > .inner,
section.section-news > .inner,
}