/* Blog archive, category filters and article cards */

/* ==================================================
   自定义 BLOG / 文章分类页
================================================== */

.custom-blog-archive {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

.custom-blog-container {
    width: calc(100% - 40px);
    max-width: 1360px;
    margin-right: auto;
    margin-left: auto;
}


/* ==================================================
   Banner
================================================== */

.custom-blog-hero {
    position: relative;
    display: flex;
    align-items: center;

    min-height: 430px;
    padding: 145px 0 75px;

    overflow: hidden;
    background-color: #121820;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.custom-blog-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            90deg,
            rgba(9, 15, 22, 0.88) 0%,
            rgba(9, 15, 22, 0.55) 48%,
            rgba(9, 15, 22, 0.35) 100%
        );
}

.custom-blog-hero__inner {
    position: relative;
    z-index: 2;
}

.custom-blog-hero__title {
    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    text-transform: uppercase;
}


/* ==================================================
   分类筛选
================================================== */

.custom-blog-filter {
    width: 100%;
    padding: 19px 0;
    background: #ffffff;
    border-bottom: 1px solid #edf0f2;
}

.custom-blog-filter__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-blog-filter__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    margin: 0 !important;
    padding: 8px 18px;

    color: #52606d !important;
    background: #f4f7f9;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.custom-blog-filter__link:hover {
    color: #005732 !important;
    background: #edf5f1;
    transform: translateY(-1px);
}

.custom-blog-filter__link.is-active {
    color: #ffffff !important;
    background: #005732;
}


/* ==================================================
   文章网格
================================================== */

.custom-blog-posts {
    width: 100%;
    padding: 56px 0 100px;
    background: #ffffff;
}

.custom-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}


/* ==================================================
   文章卡片
================================================== */

.custom-blog-card {
    position: relative;
    display: flex;
    flex-direction: column;

    min-width: 0;
    margin: 0 !important;
    padding: 10px !important;

    overflow: hidden;
    background: #ffffff;

    border: 2px solid #d9dfdc;
    border-radius: 10px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.custom-blog-card:hover {
    border-color: #005732;
    box-shadow: 0 16px 35px rgba(18, 43, 31, 0.10);
    transform: translateY(-4px);
}

.custom-blog-card__image-link {
    display: block;
    width: 100%;
    text-decoration: none !important;
}

.custom-blog-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    background: #eef1f2;
    border-radius: 8px;
}

.custom-blog-card__image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover;
    object-position: center;

    transition: transform 0.4s ease;
}

.custom-blog-card:hover .custom-blog-card__image img {
    transform: scale(1.045);
}

.custom-blog-card__placeholder {
    width: 100%;
    height: 100%;
    background: #eef1f2;
}

/* 图片上的分类标签 */
.custom-blog-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    min-height: 28px;
    padding: 5px 12px;

    color: #005732;
    background: rgba(255, 255, 255, 0.94);

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}


/* 卡片正文 */
.custom-blog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 15px 4px 5px;
}

.custom-blog-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 10px;

    color: #818a91;
    font-size: 11px;
    line-height: 1.35;
}

.custom-blog-card__meta > span:not(:last-child)::after {
    content: "•";
    margin-left: 7px;
    color: #a8afb4;
}

.custom-blog-card__category {
    color: #33755a !important;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.custom-blog-card__title {
    margin: 0 0 11px !important;
    padding: 0 !important;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: none !important;
}

.custom-blog-card__title a {
    color: #172033 !important;
    text-decoration: none !important;
}

.custom-blog-card__title a:hover {
    color: #005732 !important;
}

.custom-blog-card__excerpt {
    margin-bottom: 17px;

    color: #69737c;
    font-size: 13px;
    line-height: 1.65;
}

.custom-blog-card__excerpt p {
    margin: 0 !important;
}

.custom-blog-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    width: max-content;
    margin-top: auto;

    color: #287355 !important;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
}

.custom-blog-card__more:hover {
    color: #005732 !important;
}


/* ==================================================
   分页
================================================== */

.custom-blog-pagination {
    margin-top: 50px;
}

.custom-blog-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.custom-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    margin: 0 !important;

    color: #4c5964 !important;
    background: #ffffff;

    border: 2px solid #dde3e0;
    border-radius: 50%;

    text-decoration: none !important;
}

.custom-blog-pagination .page-numbers.current,
.custom-blog-pagination .page-numbers:hover {
    color: #ffffff !important;
    background: #005732;
    border-color: #005732;
}


/* ==================================================
   BLOG 与文章分类页：透明页眉覆盖 Banner
================================================== */

body.blog #header .header-wrapper:not(.stuck):not(.is-sticky),
body.category #header .header-wrapper:not(.stuck):not(.is-sticky) {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;

    width: 100% !important;
    z-index: 9999 !important;

    background: transparent !important;
    box-shadow: none !important;
}

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-main,

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-main,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color {
    background: transparent !important;
    background-color: transparent !important;
}

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky)
.header-nav-main > li > a,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky)
.header-nav-main > li > a {
    color: #ffffff !important;
}

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-search,

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-user,

body.blog #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-menu,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-search,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-user,

body.category #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-menu {
    color: #ffffff !important;
}


/* ==================================================
   整张文章卡片可点击
================================================== */

.custom-blog-card {
    cursor: pointer;
}

/* 整张卡片链接 */
.custom-blog-card__link {
    display: flex;
    flex: 1;
    flex-direction: column;

    width: 100%;
    height: 100%;

    color: inherit !important;
    text-decoration: none !important;
}

/* 禁止悬停时出现链接下划线 */
.custom-blog-card__link:hover,
.custom-blog-card__link:focus {
    color: inherit !important;
    text-decoration: none !important;
}

/* 键盘操作时显示焦点边框 */
.custom-blog-card__link:focus-visible {
    outline: 2px solid #005732;
    outline-offset: 3px;
    border-radius: 8px;
}

/* 标题颜色 */
.custom-blog-card__title {
    color: #172033 !important;
}

/* 整张卡片悬停时标题变绿 */
.custom-blog-card:hover .custom-blog-card__title {
    color: #005732 !important;
}

/* Read More 保持绿色 */
.custom-blog-card__more {
    color: #287355 !important;
}