/**
 * 首页样式
 * 
 * 包含首页特有的样式，如Banner、服务卡片、新闻列表等
 */

/* ========== Hero Banner 区域（背景图 + 文字组合） ========== */
.hero-banner {
    position: relative;
    padding: 130px 0 120px;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* 红色主标题（字号在基准值上放大 1.5 倍） */
.hero-title {
    color: var(--primary-color);
    font-size: 4.125rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: var(--spacing-lg);
}

.hero-subtitle {
    font-size: 1.59375rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

/* Banner 内的描边按钮（直角） */
.btn-hero {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-xl);
    border: 1px solid #c9ccd1;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.btn-hero:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========== 新闻资讯模块 ========== */
.news-module {
    background: white;
}

/* 左右各占一半且宽度固定：minmax(0,1fr) 防止长标题把左列挤小 */
.news-module-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--spacing-xl);
    align-items: stretch;
}

.news-module-grid > * {
    min-width: 0;
}

/* 左侧视频/图片（可点击，进入对应详情） */
.news-video {
    position: relative;
    display: block;
    overflow: hidden;
    background: #000;
}

.news-video img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-video-title {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(216, 0, 0, 0.85);
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧新闻面板 */
.news-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-md);
}

.news-tabs-nav {
    display: flex;
    gap: var(--spacing-xs);
}

.news-tab-btn {
    border: none;
    background: #f3f4f6;
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
}

.news-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.news-more {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.news-more:hover {
    color: var(--primary-dark);
}

/* 文本新闻列表 */
.news-list-mod {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-list-mod li {
    border-bottom: 1px dashed var(--border-color);
}

.news-list-mod li:last-child {
    border-bottom: none;
}

.news-list-mod a {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.news-list-mod a .dot {
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-light);
    margin-right: var(--spacing-md);
    transition: background var(--transition-fast);
}

.news-list-mod a:hover {
    color: var(--primary-color);
}

.news-list-mod a:hover .dot {
    background: var(--primary-color);
}

/* ========== 核心业务区域（马赛克布局） ========== */
.core-services {
    background: white;
}
.section-title {
    color: var(--text-primary);
}

.services-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--spacing-lg);
    height: 460px;
}

.service-card {
    position: relative;
    display: block;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: white;
    transition: transform var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* 大卡：占左侧两行 */
.service-large {
    grid-row: span 2;
}

.service-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
    transition: background var(--transition-normal);
}

.service-card:hover .service-mask {
    background: linear-gradient(180deg, rgba(216, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.service-info {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    padding: var(--spacing-lg);
    width: 100%;
}

.service-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.service-large .service-title {
    font-size: 1.75rem;
}

.service-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: var(--spacing-sm);
}

/* ========== 平台优势 ========== */
.why-choose-us {
    background: var(--bg-light) url('/static/images/bg01.png') center center / cover no-repeat;
}

.choose-item {
    aspect-ratio: 280 / 400;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.choose-item:hover {
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.choose-item:hover .choose-title {
    color: white;
}

.choose-item:hover .choose-desc {
    color: rgba(255, 255, 255, 0.9);
}

.choose-icon {
    margin-bottom: 60px;
    line-height: 0;
}

.choose-icon img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

/* 双套图标：白底卡用 normal，红底（高亮/悬停）用 sel */
.choose-icon-sel {
    display: none;
}

.choose-item-active .choose-icon-normal,
.choose-item:hover .choose-icon-normal {
    display: none;
}

.choose-item-active .choose-icon-sel,
.choose-item:hover .choose-icon-sel {
    display: block;
}

.choose-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.choose-desc {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 高亮卡片（红底反白） */
.choose-item-active {
    background: var(--primary-color);
}

.choose-item-active .choose-title {
    color: white;
}

.choose-item-active .choose-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* ========== 合作伙伴（4 行 x 4 列网格） ========== */
.partners-section {
    background: white;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 280px);
    justify-content: center;
    gap: 24px;
}

.partner-item {
    width: 280px;
    height: 120px;
    border: 1px solid #D8D8D8;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.partner-item img {
    max-width: 82%;
    max-height: 72%;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.partner-item:hover img {
    transform: scale(1.08);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-banner {
        padding: 60px 0;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 新闻模块移动端单列 */
    .news-module-grid {
        grid-template-columns: 1fr;
    }
    
    .news-video {
        height: 220px;
    }
    
    /* 马赛克布局在移动端改为单列堆叠 */
    .services-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        height: auto;
    }
    
    .service-card {
        height: 180px;
    }
    
    .service-large {
        grid-row: auto;
        height: 220px;
    }
    
    .choose-item {
        padding: var(--spacing-lg);
    }

    /* 合作伙伴移动端两列 */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .partner-item {
        width: 100%;
    }
}
