﻿ 
/* 推荐起点：行高 1.25 ~ 1.4，段后间距 8px */
.tight {
    line-height: 1.25;
    margin: 0 0 8px 0;
}

.style-bg {
    display: inline-block; /* 必须：让宽度按内容自动收缩 */
    width: auto; /* 确保没有被其它样式强制撑满 */
    white-space: nowrap; /* 可选：避免文字换行后撑大背景 */
    background-color: #ac010a;
    color: white;
    border-radius: 30px;
    padding: 2px 6px; /* 根据喜好微调：上下2px，左右6px */
    line-height: 1.2; /* 垂直居中 */
    font-size: 22px;
    /* 不要在这里写 text-align:center，否则会被当块级元素居中 */
    display: table; /* 让元素宽度随内容收缩，又能用 margin auto */
    margin: 8px auto; /* 上下 8px 间距，左右 auto */
}

#co-institution .card-img-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #co-institution .card-img-wrapper img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

#co-institution .card {
    border-radius: .75rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

    #co-institution .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,.1);
    }
/* 三行文本截断 + 两端对齐 + 唯一／最后一行左对齐 */
#line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    /* 下面两行实现：多行时每一行都两端对齐，唯一一行或最后一行左对齐 */
    text-align: justify;
    text-align-last: left;
}

#co-institution .line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-align: justify; /* 多行时两端对齐 */
    text-align-last: left; /* 尝试让最后一行左对齐（部分浏览器可能不生效） */
}

    #co-institution .line-clamp-3.single-line {
        text-align: left !important; /* 单行时强制左对齐 */
    }

.h-justify-content-center {
}

.brand-marquee-area .brand-marquee-wrap {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.brand-marquee-area .brand-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    width: 200%;
    animation: brandMarqueeScroll 55s linear infinite;
    will-change: transform;
}

    .brand-marquee-area .brand-marquee-track:hover {
        animation-play-state: paused;
    }

.brand-marquee-area .brand-marquee-group {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(5, auto);
    flex: 0 0 50%;
    width: 50%;
    min-width: 50%;
}

.brand-marquee-area .brand-marquee-item {
    width: 100%;
    max-width: none;
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 10px;
}

.brand-marquee-area .blog-post-item {
    margin-bottom: 0;
}

.brand-marquee-area .blog-post-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 4px;
}

    .brand-marquee-area .blog-post-thumb a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .brand-marquee-area .blog-post-thumb img {
        width: auto;
        max-width: 100%;
        max-height: 82px;
        object-fit: contain;
    }

@keyframes brandMarqueeScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 767.98px) {
    .brand-marquee-area .brand-marquee-track {
        animation-duration: 40s;
    }

    .brand-marquee-area .brand-marquee-item {
        padding-left: 3px;
        padding-right: 3px;
        margin-bottom: 8px;
    }

    .brand-marquee-area .blog-post-thumb {
        min-height: 64px;
    }

        .brand-marquee-area .blog-post-thumb img {
            max-height: 58px;
        }
}

.carousel-inner img {
    max-width: 100%;
    height: auto;
}

.blog-post-item {
    position: relative;
}

#co-institution .blog-post-thumb:hover:before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #808080;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

#co-institution .blog-post-thumb:hover:after {
    content: attr(data-title);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    background: #e9e9e9;
    color: #333;
    border: 1px solid #808080;
    padding: 10px;
    font-size: 14px;
    width: 500px;
    text-align: justify;
    border-radius: 10px;
    z-index: 10000;
    transform: translateX(-50%)
}

#co-institution .blog-post-thumb[data-title='']:hover:after {
    display: none;
}

#co-institution .blog-post-thumb[data-title='']:hover:before {
    display: none;
}

.detection-process {
    margin-bottom: 30px;
}

    .detection-process img {
        border-radius: 10px;
    }

.detection-process-msg {
    text-align: center;
    margin-top: 5px;
    font-family: 'DM Sans', sans-serif;
    font-weight: bold;
    color: #444;
}

.detection-process-box {
    overflow: hidden;
    position: relative;
}

