/* Sections */
.banner,
#solutions,
#support,
#news,
#about {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    width: 100%;
}

#support,
#about {
    background-color: var(--trae-bg);
}
#news {
    background-color: #fff;
}

/* Ensure container inside section aligns content correctly */
.section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* height: 100%; Optional: depending on if we want to stretch */
}

/* Specific Section Styles */

.banner {
    background: linear-gradient(135deg, var(--trae-dark) 0%, #003399 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    /* margin-top: 80px; */
}
.text-accent {
    /* font-size: 3.8rem; */
    color: var(--accent-orange);
}

#canvas__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* 位于背景之上，内容之下 */
    pointer-events: none;
    /* 允许点击穿透，不影响上方按钮交互 */
}

.banner-content {
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.banner-content p {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 40px;
}

.banner-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-primary {
    background: var(--accent-orange);
    color: white;
    padding: 16px 40px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.1);
}

.btn-secondary {
    border: 1.5px solid white;
    color: white;
    padding: 16px 40px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-secondary:hover {
    transform: scale(1.2);
}

/* --- 通用标题 --- */
/* section { padding: 100px 5%; } */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--trae-dark);
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
}

.section-header p {
    color: var(--text-sub);
    font-size: 1.1rem;
}

.section-header h2::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-orange);
    /* margin: 20px auto; */
}

/* --- 核心解决方案展示区（优化版） --- */
#solutions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    /* background-color: var(--trae-bg); */
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.solution-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 40px;
    border: 1px solid var(--trae-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 卡片装饰效果 */
.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-orange);
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 26, 65, 0.08);
    border-color: var(--accent-orange);
}

.solution-card:hover::before {
    width: 8px;
}

.solution-icon {
    font-size: 40px;
    color: var(--accent-orange);
    margin-bottom: 20px;
    display: block;
}

.solution-title {
    color: var(--trae-dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.solution-desc {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- 服务支持区 --- */
.support-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.support-card {
    padding: 40px 20px;
    text-align: center;
    border: 1px solid var(--trae-border);
    border-radius: 8px;
    transition: var(--transition);
    background: #fff;
}

.support-card i {
    font-size: 40px;
    color: var(--trae-dark);
    margin-bottom: 20px;
}

.support-card:hover {
    background: #eef4ff;
    transform: translateY(-5px);
    border-color: var(--trae-dark);
}

/* --- 新闻中心 --- */
.news-container {
    display: flex;
    gap: 40px;
    width: 100%;
}

.news-main {
    flex: 1;
    /* 修改为占满宽度 */
}

/* 优化新闻列表样式 */
.news-list {
    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    padding: 20px;
    transition: var(--transition);
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--trae-border);
    cursor: pointer;
}

.news-item:hover {
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.news-img {
    width: 100%;
    height: 200px;
    background: #ddd;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-info h4 {
    color: var(--trae-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-info p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-date {
    color: var(--accent-orange);
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    display: block;
    padding-top: 8px;
}

/* --- 关于我们 --- */
#about {
    background: var(--trae-bg);
    justify-content: space-between;
    /* Allow footer to stick to bottom */
    padding-bottom: 0;
}

.about-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    position: relative;
}

.about-text {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    color: var(--text-sub);
    font-size: 1.1rem;
}

.advantage-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 60px;
}

.adv-item {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--trae-border);
}

/* --- About Footer (Positioning only for Index) --- */
.about-footer {
    position: absolute;
    bottom: 0;
}


/* =========================================
   FullPage & Side Nav Styles
   ========================================= */

html {
    overflow: hidden;
    height: 100%;
    scroll-behavior: auto !important;
    /* 禁用原生平滑滚动，防止与 FullPage 冲突 */
}

body {
    overflow: hidden;
    /* 禁用原生滚动 */
    height: 100vh;
    scroll-behavior: auto !important;
}

#fullpage-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.section,
#footer-section {
    height: 100vh;
    min-height: 100vh;
    /* 保持原有的 flex 布局 */
}

/* Side Navigation */
#side-nav {
    position: fixed;
    right: 30px;
    /* Changed to right side */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#side-nav li {
    margin: 20px 0;
    cursor: pointer;
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#side-nav li span {
    display: block;
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

#side-nav li.active span {
    background: var(--accent-orange);
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
}

#side-nav li:hover span {
    background: var(--accent-orange-hover);
}

/* Tooltip on hover (Optional) */
#side-nav li::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 30px;
    /* Position to the left of the dot */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

#side-nav li:hover::after {
    opacity: 1;
}

/* Footer Section specific */
#footer-section {
    background: #f0f0f0;
    /* Slight difference to distinguish */
    /* Adjust alignment if needed */
    justify-content: center;
}


/* =========================================
   手机自适应样式 (Responsive)
   ========================================= */
@media (max-width: 768px) {

    /* Disable fullpage on mobile? Usually better to allow normal scroll */
    body {
        overflow: auto;
    }

    #fullpage-wrapper {
        height: auto;
        transform: none !important;
        transition: none;
    }

    .banner,
    #solutions,
    #support,
    #news,
    #about,
    #footer-section {
        height: auto;
        min-height: 100vh;
        /* Ensure at least full screen */
        padding: 80px 3%;
    }

    #side-nav {
        display: none;
        /* Hide side nav on mobile */
    }

    .banner-content h1 {
        font-size: 2.2rem;
    }

    .banner-content p {
        font-size: 1.1rem;
    }

    .banner-btns {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 30px;
        width: 100%;
    }

    /* section {
        padding: 60px 20px;
    } */

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* 解决方案响应式调整 */
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .solution-card {
        padding: 30px 20px;
    }

    .support-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .news-container {
        flex-direction: column;
        gap: 30px;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 100%;
        min-width: 0; /* 防止 grid item 被内容撑开 */
        overflow: hidden; /* 防止溢出 */
    }

    .news-img {
        width: 100%;
        max-width: 100%;
        height: 180px;
    }

    .news-info h4 {
        font-size: 0.9rem;
    }

    .advantage-grid {
        flex-direction: column;
        gap: 15px;
    }

    /* 移动端重置 About Footer 定位 */
    .about-footer {
        position: static;
        width: 100%;
        margin-top: 40px;
        /* 与上方内容保持间距 */
    }

    /* 移动端恢复 padding-bottom，因为 footer 不再绝对定位覆盖底部 */
    #about {
        padding-bottom: 0;
        /* 可以保持 0，因为 footer 已经是流式布局 */
        justify-content: flex-start;
        /* 移动端改为顶部对齐，自然排列 */
    }

    /* 确保 about-content-wrapper 在移动端不强制撑满高度 */
    .about-content-wrapper {
        display: block;
        flex: none;
    }
}

/* 针对超小屏幕优化 */
@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 1.8rem;
    }
}