/**
 * dongtai.css - 动态与资讯页面样式
 */

/* --- 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'CustomArial', 'SourceHanSansCN', 'CustomArialUnicode';
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }

/* 手机端导航默认隐藏 */
.mobile-nav { display: none; }
.mobile-menu-overlay { display: none; }

/* --- 容器 --- */
.container {
    width: 72vw;
    margin: 0 auto;
    position: relative;
}

/* --- 列表布局 --- */
.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    padding: 30px 0;
    border-bottom: 1px solid #eeeeee;
    align-items: flex-start; /* 顶部对齐，确保文字不会垂直拉伸 */
    cursor: pointer; 
    transition: background-color 0.3s; 
}

.news-item:first-child {
    padding-top: 0;
}

.news-item:hover {
    background-color: #fafafa; 
}

/* 左侧图片容器 */
.news-img-wrapper {
    width: 280px;  
    height: 170px; 
    flex-shrink: 0;
    margin-right: 30px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-item:hover .news-img {
    transform: scale(1.05);
}

/* 右侧内容容器 - 核心修改区域 */
.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 删除了 height: 170px; 让高度随内容自适应 */
    /* 删除了 justify-content: space-between; 取消两端对齐 */
    justify-content: flex-start; /* 内容自然从上向下排列 */
}

/* 标题 */
.news-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px; /* 控制标题与简介的间距 */
    cursor: pointer;
}

.news-item:hover .news-title {
    color: #d93826; /* 品牌红 */
}

/* 描述文字 */
.news-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 15px; /* 控制简介与日期的间距 */

    /* 多行省略 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 限制2行 */
    line-clamp: 2; 
    overflow: hidden;
}

/* English mode adaptations */
.lang-en .news-desc {
    text-align: left;
}

/* 日期标签 */
.news-date {
    display: inline-block;
    background-color: #f8eed8; 
    color: #666; 
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 15px; 
    align-self: flex-start; 
    font-family: 'CustomArial', 'CustomArialUnicode';
}

/* --- 分页 --- */
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; 
}

.page-num {
    width: 32px; 
    height: 32px;
    line-height: 32px;
    text-align: center;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f5f5f5; 
    border-radius: 2px; 
    border: none; 
}

.page-num:hover {
    background-color: #e0e0e0;
}

.page-num.active {
    background-color: #b62518; 
    color: #fff;
}

.page-next {
    width: 32px; 
    height: 32px;
    line-height: 32px;
    text-align: center;
    color: #666;
    cursor: pointer;
    background-color: #f5f5f5;
    border-radius: 2px;
    border: none;
    transition: all 0.2s;
}

.page-next:hover {
    background-color: #e0e0e0;
}

