/* 新闻资讯视觉规范 · 大标题切图 / Tab 二态黄线 / 列表五行 / 与轮播顶底对齐 */

/* 大标题：与「游戏特色」.page-tese .header 同尺寸、同顶部居中定位 */
.page-news .news-main.news-spec-main {
    padding: 0;
}

.news-spec-title {
    position: absolute;
    left: 50%;
    top: 0.8rem;
    z-index: 3;
    width: 3rem;
    height: 0.97rem;
    margin: 0;
    transform: translateX(-50%);
    line-height: 0;
    pointer-events: none;
}

.news-spec-title img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 内容区垂直居中：左轮播顶 = 最新二态顶；底 = 更多按钮底 */
.page-news .news-spec-main .news-main-top {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-news .news-spec-main .swiper-box {
    width: 7.5rem;
    height: 4.4rem;
    margin: 0;
    background-color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.page-news .news-spec-main .swiper-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.page-news .news-spec-main .swiper-box img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    object-fit: cover;
    box-sizing: border-box;
}

.page-news .news-spec-main .news-swiper-container {
    width: 100%;
    height: 100%;
}

.page-news .news-spec-main .news-swiper-container .swiper-wrapper,
.page-news .news-spec-main .news-swiper-container .swiper-slide {
    height: 100% !important;
}

.page-news .news-spec-main .news-swiper-container::after {
    background: url(../images/banner-border2.png?v=2) center center no-repeat;
    background-size: 100% 100%;
}

.page-news .news-spec-main .news-list-box {
    width: 6.84rem;
    height: 4.4rem;
    margin-left: 0.35rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* —— Tab：最新左缘对齐「更多新闻资讯」框左缘；1态→2态向右展开 —— */
.news-spec-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 0.34rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.news-spec-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: 0.34rem;
    margin: 0 0.55rem 0 0;
    padding: 0;
    cursor: pointer;
    list-style: none;
    box-sizing: border-box;
}

.news-spec-tab:last-child {
    margin-right: 0;
}

.news-spec-tab-main {
    position: relative;
    width: 0.48rem;
    height: 0.24rem;
    margin: 0;
    transition: width 0.28s ease, height 0.28s ease;
}

.news-spec-tab:hover .news-spec-tab-main,
.news-spec-tab.active .news-spec-tab-main {
    width: 0.72rem;
    height: 0.34rem;
}

.news-spec-tab .t1,
.news-spec-tab .t2 {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translateY(-50%);
    object-fit: contain;
    object-position: left center;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.news-spec-tab .t2 {
    opacity: 0;
}

.news-spec-tab:hover .t1,
.news-spec-tab.active .t1 {
    opacity: 0;
}

.news-spec-tab:hover .t2,
.news-spec-tab.active .t2 {
    opacity: 1;
}

.news-spec-uline {
    position: absolute;
    left: 50%;
    bottom: -0.06rem;
    width: 100%;
    max-width: 0.79rem;
    height: 0.05rem;
    margin: 0;
    background: #fff608;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center center;
    transition: transform 0.32s ease;
    pointer-events: none;
}

.news-spec-tab:hover .news-spec-uline,
.news-spec-tab.active .news-spec-uline {
    transform: translateX(-50%) scaleX(1);
}

/*
 * 列表内容区：始终固定 5 行等分
 * 用绝对定位铺满 inner，避免多面板切换时高度塌缩；子项 flex 等分
 */
.page-news .news-spec-main .news-list-box-inner {
    flex: 1 1 auto;
    min-height: 2.6rem;
    margin-top: 0.18rem;
    display: block;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.page-news .news-spec-main .news-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: flex-start;
    align-content: stretch;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.page-news .news-spec-main .news-list.active {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
}

.page-news .news-spec-main .news-item-a {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: inherit;
    box-sizing: border-box;
    /* 分割线在整行底边，保证内容相对上下分割线居中 */
    border-bottom: 1px solid #c5c6c6;
}

.page-news .news-spec-main .news-item-a:last-child {
    border-bottom: none;
}

.page-news .news-spec-main .news-item-a.is-placeholder {
    pointer-events: none;
}

.page-news .news-spec-main .news-item-a.is-placeholder .static-news-item {
    border-bottom-color: transparent;
}

/*
 * 行内容铺满整行高度：标签与文字垂直居中对齐（中线一致），
 * 相对上下分割线上下留白一致
 */
.page-news .news-spec-main .static-news-item {
    display: flex !important;
    flex-direction: row;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    border-radius: 0;
    color: #595555;
    font-size: 0.18rem;
    line-height: 1;
    box-sizing: border-box;
    overflow: visible !important;
    transition: color 0.25s ease, transform 0.25s ease;
}

.page-news .news-spec-main .static-news-item:hover {
    color: #595555;
    transform: translateX(0.08rem);
}

.page-news .news-spec-main .static-news-item .icon,
.page-news .news-spec-main .static-news-item .news-tag {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 0.89rem;
    width: 0.89rem;
    height: 0.38rem;
    margin: 0 0.14rem 0 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    font-size: 0 !important;
    color: transparent !important;
    line-height: 0;
    overflow: visible;
}

.page-news .news-spec-main .static-news-item .news-tag img,
.page-news .news-spec-main .static-news-item img {
    display: block !important;
    width: 0.89rem !important;
    height: 0.38rem !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill;
    object-position: center center;
}

.page-news .news-spec-main .static-news-item .text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 0.16rem 0 0 !important;
    padding: 0 !important;
    color: #595555 !important;
    font-size: 0.18rem !important;
    font-weight: 400;
    /* 与标签同高，在行内与标签中线对齐 */
    height: 0.38rem;
    line-height: 0.38rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
}

.page-news .news-spec-main .static-news-item .news-time {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    color: #595555 !important;
    font-size: 0.16rem !important;
    height: 0.38rem;
    line-height: 0.38rem;
}

.page-news .news-spec-main .static-news-item .news-time.mobile {
    display: none !important;
}

.page-news .news-spec-main .news-more {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 0.5rem;
    margin-top: 0.12rem;
    margin-left: 0;
    line-height: 1;
    padding: 0;
    float: none;
    border-radius: 0.08rem;
    background: #7a9ad4;
    color: #fff;
    font-size: 0.2rem;
    font-weight: 500;
    text-align: center;
    box-sizing: border-box;
}

.page-news .news-spec-main .news-more .pc {
    display: block;
    line-height: 1;
    /* 视觉居中：略上移，避免字落在框偏下 */
    transform: translateY(-0.02rem);
}

/* PC 隐藏手机端 Tab 文案；手机端用切图文字替代 */
.news-spec-tab .m-tab-text {
    display: none;
}

/* 旧标题/指示条在规范模式下隐藏 */
.page-news .news-spec-main .mod-tabs-title,
.page-news .news-spec-main .news-tit-border {
    display: none !important;
}

@media screen and (max-width: 768px) {
    /*
     * 手机端新闻资讯（设计稿 640 宽）
     * 仅覆盖本媒体查询；PC 端样式保持不变
     */
    .page-news .news-main.news-spec-main {
        padding: calc(52px + env(safe-area-inset-top, 0px)) 0 calc(36px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-sizing: border-box;
        /* 交给页面整体滚动，避免内部滚动锁死整页 */
        overflow: visible;
        height: auto;
        min-height: 0;
    }

    .news-spec-title,
    .news-spec-title.ff-m-sec-title {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        /* 与游戏资料 / 游戏特色 / 关注我们主标题完全同框 */
        width: 52.5vw;
        max-width: 336px;
        aspect-ratio: 336 / 74;
        height: auto;
        margin: 10px auto 14px;
        line-height: 0;
        box-sizing: border-box;
        text-align: center;
    }

    .news-spec-title img.mobile {
        display: block !important;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
    }

    .page-news .news-spec-main .news-main-top {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0 10.15%;
        box-sizing: border-box;
    }

    .page-news .news-spec-main .swiper-box {
        width: 100%;
        height: auto;
        aspect-ratio: 510 / 300;
        margin: 0;
        background-color: transparent;
        border-radius: 0;
        overflow: hidden;
    }

    .page-news .news-spec-main .swiper-box img {
        object-fit: cover;
    }

    /* 手机端去掉 PC 轮播装饰边框 */
    .page-news .news-spec-main .news-swiper-container::after {
        display: none !important;
    }

    /* 轮播菱形分页：未选灰 / 选中黄 */
    .page-news .swiper-container-horizontal > .swiper-pagination-bullets {
        text-align: center !important;
        padding-right: 0 !important;
        bottom: 8px;
        width: 100%;
        left: 0;
    }

    .page-news .swiper-pagination-bullet {
        width: 11px !important;
        height: 11px !important;
        margin: 0 5px !important;
        opacity: 1 !important;
        border-radius: 0 !important;
        background: url(../images/news-spec/pagination-off.png?v=1) center center no-repeat !important;
        background-size: contain !important;
    }

    .page-news .swiper-pagination-bullet-active {
        background: url(../images/news-spec/pagination-on.png?v=1) center center no-repeat !important;
        background-size: contain !important;
    }

    .page-news .news-spec-main .news-list-box {
        width: 100%;
        height: auto;
        margin-left: 0;
        margin-top: 18px;
    }

    /* Tab：切图导航（略放大）；底部通栏灰线 */
    .news-spec-tabs {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        height: auto;
        margin: 0;
        padding: 0 0 10px;
        border-bottom: 1px solid #c5c6c6;
        box-sizing: border-box;
    }

    .news-spec-tab {
        position: relative;
        flex: 1 1 0;
        width: auto;
        height: auto;
        margin: 0;
        padding: 8px 0 10px;
        justify-content: center;
    }

    .news-spec-tab-main {
        display: block !important;
        position: relative;
        width: 100%;
        height: 22px;
        margin: 0 auto;
        line-height: 0;
    }

    .news-spec-tab .t1,
    .news-spec-tab .t2 {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto !important;
        height: 20px !important;
        max-height: 20px !important;
        object-fit: contain;
    }

    .news-spec-tab .t2 {
        height: 22px !important;
        max-height: 22px !important;
    }

    .news-spec-tab .m-tab-text {
        display: none !important;
    }

    .news-spec-uline {
        left: 50%;
        bottom: -1px;
        width: 36px;
        max-width: 36px;
        height: 3px;
        background: #ffe148;
        transform: translateX(-50%) scaleX(0);
    }

    .news-spec-tab:hover .news-spec-uline,
    .news-spec-tab.active .news-spec-uline {
        transform: translateX(-50%) scaleX(1);
    }

    .page-news .news-spec-main .news-list-box-inner {
        position: relative;
        min-height: 220px; /* 5 × 44px，始终占住五条高度 */
        margin-top: 0;
        overflow: visible;
    }

    /* 手机端取消绝对定位，改为文档流；仍固定五条等高 */
    .page-news .news-spec-main .news-list {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .page-news .news-spec-main .news-list.active {
        display: flex !important;
        flex-direction: column;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .page-news .news-spec-main .news-item-a {
        flex: 0 0 44px;
        width: 100%;
        height: 44px;
        min-height: 44px;
        max-height: 44px;
        border-bottom: 1px solid #d5d6d6;
        overflow: hidden;
    }

    .page-news .news-spec-main .static-news-item {
        font-size: 13px;
        padding: 0;
        align-items: center;
        height: 100%;
        min-height: 100%;
    }

    .page-news .news-spec-main .static-news-item:hover {
        transform: none;
    }

    /* 手机端列表不显示分类标签切图，标题 + 日期左右排布 */
    .page-news .news-spec-main .static-news-item .icon,
    .page-news .news-spec-main .static-news-item .news-tag {
        display: none !important;
    }

    .page-news .news-spec-main .static-news-item .text {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 10px 0 0 !important;
        padding: 0 !important;
        color: #595959 !important;
        font-size: 13px !important;
        height: 100% !important;
        line-height: 44px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-news .news-spec-main .static-news-item .news-time {
        flex: 0 0 auto;
        padding: 0 !important;
        color: #595959 !important;
        font-size: 12px !important;
        height: 100% !important;
        line-height: 44px !important;
    }

    .page-news .news-spec-main .static-news-item .news-time.pc {
        display: none !important;
    }

    .page-news .news-spec-main .static-news-item .news-time.mobile {
        display: flex !important;
    }

    .page-news .news-spec-main .news-more {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 44px;
        line-height: 1 !important;
        font-size: 15px;
        font-weight: 500;
        margin-top: 16px;
        padding: 0 !important;
        border-radius: 0;
        background: #7a7a7b !important;
        color: #fff;
        float: none;
        text-align: center;
        box-sizing: border-box;
    }

    .page-news .news-spec-main .news-more .mobile {
        display: block !important;
        line-height: 1 !important;
        /* 视觉居中：略上移，避免字落在框偏下 */
        transform: translateY(-2px);
    }

    .page-news .news-spec-main .news-more .pc {
        display: none !important;
    }
}
