/* ====================
   全局基础重置
   ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局图片防溢出保护 */
img {
    max-width: 100%;
    height: auto;
}

/* 将body设置为 100vh 的弹性容器，杜绝整体滚动条（由内部模块自行滚动） */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #f5f5f5;
    height: 100vh; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
}

/* ====================
   Header 顶部导航栏
   ==================== */
.header {
    background: linear-gradient(90deg, #125399 0%, #8A1148 100%); 
    height: 120px; 
    flex-shrink: 0; /* 保证导航栏高度不被压缩 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%; 
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px; 
}

.logo-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-text h1 {
    font-size: 44px; 
    font-weight: 500;
    letter-spacing: 3px;
    font-family: 'KaiTi', 'STKaiti', serif; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logo-text p {
    font-size: 14px; 
    letter-spacing: 2px;
    margin-top: 4px;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
}

/* 导航菜单 */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px; 
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: white;
    font-size: 18px; 
    padding: 10px 26px; 
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.main-nav a.active {
    background-color: white;
    color: #8A1148; 
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-nav a:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ====================
   Hero 首屏横幅区
   ==================== */
.hero {
    background-color: #eef2f5; 
    flex: 1; /* 自动占据顶部导航和底部页脚之间所有的剩余空间 */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 轮播图相框化设置 */
.hero-slider {
    position: absolute;
    top: 3%;
    left: 3%;
    width: 94%;
    height: 94%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 1;
}

/* 幻灯片基础设定 */
.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out; 
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 2;
}

/* ====================
   图片路径与渐变遮罩
   ==================== */
.hero-slider .slide-1 {
    background-image: url('../picture/home_page_picture1.png');
}

.hero-slider .slide-2 {
    background-image: url('../picture/hnu_picture.jfif'); 
}
.hero-slider .slide-2::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(18, 83, 153, 0.7) 0%, rgba(18, 83, 153, 0) 50%);
    pointer-events: none;
}

.hero-slider .slide-3 {
    background-image: url('../picture/nku_picture.jpg'); 
}
.hero-slider .slide-3::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(138, 17, 72, 0.7) 0%, rgba(138, 17, 72, 0) 50%);
    pointer-events: none;
}

/* ====================
   底部导航圆点样式
   ==================== */
