* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

:root {
    --primary-color: #3EA2E4;
    --secondary-color: #1a4d2a;
    --accent-color: #d4e8c9;
    --text-color: #333;
    --bg-color: #f8f7f2;
}

body {
    padding-top: 0px;
    background-color: var(--bg-color);
    min-height: 0vh;
}

/* Logo和标题样式 */
.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止被压缩 */
}


.logo {
    width: 110px;  /* 严格保持 Logo 大小不变 */
    height: 110px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.site-title {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    white-space: nowrap;
}

/* ================= 头部布局重构开始 ================= */

header {
    width: 100%;
    position: relative; /* 默认定位 */
    z-index: 1000;
}


/* 2. 第一层：Logo与搜索 (深蓝色背景) */
.header-top {
    width: 100%;
    height: 120px; /* 稍微增高一点，让Logo呼吸空间更足 */
    /* 截图中的深蓝色 */
    background-color: #3EA2E4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 调整左右内边距，让Logo和搜索框不要太靠边 */
    padding: 0 10%;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%; /* 占满 header-top 的高度 */
    flex-shrink: 0;
    padding: 10px 0; /* 上下留一点空隙 */
}

/* 2. 新的品牌图片样式 */
.brand-image {
    height: 110px; /* 根据新高度微调 */
    width: auto;
    object-fit: contain;
}

/* 搜索框容器样式调整 */
.search-container {
    display: flex;
    align-items: center;
    height: 42px;
    flex-shrink: 0;
}
/* 搜索框和按钮样式保持不变 */
.search-box {
    padding: 8px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 180px;
    font-size: 14px;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-right: none;
}

.search-button {
    background: var(--accent-color);
    border: none;
    padding: 8px 15px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    color: var(--secondary-color);
    font-weight: bold;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. 第二层：导航菜单 (浅一点的颜色或半透明) */
.header-nav {
    width: 100%;
    height: 60px;
    background: rgba(50, 140, 200, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: -webkit-sticky; /* Safari 兼容 */
    position: sticky;         /* 标准属性 */
    position: sticky;
    top: 0;
    z-index: 1001;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    gap: 20px; /* 菜单项间距 */
}

.nav-menu li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: #fff; /* 导航文字改回白色更清晰 */
    text-decoration: none;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 535;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-menu a:hover {
    background-color: rgba(0, 0, 0, 0.1); /* 悬停效果 */
    color: var(--accent-color);
}

/* 移动端汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}


/* ================= 响应式调整 (移动端) ================= */
@media (max-width: 768px) {
    body {
        padding-left: 10px;
    }

    .header-top {
    width: 100%;
    height: 80px;  /* 【修改】从 120px 改为 80px */
    background-color: rgb(62, 162, 228);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

    .logo-container {
        padding: 5px 0;
    }

    .brand-image {
        height: 50px; /* 移动端图片高度调小 */
    }

    /* 移动端隐藏搜索框 */
    .search-container {
        display: none;
    }

    .menu-toggle {
        display: flex; /* 显示汉堡菜单 */
    }

    .header-nav {
        height: 0; /* 默认隐藏 */
        overflow: visible;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--primary-color);
        flex-direction: column;
        padding-top: 20px;
        transition: left 0.3s ease;
        justify-content: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        height: auto;
    }

    .nav-menu a {
        padding: 15px 20px;
        width: 100%;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }
}

        .teacher-footer {
    background-color: #f1f8e9;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--accent-color);
    text-align: center;
    color: #5a5a5a;
    font-size: clamp(12px, 2vw, 14px);
    position: relative; /* 这是最关键的一步！让子元素的绝对定位相对于它 */
    padding-top: 20px;    /* 增加一点上边距，防止内容和计数器重叠 */
    padding-bottom: 20px;
}
.visitor-counter-box {
    /* 定位 */
    position: absolute;   /* 使用绝对定位 */
    top: 20px;            /* 距离父容器顶部 20px */
    right: 20px;          /* 距离父容器右侧 20px */

    /* 盒子样式 */
    background-color: #f8f9fa; /* 一个浅灰色背景 */
    border: 1px solid #dee2e6; /* 细边框 */
    border-radius: 8px;        /* 圆角 */
    padding: 8px 15px;         /* 内边距，让文字和边框有距离 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加轻微的阴影效果 */

    /* 文字样式 */
    font-size: 0.9em;          /* 字体大小 */
    color: #495057;            /* 文字颜色 */
}

/* 3. 单独设置数字的样式 */
.visitor-counter-box #visitor-count {
    font-weight: bold;      /* 数字加粗 */
    font-size: 1.1em;       /* 让数字稍大一些 */
    color: #007bff;         /* 使用蓝色突出数字 */
    margin: 0 4px;          /* 和周围文字的间距 */
}

        .teacher-footer p {
            margin: 5px 0;
        }

/* 最新动态页面特定样式 */
        .news-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .page-header {
            text-align: center;
            margin: 30px 0;
            padding-bottom: 20px;
            border-bottom: 2px solid #e0e0e0;
        }

        .page-header h1 {
            color: #1a4d2a;
            font-size: 36px;
            margin-bottom: 10px;
            position: relative;
            padding-bottom: 15px;
            text-align: center;

        }
        .page-header h1::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 3px;
        background-color: #3EA2E4;
        }

        .page-header p {
            color: #666;
            font-size: 1.1rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .news-list {
            display: flex;
            flex-direction: column;
            gap: 30px;
            margin-bottom: 40px;
        }

        .news-item {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            display: flex;
        }

        .news-item:hover {
            transform: translateY(-5px);
        }

        .news-image {
            width: 300px;
            height: 200px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .news-content {
            padding: 20px;
            flex-grow: 1;
        }

        .news-date {
            color: #888;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .news-title {
            font-size: 1.3rem;
            margin-bottom: 10px;
            color: #333;
            line-height: 1.4;
        }

        .news-excerpt {
            color: #666;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .read-more {
            color: #2c6e3c;
            text-decoration: none;
            font-weight: bold;
            display: inline-flex;
            align-items: center;
        }

        .read-more:after {
            content: "→";
            margin-left: 5px;
            transition: transform 0.3s ease;
        }

        .read-more:hover:after {
            transform: translateX(3px);
        }

        .news-tag {
            display: inline-block;
            background: #e8f5e9;
            color: #2c6e3c;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            margin-right: 5px;
            margin-bottom: 5px;
        }

        /* 无图片新闻项的样式 */
        .news-item.no-image {
            flex-direction: column;
        }

        .news-item.no-image .news-content {
            width: 100%;
        }

        @media (max-width: 768px) {
            .news-item {
                flex-direction: column;
            }

            .news-image {
                width: 100%;
                height: 200px;
            }

            .page-header h1 {
                font-size: 2rem;
            }
        }

