/* ===== 移动端适配（<= 768px） ===== */
@media (max-width: 768px) {
    /* 导航高度与间距缩小 */
    .nav {
        height: 80px; /* 降低导航高度 */
        padding: 0 15px; /* 缩小横向内边距 */
    }

    .nav > * {
        transform: translateY(0); /* 取消桌面端位移，避免错位 */
    }

    /* Logo 缩小 */
    .nav-logo {
        max-height: 36px; /* 适配移动端尺寸 */
    }

    /* 显示汉堡按钮 */
    .hamburger {
        display: flex;
        position: relative;
        right: 0;
        margin-left: auto;
        align-items: center;
        justify-content: center;

        /* 你原来的代码不动，只加这2行 */
        z-index: 9999;
    }

    /* 右侧抽屉菜单 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        height: 100vh;
        background: rgba(26, 131, 172, 0.95);
        flex-direction: column; /* 改为竖向排列 */
        gap: 25px; /* 控制菜单项间距 */
        padding: 80px 20px; /* 顶部避开导航栏 */
        transform: translateX(100%); /* 默认隐藏到屏幕外 */
        transition: transform 0.3s ease;
        z-index: 9998;
    }

    /* 展开后滑入视口 */
    .nav-menu.active {
        transform: translateX(0);
    }

    /* 下拉改为流式展示 */
    .dropdown-content {
        position: static; /* 取消绝对定位 */
        background: rgba(22, 105, 138, 0.8);
        margin-top: 10px;
        min-width: 100%;
    }

    /* 导航字体微调 */
    .nav a {
        font-size: 14px;
    }

    /* 首屏轮播高度优化 */
    .carousel-container {
        margin-top: -80px; /* 对齐移动端导航高度 */
        min-height: 50vh; /* 减少首屏占高 */
    }

    .carousel-dots {
        right: 14px;
        bottom: 18px;
    }

    /* 横幅区缩小 */
    .banner {
        height: 150px;
        padding-top: 50px;
    }

    .banner h1 {
        font-size: 22px;
    }

    .banner p {
        font-size: 14px;
    }

    /* 内容区留白缩小 */
    .section {
        padding: 30px 15px; /* 适配窄屏阅读 */
    }

    .section h2 {
        font-size: 20px;
    }

    .section p {
        font-size: 15px;
    }

    /* 师资卡片尺寸调整 */
    .teacher-list {
        gap: 20px;
    }

    .teacher-item {
        width: 180px; /* 卡片宽度缩小 */
        padding: 15px;
    }

    .teacher-item img {
        width: 120px;
        height: 120px;
    }

    /* 页脚高度调整 */
    .footer-container {
        min-height: 200px;
    }

    .footer {
        height: 200px;
        font-size: 13px;
    }
}
