/**
 * 首页分类内容显示模块样式
 *
 * @package GoodBase
 * @since 1.0.0
 */

/* 模块容器 */
.home-category-posts {
    margin: 18px 0;
    padding: 0;
}

.home-category-posts .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 模块标题区域 */
.category-posts-header {
    margin-bottom: 12px;
    text-align: center;
}

.category-posts-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.category-posts-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-posts-title a:hover {
    color: #6366f1;
}

.category-posts-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 分类内容包装器 */
.home-category-posts .category-content-wrapper {
    margin-top: 12px;
}

/* 分类主内容区域 */
.home-category-posts .category-main-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* 瀑布流容器 - 继承分类页样式 */
.home-category-posts .waterfall-container {
    display: grid;
    gap: 20px;
}

/* 响应式网格布局 - 与分类页保持一致 */
@media (min-width: 1400px) {
    .home-category-posts .waterfall-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .home-category-posts .waterfall-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .home-category-posts .waterfall-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .home-category-posts .waterfall-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .home-category-posts .waterfall-container {
        grid-template-columns: 1fr;
    }
}

/* 标签和价格显示 */
.home-category-posts .entry-categories-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 10px;
    margin-top: 1px;
}

.home-category-posts .entry-categories-tags .tag-links {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.home-category-posts .entry-categories-tags .tag-links a {
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.home-category-posts .entry-categories-tags .tag-links a:hover {
    color: #6366f1;
}

.home-category-posts .entry-categories-tags .post-price-inline {
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
}

/* 作者样式 - 参考视频分类页 */
.home-category-posts .author-info a {
    text-decoration: none !important;
    color: inherit !important;
}

.home-category-posts .post-author {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #6b7280 !important;
    font-size: 11px !important;
    position: relative !important;
    cursor: pointer !important;
}

.home-category-posts .post-author img,
.home-category-posts .post-author .avatar {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
}

.home-category-posts .post-author .author-name {
    max-width: 60px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* 作者悬浮提示框 */
.home-category-posts .post-author .author-tooltip {
    position: absolute !important;
    bottom: 100% !important;
    left: 0 !important;
    transform: translateY(-8px) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    color: #ffffff !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease !important;
    transition-delay: 0s !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(8px) !important;
}

.home-category-posts .post-author .author-tooltip::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 12px !important;
    transform: translateX(0) !important;
    border: 5px solid transparent !important;
    border-top-color: rgba(0, 0, 0, 0.85) !important;
}

.home-category-posts .post-author:hover .author-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-12px) !important;
    transition-delay: 0.3s !important;
}

/* ============================================
   文本分类模块容器 - 一行3个分类
   与其他分类宽度保持一致（max-width: 1280px）
   ============================================ */

/* 文本分类容器 */
.home-text-categories-wrapper {
    margin: 18px 0;
    padding: 0;
}

.home-text-categories-wrapper .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 文本分类网格 - 一行3个 */
.text-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 单个文本分类模块 */
.text-category-module {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* 文本分类标题区域 */
.text-category-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    border-bottom: 1px solid #e5e7eb;
}

.text-category-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-category-title a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.text-category-title a:hover {
    opacity: 0.9;
}

.text-category-title .title-arrow {
    font-size: 12px;
    opacity: 0.8;
}

/* 文本分类内容区域 */
.text-category-content {
    padding: 0;
}

/* 文章列表 */
.text-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.text-post-item {
    display: flex;
    align-items: center;
    gap: 6px;
        padding: 6px 8px 6px 8px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.3s ease;
}

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

.text-post-item:hover {
    background: #fef7f4;
}

/* 序号样式 */
.text-post-item .post-index {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    border-radius: 4px;
}

/* 前三名特殊样式 */
.text-post-item .post-index.top-1 {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #ffffff;
}

.text-post-item .post-index.top-2 {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #ffffff;
}

.text-post-item .post-index.top-3 {
    background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 100%);
    color: #ffffff;
}

/* 文章链接 */
.text-post-item .post-link {
    flex: 1;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.text-post-item .post-link:hover {
    color: #ff6b35;
}

/* 浏览量 */
.text-post-item .post-views {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

.text-post-item .post-views i {
    font-size: 11px;
    color: #d1d5db;
}

/* 响应式调整 - PC端 */
@media (max-width: 1200px) {
    .text-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .text-categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-category-posts {
        margin: 18px 0;
    }
    
    .home-category-posts .container {
        padding: 0 15px;
    }
    
    .category-posts-title {
        font-size: 24px;
    }
    
    .category-posts-subtitle {
        font-size: 14px;
    }
    
    .home-category-posts .waterfall-container {
        gap: 15px;
    }
    
    /* 移动端文本分类网格：一行1个 */
    .text-categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

