/* 未登录首页特有样式 - 基于homepage-styles.css */

/* 登录按钮样式 */
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-register {
    padding: 10px 20px;
    color: #0056d3;
    background: white;
    border: 1px solid #0056d3;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-register:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 86, 211, 0.2);
}

.btn-login {
    padding: 10px 20px;
    color: white;
    background: #0056d3;
    border: 1px solid #0056d3;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: #0047b3;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 86, 211, 0.3);
}

/* 英雄区域样式 - 带背景图片 */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    margin-bottom: 0; /* 移除底部间距，确保右侧分类卡片顶对齐 */
    border-radius: 8px; /* 与现有卡片圆角规范一致 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/university-campus.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 学校子站点（landing.html）专用英雄区背景图 - 排除总站点 */
.page-landing:not(.page-alliance-home) .hero-background {
    background-image: url('/assets/xjtu-hero.jpg');
}

/* 合作院校页专用英雄区背景图：大学校园图片 */
.hero-partners .hero-background {
    background-image: url('/assets/university-building-2.jpg');
}

/* 西北高校课程联盟专用英雄区背景图：使用不同的图片 */
.page-northwest .hero-background {
    background-image: url('/assets/university-building-3.jpg');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 从顶部到底部的渐变：顶部较透明，底部较暗，确保文字可读性 */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 60px 40px;
    color: white;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.98);
    margin: 0 0 40px 0;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 英雄区标题在总站与合作院校页统一视觉层级 */
.page-landing .hero-title,
.page-partners .hero-title {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.page-landing .hero-subtitle,
.page-partners .hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: rgba(226, 232, 240, 0.9);
    margin-bottom: 44px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}


.btn-hero-primary {
    padding: 16px 40px;
    background: #0056d3;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0, 86, 211, 0.4), 0 0 40px rgba(0, 86, 211, 0.2);
}

.btn-hero-primary:hover {
    background: #0047b3;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 86, 211, 0.5), 0 0 50px rgba(0, 86, 211, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 总站与合作院校页：英雄区按钮使用玻璃拟态透明风格 */
.page-landing .btn-hero-primary,
.page-partners .btn-hero-primary {
    background: rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(248, 250, 252, 0.35);
    color: #f9fafb;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
}

.page-landing .btn-hero-primary:hover,
.page-partners .btn-hero-primary:hover {
    background: rgba(15, 23, 42, 0.18);
    border-color: rgba(248, 250, 252, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.55);
}

/* 容器样式覆盖 - 左右对调：左侧分类导航宽度等于单个课程卡片，右侧英雄区自适应 */
.page-landing .homepage-container {
    /* 计算：总宽度1400px - 左右padding 80px = 1320px
       课程区域4列：(1320px - 3×20px gap) / 4 = 315px
       所以分类卡片宽度 = 315px */
    grid-template-columns: 315px 1fr !important; /* 左侧315px分类导航（等于单个课程卡片宽度），右侧1fr英雄区 */
    gap: 20px !important; /* 与课程卡片间距保持一致 */
    align-items: start !important; /* 强制 grid 内所有项目从顶部对齐 */
    padding-top: 150px !important; /* 为固定顶栏留出空间（72px顶栏 + 约50px tabs + 28px合理间距） */
}

/* 主内容区域样式覆盖 - 确保与侧边栏顶部对齐 */
.page-landing .main-content {
    margin-top: 0 !important; /* 确保主内容区从顶部开始 */
    align-self: start !important; /* 确保在 grid 中顶部对齐 */
}

/* 侧边栏样式覆盖 - 移除固定定位，与英雄区顶部对齐 */
.page-landing .sidebar {
    width: 315px !important; /* 宽度等于单个课程卡片宽度 */
    position: relative !important; /* 创建新的层叠上下文，便于卡片覆盖下面内容 */
    margin-top: 0 !important; /* 强制移除 margin-top，确保与英雄区顶对齐 */
    top: 0 !important; /* 强制移除 sticky 定位的 top 值 */
    align-self: start !important; /* 确保在 grid 中顶部对齐 */
    z-index: 10;
    overflow: visible !important; /* 确保子元素可以溢出显示 */
    gap: 0 !important; /* 移除默认的 gap，避免影响定位 */
}

/* 课程分类导航卡片样式 */
.category-nav-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
    position: absolute !important; /* 悬浮在 sidebar 内部，脱离文档流，避免推挤下方内容 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 11; /* 确保在 sidebar 内部最高层，覆盖下方推荐/热门/最新区域 */
    overflow: hidden; /* 折叠状态裁剪超出内容，展开时通过 JS 增高显示全部 */
    transition: height 0.3s ease, box-shadow 0.3s ease;
}

