/*
 * 博客侧边栏样式
 * 可在分类页、文章页、搜索页等复用
 */

/* ==================== 侧边栏 ==================== */
.vc-category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

/* 侧边栏小部件通用样式 */
.vc-sidebar-widget {
    background: var(--vc-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.vc-widget-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--vc-text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--vc-border);
    position: relative;
}

.vc-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, var(--vc-primary) 0%, var(--vc-primary-dark) 100%);
}

/* ==================== 最新文章 ==================== */
.vc-recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vc-recent-post-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vc-border);
}

.vc-recent-post-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.vc-recent-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.vc-recent-post-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.vc-recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vc-recent-post-item:hover .vc-recent-post-thumb img {
    transform: scale(1.1);
}

.vc-recent-post-content {
    flex: 1;
    min-width: 0;
}

.vc-recent-post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.vc-recent-post-title a {
    color: var(--vc-text-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.vc-recent-post-title a:hover {
    color: var(--vc-primary);
}

.vc-recent-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--vc-text-light);
}

.vc-recent-post-meta svg {
    flex-shrink: 0;
    color: var(--vc-primary);
}

/* ==================== 商家展示位 ==================== */
.vc-ad-widget {
    transition: all 0.3s;
}

.vc-ad-content {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vc-bg-light);
    border-radius: 12px;
    overflow: hidden;
}

.vc-ad-content img {
    width: 100%;
    height: auto;
    display: block;
}

.vc-ad-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.vc-ad-placeholder svg {
    color: var(--vc-text-light);
    opacity: 0.3;
    margin-bottom: 16px;
}

.vc-ad-placeholder p {
    font-size: 16px;
    font-weight: 600;
    color: var(--vc-text-light);
    margin: 0 0 8px 0;
}

.vc-ad-placeholder span {
    font-size: 13px;
    color: var(--vc-text-light);
    opacity: 0.7;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .vc-ad-widget {
        position: static;
    }
}

@media (max-width: 480px) {
    .vc-sidebar-widget {
        padding: 20px;
    }
    
    .vc-recent-post-thumb {
        width: 70px;
        height: 70px;
    }
    
    .vc-recent-post-title {
        font-size: 14px;
    }
}