.slider-dots {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.slider-dots .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slider-dots .dot.active {
    background-color: #ffffff;
    transform: scale(1.4); 
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ====================
   Footer 页脚区
   ==================== */
.footer {
    background: linear-gradient(135deg, #0d3d73 0%, #6b0c37 100%); 
    padding: 30px 20px 25px; 
    flex-shrink: 0; 
    text-align: center;
    position: relative;
    box-shadow: inset 0 15px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.poem-line1 {
    font-family: 'KaiTi', 'STKaiti', serif; 
    font-size: 22px; 
    letter-spacing: 4px;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.poem-line2 {
    font-family: 'KaiTi', 'STKaiti', serif;
    font-size: 16px; 
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px; 
}

.footer-divider {
    width: 80px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 auto 15px; 
}

.copyright {
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    font-family: Arial, sans-serif;
    text-transform: uppercase;
}

/* ====================
   AI 动画页面布局 (固定头部，独立滚动)
   ==================== */
.animations-container {
    flex: 1; /* 填满 header 下方的所有空间 */
    display: flex;
    overflow: hidden; /* 防止整体页面滚动 */
    background-color: #ffffff;
}

/* ====================
   左侧侧边栏 (筛选器)
   ==================== */
.sidebar {
    width: 320px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 25px 20px;
    overflow-y: auto; /* 内容过多时侧边栏内部滚动 */
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.clear-btn {
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.filter-tree {
    list-style: none;
}

.filter-tree > li {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #125399; /* 师大蓝 */
}

/* 子级筛选缩进 */
.sub-filters {
    list-style: none;
    margin-top: 10px;
    padding-left: 26px;
    margin-bottom: 25px;
}

.sub-filters li {
    margin-bottom: 12px;
}

.sub-filters .checkbox-label {
    font-size: 13.5px;
    color: #555;
}

/* ====================
   右侧内容区及搜索框样式
   ==================== */
.content-area {
    flex: 1;
    padding: 30px 40px;
    background-color: #fcfcfc;
    overflow-y: auto; /* 右侧卡片区域独立滚动 */
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h2 {
    font-size: 24px;
    font-weight: 500;
    color: #222;
}

/* AI动画页面独立搜索框样式 */
.anim-search-box {
    position: relative;
    width: 280px;
}

.anim-search-box input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    font-size: 14px;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    background-color: #fff;
    transition: all 0.3s ease;
}

.anim-search-box input:focus {
    border-color: #125399;
    box-shadow: 0 0 8px rgba(18, 83, 153, 0.15);
}

.anim-search-box input::placeholder {
    color: #aaa;
}

.anim-search-box svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    fill: #999;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.sort-box select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    background-color: #fff;
    cursor: pointer;
}

/* 标签样式 */
.active-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* 标签较多时自动换行 */
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    color: #555;
    background-color: #fff;
    border: 1px solid #6b0c37; 
    border-radius: 4px;
    cursor: pointer;
}

.tag:hover {
    background-color: #f9f0f4;
}

/* ====================
   卡片网格展示
   ==================== */
.anim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.anim-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.anim-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.thumb-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.card-info h4 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-icons {
    display: flex;
    gap: 8px;
    align-items: center; /* 保证图标和来源标签垂直居中对齐 */
}

/* ====================
   卡片图标基础样式
   ==================== */
.icon.html-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 3px;
    position: relative; 
}

/* ====================
   来源标签样式 (新增)
   ==================== */
.source-tag {
    display: inline-block;
    font-size: 12px;
    color: #888;
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    padding: 0 6px;
    border-radius: 3px;
    line-height: 18px;
    height: 20px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* ====================
   HTML5 图标悬浮提示框 (Tooltip)
   ==================== */
.icon.html-icon::after {
    content: "HTML5，可用浏览器执行";
    position: absolute;
    bottom: 140%; 
    left: -10px; 
    transform: translateY(8px); 
    background-color: #2c3e50; 
    color: #ffffff;
    font-size: 12px;
    font-weight: normal;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap; 
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease; 
    z-index: 100;
}

.icon.html-icon::before {
    content: "";
    position: absolute;
    bottom: 140%;
    left: 10px; 
    transform: translateX(-50%) translateY(13px);
    border: 5px solid transparent;
    border-top-color: #2c3e50; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.icon.html-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); 
}

.icon.html-icon:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); 
}

.module-title {
    font-weight: bold;
    color: #125399; 
}

/* ==========================================================================
   教育思考、教学反思、自制教具 页面布局与卡片
   ========================================================================== */
.thoughts-wrapper {
    padding: 50px 40px;
    background-color: #f7f8fa; 
    /* 【核心修改】：开启弹性填充和垂直独立滚动条 */
    flex: 1; 
    overflow-y: auto; 
}

/* --- 顶部搜索栏 --- */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 650px; 
}

.search-box input {
    width: 100%;
    padding: 16px 100px 16px 55px; 
    font-size: 16px;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 40px; 
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #125399; 
    box-shadow: 0 6px 20px rgba(18, 83, 153, 0.12);
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box svg {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    fill: #999;
    width: 22px;
    height: 22px;
    transition: fill 0.3s ease;
}

.search-box input:focus + svg {
    fill: #125399; 
}

/* 下拉分类选择器 */
.search-type-select {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background-color: #f3f3f3;
    color: #555;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    appearance: none; 
    -webkit-appearance: none;
    text-align: center;
}

.search-type-select:hover {
    background-color: #e5e5e5;
    color: #125399;
}

/* --- 文章卡片网格 --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none; 
    color: inherit; 
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.article-date {
    background-color: #f3f3f3;
    color: #888;
    padding: 10px 16px;
    font-size: 13px;
}

.article-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #f0f0f0;
}

.article-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 底部文章标签（小徽章样式） */
.article-tag {
    display: inline-block; 
    align-self: flex-start; 
    font-size: 12px;
    font-weight: 500;
    color: #125399; 
    background-color: rgba(18, 83, 153, 0.08); 
    padding: 4px 10px;
    border-radius: 4px; 
    transition: background-color 0.3s ease;
}

.article-card:hover .article-tag {
    background-color: rgba(18, 83, 153, 0.15);
}

/* =========================================
   手机端响应式适配 (屏幕宽度 <= 768px 时生效)
   ========================================= */
@media (max-width: 768px) {
    /* --- 1. 基础布局解绑 --- */
    body {
        height: auto;
        overflow: auto; 
    }

    /* --- 2. Header 顶部导航栏调整 --- */
    .header {
        height: auto; 
        flex-direction: column; 
        padding: 15px 10px;
        gap: 15px;
    }
    .logo-text h1 {
        font-size: 32px; 
    }
    .main-nav ul {
        flex-wrap: wrap; 
        justify-content: center;
        gap: 10px;
    }
    .main-nav a {
        font-size: 14px;
        padding: 8px 12px; 
    }

    /* --- 3. Hero 首页轮播图调整 --- */
    .hero {
        min-height: 50vh; 
        flex: none;       
        padding: 15px 0;
    }

    /* --- 4. Footer 底部页脚调整 --- */
    .footer {
        padding: 20px 10px;
    }
    .poem-line1 {
        font-size: 16px;
        letter-spacing: 2px;
    }
    .poem-line2 {
        font-size: 13px;
        margin-bottom: 15px;
    }

    /* --- 5. AI 动画页面调整 --- */
    .animations-container {
        flex-direction: column; 
        overflow: visible; 
    }
    .sidebar {
        width: 100%; 
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 200px; 
    }
    .content-area {
        padding: 15px;
        overflow: visible; 
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .anim-search-box {
        width: 100%;
    }
    .anim-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    /* --- 6. 教育思考页面调整 --- */
    .thoughts-wrapper {
        padding: 20px 15px; 
    }
    .search-box input {
        padding: 12px 85px 12px 40px; 
        font-size: 14px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}