﻿/* 内页公共骨架：顶部 Banner + 面包屑 + 两栏布局 + 左侧栏目导航
   科研成果 / 师资队伍 / 文章详情等内页共用，避免同一份样式在各页面 CSS 里重复维护。
   各页面自己的 .page-main 间距、正文样式仍留在对应的页面 CSS 中。 */

/* ========== 顶部 Banner（整图通栏，1920×330） ========== */
.page-banner {
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.page-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* ========== 面包屑 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 21px 0 20px;
}

.breadcrumb-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    display: block;
}

.breadcrumb-text {
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 26px;
    color: var(--text-sub);
}

.breadcrumb-text a {
    color: var(--text-sub);
}

.breadcrumb-text a:hover {
    color: var(--primary-red);
}

.breadcrumb-sep {
    margin: 0 3px;
}

/* ========== 两栏布局（左 300 / 间距 101 / 右自适应） ========== */
.content-wrap {
    display: flex;
    align-items: flex-start;
    gap: 101px;
}

/* ========== 左侧栏目导航 ========== */
.side {
    flex-shrink: 0;
    width: 300px;
}

/* 栏目标题：底边为浅弧线，直接用背景图，不叠色 */
.side-hero {
    position: relative;
    z-index: 2;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../hnu-images/achievements/ach-side.png') center / 100% 100% no-repeat;
    border-radius: 0 0 50% 50% / 0 0 14px 14px;
}

.side-hero-title {
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 40px;
    color: #fff;
}

/* 导航卡片：上缘被 hero 遮住 39px，左右各留 8px */
.side-card {
    position: relative;
    z-index: 1;
    width: 284px;
    margin: -39px auto 0;
    padding: 57px 0 44px;
    background: #fff;
    border: 1px solid #EFD6D6;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
}

/* 各项等高 50，项间距 5 */
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.side-nav-item {
    position: relative;
    display: block;
    height: 50px;
    text-align: center;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-size: 18px;
    line-height: 50px;
    color: var(--text-main);
    transition: color 0.2s;
}

/* 激活项：整条红底 + 内描边 */
.side-nav-item.is-active {
    background: var(--primary-red);
    color: #fff;
}

.side-nav-item.is-active::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid #DF6362;
    pointer-events: none;
}

/* 非激活项悬停：仅文字变红 */
.side-nav-item:not(.is-active):hover {
    color: var(--primary-red);
}

/* ---------- 三级栏目：箭头 + 展开子项 ---------- */
/* 箭头：默认向下，展开后向上；带放大热区，可点击展开/收起 */
.side-nav-arrow {
    position: absolute;
    top: 50%;
    right: 35px;
    width: 14px;
    height: 12px;
    background-color: var(--gold);
    /* 内联 SVG（data URI）避免 file:// 下加载本地 SVG 作为 mask 被拦截而不显示 */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M12.8433 10.8713C12.0965 11.5984 11.1079 11.9931 10.0624 11.9931C9.00971 11.9931 8.02108 11.5915 7.28138 10.8713L6.99688 10.5943L6.71239 10.8713C5.97269 11.5984 4.98406 12 3.93142 12C2.87877 12 1.89014 11.5984 1.14333 10.8713C-0.385844 9.37565 -0.378732 6.94518 1.15045 5.44951L6.56302 0.180035C6.68394 0.0623198 6.84041 0 7.004 0C7.16758 0 7.32406 0.0623198 7.44497 0.180035L12.8575 5.44951C14.3867 6.95211 14.3796 9.38257 12.8433 10.8713ZM12.2601 6.03808L7.01111 0.927871L1.76212 6.03808C0.560112 7.20831 0.553 9.11252 1.74789 10.2897C2.33111 10.8575 3.10637 11.1691 3.93142 11.1691C4.75646 11.1691 5.53172 10.8575 6.11494 10.2897L6.99688 9.43104L7.87883 10.2897C8.46205 10.8575 9.23731 11.1691 10.0624 11.1691C10.8874 11.1691 11.6627 10.8575 12.2459 10.2897C13.4408 9.11945 13.4479 7.21523 12.2601 6.03808Z' fill='white'/%3E%3Cpath d='M7 2L1.80385 7.25H12.1962L7 2Z' fill='white'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M12.8433 10.8713C12.0965 11.5984 11.1079 11.9931 10.0624 11.9931C9.00971 11.9931 8.02108 11.5915 7.28138 10.8713L6.99688 10.5943L6.71239 10.8713C5.97269 11.5984 4.98406 12 3.93142 12C2.87877 12 1.89014 11.5984 1.14333 10.8713C-0.385844 9.37565 -0.378732 6.94518 1.15045 5.44951L6.56302 0.180035C6.68394 0.0623198 6.84041 0 7.004 0C7.16758 0 7.32406 0.0623198 7.44497 0.180035L12.8575 5.44951C14.3867 6.95211 14.3796 9.38257 12.8433 10.8713ZM12.2601 6.03808L7.01111 0.927871L1.76212 6.03808C0.560112 7.20831 0.553 9.11252 1.74789 10.2897C2.33111 10.8575 3.10637 11.1691 3.93142 11.1691C4.75646 11.1691 5.53172 10.8575 6.11494 10.2897L6.99688 9.43104L7.87883 10.2897C8.46205 10.8575 9.23731 11.1691 10.0624 11.1691C10.8874 11.1691 11.6627 10.8575 12.2459 10.2897C13.4408 9.11945 13.4479 7.21523 12.2601 6.03808Z' fill='white'/%3E%3Cpath d='M7 2L1.80385 7.25H12.1962L7 2Z' fill='white'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: translateY(-50%) rotate(180deg);
    transition: transform 0.3s, background-color 0.2s;
    cursor: pointer;
}

