/* ==================== 首页专用样式 ==================== */

/* 首页主题色变量 - 继承全局或使用本地值 */
:root {
    --home-tab-blue: #1a4ecc;
    --home-tab-blue-light: #e3f2fd;
}


/* ============================================================
   1. Hero Carousel / 顶部轮播图
   ============================================================ */

.home-hero {
    position: relative;
    height: 480px;
    margin-top: -40px;
}

/* el-carousel 充满 hero */
.home-hero .hero-carousel .el-carousel__container {
    height: 480px !important;
}

.hero-slide-item {
    width: 100%;
    height: 100%;
}

.hero-slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   2. Main Content / 主内容区
   ============================================================ */

.home-content {
    max-width: var(--portal-container-width, 1200px);
    margin: 0 auto;
    padding: 30px 20px;
}


/* ============================================================
   3. News Section / 新闻资讯区
   ============================================================ */

.home-news-section {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
}

/* --- News Left (Tabs + List) --- */
.news-left {
    flex: 1;
    min-width: 0;
}

.news-tabs-container {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.news-tabs-container::-webkit-scrollbar {
    display: none;
}

/* Element Plus Tabs 自定义样式 */
.news-el-tabs {
    flex: 1;
    min-width: 0;
}

.news-el-tabs .el-tabs__header {
    margin: 0;
    border-bottom: none;
}

.news-el-tabs .el-tabs__nav-wrap::after {
    display: none;
}

.news-el-tabs .el-tabs__nav {
    border: none;
}

.news-el-tabs .el-tabs__item {
    padding: 10px 12px !important;
    font-size: 18px;
    font-weight: 600;
    color: var(--portal-text-secondary, #666);
    border: none;
    transition: all 0.3s ease;
    height: auto;
    line-height: 1.5;
    overflow: visible !important;
    margin-bottom: 10px !important;
}

.news-el-tabs .el-tabs__item:hover {
    color: var(--home-tab-blue);
    background: var(--home-tab-blue-light);
}

.news-el-tabs .el-tabs__item.is-active {
    color: #fff;
    font-weight: 600;
    background: var(--home-tab-blue);
}

.news-el-tabs .el-tabs__active-bar {
    display: none;
}

.news-tab-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 激活状态的底部箭头 - PC端默认样式 */
.news-el-tabs .el-tabs__item.is-active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 8px solid var(--home-tab-blue) !important;
    z-index: 10 !important;
    display: block !important;
}

.news-tab--more {
    margin-left: auto;
    font-size: 13px;
    padding: 10px 8px;
    border-bottom: none;
    color: var(--portal-primary, #c62828);
    flex-shrink: 0;
}

.news-tab--more:hover {
    color: var(--portal-primary, #c62828);
}

/* News Content Wrapper - 滑动动画容器 */
.news-content-wrapper {
    position: relative;
    overflow: hidden;
    /* 移除固定 min-height，让容器根据内容自适应 */
}

.news-content {
    width: 100%;
    position: relative;  /* 改为相对定位，保持在文档流中 */
    transition: all 0.3s ease;  /* 添加高度变化的过渡效果 */
}

/* ========== Tab 列表滑动动画 ========== */

/* 从右侧滑入 */
.news-slide-right-enter-active {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-slide-right-leave-active {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-slide-right-enter {
    opacity: 0;
    transform: translateX(80px);
}

.news-slide-right-leave-to {
    opacity: 0;
    transform: translateX(-40px);
}

/* 从左侧滑入 */
.news-slide-left-enter-active {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-slide-left-leave-active {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-slide-left-enter {
    opacity: 0;
    transform: translateX(-80px);
}

.news-slide-left-leave-to {
    opacity: 0;
    transform: translateX(40px);
}

/* News Headline */
.news-headline {
    margin-bottom: 14px;
    display: flex;
}

.news-headline-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    font-weight: 700;
    color: var(--portal-text, #333);
    text-align: center;
}


.news-headline a {
    transition: color 0.2s;
}

.news-headline a:hover {
    color: var(--home-tab-blue);
}

.news-headline-detail {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    color: var(--portal-primary, #c62828);
}

.news-headline-detail:hover {
    text-decoration: underline;
}

/* News List */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--portal-border, #e0e0e0);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-link {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--portal-text, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 14px;
    position: relative;
    transition: color 0.2s;
}

.news-item-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #c0c0c0;
    border-radius: 50%;
}

.news-item-link:hover {
    color: var(--home-tab-blue);
}

.news-item-date {
    flex-shrink: 0;
    margin-left: 16px;
    font-size: 13px;
    color: var(--portal-text-muted, #999);
}

/* --- News Right (Carousel) --- */
.news-right {
    width: 570px;
    flex-shrink: 0;
}

.news-carousel {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.news-carousel .el-carousel__container {
    height: 350px !important;
}

.news-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 底部指示器条（PC：左侧文字 + 右侧圆点） */
.news-carousel-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    z-index: 2;
}

.news-carousel-caption {
    flex: 1;
    min-width: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 16px;
}

.news-carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.news-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.news-carousel-dot.active {
    background: var(--portal-primary, #c62828);
}


/* ============================================================
   4. Party Building + Promo Video / 党建与宣传片
   ============================================================ */

.home-mid-section {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
}

.home-col-half {
    flex: 1;
    min-width: 0;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header-title {
    position: relative;
    display: inline-block;
    background: var(--home-tab-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    padding: 8px 24px;
    transition: opacity 0.2s;
}

.section-header-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--home-tab-blue);
}

.section-header-title:hover {
    opacity: 0.8;
}

.section-header-more {
    font-size: 13px;
    color: var(--portal-primary, #c62828);
    transition: opacity 0.2s;
    padding-bottom: 4px;
}

.section-header-more:hover {
    opacity: 0.7;
}

.section-body {
    padding: 16px 0px;
}

/* --- Promo Video --- */
.promo-video-img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    background: #000;
}


/* ============================================================
   5. Bridge Showcase / 桥梁展示
   ============================================================ */

.home-bridge-section {
    margin-bottom: 30px;
    text-align: center;
}

.bridge-banner {
    display: block;
    position: relative;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    cursor: pointer;
}

.bridge-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.bridge-banner:hover img {
    transform: scale(1.03);
}


/* ============================================================
   桥梁博物馆 Gallery
   ============================================================ */

.bridge-gallery {
    display: flex;
    gap: 20px;
    height: 100%;
}

.bridge-card {
    display: block;
    flex: 1;
    min-width: 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    height: 240px;
}

.bridge-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.bridge-card:hover img {
    transform: scale(1.05);
}

.bridge-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    padding: 24px 16px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    z-index: 10;
}

/* ============================================================
   5.5 Bridge Museum / 贵州桥梁博物馆
   ============================================================ */

.home-museum-section {
    text-align: center;
    margin-bottom: 30px;
}

.bridge-museum-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--portal-text, #333);
    letter-spacing: 4px;
    margin-bottom: 20px;
}


/* ============================================================
   6. Special Columns / 专题专栏
   ============================================================ */

.home-columns-section {
    background:linear-gradient(to bottom, #e6eaf6 0%,#ffffff 100%) ;
    padding-bottom: 20px;
}

.columns-divider {
    margin-bottom: 24px;
}

.columns-divider .el-divider__text {
    font-size: 20px;
    font-weight: 700;
    color: var(--home-tab-blue);
    letter-spacing: 4px;
    background-color: #fff;
    padding: 0 16px;
}

.columns-divider .el-divider__text a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.columns-divider .el-divider__text a:hover {
    opacity: 0.7;
}

.home-columns-grid {
    display: flex;
    gap: 0;
    justify-content: left;
    padding-top: 40px;
}

.home-column-card {
    width: 280px;
    height: 80px;
    margin-right: 26px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
    flex-shrink: 0;
}

.home-column-card:last-child {
    margin-right: 0;
}

.home-column-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.home-column-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   7. Placeholder Images (临时占位)
   ============================================================ */

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e3e8ee 0%, #cfd8dc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #90a4ae;
    font-size: 14px;
}


/* ============================================================
   8. H5 Responsive / 响应式适配
   ============================================================ */

/* 平板端（≤1200px） */
@media (max-width: 1200px) {
    .home-hero {
        height: 380px;
    }

    .home-hero .hero-carousel .el-carousel__container {
        height: 380px !important;
    }

    .news-right {
        width: 570px;
    }

    .news-carousel .el-carousel__container {
        height: 350px !important;
    }

    /* 使用统一的 el-tabs 样式 */
    .news-tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .news-tabs-container::-webkit-scrollbar {
        display: none;
    }

    .news-el-tabs .el-tabs__item {
        padding: 8px 14px !important;
        font-size: 14px !important;
    }

    .news-el-tabs .el-tabs__item.is-active::after {
        border-left-width: 6px !important;
        border-right-width: 6px !important;
        border-top-width: 6px !important;
        bottom: -6px !important;
    }

    .news-tab--more {
        margin-left: 0;
        flex-shrink: 0;
        padding-left: 12px;
        border-left: 1px solid var(--portal-border, #e0e0e0);
    }
}

/* H5端（≤768px） */
@media (max-width: 768px) {
    .home-hero {
        height: 260px;
        margin-top: 0;
    }

    .home-hero .hero-carousel .el-carousel__container {
        height: 260px !important;
    }

    .home-content {
        padding: 20px 16px;
    }

    /* News Section → 纵向堆叠 */
    .home-news-section {
        flex-direction: column;
    }

    .news-right {
        width: 100%;
    }

    .news-carousel .el-carousel__container {
        height: 200px !important;
    }

    /* H5端：底部条改为纵向（第一行文字 + 第二行圆点） */
    .news-carousel-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 12px;
    }

    .news-carousel-caption {
        margin-right: 0;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        font-size: 12px;
    }

    .news-carousel-dots {
        align-self: flex-end;
    }

    .news-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .news-tabs::-webkit-scrollbar {
        display: none;
    }

    .news-tab {
        padding: 8px 14px;
        font-size: 14px;
        margin-right: 2px;
    }

    .news-tab.active .news-tab-arrow {
        border-left-width: 6px;
        border-right-width: 6px;
        border-top-width: 6px;
        bottom: -6px;
    }

    .news-tab--more {
        margin-left: 0;
        flex-shrink: 0;
        padding-left: 12px;
        border-left: 1px solid var(--portal-border, #e0e0e0);
    }

    .news-headline a {
        font-size: 17px;
    }

    /* Mid Section → 纵向堆叠 */
    .home-mid-section {
        flex-direction: column;
    }

    .promo-video-img {
        height: 200px;
    }

    /* Bridge Showcase */
    /* Bridge Museum H5: single card full width */
    .home-museum-section .el-carousel__container{
        height: 180px !important;
    }
    .bridge-gallery .bridge-card {
        width: 100%;
        height: 180px;
    }

    .bridge-card img {
        height: 180px;
    }

    .bridge-card-label {
        padding: 24px 16px 12px;
        font-size: 14px;
    }

    .bridge-museum-title {
        font-size: 20px;
    }

    /* Special Columns H5: 纵向堆叠全宽 */
    .home-columns-grid {
        flex-direction: column;
        align-items: center;
    }

    .home-column-card {
        width: 100%;
        height: 90px;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .home-column-card:last-child {
        margin-bottom: 0;
    }

    .home-column-card img {
        height: 100%;
    }

    /* Quick Entry H5: 隐藏 */
    .quick-entry {
        display: none;
    }
}

/* 小屏手机（≤480px） */
@media (max-width: 480px) {
    .home-hero {
        height: 220px;
    }

    .home-hero .hero-carousel .el-carousel__container {
        height: 220px !important;
    }

    .news-el-tabs .el-tabs__item {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .news-el-tabs .el-tabs__item.is-active::after {
        border-left-width: 5px !important;
        border-right-width: 5px !important;
        border-top-width: 5px !important;
        bottom: -5px !important;
    }

    .news-headline a {
        font-size: 16px;
    }

    .news-item-link {
        font-size: 13px;
    }
    .home-museum-section .el-carousel__container{
        height: 180px !important;
    }
    .bridge-gallery .bridge-card {
        height: 150px;
    }
    .bridge-card img {
        height: 150px;
    }

    .home-column-card {
        height: 70px;
    }
}


/* ============================================================
   9. Quick Entry / 快捷入口
   ============================================================ */

.quick-entry {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    max-width: 220px;
}

.quick-entry-link {
    display: block;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
}

.quick-entry-link img {
    width: 100%;
    height: auto;
    display: block;
}

.quick-entry-close {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.quick-entry-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 快捷入口列表样式 */
.quick-entry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-entry-item-wrapper {
    position: relative;
}

.quick-entry-item {
    display: block;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-entry-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quick-entry-item img {
    width: 100%;
    height: auto;
    display: block;
}
