﻿﻿/* ==========================================================================
   gwcms-content-down-safe.css
   终极修复版：完美垂直居中 + 绝对稳定的几何图标
   ========================================================================== */

/* --- 1. 标题与底座 --- */
.gwcms-block-hd h2,
.gwcms-sub-row .gwcms-sub-title {
    font-size: 22px;
    font-weight: bold;
    color: #222;
    display: flex;
    align-items: center;
    padding-left: 36px !important;
    position: relative;
    letter-spacing: 1px;
    margin: 0;
    height: 50px;
    line-height: 50px;
}

    .gwcms-block-hd h2::after,
    .gwcms-sub-row .gwcms-sub-title::after {
        content: "";
        position: absolute;
        left: 36px;
        bottom: -1px;
        width: 36px;
        height: 3px;
        background: #a62126;
        border-radius: 2px;
        z-index: 2;
    }

    .gwcms-block-hd h2::before {
        display: none;
    }

    /* 图标底座（绝对居中对齐） */
    .gwcms-block-hd h2 .gwcms-css-icon-title,
    .gwcms-sub-row .gwcms-css-icon-title {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        display: inline-block;
        width: 26px;
        height: 26px;
        background: linear-gradient(135deg, #e74c3c, #a62126);
        border-radius: 6px;
        box-shadow: 0 3px 6px rgba(166, 33, 38, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    }

    /* ====== 内部图形（最稳像素） ====== */

    /* 专题：四宫格 */
    .gwcms-block-hd h2 .icon-special::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 6px;
        width: 4px;
        height: 4px;
        background: #fff;
        border-radius: 1px;
        box-shadow: 6px 0 0 #fff, 0 6px 0 #fff, 6px 6px 0 #fff;
    }

/* 招标采购：公文包 */
.gwcms-sub-row .icon-purchase::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 9px;
    width: 12px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 1px;
}

.gwcms-sub-row .icon-purchase::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 6px;
    width: 4px;
    height: 2px;
    border: 2px solid #fff;
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

/* 人才招聘：人像 */
.gwcms-sub-row .icon-job::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.gwcms-sub-row .icon-job::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 15px;
    width: 10px;
    height: 4px;
    border: 2px solid #fff;
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

/* --- 布局（保持原样不动） --- */
.gwcms-cd-row {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.gwcms-cd-left {
    width: 46%;
    display: flex;
    flex-direction: column;
}

    .gwcms-cd-left .gwcms-block-bd {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0 !important;
    }

.gwcms-topic-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 电脑端：固定高度限制，保证整齐 */
.gwcms-topic-cell {
    display: block;
    width: 100%;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    max-height: 85px;
}

.gwcms-topic-item {
    display: block;
    width: 100%;
    height: 100%;
    background: #a62126;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

    .gwcms-topic-item img {
        width: 100%;
        height: 100%;
        /* ★ 电脑端：按原图比例填满，多余部分居中裁剪 */
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .gwcms-topic-item .gwcms-topic-title {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        padding: 0 15px;
        background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        display: flex;
        align-items: center;
        max-width: 80%;
        /* ★ 防止长文字换行被切掉 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.gwcms-cd-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column !important;
    gap: 20px;
}

.gwcms-cd-list-box {
    flex: 1;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.gwcms-sub-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
    height: 50px;
    padding: 0 15px;
    flex-shrink: 0;
}

    .gwcms-sub-row .gwcms-sub-more {
        margin-left: auto;
        font-size: 14px;
        color: #999;
        text-decoration: none;
    }

ul.gwcms-cd-list {
    flex: 1;
    padding: 8px 14px;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

    ul.gwcms-cd-list > li {
        display: flex;
        align-items: center;
        padding: 10px 0 !important;
        border-bottom: 1px dashed #f0f0f0;
    }

        ul.gwcms-cd-list > li:last-child {
            border-bottom: none;
        }

        ul.gwcms-cd-list > li > a.gwcms-cd-item-title {
            flex: 1;
            min-width: 0;
            font-size: 16px;
            font-weight: normal;
            color: #333;
            line-height: 1.5;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            padding-left: 16px;
            position: relative;
            text-decoration: none;
        }

            ul.gwcms-cd-list > li > a.gwcms-cd-item-title::before {
                content: "";
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 0;
                height: 0;
                border-style: solid;
                border-width: 4px 0 4px 6px;
                border-color: transparent transparent transparent #a62126;
            }

        ul.gwcms-cd-list > li > .gwcms-cd-item-date {
            flex-shrink: 0;
            margin-left: 10px;
            color: #999;
            font-size: 13px;
        }

/* ==========================================================================
   平板/手机端
   ========================================================================== */
@media (max-width: 1023px) {
    .gwcms-cd-row {
        flex-direction: column;
        gap: 20px;
    }

    .gwcms-cd-left {
        width: 100%;
    }

    .gwcms-topic-grid {
        flex: none;
        gap: 15px; /* 增加一点手机端的间距 */
    }

    /* ★ 核心修复：解除手机端的高度限制，让图片完整显示 */
    .gwcms-topic-cell {
        height: auto !important; 
        max-height: none !important;
        flex: none;
    }

    .gwcms-topic-item {
        height: auto !important; 
    }

    .gwcms-topic-item img {
        height: auto !important; /* 高度让图片自己按比例撑开 */
        object-fit: contain !important; /* 保证原图完整，绝不裁剪 */
    }

    /* 标题文字层适配：图片变高了，文字层也要跟着自动铺满高度 */
    .gwcms-topic-item .gwcms-topic-title {
        top: 0;
        bottom: 0;
        padding: 15px; /* 增加上下内边距，让文字垂直居中更好看 */
    }

    .gwcms-cd-right {
        flex-direction: column !important;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .gwcms-block-hd h2, .gwcms-sub-row .gwcms-sub-title {
        font-size: 18px;
        padding-left: 32px !important;
    }

        .gwcms-block-hd h2::after, .gwcms-sub-row .gwcms-sub-title::after {
            left: 32px;
        }

        .gwcms-block-hd h2 .gwcms-css-icon-title, .gwcms-sub-row .gwcms-css-icon-title {
            width: 22px;
            height: 22px;
        }

        .gwcms-block-hd h2 .icon-special::after {
            left: 5px;
            top: 5px;
            width: 3px;
            height: 3px;
            box-shadow: 5px 0 0 #fff, 0 5px 0 #fff, 5px 5px 0 #fff;
        }

    .gwcms-sub-row .icon-purchase::after {
        left: 5px;
        top: 7px;
        width: 10px;
        height: 6px;
    }

    .gwcms-sub-row .icon-purchase::before {
        left: 7px;
        top: 4px;
        width: 4px;
        height: 2px;
    }

    .gwcms-sub-row .icon-job::after {
        left: 7px;
        top: 4px;
        width: 5px;
        height: 5px;
    }

    .gwcms-sub-row .icon-job::before {
        left: 5px;
        top: 13px;
        width: 8px;
        height: 3px;
    }

    .gwcms-sub-row {
        padding: 0 10px;
    }

    .gwcms-cd-list > li > a.gwcms-cd-item-title {
        font-size: 15px;
        padding-right: 5px;
    }
}