﻿/* ==========================================================
   首页移动端样式 - 基于蓝湖「首页wap2」设计稿还原
   作用范围：视口宽度 ≤768px
   原则：通过独立样式文件覆盖 PC 样式，不修改 PC 端代码
   ========================================================== */

@media (max-width: 768px) {

    /* ---------- 基础 ---------- */
    .home-page {
        overflow-x: hidden;
    }

    body.home-page.menu-open {
        overflow: hidden;
    }

    .home-page .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* ---------- Banner ---------- */
    .home-page .banner-section {
        height: auto;
        aspect-ratio: 375 / 139;
        min-height: 160px;
        max-height: 240px;
        max-width: none;
        overflow: hidden;
        background: #f5f5f5;
    }

    .home-page .banner-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .home-page .banner-arrows {
        display: none;
    }

    .home-page .banner-dots {
        bottom: 10px;
        gap: 6px;
    }

    .home-page .banner-dots .dot {
        width: 6px;
        height: 6px;
    }

    .home-page .banner-dots .dot.active {
        background: #fcff83;
    }

    /* ---------- 区块标题 ---------- */
    .home-page .section-header {
        margin-bottom: 12px;
    }

    .home-page .section-title {
        left: -18px;
    }

    .home-page .section-title img {
        width: auto;
        height: 32px;
        display: block;
    }

    .home-page .section-title span {
        font-size: 16px;
    }

    .home-page .more-link {
        font-size: 13px;
        color: #999;
    }

    .home-page .more-link img {
        width: 6px;
        height: 11px;
    }

    .home-page .more-link-white {
        color: rgba(255, 255, 255, 0.9);
    }

    .home-page .more-link-white:hover {
        color: #fff;
    }

    /* ---------- 新闻动态 + 通知公告 ---------- */
    .home-page .section-news-notice {
        padding: 20px 0;
        background: #fff;
    }

    .home-page .news-notice-layout {
        flex-direction: column;
        gap: 20px;
    }

    .home-page .news-column,
    .home-page .notice-column {
        width: 100%;
        height: auto;
        max-width: none;
        border: 1px solid #DDA9AA;
        border-radius: 10px;
        padding: 16px;
        box-sizing: border-box;
        overflow: visible
    }

    .home-page .news-slider {
        height: 180px;
        border-radius: 6px;
        margin-bottom: 10px;
    }

    .home-page .news-slide-overlay {
        padding: 10px 12px;
    }

    .home-page .news-slide-title-wrapper {
        align-items: center;
        min-width: 0;
    }

    .home-page .news-slide-title-bar {
        width: 3px;
        height: 14px;
        margin-right: 8px;
    }

    .home-page .news-slide-title {
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-page .news-slider-dots {
        margin-left: 10px;
        gap: 6px;
        flex-shrink: 0;
    }

    .home-page .news-slider-dots .dot {
        width: 6px;
        height: 6px;
    }

    .home-page .news-list {
        margin-top: 0;
    }

    .home-page .news-list-item,
    .home-page .notice-list-item {
        padding: 10px 0;
        border-bottom: 1px dashed #eee;
    }

    .home-page .news-list-item:last-child,
    .home-page .notice-list-item:last-child {
        border-bottom: none;
    }

    .home-page .news-list-item .title,
    .home-page .notice-list-item .title {
        font-size: 14px;
        color: #1A1A1A;
    }

    .home-page .news-list-item .date,
    .home-page .notice-list-item .date {
        font-size: 12px;
        color: #CF955E;
        margin-left: 8px;
    }

    .home-page .dot-icon {
        width: 12px;
        height: 12px;
        margin-right: 8px;
    }

    .home-page .notice-list {
        border-top: 1px solid #FFECEC;
        margin-top: 10px;
        padding-top: 8px;
    }

    /* ---------- 人才培养 ---------- */
    .home-page .section-education {
        height: auto;
        padding: 30px 0;
        background: none;
        background-size: cover;
        border: 1px solid #DDA9AA;
        border-radius: 10px;
        padding: 13px;
        margin: 0 15px;
    }

    .home-page .section-education .container {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
    }

    .home-page .education-layout {
        flex-direction: column;
        gap: 0;
    }

    .home-page .education-tabs {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }

    .home-page .education-tab {
        flex: 1 1 0;
        width: 155px;
        height: 50px;
        border: none;
        padding: 0;
        background-color: transparent;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: contain;
        cursor: pointer;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        /* 设计稿 310px×100px，按宽度等比缩放 */
        /* padding-top: 32.258%; */
    }

    .home-page .education-tab.is-active {
        /* 设计稿 310px×111px */
        /* padding-top: 35.806%; */
    }

    .home-page .education-tab-ben {
        background-image: url('../hnu-images/home/ben.png');
    }

    .home-page .education-tab-ben.is-active {
        background-image: url('../hnu-images/home/ben_active.png');
        height: 56px;
    }

    .home-page .education-tab-yan {
        background-image: url('../hnu-images/home/yan.png');
    }

    .home-page .education-tab-yan.is-active {
        background-image: url('../hnu-images/home/yan_active.png');
        height: 56px;
    }

    .home-page .education-tab-icon {
        width: 18px;
        height: 14px;
        object-fit: contain;
    }

    .home-page .education-tab-text {
        font-weight: bold;
        font-size: 14px;
        color: #FFFFFF;
        white-space: nowrap;
    }

    .home-page .education-card {
        display: none;
        max-width: none;
        flex: 1 1 auto;
        background: #fff;
        /* border: 1px solid #DDA9AA; */
        /* border-radius: 10px; */
        /* padding: 16px; */
        box-sizing: border-box;
        overflow: hidden;
    }

    .home-page .education-card.is-active {
        display: block;
    }

    .home-page .education-card-header {
        display: none;
    }

    .home-page .education-list {
        padding: 0;
        border-top: 1px solid #FFECEC;
        padding-top: 10px;
    }

    .home-page .education-list-item {
        padding: 9px 0;
        border-bottom: 1px dashed #eee;
    }

    .home-page .education-list-item:last-child {
        border-bottom: none;
    }

    .home-page .education-list-item .title {
        font-size: 13px;
        color: #1A1A1A;
    }

    .home-page .education-list-item .date {
        font-size: 12px;
        color: #CF955E;
        margin-left: 8px;
    }

    .home-page .education-list-item .dot-icon {
        width: 12px;
        height: 12px;
        margin-right: 8px;
        content: url('../hnu-images/lanhu/icon-bullet-orange@2x.png');
    }

    /* ---------- 科研智库 / 岳麓经济学论坛 ---------- */
    .home-page .section-research {
        padding: 20px 0;
        background: #fff;
    }

    .home-page .research-layout {
        flex-direction: column;
        gap: 20px;
    }

    .home-page .research-column,
    .home-page .research-column-forum {
        width: 100%;
        height: auto;
        max-width: none;
        border: 1px solid #DDA9AA;
        border-radius: 10px;
        padding: 16px;
        box-sizing: border-box;
    }

    .home-page .research-column .section-header {
        margin-bottom: 12px;
    }

    .home-page .research-column .news-list {
        border-top: 1px solid #FFECEC;
        padding-top: 10px;
    }

    .home-page .forum-card {
        padding: 20px;
        border-radius: 8px;
        height: 278px;
    }

    .home-page .forum-card-header {
        margin-bottom: 15px;
    }

    .home-page .forum-tag {
        width: auto;
        height: 32px;
        padding: 0 12px;
        font-size: 14px;
    }

    .home-page .forum-issue {
        width: auto;
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }

    .home-page .forum-title {
        font-size: 15px;
        margin-bottom: 0;
        margin-top: 6px;
    }

    .home-page .forum-info p {
        font-size: 13px;
        height: 40px;
    }

    .home-page .forum-info strong {
        font-size: 13px;
    }

    /* ---------- 友情链接 ---------- */
    .home-page .section-links {
        padding: 20px 15px;
        background: #fff;
        padding-top: 0;

    }

    .home-page .section-links .container {
        max-width: none;
        min-height: auto;
        background: #fff;
        border: 1px solid #DDA9AA;
        border-radius: 10px;
        padding: 16px;
        box-sizing: border-box;
        background: linear-gradient(0deg, #FFF7F5 0%, #FFF7F5 15%, #FFF7F5 41%, #FFFFFF 100%);
    }

    .home-page .links-row-first,
    .home-page .external-links-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        justify-items: stretch;
        align-items: stretch;
    }

    .home-page .external-links-row {
        display: none;
        margin-top: 12px;
        padding-top: 0;
        border-top: none;
    }

    .home-page .external-links-row.active {
        display: grid;
    }

    .home-page .link-item {
        width: auto;
        height: auto;
        min-height: 58px;
        padding: 8px;
        font-size: 13px;
        line-height: 1.4;
        gap: 8px;
        border-radius: 6px;
        background: #fff;
        border: none;
        box-sizing: border-box;
        color: #1A1A1A;
    }

    .home-page .link-item {
        padding-left: 10px;
        padding-right: 10px;
    }

    .home-page .link-icon-img {
        width: 36px;
        height: 36px;
    }

    /* 校外链接特殊样式 */
    .home-page .link-item.has-dropdown {
        cursor: pointer;
        justify-content: center;
        background: transparent;
        border: none;
        grid-column: 1 / -1;
        width: 100%;
        margin: 0 auto 0;
        box-shadow: none;
        position: relative;
        top: 8px;
    }

    /* 展开后隐藏校外链接按钮 */
    .home-page .link-item.has-dropdown.active {
        display: none;
    }

    /* 移动端隐藏PC端图标 */
    .home-page .link-item.has-dropdown .link-icon-pc {
        display: none;
    }

    /* 移动端显示移动端图标并作为展开收起图标 */
    .home-page .link-item.has-dropdown .link-icon-mobile {
        width: 14px !important;
        height: 11px !important;
        display: block !important;
    }

    /* 移动端隐藏PC端的下拉箭头 */
    .home-page .link-item.has-dropdown .dropdown-arrow {
        display: none;
    }

    .home-page .link-item.has-dropdown span {
        font-weight: 400;
        font-size: 14px;
        color: #C13432;
    }

    /* 外部链接展开区域样式调整 */
    .home-page .external-links-row {
        display: none;
        margin-top: 8px;
        padding-top: 0;
        border-top: none;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .home-page .external-link-item {
        width: auto;
        height: auto;
        min-height: 58px;
        padding: 8px;
        font-size: 13px;
        line-height: 1.4;
        gap: 8px;
        border-radius: 6px;
        background: #fff;
        box-sizing: border-box;
    }

    .home-page .external-link-item img {
        width: 32px;
        height: 32px;
    }

    /* ---------- 回到顶部 ---------- */
    .home-page .back-to-top {
        width: 40px;
        height: 40px;
        right: 12px;
        bottom: 12px;
    }
}

/* ≤576px 进一步紧凑 */
@media (max-width: 576px) {
    .home-page .main-nav .nav-container::before {
        width: 205px;
        height: 31px;
    }

    .home-page .banner-section {
        min-height: 140px;
        max-height: 200px;
    }

    .home-page .section-title img {
        height: 28px;
    }

    .home-page .section-title span {
        font-size: 14px;
    }

    .home-page .more-link {
        font-size: 12px;
    }

    .home-page .news-column,
    .home-page .notice-column,
    .home-page .research-column,
    .home-page .research-column-forum,
    .home-page .section-links .container {
        padding: 12px;
        border-radius: 8px;
    }

    .home-page .news-slider {
        height: 160px;
    }

    .home-page .news-list-item .title,
    .home-page .notice-list-item .title {
        font-size: 13px;
    }

    .home-page .education-card-header {
        height: 44px;
        font-size: 15px;
    }

    .home-page .forum-card {
        padding: 15px;
    }

    .home-page .forum-title {
        font-size: 14px;
    }

    .home-page .links-row-first,
    .home-page .external-links-row {
        gap: 8px;
    }

    .home-page .link-item {
        min-height: 45px;
    }

    .home-page .external-link-item {
        
    }

    .home-page .link-icon-img,
    .home-page .external-link-item img {
        width: 36px;
        height: 36px;
    }
}

/* ≥769px 恢复 PC 默认值（防止媒体查询交叉影响） */
@media (min-width: 769px) {
    body.home-page.menu-open {
        overflow: auto;
    }

    .home-page .education-tabs {
        display: none;
    }

    /* PC端隐藏三级菜单（师资队伍-在职教师下的系部列表） */
    .home-page .nav-menu li.has-submenu .sub-menu li.has-submenu .sub-menu {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}