@viewport {
    width: 1920px;
}

body {
    background-color: #000;
    color: white;
    font-family: "AlibabaPuHuiTi-Regular";
    font-weight: normal;
    transition: all 1s ease;
}


/* .active-yellow-body {
    background-color: #FFA12E;
    transition: all 1s ease;
} */


.news-add .news-add-imag::after {
    font-size: 10vw;
}

.news-add .news-add-imag:hover::after {
    animation: scrollText1 7s linear infinite;
}

@keyframes scrollText1 {
    0% {
        left: 50%;
    }

    100% {
        left: -70%;
    }
}

/* 分割线动效 */
.line {
    margin-top: 1vw;
    transition: transform 1s ease-in;
    transform-origin: 0% 50%;
    transform: scaleX(0);
}

.line.active {
    transform: scaleX(1);
}

.message-text {
    display: flex;
    justify-content: flex-end;
}

.message-text p {
    width: 50%;
}

.w3_agile_portfolio_grid1,
.w3_agile_portfolio_grid {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.project-news-image-container:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

/* 遮罩层 */
.news-image-container::before {
    width: 100%;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: yellow;
    /* 设置遮罩层颜色 */
    opacity: 0;
    /* 默认隐藏 */
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* 确保遮罩层不阻止鼠标指针 */
    z-index: 1;
    /* 遮罩层在图片上方 */
    /* border-radius: 50%; */
}

/* 鼠标悬停时显示遮罩层 */
.news-image-container:hover::before {
    opacity: 1;
    /* 显示遮罩层 */
}

/* 滚动的文字 */
.news-image-container::after {
    content: "READ MORE";
    /* 在 CSS 中直接写文字 */
    position: absolute;
    top: 50%;
    /* 使文字垂直居中 */
    left: 100%;
    /* 让文字从右侧开始 */
    transform: translateY(-50%);
    /* 使文字垂直居中 */
    color: #000;
    font-size: 6vw;
    /* 设置字体大小 */
    z-index: 2;
    /* 确保文字位于遮罩层之上 */
    white-space: nowrap;
    /* 防止文字换行 */
    transition: left 0.3s ease;
    /* 控制文字从右到左的过渡效果 */
}

/* 鼠标悬停时启动滚动效果 */
.news-image-container:hover::after {
    animation: scrollText 10s linear infinite;
    /* 启动滚动动画 */
}

/* 动画：让文字从右到左滚动 */
@keyframes scrollText {
    0% {
        left: 10%;
        /* 从右侧开始 */
    }

    100% {
        left: -100%;
        /* 滚动到左侧，直到完全离开视野 */
    }
}




p {
    font-family: "AlibabaPuHuiTi-Regular";
    font-size: 1.5vw;
    color: white;
    font-weight: normal;
}

h1 {
    font-family: "AlibabaPuHuiTi-Bold";
    color: white;
    font-weight: 500;
    font-size: 6vw;
}

.title-cn {
    font-size: 4.5vw;
}

h2 {
    font-family: "AlibabaPuHuiTi-Bold";
    font-weight: 700;
    font-size: 8.10vw;
    line-height: 5vw;
    font-style: italic;
}

h3 {
    font-family: "AlibabaPuHuiTi-Regular";
    font-weight: normal;
    font-size: 1.5vw;
    color: white;
    line-height: 1.6;
}

span {
    font-family: "AlibabaPuHuiTi-Regular";
    color: white;
    font-weight: normal;
}

p1 {
    font-family: "AlibabaPuHuiTi-Regular";
    font-size: 0.8vw;
    margin-top: 1vw;
    color: white;
    font-weight: normal;
}

a {
    font-family: "AlibabaPuHuiTi-Regular";
    color: white;
    font-weight: normal;
    font-size: 1.39vw;
}

@media (max-width: 960px) {
    h2 {
        font-size: 8vw;
    }

    h3 {
        font-size: 3.3vw;
        color: white;
        line-height: 1.6;
        /* margin-left: -50%; */
    }

    p2 {
        font-family: "AlibabaPuHuiTi-Regular";
        font-size: 4vw;
        margin-top: 1vw;
        color: white;
        font-weight: normal;
    }

    p1 {
        font-family: "AlibabaPuHuiTi-Regular";
        font-size: 2vw;
        margin-top: 1vw;
        color: white;
        font-weight: normal;
    }

    .navbar .navbar-brand img {
        width: 36vw;

        transition: all 2s ease;
    }
}

.news-ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}


.news-li {
    width: 50%;
    height: auto;
    margin-bottom: 10.7vw;
}

.w3_agile_portfolio_grid1,
.w3_agile_portfolio_grid {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: auto;
}

.news-image-container {
    position: relative;
    width: 30vw;
    height: 30vw;
}