.category-nav-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

/* 底部渐变背景和下箭头 */
.category-nav-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    /* 箭头在底部16px，箭头上方15px即31px处开始渐变，计算：31/80 = 38.75% */
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 38.75%, rgba(255, 255, 255, 0.8) 55%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-nav-card::before {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #94a3b8;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.category-nav-card:hover::after,
.category-nav-card:hover::before {
    opacity: 0;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    border-radius: 0;
    gap: 8px;
    margin: 0;
    margin-top: 12px;
    margin-bottom: 12px;
}

.category-nav-item:first-child {
    margin-top: 0;
}

.category-nav-item:last-child {
    margin-bottom: 0;
}

.category-nav-item.active {
    background: transparent; /* 移除蓝色背景 */
}

.category-main-link {
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
    white-space: nowrap;
    width: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    outline: none; /* 移除聚焦轮廓 */
}

.category-main-link:hover {
    color: #0056d3;
}

.category-main-link:active {
    background: transparent; /* 禁用鼠标按下时的背景 */
}

.category-main-link:focus {
    outline: none; /* 移除聚焦时的轮廓 */
}

.category-nav-item.active .category-main-link {
    color: #0056d3;
}

.hot-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 14px;
    line-height: 1;
    color: #ff6b35; /* 橙色火焰图标 */
    flex-shrink: 0;
}

.category-separator {
    color: #cbd5e1;
    font-size: 14px;
    margin: 0 4px;
    flex-shrink: 0;
}

.category-sub-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.category-sub-link {
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    outline: none; /* 移除聚焦轮廓 */
}

.category-sub-link:hover {
    color: #0056d3;
}

.category-sub-link:active {
    background: transparent; /* 禁用鼠标按下时的背景 */
}

.category-sub-link:focus {
    outline: none; /* 移除聚焦时的轮廓 */
}

.category-sub-separator {
    color: #cbd5e1;
    font-size: 13px;
    flex-shrink: 0;
}

