* {
    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;
    }
}


/* 团队成员页面样式 */
.team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    text-align: center;
    color: #1a4d2a;
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #3EA2E4;
}

.team-description {
    text-align: center;
    color: #666;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 250px;
    text-align: center;
    padding: 20px;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 5px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.team-member:hover .member-photo {
    border-color: #3EA2E4;
}

/* 照片占位符样式 */
.member-photo.placeholder {
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #f0f0f0;
}

.member-photo.placeholder::before {
    content: "👤";
    font-size: 3rem;
    color: #6c757d;
}

.member-name {
    font-size: 20px;
    color: #1a4d2a;
    margin-bottom: 5px;
    font-weight: bold;
}

.member-title {
    color: #3EA2E4;
    font-size: 14px;
    margin-bottom: 15px;
}

.member-brief {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.view-details {
    display: inline-block;
    padding: 8px 20px;
    background-color: #3EA2E4;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.view-details:hover {
    background-color: #2d6a3d;
    color: white;
}

/* 无成员时的样式 */
.no-members {
    width: 100%;
    text-align: center;
    padding: 3rem;
    color: #666;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* 页脚样式 */
.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;
    flex-shrink: 0;
}
.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;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .navbar {
        padding: 0 2%;
    }
    .nav-menu a {
        padding: 10px 10px;
        font-size: 14px;
    }
    .search-box {
        width: 150px;
    }
}

@media (max-width: 900px) {
    .site-title {
        font-size: 16px;
    }
    .nav-menu a {
        padding: 10px 8px;
        font-size: 13px;
    }
    .search-box {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 20px;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        padding: 15px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-container {
        display: none;
    }

    .team-grid {
        gap: 20px;
    }

    .team-member {
        width: 100%;
        max-width: 300px;
    }

    .member-photo {
        width: 120px;
        height: 120px;
    }

    .member-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        flex: 1;
    }

    .site-title {
        font-size: 14px;
    }

    .team-container {
        padding: 20px 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .team-description {
        font-size: 14px;
    }
}