.radius-image,
.rectangle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-li:nth-child(1) .radius-image,
.news-li:nth-child(4) .rectangle-image,
.news-li:nth-child(1) .news-image-container::before,
.news-li:nth-child(4) .news-image-container::before {
    border-radius: 50%;
}

.text-lines {
    width: 30vw;
    margin-top: 2vw;
    text-align: left;
    position: relative;
}

.news-title {
    font-size: 1.2vw;
    font-weight: normal;
    position: absolute;
    color: white;
    margin: 0;
    max-width: 90%;
    transform: translate(-50%, -50%);
    line-height: 2.5vw;
    /* 设置合理的行高，避免文字重叠 */
    word-wrap: break-word;
    /* 允许文字换行 */
}


.news-title:nth-child(1) {
    top: 40%;
    left: 20%;
    transform: translate(-50%, -50%);
}

.news-title:nth-child(2) {
    top: 40%;
    left: 34%;
    transform: translate(-50%, -50%);
}

.news-text {
    font-size: 1.39vw;
    font-weight: 400;
    color: #FFF;
    line-height: 2.5vw;

}

.news-img {
    width: 20vw;
    height: auto;
}




@media (max-width: 768px) {

    .text-lines {
        width: 100%;
        margin-top: 0;
    }

    .news-add .text-lines {
        width: 50%;
    }

    .news-li {
        width: 48%;
        margin-bottom: 30px;
    }

    .news-image-container {
        width: 100%;
        height: 100vw;
    }


    .news-title {
        font-size: 2.8vw;
        top: 40% !important;
        left: 50% !important;
        width: 100%;
        text-align: center;
    }

    .news-text {
        font-size: 2.4vw;
        line-height: 4vw;
    }

    .news-img {
        display: block;
        width: 100% !important;
        height: auto;
        margin: 0 auto;
    }

    .news-image-container {
        position: relative;
        width: 100%;
        height: auto;
    }


    .radius-image {
        width: 40vw;
        /* 让宽度占满容器 */
        height: auto;
        /* 让高度自适应宽度 */
        aspect-ratio: 1 / 1;
        /* 强制保持 1:1 的宽高比，确保为圆形 */
        object-fit: cover;
        /* 保证图片保持比例并充满容器 */
        /* border-radius: 50%; */
        /* 圆形 */
    }

    /* 设置正方形图片 */
    .rectangle-image {
        width: 40vw;
        /* 宽度为容器的 100% */
        height: auto;
        /* 高度自适应宽度 */
        aspect-ratio: 1 / 1;
        /* 强制保持 1:1 的宽高比，确保为正方形 */
        object-fit: cover;
        /* 保证图片填充满容器 */
    }

    .news-image-container::after {
        font-size: 13vw;
    }

    .news-ul:nth-child(1) .news-li:nth-child(1) .news-title {
        left: 40% !important;
    }

    .news-ul:nth-child(2) .news-li:nth-child(4) .news-title {
        left: 40% !important;
    }

}

/* 默认样式 */
.message-text p {
    width: 100%;
    font-size: 1.5vw;
    /* 使用视口宽度单位，使字体大小随着屏幕宽度变化 */
    color: white;
    margin-left: 20px;
    /* 改小了左边距，避免过大的偏移 */
    margin-top: 30px;
    margin-bottom: 30px;
    line-height: 1;
    text-align: left;
}

/* 响应式设计：在屏幕宽度大于 768px 时调整字体和布局 */
@media (max-width: 768px) {
    .row {
        flex-direction: row;
        /* 保证小屏幕上元素依然在一排 */
    }

    #messageText {
        font-size: 3vw;
        /* 小屏幕下文字稍微缩小 */
    }

    .ql-size-huge {
        font-size: 4vw;
        /* 更大的字体适应小屏幕 */
        margin-left: 10px;
        /* 更小的左边距 */
    }
}

/* 响应式设计：在屏幕宽度小于 480px 时调整字体和布局 */
@media (max-width: 480px) {
    .ql-size-huge {
        font-size: 10vw;
        /* 适应超小屏幕，进一步放大字体 */
        margin-left: 5px;
        /* 更小的左边距 */
    }
}

@media (max-width: 768px) {
    .news-items {
        flex-direction: column;
        /* 在小屏设备上切换为纵向布局 */
        align-items: center;
        /* 确保矩形居中 */
    }

    .news-item {
        width: 80%;
        /* 矩形宽度设为80% */
        margin-bottom: 20px;
        /* 每个矩形之间增加间距 */
    }

    .news-text {
        height: auto;
        /* 调整文本区域高度 */
    }

    #myVideo {
        height: 25px !important;
        object-fit: fill !important;
    }
}