.category-sub-ellipsis {
    color: #64748b;
    font-size: 13px;
    margin-left: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 课程模块上下间距：与上方元素保持一致的顶边距 */
/* 合作院校展示区域 */
.partners-showcase-section {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 40px;
    box-sizing: border-box;
}

.partners-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.partners-logo-scroll {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 渐隐效果 - 通过类控制 */
.partners-logo-scroll.fade-left {
    mask-image: linear-gradient(to right, transparent 0%, black 60px, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px, black 100%);
}

.partners-logo-scroll.fade-right {
    mask-image: linear-gradient(to right, black 0%, black calc(100% - 60px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, black calc(100% - 60px), transparent 100%);
}

.partners-logo-scroll.fade-both {
    mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
}

.partners-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    color: #1e293b;
}

.partners-scroll-btn:hover {
    background: rgba(248, 250, 252, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.partners-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.partners-scroll-btn-left {
    left: -20px;
}

.partners-scroll-btn-right {
    right: -20px;
}

.partners-scroll-btn.hidden {
    display: none;
}

.partners-logo-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.partners-logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 220px;
    height: 64px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.partners-logo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    border-color: #cbd5e1;
}

.partners-logo-item .logo-wrapper {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partners-logo-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.partners-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partners-logo-item .school-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.popular-courses-section,
.latest-courses-section,
.alliance-courses-section,
.language-data-science-section {
    margin-top: 40px;
}

/* Section Header 与卡片对齐 - 桌面端 */
.page-landing .section-header {
    padding: 0; /* 移除 padding，让标题和按钮与卡片对齐 */
    margin: 0 0 20px 0; /* 只保留底部间距 */
}

/* 课程网格 - 确保与 section-header 对齐 */
.page-landing .course-grid {
    padding: 0; /* 确保卡片与标题对齐 */
    margin: 0; /* 移除默认 margin */
}

/* 页面底部留白 */
.alliance-courses-section,
.language-data-science-section {
    margin-bottom: 40px;
}

/* 课程区域撑满整个 grid 区域（主内容 + 侧边栏 + gap） */
.recommended-courses-section,
.popular-courses-section,
.latest-courses-section,
.alliance-courses-section,
.language-data-science-section {
    grid-column: 1 / -1; /* 占满整个 grid 宽度 */
    width: 100%;
    position: relative;
    z-index: 1; /* 保持在 sidebar 之下，避免遮挡展开的分类卡片 */
    box-sizing: border-box;
}

/* 课程网格布局 - 每行显示4个课程 */
.page-landing .course-grid {
    grid-template-columns: repeat(4, 1fr) !important; /* 强制每行4个课程 */
    gap: 20px;
    margin-bottom: 0; /* 去掉底部外边距，避免与 section 的 margin-top 重复计算垂直间距 */
}

/* 响应式：中等屏幕显示3列 */
@media (max-width: 1200px) {
    .page-landing .course-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 响应式：小屏幕显示2列 */
@media (max-width: 900px) {
    .page-landing .course-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 响应式：移动端显示1列 */
@media (max-width: 600px) {
    .page-landing .course-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== 响应式设计 ==================== */

/* 平板和中等屏幕 (1024px 及以下) */
@media (max-width: 1024px) {
    /* 容器布局调整 - 单列布局 */
    .page-landing .homepage-container {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 24px 16px;
        padding-top: 140px !important; /* 为固定顶栏留出空间（72px顶栏 + 约50px tabs + 18px间距） */
    }
    
    /* 侧边栏在移动端完全隐藏 */
    .page-landing .sidebar {
        display: none !important;
    }
    
    /* 分类导航卡片在移动端完全隐藏 */
    .category-nav-card {
        display: none !important;
    }
    
    /* 主内容区域 */
    .page-landing .main-content {
        margin-top: 0 !important;
    }
    
    /* 课程区域占满宽度 */
    .recommended-courses-section,
    .popular-courses-section,
    .latest-courses-section,
    .alliance-courses-section,
    .language-data-science-section {
        grid-column: 1 / -1;
    }
    
    /* Header 调整 */
    .header-content {
        padding: 0 16px;
        flex-wrap: wrap;
    }
    
    .search-section {
        order: 3;
        width: 100%;
        margin: 12px 0 0 0;
        flex: 1 1 100%;
    }
    
    /* Hero 区域 */
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-content {
        padding: 50px 24px;
    }
    
    /* Tabs 导航 */
    .tabs-content {
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabs-nav {
        flex-wrap: nowrap;
        min-width: max-content;
    }
    
    .tab-item {
        white-space: nowrap;
        font-size: 14px;
        padding: 12px 0;
    }
}

/* 移动端 (768px 及以下) */
@media (max-width: 768px) {
    /* Header 紧凑布局 */
    .header-content {
        height: auto;
        min-height: 64px;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .logo-section {
        flex: 1;
        min-width: 0;
    }
    
    .platform-name {
        font-size: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .university-logo {
        width: 32px;
        height: 32px;
    }
    
    /* 搜索框在移动端隐藏，可以后续添加搜索图标按钮 */
    .search-section {
        display: none;
    }
    
    /* 可选：移动端搜索图标按钮（如果需要） */
    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: transparent;
        border: none;
        color: #64748b;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .mobile-search-btn:hover {
        background: #f1f5f9;
    }
    
    /* 分类导航卡片在移动端隐藏 */
    .category-nav-card {
        display: none !important;
    }
    
    /* 侧边栏在移动端也隐藏（因为主要就是分类导航卡片） */
    .page-landing .sidebar {
        display: none !important;
    }
    
    /* 用户操作按钮 */
    .user-section {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .btn-register,
    .btn-login {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* Tabs 导航滚动 */
    .header-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .header-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .tabs-content {
        padding: 0;
    }
    
    .tabs-nav {
        padding: 0 16px;
        margin: 0;
    }
    
    .tabs-nav > * {
        margin: 0 12px;
    }
    
    .tab-item {
        font-size: 13px;
        padding: 12px 0;
    }
    
    /* Hero 区域 - 移动端优化设计 */
    .hero-section {
        min-height: 380px; /* 增加高度，提供更好的视觉空间 */
        border-radius: 0;
        margin: 0 -16px; /* 扩展到容器边缘 */
        width: calc(100% + 32px);
        margin-top: 0; /* 确保与顶栏有间距 */
    }
    
    /* 确保容器有足够的 padding-top 避免被顶栏遮挡 */
    /* 顶栏高度：72px (main-header) + 约50px (header-tabs) = 122px，加上间距 */
    .page-landing .homepage-container {
        padding-top: 140px !important; /* 移动端：72px顶栏 + 约50px tabs + 18px间距 */
    }
    
    /* 标题 - 移动端优化：更大更醒目，但不过度 */
    .hero-title {
        font-size: 32px; /* 从28px增加到32px，提升视觉冲击力 */
        line-height: 1.25; /* 更紧凑的行高，适合移动端 */
        font-weight: 700;
        margin: 0 0 16px 0; /* 减少与副标题的间距 */
        letter-spacing: -0.01em; /* 轻微负字距，提升可读性 */
    }
    
    /* 副标题 - 移动端优化：清晰易读 */
    .hero-subtitle {
        font-size: 16px; /* 保持16px，确保可读性 */
        line-height: 1.6; /* 增加行高，提升阅读舒适度 */
        margin: 0 0 32px 0; /* 增加与按钮的间距 */
        font-weight: 400;
        color: rgba(255, 255, 255, 0.95); /* 稍微提高不透明度 */
    }
    
    /* 内容区域 - 优化内边距 */
    .hero-content {
        padding: 48px 24px; /* 增加垂直内边距，提升视觉平衡 */
        max-width: 100%;
    }
    
    /* 按钮容器 - 居中显示 */
    .hero-actions {
        flex-direction: column;
        width: 100%;
        align-items: center; /* 确保按钮居中 */
    }
    
    /* 按钮 - 移动端优化：合理宽度，不占满屏幕 */
    .btn-hero-primary {
        width: auto; /* 改为自动宽度 */
        min-width: 200px; /* 最小宽度确保可点击性 */
        max-width: 280px; /* 最大宽度，避免过宽 */
        text-align: center;
        padding: 14px 32px; /* 增加水平内边距，提升视觉平衡 */
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px; /* 保持圆角 */
        box-shadow: 0 4px 16px rgba(0, 86, 211, 0.35), 0 0 24px rgba(0, 86, 211, 0.15);
    }
    
    /* 侧边栏分类导航 */
    .category-nav-card {
        padding: 20px 16px;
        border-radius: 0;
        margin: 0 -16px 20px -16px;
        width: calc(100% + 32px);
    }
    
    .category-nav-item {
        margin-top: 16px;
        margin-bottom: 16px;
    }
    
    .category-main-link {
        font-size: 15px;
    }
    
    .category-sub-link {
        font-size: 13px;
    }
    
    /* 课程网格 */
    .page-landing .course-grid {
        gap: 16px;
    }
    
    /* 确保触摸目标足够大（至少 44x44px） */
    .category-main-link,
    .category-sub-link,
    .tab-item,
    .btn-hero-primary,
    .view-more {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 优化文字可读性 */
    .category-sub-link {
        line-height: 1.5;
    }
    
    /* Section 标题 - 保持在同一行，与卡片对齐 */
    .section-header {
        flex-direction: row !important; /* 强制保持横向布局 */
        justify-content: space-between !important; /* 标题在左，查看更多在右 */
        align-items: center !important; /* 垂直居中对齐 */
        gap: 12px;
        padding: 0; /* 移除 padding，让内容与卡片对齐 */
        margin: 0 0 20px 0; /* 只保留底部间距 */
        flex-wrap: nowrap; /* 防止换行 */
    }
    
    .section-header h2 {
        font-size: 20px;
        margin: 0; /* 移除默认 margin */
        flex: 0 1 auto; /* 允许标题收缩但不换行 */
        white-space: nowrap; /* 防止标题文字换行 */
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .view-more {
        font-size: 14px;
        padding: 8px 16px;
        flex-shrink: 0; /* 防止按钮被压缩 */
        white-space: nowrap; /* 防止按钮文字换行 */
    }
    
    /* 课程区域间距 - 移除 padding，让卡片与标题对齐 */
    .popular-courses-section,
    .latest-courses-section,
    .alliance-courses-section,
    .language-data-science-section {
        margin-top: 32px;
        padding: 0; /* 移除 padding，让内容与容器对齐 */
    }
    
    /* 课程网格 - 确保与 section-header 对齐 */
    .page-landing .course-grid {
        padding: 0; /* 确保卡片与标题对齐 */
        margin: 0; /* 移除默认 margin */
    }
    
    /* 页脚 */
    .footer-content {
        padding: 0 16px;
    }
}

/* 小屏手机 (480px 及以下) */
@media (max-width: 480px) {
    /* Header 更紧凑 */
    .header-content {
        padding: 10px 12px;
    }
    
    .platform-name {
        font-size: 14px;
    }
    
    .university-logo {
        width: 28px;
        height: 28px;
    }
    
    .btn-register,
    .btn-login {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Hero 区域 - 小屏手机优化设计 */
    .hero-section {
        min-height: 320px; /* 稍微增加高度 */
    }
    
    /* 标题 - 小屏优化：保持可读性 */
    .hero-title {
        font-size: 28px; /* 从24px增加到28px，提升视觉层次 */
        line-height: 1.25;
        font-weight: 700;
        margin: 0 0 14px 0;
        letter-spacing: -0.01em;
    }
    
    /* 副标题 - 小屏优化：确保清晰 */
    .hero-subtitle {
        font-size: 15px; /* 从14px增加到15px，提升可读性 */
        line-height: 1.6;
        margin: 0 0 28px 0;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.95);
    }
    
    /* 内容区域 - 小屏优化内边距 */
    .hero-content {
        padding: 40px 20px; /* 增加内边距，提升视觉舒适度 */
    }
    
    /* 按钮 - 小屏优化：保持合理宽度 */
    .btn-hero-primary {
        min-width: 180px; /* 小屏稍微减小最小宽度 */
        max-width: 260px; /* 小屏稍微减小最大宽度 */
        padding: 13px 28px; /* 稍微减小内边距 */
        font-size: 15px; /* 稍微减小字体 */
    }
    
    /* 课程网格间距 */
    .page-landing .course-grid {
        gap: 12px;
    }
    
    /* Section 标题 - 保持在同一行，与卡片对齐 */
    .section-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap;
        padding: 0; /* 移除 padding，让内容与卡片对齐 */
        margin: 0 0 16px 0; /* 只保留底部间距 */
    }
    
    .section-header h2 {
        font-size: 18px;
        margin: 0;
        flex: 0 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 100px); /* 为"查看更多"按钮留出空间 */
    }
    
    .view-more {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* 课程区域 - 移除 padding，让卡片与标题对齐 */
    .popular-courses-section,
    .latest-courses-section,
    .alliance-courses-section,
    .language-data-science-section {
        padding: 0; /* 移除 padding */
    }
    
    /* 课程网格 - 确保与 section-header 对齐 */
    .page-landing .course-grid {
        padding: 0;
        margin: 0;
    }
    
    /* 页脚 */
    .site-footer {
        margin-top: 40px;
        padding: 32px 0 20px;
    }
    
    .footer-social {
        gap: 12px;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    /* 容器内边距 */
    .page-landing .homepage-container {
        padding: 16px 12px;
    }
    
    /* 课程区域内边距 */
    .popular-courses-section,
    .latest-courses-section,
    .alliance-courses-section,
    .language-data-science-section {
        padding: 0 12px;
    }
}

/* ==================== 页脚样式 ==================== */
.site-footer {
    background: #1a1a1a;
    color: #e0e0e0;
    margin-top: 80px;
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
    margin-bottom: 50px;
}

.footer-column {
    min-width: 0;
}

.footer-heading {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #0056d3;
}

.footer-link-highlight {
    color: #0056d3 !important;
    font-weight: 500;
}

.footer-link-highlight:hover {
    color: #0047b3 !important;
}

/* 联系我们区域 */
.footer-contact {
    font-size: 14px;
    line-height: 1.8;
}

.contact-org {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 15px;
}

.contact-item {
    color: #b0b0b0;
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 5px;
}

.contact-item a {
    color: #0056d3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #0047b3;
    text-decoration: underline;
}

/* 底部版权区域 */
.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 子站点和联盟站点：移除版权信息上方的横线并调整间距 */
.page-landing .site-footer,
.page-northwest .site-footer,
.page-landing-footer {
    padding: 40px 0 30px;
}

.page-landing .footer-bottom,
.page-northwest .footer-bottom,
.page-landing-footer .footer-bottom {
    border-top: none;
    padding-top: 0;
    gap: 12px;
}

.footer-social {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-link {
    color: #b0b0b0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a2a;
}

.social-link:hover {
    color: #0056d3;
    background: #333;
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    color: #808080;
    font-size: 13px;
    line-height: 1.8;
}

.footer-copyright p {
    margin: 5px 0;
}

.footer-copyright a {
    color: #808080;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-copyright a:hover {
    color: #b0b0b0;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 60px;
        padding: 40px 0 20px;
    }
    
    .footer-content {
        padding: 0 24px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .footer-bottom {
        padding-top: 30px;
        gap: 15px;
    }
    
    .footer-social {
        gap: 15px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
}

/* 合作院校英雄区搜索样式 */
.hero-partners .hero-content {
    max-width: 720px;
}

.institution-search {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    width: 100%;
    /* 黑色背景上使用白色半透明搜索框，弱存在感 */
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    box-shadow: none;
}

.institution-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #f9fafb;
    outline: none;
    padding: 10px 8px;
}

.institution-search-input::placeholder {
    color: rgba(249, 250, 251, 0.55);
}

.institution-search-button {
    border: none;
    background: transparent;
    color: #f9fafb;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.institution-search-button:hover {
    opacity: 0.9;
}

.institution-search-button svg {
    display: block;
}

