/* ========== 品牌合作伙伴展示样式 - 暗色沉浸式 ========== */
.brands-section {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0; /* 与页脚无缝衔接，消除灰色空隙 */
}

.brands-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 标题由内联样式控制，此处仅保留类名兼容 */
.brands-title::after { display: none; }

/* 标题中的名字高亮 - 蓝色 */
.brands-name-highlight {
    color: #e2e8f0;
}

/* 标题中的Ai高亮 - 红色 */
.brands-ai-highlight {
    color: #F44336;
}

/* 副标题由内联样式控制 */
/* 高亮色由内联样式控制 */

/* 品牌轮播 - 全宽容器（铺满整个视口宽度） */
.brands-carousel-fullwidth {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 1;
}

/* 品牌轮播容器 */
.brands-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 36px;
    min-height: 300px;
}

/* 品牌轮播轨道 */
.brands-carousel-track {
    display: flex;
    width: max-content;
    animation: brands-scroll 40s linear infinite;
    padding: 14px 0;
    gap: 18px;
}

.brands-carousel-track:hover {
    animation-play-state: paused;
}

/* 第一行 */
.brands-row-1 {
    margin-bottom: 22px;
}

/* 第二行 - 反向滚动；悬停同样暂停 */
.brands-row-2 {
    margin-bottom: 22px;
    animation-direction: reverse;
}

/* 第三行 */
.brands-row-3 {
    animation: brands-scroll 35s linear infinite;
}

@keyframes brands-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 品牌项链接：固定槽位，保证横滑节奏一致 */
.brand-item-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 158px;
    width: 158px;
    height: 52px;
    outline: none;
}

.brand-item-link:hover {
    text-decoration: none;
}

.brand-item-link:focus {
    outline: none;
}

/* 品牌项：统一宽高，直接展示 icon */
.brand-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 158px;
    height: 52px;
    background: transparent !important;
    border-radius: 0;
    padding: 0;
    box-shadow: none !important;
    border: none !important;
    outline: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 158px;
    cursor: pointer;
    box-sizing: border-box;
}

.brand-item:hover,
.brand-item-link:hover .brand-item {
    transform: translateY(-3px);
    box-shadow: none !important;
}

/* 暂无图的文字品牌：同样占满统一槽位 */
.brand-text-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a !important;
    background: transparent !important;
    border-radius: 0;
    transition: transform 0.3s ease;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
    border: none;
    outline: none;
    white-space: nowrap;
}

.brand-item:hover .brand-text-logo {
    transform: scale(1.04);
}

.brand-item--logo {
    background: transparent !important;
    border: none !important;
    padding: 2px 4px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: none !important;
}

/* 仅 Kimi：白字 logo 需要深底 */
.brand-item--logo-dark {
    background: #0a0a0a !important;
    border: none !important;
    border-radius: 8px;
    padding: 6px 10px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: none !important;
}

/* 所有 logo 压进同一显示框，长短更接近 */
.brand-img-logo {
    --logo-fit: 1;
    width: 146px;
    height: 44px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 0;
    background: transparent;
    transition: transform 0.3s ease;
    transform: scale(var(--logo-fit));
    transform-origin: center center;
}

.brand-item--logo-dark .brand-img-logo {
    width: 130px;
    height: 36px;
}

.brand-item:hover .brand-img-logo,
.brand-item-link:hover .brand-img-logo {
    transform: scale(calc(var(--logo-fit) * 1.05));
}

/* 品牌类别颜色 */
.bank { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.post { background: linear-gradient(135deg, #D32F2F, #B71C1C); }
.food { background: linear-gradient(135deg, #FF9800, #E65100); }
.airline { background: linear-gradient(135deg, #2196F3, #0D47A1); }
.tech { background: linear-gradient(135deg, #9C27B0, #6A1B9A); }
.auto { background: linear-gradient(135deg, #607D8B, #37474F); }
.insurance { background: linear-gradient(135deg, #00BCD4, #006064); }
.cosmetics { background: linear-gradient(135deg, #E91E63, #880E4F); }
.retail { background: linear-gradient(135deg, #FF5722, #BF360C); }
.logistics { background: linear-gradient(135deg, #795548, #3E2723); }
.finance { background: linear-gradient(135deg, #FFC107, #FF6F00); }
.health { background: linear-gradient(135deg, #8BC34A, #33691E); }


/* 统计信息 */
.brands-stats-container {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.brands-stat-item {
    text-align: center;
    min-width: 200px;
}

.brands-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
    line-height: 1;
    display: inline-block;
    min-width: 180px;
}

.brands-stat-label {
    font-size: 1rem;
    color: #64748b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .brands-section {
        padding: 2rem 1rem;
    }
    
    .brands-wrapper {
        padding: 20px;
    }
    
    .brands-title {
        font-size: 2rem;
    }
    
    .brand-item-link,
    .brand-item {
        flex-basis: 132px;
        width: 132px;
        height: 44px;
    }

    .brand-img-logo {
        width: 120px;
        height: 36px;
    }

    .brand-item--logo-dark .brand-img-logo {
        width: 108px;
        height: 30px;
    }
    
    .brand-text-logo {
        font-size: 0.92rem;
    }
    
    .brands-carousel-track {
        animation-duration: 20s;
    }

    .brands-row-2 {
        animation-direction: reverse;
    }
    
    .brands-stats-container {
        gap: 30px;
    }
    
    .brands-stat-item {
        min-width: 150px;
    }
    
    .brands-stat-number {
        font-size: 2rem;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .brands-title {
        font-size: 1.6rem;
    }
    
    .brand-item-link,
    .brand-item {
        flex-basis: 118px;
        width: 118px;
        height: 40px;
    }

    .brand-img-logo {
        width: 108px;
        height: 32px;
    }

    .brand-item--logo-dark .brand-img-logo {
        width: 96px;
        height: 28px;
    }
    
    .brand-text-logo {
        font-size: 0.85rem;
    }
    
    .brands-stat-item {
        min-width: 120px;
    }
    
    .brands-stat-number {
        font-size: 1.8rem;
        min-width: 110px;
    }
}
