/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'system-ui', 'sans-serif';
}

.community-container {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-container {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 头部区域样式 */
.community-section {
    background-color: #25499D;
    padding: 60px 40px;
    position: relative;
    height: 350px;
}

.community-title-container {
    position: absolute;
    left: 10%;
    top: 20%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
}

.committed-area {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #25499D;
}

.community-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 16px;
    color: #25499D;
}

/* 基础信息与活动资讯区域 */
.info-news-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin: 40px auto;
    background-color: white;
}

.info-card {
    width: 600px;
    border-radius: 8px;
    padding: 20px;
}

.info-card h2 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 24px;
    color: #25499D;
    text-align: left;
}

.view-more {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-more a {
    display: block;
    color: #666666;
    text-decoration: none;
}

.info-detail {
    margin-bottom: 16px;
    background-color: #F7F7F7;
    border-radius: 16px;
    padding: 10px;
}

.info-detail p {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.8;
    padding: 6px 0;
}

.info-detail strong {
    color: #333;
    font-weight: 600;
}

.news-list {
    padding-left: 15px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
    align-items: center;
}

.news-item:last-child {
    border-bottom: none;
}

.news-content {
    flex: 1;
}

.news-content a {
    color: #1d2129;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-content a:hover {
    color: #1677ff;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-left: 16px;
    white-space: nowrap;
}

/* 学习中心区域 */
.learning-center {
    background-color: #25499D;
    padding: 20px 0 60px;
    margin-bottom: 40px;
}

.learning-center .community-container h2 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    font-weight: bold;
    padding-bottom: 10px;
    color: white;
    text-align: center;
    position: relative;
    margin-bottom: 30px;
}

.learning-center .community-container h2::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background-color: #fff;
    left: calc(50% - 100px);
    bottom: 0;
}

.learning-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15vw, 1fr));
    gap: 4vw;
}

.learning-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.learning-image:hover {
    transform: scale(1.02);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .community-title {
        font-size: 2rem;
    }

    .info-news-section {
        grid-template-columns: 1fr;
    }

    .learning-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .community-title {
        font-size: 1.8rem;
    }

    .learning-gallery {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-date {
        margin-left: 0;
        margin-top: 4px;
    }
}

/* 课程展示区域样式 */
.comunity-course-section {
    padding: 0 40px 60px;
    background-color: white;
}

.community-course-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
}

.community-course-title h2 {
    font-size: 24px;
    color: #25499D;
}

.community-course-title a {
    font-size: 16px;
    color: #666666;
    text-decoration: none;
}

.comunity-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(23vw, 1fr));
    gap: 3vw;
}

.course-card {
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 1px 3px 15px 3px #ECEEF4;
    position: relative;
    padding: 20px;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-header-left {
    padding-right: 10px;
}

.course-header-left img {
    width: 200px;
    height: auto;
}

.course-header-right img {
    width: auto;
    height: 30px;
}

.course-header-right h3 {
    margin-top: 10px;
}

.course-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    padding-top: 10px;
    margin-bottom: 20px;
    padding-right: 40px;
}

.course-body {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.course-body h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.course-rating {
    width: 200px;
    height: auto;
    display: flex;
    align-items: center;
}

.rating-star {
    color: #ff9800;
    margin-right: 5px;
    font-size: 1.1rem;
}

.rating-score {
    font-weight: bold;
    margin-right: 5px;
    color: #333;
}

.rating-count {
    font-size: 0.85rem;
    color: #999;
}

.course-level {
    font-size: 0.85rem;
    color: #666;
}

.action-button {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: url('imgs/xuexi-bgicon.png') no-repeat;
    background-size: 100% 100%;
}

.action-button:hover {
    transform: scale(1.1);
}

/* 课程区域响应式调整 */
@media (max-width: 768px) {
    .comunity-course--grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .comunity-course--grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        margin-bottom: 20px;
    }

    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 1337px) {
    .community-container {
        max-width: 1200px;
    }

    .main-container {
        max-width: 1200px;
    }
}