/* ================= 手机端适配 ================= */
@media screen and (max-width: 768px) {
    /* 隐藏 PC 端 Header */
    .header-component-wrapper {
        display: none !important;
    }

    /* 容器适配 */
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Banner 适配 */
    .banner {
        display: flex !important;
        height: 230px;
        margin-top: 90px; /* 紧接在 header 下方 */
        background-size: cover;
        position: relative;
    }

    .banner img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    .banner-text-container {
        width: 100%;
        padding: 0 20px;
        justify-content: flex-start;
    }

    .banner-title-group {
        height: 40px;
        transform: translateY(0);
    }

    .banner-red-line {
        height: 80%;
        margin-right: 15px;
        width: 4px;
        background-color: #d93826;
    }

    .banner-main-title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    /* 显示手机端导航 */
    .mobile-nav {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        height: 90px;
        background-color: rgba(174, 31, 3, 0.9); /* #ae1f03 at 90% opacity */
        position: fixed;
        top: 0; left: 0; z-index: 1000;
        padding: 0 15px;
    }

    .mobile-menu-btn, .mobile-search-btn {
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        width: 40px;
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-right-tools {
        display: flex;
        height: 90px;
        align-items: center;
    }

    .mobile-lang-btn {
        color: #fff;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
        border: 1px solid #fff;
        border-radius: 2px;
        padding: 3px 6px;
        margin-left: 10px;
        height: auto;
        width: auto;
        display: inline-block;
        line-height: 1;
    }

    .mobile-logo-box {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        background-color: transparent;
        height: 90px;
        width: 160px;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: none;
        z-index: 1001;
    }

    .mobile-logo-box img {
        max-width: 80%;
        max-height: 80%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* 手机端全屏菜单样式 */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 2000;
        display: none;
        flex-direction: column;
        justify-content: flex-start;
    }

    .mobile-menu-content {
        width: 100%;
        background-color: transparent;
        max-height: 80vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-header {
        display: flex;
        height: 90px;
        width: 100%;
    }

    .mobile-menu-close {
        width: 70px;
        height: 90px;
        background-color: #ae1f03; /* 使用指定的红色 */
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    .mobile-menu-close i {
        color: #fff;
        font-size: 50px;
    }

    .mobile-menu-logo {
        flex: 1;
        min-width: 0;
        background-color: #000;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0 20px;
    }

    .mobile-menu-logo img {
        height: auto;
        max-height: 100px;
        width: 100%;
    }

    .mobile-menu-list {
        background-color: #000;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        margin-left: 70px;
    }

    .mm-item {
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .mm-link, .mm-link-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        color: #fff;
        font-size: 18px;
        text-decoration: none;
        cursor: pointer;
        background-color: #000;
        transition: background-color 0.3s;
    }

    .mm-link:hover, .mm-link-wrapper:hover {
        background-color: #1a1a1a;
    }

    .mm-item.active .mm-link-wrapper {
        background-color: #606060;
    }

    .mm-link-text {
        font-weight: normal;
    }

    .mm-arrow-box {
        padding-left: 15px;
        border-left: 1px solid #999;
        display: flex;
        align-items: center;
        height: 14px;
    }

    .mm-item.active .mm-arrow-box {
        border-left-color: #000;
    }

    .mm-arrow {
        font-size: 14px;
        color: #fff;
        transition: transform 0.3s;
    }

    .mm-item.active .mm-arrow {
        transform: rotate(180deg);
        color: #fdb933;
    }

    .mm-submenu {
        display: none;
        background-color: #212121;
        padding: 0;
        border-right: 15px solid #606060;
    }

    .mm-item.active .mm-submenu {
        display: block;
    }

    .mm-sub-link {
        display: block;
        padding: 12px 20px;
        color: #ccc;
        font-size: 16px;
        text-decoration: none;
        border-bottom: 1px solid #444;
    }

    .mm-sub-link:last-child {
        border-bottom: none;
    }

    .mm-sub-link.active {
        color: #fdb933;
    }

    /* 面包屑适配 */
    .breadcrumb {
        padding: 16px 15px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        font-size: 0;
        color: #333;
        width: calc(100% + 30px);
        margin-left: -15px;
        background-color: #fff;
        position: relative;
        z-index: 5;
    }

    .breadcrumb > a:first-child {
        display: inline-block;
        width: 32px;
        height: 32px;
        background: url('../img/icon-27.png') no-repeat center center;
        background-size: contain;
        font-size: 0;
        margin-right: 15px;
        position: relative;
    }

    .breadcrumb > a:first-child::after {
        content: '';
        position: absolute;
        right: -15px;
        top: 3px;
        height: 26px;
        width: 2px;
        background-color: #ddd;
    }

    .breadcrumb span,
    .breadcrumb a {
        font-size: 18px;
        color: #333;
        font-family: 'CustomArial', 'SourceHanSansCN', 'CustomArialUnicode';
    }

    .breadcrumb span {
        margin-left: 0;
        font-weight: normal;
    }

    .breadcrumb span:first-of-type {
        margin-left: 15px;
    }

    .breadcrumb span:not(:last-child)::after {
        content: '>';
        margin-left: 8px;
        margin-right: 8px;
        color: #666;
        font-weight: normal;
        display: inline-block;
        vertical-align: middle;
        width: auto;
        height: auto;
        background-color: transparent;
    }

    /* 列表适配 */
    .news-item {
        padding: 20px 0;
        display: flex;
        flex-direction: row; /* 默认图片在左，内容在右 */
        justify-content: space-between;
    }

    .news-desc {
        display: none; /* 隐藏描述 */
    }

    .news-img-wrapper {
        width: 180px;
        height: 110px;
        margin-right: 15px;
    }
    
    /* 纯文本项 */
    .news-item.text-only {
        flex-direction: column;
    }
    
    .news-item.text-only .news-content {
        width: 100%;
    }

    .news-content {
        justify-content: flex-start; /* 标题和日期自然排列 */
        min-height: 110px; /* 对应图片高度 */
    }
    
    /* 对于没有图片的项，高度自适应 */
    .news-item.text-only .news-content {
        min-height: auto;
    }

    .news-title {
        font-size: 16px;
        margin-bottom: 20px; /* 与日期保持20px间距 */
        line-height: 1.4;
    }

    .news-date {
        padding: 2px 8px;
        font-size: 12px;
        background-color: #fdf1e1; /* 米色背景 */
        color: #9f8864; /* 棕色文字 */
        border-radius: 4px;
        margin-top: 0;
    }

    /* 分页适配 */
    .pagination {
        margin-top: 30px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .page-num, .page-next {
        width: 36px;
        height: 36px;
        font-size: 14px;
        background-color: #fff; /* 白色背景 */
        border: 1px solid #eee; /* 加边框 */
    }
    
    .page-num.active {
        background-color: #ae1f03;
        color: #fff;
        border-color: #ae1f03;
    }

    /* 搜索栏适配 */
    .header-search-bar {
        position: fixed;
        top: 90px;
        background-color: rgba(31, 31, 31, 0.95);
        height: auto;
        padding: 30px 0;
        z-index: 999;
    }

    .header-search-bar .search-container {
        width: 90%;
        max-width: none;
    }
}
