/* === main.css === 页面主体核心样式 === */
/* 主体内容容器 */
.main-content {
    margin-top: 80px; /* 适配固定头部 */
}

/* Banner轮播 */
.banner-section {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.banner-slider {
    position: relative;
    height: 500px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-slide.active {
    opacity: 1;
}

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


.banner-prev, .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
}

.indicator.active {
    background-color: #fff;
}

/* 学校介绍区域 */
.about-section {
    padding: 2.5rem 0;
    background-color: #fff;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    width: 50%;
    padding: 0 15px;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

.env-slider-wrap {
    position: relative;
    height: 400px;
}

.env-slider {
    position: relative;
    height: 100%;
}

.env-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.env-slide.active {
    opacity: 1;
}

.env-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.env-prev, .env-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.env-prev {
    left: 10px;
}

.env-next {
    right: 10px;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-desc {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #666;
    text-indent:2rem;
}

/* 新闻动态 */
.news-section {
    padding: 2.5rem 0;
    background-color: #f8f8f8;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
}

.news-img {
    width: 200px;
    height: 180px;
    object-fit: cover;
}

.news-info {
    padding: 1.5rem;
    flex: 1;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.news-title a:hover {
    color: #3498db;
}

.news-desc {
    line-height: 1.6;
    color: #666;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-time {
    font-size: 0.9rem;
    color: #999;
}

.load-more, .loading, .no-more {
    display: block;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.loading {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.no-more {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 师资力量基础样式 - 保留原有视觉效果 */
.teacher-section {
    padding: 4rem 0;
    background-color: #fff;
}

.teacher-section .container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* 增加内边距，避免按钮贴边 */
}

/* 核心：横向滚动列表样式（彻底替换grid为flex） */
.teacher-list {
    display: flex !important; /* 强制使用flex，彻底放弃grid */
    flex-wrap: nowrap !important; /* 禁止换行，必须一行 */
    gap: 2rem !important; /* 保留原有间距 */
    padding: 10px 0 !important;
    margin: 0 !important;
    overflow-x: auto !important; /* 横向滚动核心 */
    overflow-y: hidden !important;
    scroll-behavior: smooth !important; /* 平滑滚动 */
    -ms-overflow-style: none !important; /* 隐藏IE滚动条 */
    scrollbar-width: none !important; /* 隐藏Firefox滚动条 */
}

/* 隐藏Chrome/Safari滚动条 */
.teacher-list::-webkit-scrollbar {
    display: none !important;
}

/* 教师卡片样式 - 保留原有视觉，适配横向滚动 */
.teacher-item {
    flex: 0 0 auto !important; /* 固定宽度，不伸缩 */
    width: 300px; /* 恢复原有300px宽度（原grid布局的最小宽度） */
    background-color: #f8f8f8 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    padding: 1.5rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: normal !important; /* 内部文字正常换行 */
}

/* 保留原有卡片内部样式 */
.teacher-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.teacher-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.teacher-title {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.teacher-desc {
    line-height: 1.6;
    color: #666;
}

/* 滚动按钮样式 - 优化层级和交互 */
/* 滚动按钮样式 - 完整版本（PC端重点优化） */
.teacher-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid #ddd !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 999 !important; /* 大幅提高层级，避免遮挡 */
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    pointer-events: auto !important; /* 强制启用点击事件 */
}

/* 鼠标悬停效果（PC端专属） */
.teacher-scroll-btn:hover {
    opacity: 1 !important;
    background: #fff !important;
    border-color: #ccc !important;
}

.teacher-scroll-prev {
    left: 10px;
}

.teacher-scroll-next {
    right: 10px;
}

/* 响应式适配（主体部分） */
@media (max-width: 992px) {
    .banner-slider {
        height: 400px;
    }
}

@media (max-width: 768px) {
    /* 调整列布局 */
    .col-md-6 {
        width: 100%;
        margin-bottom: 2rem;
    }

    .banner-slider {
        height: 300px;
    }

    .env-slider-wrap {
        height: 300px;
    }

    /* 新闻列表适配 */
    .news-list {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
    }

    .news-img {
        width: 100%;
        height: 200px;
    }
    
    .teacher-item {
    width: 220px;
    }
    
    .teacher-scroll-btn {
        display: none !important;
    }
}