/* 首页特定样式 */
#highlights .highlight-item, #testimonials .testimonial-item {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.3s ease;
}

#highlights .highlight-item:hover, #testimonials .testimonial-item:hover {
    transform: translateY(-3px);
}

#highlights h4 { 
    margin-top: 0; 
    margin-bottom: 10px; 
    color: var(--primary-color);
    font-size: 1.2em;
}

#testimonials .testimonial-item p { 
    margin: 8px 0; 
    line-height: 1.6;
}

#call-to-action {
    text-align: center;
    margin-top: 40px;
    padding: 35px 25px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

#call-to-action h3 {
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
    color: var(--primary-dark);
}

#call-to-action p {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--text-color);
}

/* 首页课程推荐部分样式 */
.course-recommendation {
    padding: 30px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.course-recommendation .tab-buttons {
    margin-bottom: 20px; /* 减小按钮组下方间距 */
}

.course-recommendation .tab-button {
    padding: 8px 16px; /* 减小 Tab 按钮内边距 */
    font-size: 0.95em; /* 减小 Tab 按钮字体 */
}

.featured-courses {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.featured-course-card {
    width: 300px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-color: #fff;
}

.featured-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.featured-course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.featured-course-card h4 {
    margin: 15px 15px 5px;
    font-size: 18px;
    color: var(--primary-dark);
    border-bottom: none;
}

.featured-course-card p {
    margin: 0 15px 15px;
    font-size: 14px;
    color: #666;
}

/* 学员评价部分样式 */
.testimonials {
    margin: 40px 0;
}

.testimonials h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
    font-size: 1.8em;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.testimonial-card {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial-author {
    text-align: right;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.9em;
}

/* 课程掠影部分样式 */
.course-gallery {
    margin: 40px 0;
    padding: 0 20px;
}

.course-gallery h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
    font-size: 1.8em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .testimonial-text {
        font-size: 1em;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-item img {
        height: 180px;
    }
}

main section h2 {
    font-size: 1.8em; /* 减小二级标题字体 */
    margin-bottom: 20px; /* 减小标题下边距 */
}

main section h3 {
    font-size: 1.4em; /* 减小三级标题字体 */
    margin-top: 25px; /* 减小标题上边距 */
    margin-bottom: 15px; /* 减小标题下边距 */
    padding-bottom: 4px; /* 减小下划线与文字的距离 */
}

.testimonial-grid {
    gap: 15px; /* 减小评价卡片间距 */
}

.testimonial-card {
    padding: 15px; /* 减小评价卡片内边距 */
     /* 如果卡片样式在 components.css，则在那里修改 */
}

.testimonial-card .testimonial-text {
    font-size: 0.95em; /* 减小评价文字字体 */
    margin-bottom: 10px; /* 减小评价文字下方间距 */
}

.testimonial-card .testimonial-author {
    font-size: 0.85em; /* 减小作者信息字体 */
}

/* 首页最新课表 */
.popular-course-summary {
    max-width: 860px;
    margin: 0 auto 24px;
    text-align: center;
    color: #4a4a4a;
    font-size: 1rem;
    line-height: 1.8;
}

.popular-course-grid .featured-course-card {
    min-height: 260px;
}

.weekly-schedule {
    margin: 56px 0;
    padding: 28px;
    background: #f7fbf1;
    border: 1px solid rgba(76, 175, 80, 0.18);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.1);
}

.weekly-schedule-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.weekly-schedule-header h2 {
    margin-bottom: 10px;
}

.weekly-schedule-header p {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

.schedule-open-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #4caf50;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.24);
}

.schedule-open-link:hover {
    color: #fff;
    background: #388e3c;
}

.schedule-image-link {
    display: block;
    max-height: 760px;
    overflow: auto;
    border: 1px solid #d9e8d0;
    border-radius: 8px;
    background: #fff;
}

.schedule-image-link img {
    width: 100%;
    min-width: 860px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .weekly-schedule {
        margin: 40px 0;
        padding: 18px 12px;
    }

    .weekly-schedule-header {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-open-link {
        width: 100%;
    }

    .schedule-image-link {
        max-height: 620px;
    }
}


/* 历年好课榜 */
.annual-course-panel {
    max-width: 900px;
    margin: 0 auto 28px;
    padding: 22px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff8df 0%, #f4ffec 100%);
    border: 1px solid rgba(76, 175, 80, 0.22);
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.08);
    text-align: center;
}

.annual-course-panel h4,
.popular-year-heading {
    margin: 0 0 16px;
    color: #388e3c;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.annual-course-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.annual-course-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #2f5130;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.16);
}

.popular-course-summary.compact {
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .annual-course-panel {
        padding: 18px 14px;
    }

    .annual-course-list {
        align-items: stretch;
        flex-direction: column;
    }
}
