/* ==========================================================================
   基础重置
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    margin: 0;
}

/* 主题色 */
:root {
    --main-green: #1a9952;
    --main-green-dark: #138a3b;
    --page-width: 1350px;
}

/* ==========================================================================
   页头：logo + 导航 同一行，悬浮在头图上方
   ========================================================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: transparent;
}

.site-header-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 60px 20px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* logo 图片按比例缩放，窄屏时自动变小 */
.site-logo {
    flex: 1 1 auto;
    min-width: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: auto;
    max-height: 90px;
    max-width: 100%;
}

.site-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #1f1f1f;
    cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle-icon::before {
    top: -7px;
}

.nav-toggle-icon::after {
    top: 7px;
}

.nav-toggle.is-open .nav-toggle-icon {
    background: transparent;
}

.nav-toggle.is-open .nav-toggle-icon::before {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-icon::after {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav a {
    display: inline-block;
    background-color: #fff;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 30px;
    padding: 6px 20px;
    white-space: nowrap;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.site-nav a:hover,
.site-nav a:active {
    background-color: var(--main-green);
    color: #fff;
    border-color: var(--main-green);
}

/* 登录按钮固定绿色 */
.site-nav .site-nav-login {
    background-color: var(--main-green);
    color: #fff;
    border-color: var(--main-green);
}

/* ==========================================================================
   头图（文字覆盖层用 vw 单位，随图片等比缩放）
   ========================================================================== */
.banner {
    position: relative;
}

.banner img {
    display: block;
    width: 100%;
    height: auto;
}

.banner-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 13.5%;
    text-align: center;
}

/* 标题：白色描边（元素本身）+ 绿色渐变填充（::after 覆盖在上层） */
.banner-title {
    position: relative;
    font-family: "Yuanti SC", "YouYuan", "幼圆", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 2.7vw;
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
    -webkit-text-stroke: 0.04em #fff;
    text-shadow: 0 0.06em 0.2em rgba(20, 80, 45, 0.35);
}

.banner-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    -webkit-text-stroke: 0;
    text-shadow: none;
    background-image: linear-gradient(to right, #8cc63f 0%, #3aad5c 50%, #128a47 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner-divider {
    width: 60%;
    height: 2px;
    background-color: #fff;
    margin: 1.6% 0 2.4%;
}

.banner-desc {
    font-size: 1.25vw;
    color: #fff;
    line-height: 2.15;
    letter-spacing: 0.02em;
    text-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   通用：版块 / 标题 / MORE+ 按钮
   ========================================================================== */
.section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px 0;
}

.section-title {
    font-size: 50px;
    color: var(--main-green);
    font-weight: 400;
    line-height: 1.2;
    position: relative;
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 50px;
}

.section-title span {
    color: #000;
}

/* 细长下划线 */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: 90vw;
    height: 1px;
    background-color: var(--main-green);
}

/* 中间加粗短线 */
.section-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background-color: var(--main-green);
}

/* 长标题版块（虚拟仿真）下划线更宽 */
.section-title-wide::after {
    width: 800px;
}

.section-title-wide::before {
    width: 200px;
}

.section-more {
    margin: 40px 0;
}

