/* LinkedKeeper Courses Page - Enhanced Course Display Styles */

/* Course Page Layout */
.courses-page {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Enhanced Search Section */
.search-section {
    padding: 100px 0 60px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="courseGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23courseGrid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.search-section .container {
    position: relative;
    z-index: 1;
}

.search-section .section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.search-section .section-description {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #6b7280;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Enhanced Search Bar */
.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.search-bar button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Course Categories Filter */
.course-categories {
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.tab-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #6b7280;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active,
.tab-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Enhanced Courses Grid */
.pricing {
    padding: 80px 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced Course Cards */
.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px; /* 增加最小高度以适应更多行title */
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.pricing-card:hover::before {
    transform: scaleX(1);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e1;
}

/* Course Header */
.course-header {
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1; /* 占据剩余空间 */
}


.course-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    min-height: 2.6rem; /* 使用min-height而不是固定height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    line-clamp: 2; /* 标准属性 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-wrap: break-word; /* 允许长单词换行 */
    word-break: break-word; /* 强制长单词换行 */
}

.course-description {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0;
    font-size: 0.95rem;
    flex: 1; /* 占据剩余空间 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* PC端显示3行 */
    line-clamp: 3; /* 标准属性 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}


/* Course Price Section */
.course-price-section {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e5e7eb;
    margin-top: 0; /* 移除auto margin */
    margin-bottom: 0; /* 确保没有底部间距 */
    flex-shrink: 0; /* 防止被压缩 */
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-currency {
    font-size: 1.2rem;
    color: #6b7280;
}

.price-amount {
    font-size: 2.5rem;
    color: #3b82f6;
}

.price-period {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.price-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Course Card Link */
.course-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: all 0.3s ease;
}

.course-card-link:hover {
    text-decoration: none;
    color: inherit;
}


/* Enhanced Pagination */
.pagination-container {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background: white;
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    min-width: 120px;
    text-align: center;
}

.pagination-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-current {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Course Loading States */
.course-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Course Empty State */
.course-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.course-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.course-empty h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.course-empty p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Course Category Specific Styles */
.pricing-card[data-category="personal"] {
    border-left: 4px solid #3b82f6;
}

.pricing-card[data-category="individual"] {
    border-left: 4px solid #10b981;
}

.pricing-card[data-category="group"] {
    border-left: 4px solid #f59e0b;
}

.pricing-card[data-category="advanced"] {
    border-left: 4px solid #8b5cf6;
}

.pricing-card[data-category="specialized"] {
    border-left: 4px solid #ef4444;
}

.pricing-card[data-category="expert"] {
    border-left: 4px solid #f97316;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 40px 0;
    }
    
    .search-section .section-title {
        font-size: 2.2rem;
    }
    
    .search-section .section-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
    }
    
    .search-bar input {
        width: 100%;
        padding: 0.875rem 1.25rem;
    }
    
    .search-bar button {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .category-tabs {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .pricing {
        padding: 60px 0;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .pricing-card {
        border-radius: 16px;
    }
    
    .course-header {
        padding: 0.875rem 0.875rem 0.375rem 0.875rem;
    }
    
    .course-title {
        font-size: 1.3rem;
        height: auto; /* 完全自适应高度 */
        min-height: auto; /* 移除最小高度限制 */
        -webkit-line-clamp: 3; /* 移动端允许显示3行 */
        line-clamp: 3; /* 标准属性 */
        line-height: 1.3; /* 增加行高确保文字完整显示 */
        max-height: calc(1.3em * 3 + 0.3em); /* 确保3行完整显示 */
    }
    
    .course-description {
        font-size: 0.9rem;
    }
    
    .course-price-section {
        padding: 0.875rem 1rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    
    
    .pagination-container {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .pagination-buttons {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .search-section .section-title {
        font-size: 1.8rem;
    }
    
    .pricing-grid {
        padding: 0;
    }
    
    .pricing-card {
        min-height: 380px; /* 小屏幕进一步增加高度 */
    }
    
    .course-header {
        padding: 0.75rem 0.75rem 1rem 0.75rem; /* 增加底部间距 */
    }
    
    .course-title {
        min-height: 2.08rem; /* 使用min-height，允许内容自适应 */
        font-size: 1.2rem; /* 小屏幕稍微减小字体 */
        -webkit-line-clamp: 3; /* 小屏幕也允许3行 */
        line-clamp: 3; /* 标准属性 */
        line-height: 1.15; /* 更紧凑的行高 */
        margin-bottom: 0.75rem; /* 减少底部间距为description留空间 */
    }
    
    .course-price-section {
        padding: 0.75rem 0.875rem;
    }
    
    
    .pagination-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .pagination-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Course Card Hover Effects - 只影响courses页面 */
.courses-page .pricing-card:hover .course-title {
    color: #3b82f6;
}


.pricing-card:hover .price-amount {
    color: #1d4ed8;
}

/* Course Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card {
    animation: fadeInUp 0.6s ease-out;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }
.pricing-card:nth-child(4) { animation-delay: 0.4s; }
.pricing-card:nth-child(5) { animation-delay: 0.5s; }
.pricing-card:nth-child(6) { animation-delay: 0.6s; }

/* Focus States for Accessibility */
.pricing-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.pagination-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 超长title处理 - 只影响courses页面 */
.courses-page .pricing-card .course-title {
    hyphens: auto; /* 自动断词 */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}


/* 确保title在移动端有足够的显示空间 - 参考course-detail页面样式，只影响courses页面 */
@media (max-width: 768px) {
    .courses-page .pricing-card .course-title {
        height: auto !important; /* 高度完全自适应 */
        min-height: auto !important; /* 移除最小高度限制 */
        max-height: none !important; /* 移除最大高度限制 */
        overflow: visible !important; /* 允许内容完全显示 */
        -webkit-line-clamp: unset !important; /* 移除行数限制 */
        line-clamp: unset !important; /* 标准属性 */
        display: block !important; /* 改为块级显示 */
        line-height: 1.4 !important; /* 确保行高足够 */
        word-break: break-word !important; /* 智能断词 */
        hyphens: auto !important; /* 自动断词 */
        margin-bottom: 0.75rem !important; /* 为description留出空间 */
    }
    
    .courses-page .pricing-card .course-description {
        height: auto !important; /* 高度完全自适应 */
        min-height: auto !important; /* 移除最小高度限制 */
        max-height: none !important; /* 移除最大高度限制 */
        overflow: visible !important; /* 允许内容完全显示 */
        -webkit-line-clamp: unset !important; /* 移除行数限制 */
        line-clamp: unset !important; /* 标准属性 */
        display: block !important; /* 改为块级显示 */
        line-height: 1.5 !important; /* 确保行高足够 */
        word-break: break-word !important; /* 智能断词 */
        hyphens: auto !important; /* 自动断词 */
    }
}

/* 移动端特殊优化 - 确保长文本能正确显示，只影响courses页面 */
@media (max-width: 768px) {
    .courses-page .pricing-card {
        /* 确保卡片有足够高度容纳长文本 */
        min-height: 420px;
    }
    
    /* 针对超长标题的特殊处理 */
    .courses-page .pricing-card .course-title {
        /* 确保长标题能正确换行 */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }
    
    /* 针对超长描述的特殊处理 */
    .courses-page .pricing-card .course-description {
        /* 确保长描述能正确换行 */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }
}

/* Fallback for browsers that don't support -webkit-line-clamp - 只影响courses页面 */
@supports not (-webkit-line-clamp: 2) {
    .courses-page .pricing-card .course-title {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        height: 1.3rem; /* 单行高度 */
    }
    
    .courses-page .pricing-card .course-description {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
}

/* Override any conflicting styles from other CSS files */
.courses-page .pricing-card {
    padding: 0 !important; /* 覆盖home.css中的padding */
    background: white !important; /* 确保背景色正确 */
}

/* 桌面端样式 - 只在非移动端应用 */
@media (min-width: 769px) {
    .courses-page .pricing-card h4 {
        font-size: 1.5rem !important; /* 覆盖home.css中的h4样式 */
        font-weight: 400 !important;
        color: #1a1a1a !important;
        margin-bottom: 1rem !important;
    }
}

/* 桌面端样式 - 只在非移动端应用 */
@media (min-width: 769px) {
    .courses-page .pricing-card p {
        color: #64748b !important; /* 覆盖home.css中的p样式 */
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
        font-size: 0.95rem !important;
    }
}

/* Course Chapters Styles */
.course-chapters {
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.chapters-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.total-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.total-duration svg {
    color: #9ca3af;
}

.chapters-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.chapter-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.chapter-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    background: #f1f5f9;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    min-width: 25px;
    text-align: center;
}

.chapter-title {
    flex: 1;
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-duration {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 500;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    white-space: nowrap;
}

.more-chapters {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.more-chapters:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #94a3b8;
}

/* Course Card Hover Effects for Chapters */
.pricing-card:hover .course-chapters {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

.pricing-card:hover .chapters-count {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.pricing-card:hover .chapter-item {
    background: white;
    border-color: #bae6fd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 通用移动端适配 - 基于屏幕宽度的智能适配 */
/* 超窄屏设备 (宽度 < 400px) - 使用course-detail样式 */
@media (max-width: 400px) {
    .pricing-card {
        min-height: 450px; /* 增加卡片高度以容纳更多内容 */
    }
    
    .course-header {
        padding: 1.25rem 1rem 1.5rem 1rem;
    }
    
    /* 覆盖home.css的样式，使用course-detail页面480px断点的样式 */
    .courses-page .pricing-card h4,
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.2rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    .courses-page .pricing-card p,
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.85rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

/* 窄屏设备 (400px - 480px) - 使用course-detail样式 */
@media (min-width: 400px) and (max-width: 480px) {
    .pricing-card {
        min-height: 420px;
    }
    
    .course-header {
        padding: 1rem 1rem 1.25rem 1rem;
    }
    
    /* 覆盖home.css的样式，使用course-detail页面480px断点的样式 */
    .courses-page .pricing-card h4,
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.2rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    .courses-page .pricing-card p,
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.85rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

/* 中等屏幕 (480px - 768px) - 使用course-detail样式 */
@media (min-width: 480px) and (max-width: 768px) {
    .pricing-card {
        min-height: 400px;
    }
    
    /* 覆盖home.css的样式，使用course-detail页面968px断点的样式 */
    .courses-page .pricing-card h4,
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.3rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    .courses-page .pricing-card p,
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.9rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

/* 移动端样式 - 直接复制course-detail页面sidebar样式 */
@media (max-width: 768px) {
    .pricing-card {
        min-height: 400px; /* 移动端增加卡片高度以容纳更多内容 */
    }
    
    .course-header {
        padding-bottom: 1rem; /* 增加底部间距 */
    }
    
    /* 覆盖home.css的样式，确保移动端使用course-detail样式 */
    .courses-page .pricing-card h4,
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.5rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    /* 覆盖home.css的样式，确保移动端使用course-detail样式 */
    .courses-page .pricing-card p,
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.95rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

/* Responsive Design for Chapters */
@media (max-width: 768px) {
    .course-chapters {
        margin-top: 0.75rem;
        padding: 0.625rem;
    }
    
    .chapters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.625rem;
    }
    
    .chapters-count {
        font-size: 0.8rem;
        padding: 0.2rem 0.45rem;
    }
    
    .total-duration {
        font-size: 0.75rem;
    }
    
    .chapter-item {
        padding: 0.3rem 0.45rem;
    }
    
    .chapter-number {
        font-size: 0.7rem;
        min-width: 20px;
        padding: 0.1rem 0.25rem;
    }
    
    .chapter-title {
        font-size: 0.75rem;
    }
    
    .chapter-duration {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
    
    .more-chapters {
        padding: 0.45rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .course-chapters {
        margin-top: 0.625rem;
        padding: 0.5rem;
    }
    
    .chapters-header {
        margin-bottom: 0.5rem;
    }
    
    .chapter-item {
        padding: 0.25rem 0.375rem;
    }
    
    .chapter-number {
        min-width: 18px;
        font-size: 0.65rem;
    }
    
    .chapter-title {
        font-size: 0.7rem;
    }
    
    .chapter-duration {
        font-size: 0.6rem;
    }
}

/* 移动端最终优化 - 使用course-detail样式 */
@media (max-width: 600px) {
    .pricing-card {
        min-height: 450px; /* 进一步增加高度 */
    }
    
    .course-header {
        padding: 1rem 0.875rem 1.25rem 0.875rem; /* 调整内边距 */
    }
    
    /* 使用course-detail页面480px断点的样式，只影响courses页面 */
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.2rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.85rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

@media (max-width: 480px) {
    .pricing-card {
        min-height: 480px; /* 小屏幕设备增加更多高度 */
    }
    
    .course-header {
        padding: 0.875rem 0.75rem 1rem 0.75rem;
    }
    
    /* 使用course-detail页面480px断点的样式，只影响courses页面 */
    .courses-page .pricing-card .course-title {
        font-family: var(--font-primary) !important;
        font-size: 1.2rem !important;
        font-weight: var(--font-weight-bold) !important;
        color: #111827 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
    
    .courses-page .pricing-card .course-description {
        font-family: var(--font-secondary) !important;
        color: #6b7280 !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
        font-size: 0.85rem !important;
        font-weight: var(--font-weight-normal) !important;
        flex: 1 !important;
        overflow: visible !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        text-overflow: unset !important;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .course-categories,
    .pagination-container {
        display: none;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .pricing-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .course-chapters {
        background: #f9f9f9 !important;
        border: 1px solid #ccc !important;
    }
}