.detection-process-tag {
    position: absolute;
    left: -70px;
    top: 15px;
    width: 200px;
    text-align: center;
    transform: rotate(-45deg);
    font-family: 'DM Sans', sans-serif;
    background-color: #AC010A;
    color: #fff;
    font-size: 14px;
}

.detection-process-detail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background-color: #AC010A;
    padding: 5px 20px;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    display: none;
}

.detection-process-box:hover .detection-process-detail {
    display: block;
}

.about-img-current {
    width: 100%;
    height: auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
}

.section-title .sub-title {
    font-size: 20px;
    position: relative;
    line-height: normal;
    font-weight: 500;
    display: inline-block;
    color: var(--tg-primary-color);
    padding-left: 80px;
    margin-bottom: 15px;
}

    .section-title .sub-title::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 2px;
        background: var(--tg-primary-color);
    }


/* ---------- 懒加载 & loading 样式 ---------- */

/* 图片容器：确保定位上下文 */
.ft-news-thumb {
    position: relative;
    overflow: hidden;
    background: #f6f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* 图片：初始透明，加载成功后加 .loaded 再变为不透明 */
    .ft-news-thumb img.lazy-img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 420ms ease, transform 420ms ease;
        transform: scale(1.02); /* 微微放大会让淡入更柔和 */
    }

        /* 图片加载完成时 */
        .ft-news-thumb img.lazy-img.loaded {
            opacity: 1;
            transform: scale(1);
        }

/* 占位与小 spinner 覆盖层 */
.thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* 点击穿透图片到 a 元素 */
    background: linear-gradient(180deg, rgba(255,255,255,0.00), rgba(255,255,255,0.00));
    z-index: 2;
}

/* 小 spinner 圆环（纯 CSS） */
.thumb-spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: #AC010A; /* 用你的主色 */
    animation: ft-spin 1s linear infinite;
    box-sizing: border-box;
}

/* 失败图标（当图片加载失败时显示） */
.thumb-error {
    font-size: 13px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* spinner 动画 */
@keyframes ft-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 小屏更小的 spinner */
@media (max-width: 576px) {
    .thumb-spinner {
        width: 22px;
        height: 22px;
        border-width: 2.5px;
    }
}


/* 分页风格（与页面主色 #AC010A 协调） */
#ftNewsPagerContainer {
    width: 100%;
}

/* 分页外观 */
#ftNewsPager {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

    /* 每个分页项 */
    #ftNewsPager .page-item {
        display: inline-block;
    }

    /* 链接样式 */
    #ftNewsPager .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 38px;
        padding: 6px 10px;
        margin: 0 3px;
        font-size: 14px;
        line-height: 1;
        border-radius: 8px;
        background: #ffffff;
        color: #333333;
        border: 1px solid rgba(0,0,0,0.06);
        text-decoration: none;
        cursor: pointer;
        transition: all .16s ease;
        box-shadow: 0 2px 6px rgba(18,38,63,0.03);
    }

        /* hover / focus */
        #ftNewsPager .page-link:hover,
        #ftNewsPager .page-link:focus {
            transform: translateY(-2px);
            color: #ffffff;
            background: #AC010A;
            border-color: #AC010A;
            outline: none;
        }

    /* 当前页样式 */
    #ftNewsPager .page-item.active .page-link {
        background: #AC010A;
        color: #fff;
        border-color: #AC010A;
        box-shadow: 0 6px 18px rgba(172,1,10,0.12);
        cursor: default;
    }

    /* 禁用项样式（比如上一页在第一页时） */
    #ftNewsPager .page-item.disabled .page-link,
    #ftNewsPager .page-item.disabled .page-link:hover {
        color: #bdbdbd;
        background: #fff;
        border-color: #f0f0f0;
        pointer-events: none;
        transform: none;
        box-shadow: none;
    }

    /* 省略号项（如果用到） */
    #ftNewsPager .page-item.ellipsis .page-link {
        cursor: default;
    }

/* 小屏适配：更紧凑 */
@media (max-width: 576px) {
    #ftNewsPager .page-link {
        padding: 6px 8px;
        min-width: 32px;
        font-size: 13px;
        border-radius: 6px;
    }

    #ftNewsPager {
        gap: 4px;
    }
}


