/* ========== 无固定比例：纯自适应布局 + 图像完整显示修复 ========== */
:root {
    --deep-green: #07624e;
    --light-green: #2e7d32;
    --white: #ffffff;
    --gray: #f5f5f5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background-color: var(--white);
    color: #333;
    font-size: 16px;
    overflow-x: hidden;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
}

/* region 顶部导航栏 */
.top-nav {
    background-color: var(--deep-green);
    color: var(--white);
    padding: 0.375rem 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    min-height: 60px;
}

.logo-container {
    width: 120px;
    height: 60px;
    margin-right: 2.5rem;
    margin-left: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.logo-container > span {
    position: relative;
    white-space: nowrap;
    font-size: 18px;
    margin-left: 0.625rem;
    color: #ffffff;
}

.logo-container img {
    filter: grayscale(100%) contrast(1000%) brightness(0) invert(1);
    width: 40px;
    height: 40px;
    max-width: 100%;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: 15.625rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #a5d6a7;
}

.navbar-right {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1.125rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.btn-apply, .btn-login {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-apply:hover, .btn-login:hover {
    background-color: rgba(255,255,255,0.1);
}
/* endregion */
/* region 登录弹窗 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 24px;
    color: #333;
}

.login-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.login-tabs .tab {
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.login-tabs .tab.active {
    color: var(--light-green);
    border-bottom-color: var(--light-green);
}

.input-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.input-group input {
    width: 100%;
    height: 3rem;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    font-size: 16px;
}

.input-group .icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.input-group .clear-btn, .input-group .eye-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
}

.login-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.login-links a {
    color: var(--light-green);
    text-decoration: none;
}

.agreement {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 1.5rem;
}

.agreement a {
    color: var(--light-green);
    text-decoration: none;
}

.login-btn {
    width: 100%;
    height: 3rem;
    background: var(--light-green);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: var(--deep-green);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    color: #666;
}
/* endregion */
/* region banner容器顶部 */
.banner {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-top: 60px;
    background: url("images/home-1.png") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

.banner-content {
    position: relative;
    z-index: 1;
    padding: 0 1.25rem;
    max-width: 100%;
    width: 100%;
    max-width: 800px;
}

.banner-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.banner-content p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.banner-btn {
    background: #07624e;
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.banner-btn:hover {
    background: #034605;
}
/* endregion */

/* 整体服务区块容器 */
.service-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* 每个服务卡片 */
.service-card {
    background-color: #f5f7fa; /* 浅灰色背景 */
    border-radius: 16px; /* 圆角矩形 */
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    width: 1200px;
    height: 450px;/* 想要的宽度，比如800px（变窄）、1200px（变宽） */
    margin:0 auto; /* 让卡片在父容器中水平居中 */
}

.service-card:hover {
    transform: translateY(-4px);
}

/* 左侧文字区域 */
.service-text {
    flex: 1;
    min-width: 300px;
}

/* 标题样式 */
.service-title {
    font-size: 35px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex; /* 保留flex用于内部元素对齐 */
    align-items: center;
    gap: 8px;
    margin-top: -200px;
    /* 添加左对齐关键属性 */
    justify-content: flex-start; /* flex容器内元素左对齐 */
    text-align: left; /* 文本左对齐 */
    width: 100%; /* 确保宽度占满父容器，对齐更准确 */
}

/* 描述样式 */
.service-desc {
    font-size: 20px;
    line-height: 1.6;
    color: #555;
    /* 添加左对齐属性，确保和标题对齐 */
    text-align: left;
    /* 可选：如果需要完全对齐，可以统一缩进/内边距 */
    margin-left: 14px;
    padding-left: 0;
}

/* 绿色圆点装饰 */
.green-dot {
    width: 8px;
    height: 30px;
    background-color: #115e3d; /* 绿色 */
    border-radius: 4px;
}

/*.service-desc {*/
/*    font-size: 20px;*/
/*    line-height: 1.6;*/
/*    color: #555;*/
/*}*/

/* 右侧媒体区域 */
.service-media {
    flex-shrink: 0;
    width: 550px;
}

.video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.video-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 播放按钮覆盖层 */
.play-overlay {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .service-card {
        flex-direction: column;
        text-align: center;
    }
    .service-media {
        width: 100%;
    }
}
/* region 热点新闻 */
.news-page {
    padding: 1.5rem;
    width: 100%;
    margin-top: 60px;
}

.news-carousel {
    width: 100%;
    height: 18.75rem;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    min-height: 200px;
}

.news-content {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.news-list {
    width: 100%;
    max-width: 960px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.news-item {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
}

.news-item h3 {
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.news-item p {
    font-size: 14px;
}

.hot-headlines {
    width: 100%;
    max-width: 480px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.hot-item {
    padding: 0.75rem;
    border-left: 4px solid var(--light-green);
    background: var(--gray);
    font-size: 14px;
}
/* endregion */
/* region 本校动态 */
.campus-container {
    max-width: 1400px; /* 最大宽度从1200px放宽到1400px */
    margin: 0 auto;
    padding: 1rem 2rem; /* 左右内边距加大，避免内容贴边 */
    color: #333;
}

/* 轮播图样式 */
.campus-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.carousel-item.active {
    opacity: 1;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

/* 三列内容区 - 改为纵向排列并加宽 */
.campus-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.content-column {
    background: #fff;
    padding: 2rem; /* 进一步加大内边距 */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1100px; /* 最大宽度从900px放宽到1100px */
    margin: 0 auto;
    width: 100%; /* 确保在小屏幕上占满可用宽度 */
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #0A7361;
    padding-bottom: 0.6rem;
}
.section-header h3 {
    color: #0A7361;
    margin: 0;
    font-size: 1.3rem;
}
.more-link {
    color: #0A7361;
    font-size: 0.9rem;
    text-decoration: none;
}
.more-link:hover {
    text-decoration: underline;
}

/* 新闻列表样式 */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.news-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.news-list img {
    width: 140px; /* 图片宽度加大 */
    height: 105px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.news-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #222;
}
.news-info p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* 科研列表样式 */
.research-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.research-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.research-list li:last-child {
    border-bottom: none;
}
.research-list .icon {
    font-size: 1.5rem;
    color: #0A7361;
    margin-top: 0.2rem;
}
.research-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #222;
}
.research-info p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

/* 通知公告样式 */
.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.notice-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.notice-list li:last-child {
    border-bottom: none;
}
.notice-list .date {
    display: inline-block;
    background: #0A7361;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.notice-list p {
    margin: 0;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.5;
}

/* 专题专栏样式 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.topic-item {
    display: block;
    padding: 1.2rem;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1.05rem;
    transition: background-color 0.3s ease;
}
.topic-item:hover {
    opacity: 0.9;
}

/* 校园风采样式 */
.campus-gallery {
    margin-top: 2rem;
}
.campus-gallery h3 {
    color: #0A7361;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0A7361;
    padding-bottom: 0.5rem;
    font-size: 1.3rem;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* 图片网格宽度加大 */
    gap: 1.2rem;
}
.gallery-grid img {
    width: 100%;
    height: 180px; /* 图片高度加大 */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.gallery-grid img:hover {
    transform: scale(1.03);
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .content-column {
        max-width: 900px;
        padding: 1.8rem;
    }
    .news-list img {
        width: 120px;
        height: 90px;
    }
}
@media (max-width: 992px) {
    .content-column {
        max-width: 750px;
        padding: 1.5rem;
    }
    .news-list img {
        width: 100px;
        height: 75px;
    }
}
@media (max-width: 768px) {
    .campus-content {
        gap: 1.5rem;
    }
    .content-column {
        max-width: 100%;
        padding: 1.2rem;
    }
    .campus-carousel {
        height: 220px;
    }
    .carousel-overlay h2 {
        font-size: 1.2rem;
    }
    .carousel-overlay p {
        font-size: 0.9rem;
    }
    .news-list img {
        width: 80px;
        height: 60px;
    }
}
/* endregion */
/* region 资源库 */
.resource-page {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 60px;
}

.resource-sidebar {
    width: 100%;
    max-width: 426px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--gray);
    padding: 1.25rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--deep-green);
    font-size: 16px;
}

.filter-group select {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    background: var(--white);
    font-size: 16px;
}

.upload-btn {
    background: var(--light-green);
    color: var(--white);
    cursor: pointer;
    height: 3rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 16px;
    margin-top: 1rem;
}

.resource-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.resource-item {
    height: 12.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
}

/* 搜索框：自适应 */
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    width: 100%;
}

.search-icon img {
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* 收藏/录音按钮 */
.save-btn {
    border: none;
    background: none;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn img {
    width: 1rem;
    height: 1rem;
    filter: grayscale(100%) brightness(80%);
    transition: filter 0.2s;
    max-width: 100%;
    height: auto;
}

.save-btn:hover img {
    filter: grayscale(0%) brightness(100%);
}

/* 输入框 */
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

/* 清除按钮 */
.clear-btn {
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* endregion */


/* region 智能体 */
.ai-agent-page {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin-top: 60px;
}

.ai-chat-container {
    height: 31.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
    background: var(--gray);
    min-height: 200px;
}

.ai-input-area {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ai-input-area input {
    flex: 1;
    min-width: 200px;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    font-size: 16px;
}

.ai-input-area button {
    width: 100%;
    max-width: 100px;
    background: var(--light-green);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
}
/* endregion */






/* 页脚：自适应 */
footer {
    background-color: var(--deep-green);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
    margin-top: 2.5rem;
    font-size: 14px;
    width: 100%;
}

/* 页面隐藏类 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ========== 响应式断点适配 ========== */
/* 平板 */
@media (max-width: 992px) {
    .nav-links {
        margin-left: 5rem;
        gap: 1.25rem;
    }

    .left-img, .media-block img {
        height: 15rem;
    }

    .data-card {
        padding: 4rem 1.25rem;
    }
}

/* 手机 */
@media (max-width: 768px) {
    .top-nav {
        padding: 0.375rem 1rem;
    }

    .logo-container {
        margin-right: 1rem;
        margin-left: 1rem;
        width: 80px;
    }

    .nav-links {
        margin-left: 1rem;
        gap: 0.75rem;
    }

    .navbar-right {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 12px;
    }

    .main-layout {
        padding: 0 2.5%;
        gap: 1.875rem;
    }

    .text-block {
        padding-left: 0;
    }

    .action-btn {
        width: 100%;
        text-align: center;
    }

    .bg-decoration {
        display: none;
    }

    .card-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .banner {
        min-height: 80vh;
    }

    .ai-input-area button {
        max-width: 100%;
        margin-top: 0.625rem;
    }

    .knowledge-catalog {
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

/* 小手机 */
@media (max-width: 480px) {
    .nav-links {
        display: none; /* 移动端可隐藏导航，改用汉堡菜单 */
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .left-img, .media-block img {
        height: 10rem;
    }

    .data-card {
        padding: 2rem 1rem;
    }
}