/* 心理科普模块样式 */

/* 分类导航区域 */
.kp-category-section {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.kp-category-tabs-container {
    position: relative;
    width: 100%;
}

.kp-category-tabs {
    display: flex;
    padding: 12px 15px;
    position: relative;
    width: 100%;
    justify-content: space-around;
}

.kp-category-tab {
    padding: 8px 15px;
    font-size: 14px;
    color: #666;
    border-radius: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.kp-category-tab.active {
    background-color: #4e9cff;
    color: #fff;
    box-shadow: 0 2px 6px rgba(78, 156, 255, 0.3);
}

/* 内容区域 */
.knowledge-content-area {
    background-color: #fff;
    padding: 15px;
}

.knowledge-content-section {
    display: none;
}

.knowledge-content-section.active {
    display: block;
}

.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.knowledge-item {
    display: flex;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.knowledge-item:last-child {
    border-bottom: none;
}

.knowledge-item:hover {
    background-color: #f5f5f5;
}

.knowledge-image {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.knowledge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration, .course-lessons {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
}

.knowledge-info {
    flex: 1;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.knowledge-title {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.knowledge-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.view-more-btn {
    text-align: center;
    margin-top: 15px;
}

.view-more-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.view-more-link:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .knowledge-item {
        padding: 8px 0;
    }
    
    .knowledge-image {
        width: 90px;
        height: 65px;
    }
}

.category-content {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.article-item {
    width: calc(50% - 6px);
    display: flex;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.article-item:hover {
    background-color: #f5f5f5;
}

.article-image {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration, .course-lessons {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
}

.article-info {
    flex: 1;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-item {
        width: 100%;
    }
}