.side-nav-arrow::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
}

.side-nav-item.is-open .side-nav-arrow {
    transform: translateY(-50%);
}

.side-nav-item.is-active .side-nav-arrow {
    background-color: #fff;
}

/* 三级栏目：默认收起，点击箭头展开 */
.side-nav-subs {
    display: none;
    margin-top: 10px;
}

.side-nav-item.is-open + .side-nav-subs {
    display: block;
}

/* 父项未激活（无红底）时展开，子项紧贴父项，避免中间空档过大 */
.side-nav-item:not(.is-active) + .side-nav-subs {
    margin-top: 0;
}

.side-nav-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 41px;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 41px;
    color: #8B8B8B;
    transition: color 0.2s;
}

.side-nav-sub::before {
    content: '';
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.side-nav-sub.is-active,
.side-nav-sub:hover {
    color: var(--primary-red);
}

/* ============================================================
   响应式：移动端（≤767px）；平板（768–1279px）为过渡兜底
   ============================================================ */
@media (min-width: 768px) and (max-width: 1279px) {
    .content-wrap {
        gap: 30px;
    }

    .side {
        width: 240px;
    }

    .side-card {
        width: 230px;
        padding: 40px 0 30px;
    }

    .side-hero-title {
        font-size: 24px;
    }

    .side-nav-item {
        font-size: 16px;
    }
}

@media (max-width: 767px) {

    /* ---------- 顶部 Banner：150px，裁切铺满 ---------- */
    .page-banner {
        height: 150px;
    }

    .page-banner img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }

    /* ---------- 面包屑 ---------- */
    .breadcrumb {
        gap: 9px;
        padding: 12px 0 15px;
    }

    .breadcrumb-icon {
        width: 12px;
        height: 12px;
    }

    .breadcrumb-text {
        font-size: 12px;
        line-height: 16px;
    }

    /* ---------- 栏目标题：整条红底（高 36），左对齐 + 白色竖条 ---------- */
    .content-wrap {
        display: block;
    }

    .side {
        width: 100%;
        margin-bottom: 14px;
    }

    .side-hero {
        height: 36px;
        justify-content: flex-start;
        padding-left: 21px;
        background: var(--primary-red);
        border-radius: 0;
    }

    .side-hero::before {
        content: '';
        position: absolute;
        left: 10px;
        top: 50%;
        width: 3px;
        height: 14px;
        transform: translateY(-50%);
        background: #fff;
    }

    .side-hero-title {
        font-size: 15px;
        line-height: 1;
    }

    /* 设计稿中移动端不展示左侧栏目导航列表 */
    .side-card {
        display: none;
    }
}