* {
    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;
    }
}


        /* 联系我们页面内容样式 */
        .contact-container {
            max-width: 1200px;
            margin: 40px auto;
            padding: 0 20px;
        }

        .contact-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .contact-header h1 {
            color: #1a4d2a;
            font-size: 36px;
            margin-bottom: 15px;
        }

        .contact-header p {
            color: #5a5a5a;
            font-size: 18px;
            max-width: 800px;
            margin: 0 auto;
        }

        .contact-content {
            display: flex;
            flex-wrap: wrap;
            gap: 40px;
            margin-bottom: 60px;
        }

        .contact-info {
            flex: 1;
            min-width: 300px;
            max-width: 35%; /* 限制联系信息的最大宽度 */
            background-color: white;
            border-radius: 8px;
            padding: 30px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .contact-info h2 {
            color: #2d6a3d;
            margin-bottom: 25px;
            padding-bottom: 10px;
            border-bottom: 2px solid #d4e8c9;
        }

        .contact-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 25px;
        }

        .contact-icon {
            width: 40px;
            height: 40px;
            background-color: #f1f8e9;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            color: #2d6a3d;
            font-size: 18px;
        }

        .contact-details h3 {
            color: #1a4d2a;
            margin-bottom: 5px;
            font-size: 18px;

        }

        .contact-details a {
            color: #5a5a5a;
            line-height: 1.6;
            text-decoration:none;
        }

        .contact-map {
            flex: 3;
            min-width: 300px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            height: 600px; /* 固定高度 */
        }

        .contact-map iframe {
            width: 100%;
            height: 100%;
            border: none;
        }


        .contact-form {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #1a4d2a;
            font-weight: bold;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #d4e8c9;
            border-radius: 4px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #3EA2E4;
        }

        .form-group textarea {
            min-height: 150px;
            resize: vertical;
        }

        .submit-btn {
            background-color: #3EA2E4;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .submit-btn:hover {
            background-color: #2d8cd0;
        }

        /* 页脚样式 */
        .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;
}

        /* 响应式设计 */
        @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) {
            .contact-content {
                flex-direction: column;
            }

            .contact-info {
                max-width: 100%; /* 在小屏幕上恢复全宽 */
            }

            .contact-form {
                grid-template-columns: 1fr;
            }
        }
.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;
}