/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .about-content {
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 导航栏 */
    .main-nav {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .user-center {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }
    
    /* 调整header-content布局，确保移动端菜单按钮在右上角 */
    .header-content {
        position: relative;
    }
    
    /* 英雄区域 */
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    /* 关于我们 */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* banner区域 */
    .banner-top-section {
        flex-direction: column;
    }
    
    .banner-carousel-container {
        min-width: 100% !important;
        width: 100% !important;
        margin-top: 15px !important;
    }
    
    .banner-left-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* 课程卡片 */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 页脚 */
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 导航栏 */
    .header-content {
        padding: 15px 0;
        flex-wrap: nowrap;
        position: relative;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .logo {
        flex-shrink: 0;
        margin-right: auto;
    }
    
    .logo a {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    
    .logo-text {
        font-size: 20px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .user-center {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1001;
        background: none;
        border: none;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-btn:hover {
        background-color: #f5f5f5;
    }
    
    /* 英雄区域 */
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    /* banner区域 */
    .banner-content {
        flex-direction: column;
    }
    
    .banner-main {
        margin-right: 0 !important;
        margin-bottom: 20px;
    }
    
    /* 右侧内容容器 */
    .right-content-container {
        width: 100%;
    }
    
    /* 课程卡片 */
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    /* 项目卡片 */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* 确保热门资讯和课程卡片宽度一致 */
    @media (max-width: 360px) {
        /* 容器宽度 */
        .container {
            max-width: 320px !important;
            margin: 0 auto !important;
            padding: 0 !important;
        }
        
        /* 横幅内容 */
        .banner-content {
            display: block !important;
            width: 100% !important;
            max-width: 320px !important;
        }
        
        /* 右侧内容容器 */
        .right-content-container {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
        }
        
        /* 主横幅 */
        .banner-main {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
        }
        
        /* 课程卡片容器 */
        .course-cards-container {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
            padding: 0 !important;
            grid-template-columns: 1fr !important;
        }
        
        /* 课程卡片 */
        .project-card {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
            padding: 15px !important;
            box-sizing: border-box !important;
        }
        
        /* 热门资讯 */
        .hot-news {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
            padding: 15px !important;
            box-sizing: border-box !important;
        }
        
        /* 轮播横幅容器 */
        .banner-carousel-container {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 !important;
        }
        
        /* 左侧热门标签卡片 */
        .banner-left-card {
            width: 100% !important;
            max-width: 320px !important;
            margin: 0 0 15px 0 !important;
        }
    }
    
    /* 分类卡片 */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 资讯卡片 */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    /* 讲师卡片 */
    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 统计数字 */
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    /* 最新课程卡片 */
    .latest-courses-card {
        padding: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .latest-courses-card .course-item {
        padding-left: 15px !important;
        padding: 10px 0 !important;
        box-sizing: border-box !important;
    }
    
    .latest-courses-card .course-item::before {
        top: 15px;
        font-size: 8px;
        padding: 1px 4px;
    }
    
    /* 确保最新课程卡片内容不溢出 */
    .latest-courses-card .course-item > div {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .latest-courses-card .course-item h4 {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }
    
    .latest-courses-card .course-item p {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }
    
    .latest-courses-card .course-item img {
        max-width: 84px !important;
        max-height: 50px !important;
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 英雄区域 */
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    /* 按钮 */
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* banner区域 */
    .banner {
        padding: 10px 0;
    }
    
    /* 轮播图 */
    .banner-carousel {
        aspect-ratio: 16 / 9;
        min-height: auto !important;
    }
    
    /* 课程卡片 */
    .project-card-content {
        padding: 12px;
    }
    
    .project-card-content h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .project-list-item {
        gap: 10px;
        min-height: auto;
    }
    
    .project-list-image {
        width: 84px;
        height: 50px;
    }
    
    .project-list-info h4 {
        font-size: 13px;
    }
    
    .project-list-info p {
        font-size: 11px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .project-meta {
        font-size: 10px;
    }
    
    /* 分类卡片 */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* 讲师卡片 */
    .teachers-grid {
        grid-template-columns: 1fr;
    }
    
    /* 评价轮播 */
    .testimonials-carousel {
        gap: 20px;
    }
    
    .testimonial-item {
        min-width: 250px;
        padding: 20px;
    }
    
    /* 统计数字 */
    .stat-item {
        padding: 20px;
    }
    
    .stat-item h3 {
        font-size: 28px;
    }
    
    /* 最新课程 */
    .latest-courses-card {
        padding: 12px;
    }
    
    .latest-courses-card h3 {
        font-size: 16px;
        padding-bottom: 8px;
    }
    
    /* 热门资讯 */
    .hot-news {
        padding: 12px;
    }
    
    .hot-news h3 {
        font-size: 16px;
    }
    
    /* 标签样式 */
    .tag-item {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h3 {
    color: #3498db;
    font-size: 20px;
    margin: 0;
}

.mobile-menu-close {
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mobile-menu-close:hover {
    background-color: #f5f5f5;
}

.mobile-menu-nav {
    margin-bottom: 30px;
}

.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav li {
    margin-bottom: 10px;
}

.mobile-menu-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    padding: 15px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-menu-nav a:hover {
    background-color: #f1f8ff;
    color: #3498db;
}

.mobile-menu-search {
    margin-bottom: 30px;
}

.mobile-menu-search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 24px;
    outline: none;
    font-size: 16px;
    min-height: 48px;
}

.mobile-menu-user {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu-user a {
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 24px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-login {
    color: #333;
    border: 1px solid #eee;
}

.mobile-menu-login:hover {
    color: #3498db;
    border-color: #3498db;
}

.mobile-menu-register {
    background-color: #3498db;
    color: #fff;
}

.mobile-menu-register:hover {
    background-color: #2980b9;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 响应式表格 */
table {
    width: 100%;
    overflow-x: auto;
   /* display: block;*/
}

/* 响应式视频 */
video {
    max-width: 100%;
    height: auto;
}

/* 响应式iframe */
iframe {
    max-width: 100%;
}