.more-btn {
    display: inline-block;
    background-color: var(--main-green);
    color: #fff;
    font-size: 20px;
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.more-btn:hover {
    background-color: var(--main-green-dark);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   新闻中心
   ========================================================================== */
.news-content {
    width: 100%;
    max-width: var(--page-width);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

/* 轮播容器（类名供 Swiper 初始化使用，勿改） */
.carousel-container {
    position: relative;
    width: 700px;
    max-width: 100%;
    height: 470px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f2f2f2;
}

.carousel {
    display: flex;
}

.carousel.swiper-wrapper {
    transition-timing-function: ease-in-out;
}

.slide {
    width: 700px;
    height: 470px;
    flex-shrink: 0;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播底部标题条 */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-size: 16px;
}

/* 轮播分页小圆点（右下角） */
.dots.swiper-pagination {
    position: absolute;
    bottom: 15px;
    right: 15px;
    left: auto;
    width: auto;
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: 10px;
}

.swiper-pagination-bullet {
    opacity: 1;
    background-color: #fff;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    background-color: var(--main-green);
}

/* 新闻列表：与左侧轮播等高，两张卡片平分 */
.news-list {
    width: 390px;
    height: 470px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    padding: 20px;
    border-bottom: 2px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease,
        transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    background: #f4fff9;
    border-bottom-color: var(--main-green);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(26, 153, 82, 0.12);
}

/* 日期块 + 标题 */
.news-item-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.news-item-date {
    flex-shrink: 0;
    width: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    padding: 6px 0 5px;
    line-height: 1.2;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.news-item-day {
    font-size: 24px;
    font-weight: 700;
    color: var(--main-green);
    transition: color 0.3s ease;
}

.news-item-ym {
    font-size: 12px;
    color: #999;
    transition: color 0.3s ease;
}

.news-item:hover .news-item-date {
    background: var(--main-green);
    border-color: var(--main-green);
}

.news-item:hover .news-item-day,
.news-item:hover .news-item-ym {
    color: #fff;
}

.news-item-title {
    font-size: 17px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-item:hover .news-item-title {
    color: var(--main-green);
}

.news-item-summary {
    font-size: 13px;
    color: #737373;
    line-height: 1.8;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* 底部 MORE + 箭头 */
.news-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    font-size: 13px;
    color: #999;
}

.news-item-arrow {
    transition: transform 0.3s ease, color 0.3s ease;
}

.news-item:hover .news-item-foot {
    color: var(--main-green);
}

.news-item:hover .news-item-arrow {
    transform: translateX(6px);
}

/* ==========================================================================
   课程平台
   ========================================================================== */
.kcpt-intro {
    width: 100%;
    max-width: var(--page-width);
    font-size: 22px;
    color: #000;
    text-align: center;
    margin-bottom: 20px;
}

.kcpt-cards {
    width: 100%;
    max-width: var(--page-width);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.kcpt-card {
    flex: 0 1 430px;
    min-width: 280px;
    height: 285px;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.kcpt-card img {
    display: block;
    max-width: 60%;
    max-height: 150px;
    width: auto;
}

.kcpt-card-label {
    font-size: 28px;
    font-weight: 300;
    color: #000;
    white-space: nowrap;
    border: 2px solid var(--main-green);
    border-radius: 30px;
    padding: 0 60px;
    transition: background-color 0.3s, color 0.3s;
}

.kcpt-card:hover .kcpt-card-label {
    background-color: var(--main-green);
    color: #fff;
}

/* ==========================================================================
   虚拟仿真试验教学开放平台
   ========================================================================== */
.xnfz-list {
    width: 100%;
    max-width: var(--page-width);
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.xnfz-item {
    flex: 0 1 410px;
    min-width: 300px;
    background: #f8f8f8;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.xnfz-item:hover {
    background: var(--main-green-dark);
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(26, 153, 82, 0.18);
}

.xnfz-item a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 图片按 410:290 比例缩放，卡片变窄也不变形 */
.xnfz-item-pic {
    width: 100%;
    aspect-ratio: 410 / 290;
    overflow: hidden;
}

.xnfz-item-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.xnfz-item:hover .xnfz-item-pic img {
    transform: scale(1.08);
}

/* 标题条：居中文字，悬停滑出箭头 */
.xnfz-item-title {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    color: #1f1f1f;
    transition: color 0.3s ease;
}

.xnfz-item-title::after {
    content: '→';
    margin-left: 8px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.xnfz-item:hover .xnfz-item-title {
    color: #fff;
}

.xnfz-item:hover .xnfz-item-title::after {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
    width: 100%;
    background-color: var(--main-green);
    color: #fff;
    text-align: center;
    padding: 20px;
}

/* ==========================================================================
   响应式
   ========================================================================== */
/* 中等屏幕：页头回到普通文档流，避免覆盖内容 */
@media (max-width: 1200px) {
    .site-header {
        position: static;
        background-color: #fff;
        border-bottom: 1px solid #eee;
    }

    .site-header-inner {
        padding: 24px 28px;
    }

    .site-logo img {
        max-height: 54px;
    }

    .site-nav a {
        padding: 5px 14px;
        font-size: 15px;
    }

    .section-title-wide::after {
        width: 90vw;
        max-width: 800px;
    }
}

/* 小屏幕：新闻区上下排列，标题缩小 */
@media (max-width: 1160px) {
    .news-content {
        flex-direction: column;
        align-items: center;
    }

    .news-list {
        width: 100%;
        max-width: 700px;
        height: auto;
        min-height: 360px;
    }
}

@media (max-width: 900px) {
    .site-header {
        position: relative;
        z-index: 100;
    }

    .site-header-inner {
        min-height: 76px;
        padding: 14px 20px;
        gap: 16px;
    }

    .site-logo img {
        max-height: 44px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 10px 0 10px 10px;
        font-size: 15px;
        white-space: nowrap;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 12px 20px 20px;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-nav a {
        padding: 10px 8px;
        border: 0;
        border-radius: 0;
        text-align: center;
        background: transparent;
        font-size: 15px;
    }

    .site-nav .site-nav-login {
        background: transparent;
        color: var(--main-green);
    }

    .banner-text {
        padding: clamp(28px, 8vw, 70px) 24px 0;
    }

    .banner-title {
        font-size: clamp(18px, 3.9vw, 30px);
        line-height: 1.35;
        -webkit-text-stroke-width: 0.025em;
    }

    .banner-divider {
        width: min(70%, 560px);
        margin: 14px 0 18px;
    }

    .banner-desc {
        font-size: clamp(13px, 1.9vw, 16px);
        line-height: 1.8;
    }

    .section {
        padding-top: 42px;
    }

    .section-title {
        margin-bottom: 34px;
    }

    .xnfz-list {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    /* 仅手机端：纯白标题搭配阴影，提高图片背景上的辨识度 */
    .banner-title {
        color: #fff;
        font-weight: 700;
        -webkit-text-stroke: 0;
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.78);
    }

    .banner-title::after {
        content: none;
    }

    .banner-divider {
        display: none;
    }

    .section {
        padding-right: 16px;
        padding-left: 16px;
    }

    .section-title {
        font-size: 32px;
        padding-bottom: 12px;
        margin-bottom: 28px;
    }

    .section-title::after {
        width: min(300px, 84vw);
    }

    .section-title-wide {
        font-size: 28px;
    }

    .section-title-wide::before {
        width: 100px;
    }

    .banner-desc {
        display: none;
    }

    .carousel-container,
    .slide {
        height: auto;
        aspect-ratio: 7 / 4.7;
    }

    .caption {
        padding: 8px 38px 8px 10px;
        font-size: 13px;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dots.swiper-pagination {
        right: 8px;
        bottom: 8px;
        gap: 5px;
        padding: 3px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .news-list {
        min-height: 0;
        gap: 12px;
    }

    .news-item {
        min-height: 190px;
        padding: 16px;
    }

    .news-item-title {
        font-size: 16px;
    }

    .news-item-summary {
        -webkit-line-clamp: 2;
    }

    .kcpt-intro {
        font-size: 16px;
        line-height: 1.9;
        margin-bottom: 18px;
    }

    .kcpt-cards {
        gap: 12px;
    }

    .kcpt-card {
        flex-basis: calc(50% - 6px);
        min-width: 0;
        height: 230px;
        gap: 14px;
    }

    .kcpt-card img {
        max-height: 112px;
    }

    .kcpt-card-label {
        max-width: calc(100% - 20px);
        padding: 2px 16px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kcpt-card-label {
        font-size: 17px;
    }

    .xnfz-list {
        gap: 16px;
    }

    .xnfz-item {
        flex-basis: calc(50% - 8px);
        min-width: 0;
    }

    .xnfz-item-title {
        height: 48px;
        font-size: 16px;
    }

    .section-more {
        margin: 28px 0;
    }

    .more-btn {
        padding: 8px 16px;
        border-radius: 12px;
        font-size: 16px;
    }

    .site-footer {
        padding: 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        padding-right: 16px;
        padding-left: 16px;
    }

    .site-logo img {
        max-height: 42px;
    }

    .nav-toggle-label {
        display: none;
    }

    .nav-toggle {
        padding-left: 8px;
    }

    .banner-text {
        padding-top: 55px;
    }

    .banner-title {
        font-size: 16px;
    }

    .banner-divider {
        width: 78%;
    }

    .section-title-wide {
        font-size: 25px;
    }

    .kcpt-card {
        flex-basis: 100%;
        height: 210px;
    }

    .xnfz-item {
        flex-basis: 100%;
    }

    .xnfz-item-title {
        height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