/* CSS 放在全局样式表 */
#loading-overlay {
    position: fixed;
    inset: 0; /* top:0; left:0; right:0; bottom:0; */
    background: none;
    z-index: 9999;
    display: block; /* 永远占位 */
    opacity: 0; /* 初始透明 */
    pointer-events: none; /* 不阻断点击 */
    transition: opacity 0.3s ease; /* 0.3s 淡入淡出 */
}

    #loading-overlay.active {
        opacity: 1;
        pointer-events: auto; /* 激活时阻断底下操作 */
    }

    #loading-overlay .spinner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* 按钮样式：默认使用 bootstrap btn-outline-secondary 风格，active 时变红 */
.news-filter-group .filter-btn {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    color: #333;
    background: transparent;
    border: 1px solid #d8d8d8;
}

    .news-filter-group .filter-btn:hover {
        color: #ffffff;
        border-color: #ffffff;
    }

    .news-filter-group .filter-btn.active,
    .news-filter-group .filter-btn:active,
    .news-filter-group .filter-btn[aria-pressed="true"] {
        background: #AC010A;
        color: #fff;
        border-color: #AC010A;
    }

/* 内联样式：可移动到你的 CSS 文件 */
.ft-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.ft-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 6px 18px rgba(18,38,63,0.04);
    display: flex;
    flex-direction: column;
}

    .ft-news-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(18,38,63,0.08);
    }

.ft-news-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f6f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ft-news-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.ft-news-body {
    padding: 12px 14px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.ft-news-title {
    font-size: 15px;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #222;
    flex: 0 0 auto;
}

.ft-news-excerpt {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示 3 行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.ft-news-meta {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* 响应式 */
@media (max-width: 1199.98px) {
    .ft-news-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media (max-width: 991.98px) {
    .ft-news-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 575.98px) {
    .ft-news-grid {
        grid-template-columns: repeat(1,1fr);
    }
}

@@supports not (aspect-ratio: 16/9) {
    .ft-news-thumb {
        height: 0;
        padding-bottom: 56.25%;
    }
}

/ /* image-wrapper 保持图片居中 */
.image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* image-frame：关键，inline-block 使其宽度等于图片宽度 */
.image-frame {
    position: relative;
    display: inline-block;
}

/* 图片样式（尽量放大但不溢出视口） */
#imageModalImg {
    display: block;
    width: auto;
    max-width: 90vw; /* 桌面下图片最大占视口 90% 宽 */
    max-height: 80vh; /* 图片最大高度 */
    object-fit: contain;
    margin: 0;
}

/* 关闭按钮：相对 image-frame 的右上角 */
.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2200; /* 高于 caption */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45); /* 半透明背景，保证在亮图上也能看见 */
    box-shadow: 0 6px 16px rgba(0,0,0,0.24);
    border: none; /* 去掉默认边框 */
}

    /* 调整内部 X 图标大小/颜色（bootstrap 的 .btn-close-white 已提供白色叉） */
    .image-modal-close .btn-close {
        filter: none;
    }

/* caption：绝对定位在 image-frame 底部，left/right=0 使宽度与 image-frame 一致 */
.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000; /* 低于关闭按钮 */
    background: rgba(0,0,0,0.42); /* 半透明黑，感觉更通透 */
    color: #fff;
    padding: 12px 14px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.6;
    max-height: 22vh; /* 避免遮盖太多图片，可按需调整 */
    overflow-y: auto;
    word-break: break-word;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 小屏适配：modal 全屏，图片与 caption 尺寸调整 */
@media (max-width: 576px) {
    #imageModalImg {
        max-width: 100vw;
        max-height: 60vh;
    }

    .image-caption {
        font-size: 13px;
        padding: 10px;
        max-height: 30vh;
    }

    .image-modal-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
}

/* 可选：当图片很窄时让 caption 的文字左对齐更美观 */
.image-caption p, .image-caption span {
    text-align: left;
    margin: 0;
}

 
