/* 专题列表页面样式 */

/* 专题列表区域 */
.topic-list-section {
    background-color: var(--bg-body);
    /* padding: 40px 0 60px; */
    min-height: calc(100vh - 400px);
}


/* 页面标题区域 */
.topic-list-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: #fff !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: 80px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.section-title h2 {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* 搜索容器 */
.search-container {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.search-container:focus-within {
    box-shadow: 0 0 0 3px rgba(215, 67, 57, 0.1);
}

.search-input {
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    width: 280px;
    background-color: transparent;
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-button {
    padding: 10px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--primary-color);
}

.search-button:hover {
    color: var(--primary-dark);
    background: rgba(215, 67, 57, 0.05);
}

.search-button svg circle,
.search-button svg path {
    stroke: currentColor;
}

/* 专题网格 */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
    background-color: #fff;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* 专题卡片 */
.topic-card {
    background-color: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* 专题图片区域 */
.topic-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.topic-card:hover .topic-image img {
    transform: scale(1.05);
}

/* 专题统计信息 */
.topic-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4), transparent);
    color: #fff;
    font-size: 13px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item svg {
    flex-shrink: 0;
}

.stat-item svg circle,
.stat-item svg path {
    stroke: currentColor;
}

/* 专题信息区域 */
.topic-info {
    padding: 10px 15px;
    height: 56px;
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topic-card:hover .topic-title {
    color: var(--primary-color);
}

/* 分页样式（复用 common.css 的分页样式） */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: #fff;
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.page-link:hover:not(.disabled) {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link.active {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link.disabled {
    color: var(--text-lighter);
    background-color: var(--bg-hover);
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-lighter);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .section-title {
        justify-content: center;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header {
        padding: 20px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .title-icon {
        font-size: 28px;
    }

    .topic-image {
        height: 200px;
    }

    .topic-title {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .topic-list-section {
        padding: 20px 0 40px;
    }

    .section-header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .topic-image {
        height: 180px;
    }

    .topic-stats {
        font-size: 12px;
        padding: 10px 12px;
    }

    .stat-item svg {
        width: 14px;
        height: 14px;
    }
}
