/* 右侧边栏字体缩小 */
.sidebar-sm {
    font-size: 0.875rem;
}
.sidebar-sm .card-header h5 {
    font-size: 1rem;
}
.sidebar-sm .list-group-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}
.sidebar-card {
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.sidebar-card:hover {
    transform: translateY(-3px);
}
.list-group-item {
    padding: 0.75rem 1.25rem;
    border-left: 0;
    border-right: 0;
}
.list-group-item a {
    color: #333;
    text-decoration: none;
}
.list-group-item a:hover {
    color: #007bff;
    text-decoration: underline;
}
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    font-weight: 500;
}
/* 更鲜艳的标签颜色样式 */
.tag-color-1 {
    background-color: #ff5252;
    color: white;
    border: 1px solid #ff5252;
}
.tag-color-2 {
    background-color: #4caf50;
    color: white;
    border: 1px solid #4caf50;
}
.tag-color-3 {
    background-color: #ff9800;
    color: white;
    border: 1px solid #ff9800;
}
.tag-color-4 {
    background-color: #9c27b0;
    color: white;
    border: 1px solid #9c27b0;
}
.tag-color-5 {
    background-color: #2196f3;
    color: white;
    border: 1px solid #2196f3;
}
.tag-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}
/* 分类相关样式 */
.parent-category {
    font-weight: bold;
}
.category-count1 {
    color: #6c757d;
    font-size: 0.8em;
    margin-left: 3px;
}
.child-categories {
    display: inline;
    flex-wrap: wrap;
}
.child-categories-wrapper {
    display: inline;
}
.child-category-item {
    display: inline;
    white-space: nowrap;
}
.child-category-item:not(:last-child)::after {
    content: "|";
}


.child-categories-break {
    display: block;
    margin-top: 3px;
    padding-left: 1em;
}
/* 广告样式 */
.section-ads {
    display: flex;
    gap: 15px;
    align-items: center;
}
.ad-content {
    display: inline-block;
}
.ad-placeholder {
    display: inline-block;
    padding: 0 10px;
    color: #6c757d;
    border: 1px dashed rgba(0,0,0,0.1);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.ad-placeholder:hover {
    background-color: rgba(0,0,0,0.05);
    text-decoration: none;
    color: #6c757d;
}
/* 广告项样式 */
.ad-item {
    display: inline-block;
    white-space: nowrap;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .d-flex.align-items-center.justify-content-between > div:last-child {
        max-width: 60%;
    }
    .ad-item {
        margin-left: 5px !important;
    }
    .ad-placeholder {
        font-size: 0.8rem;
        padding: 0 5px;
    }
}


/* 分类折叠功能样式 */
.parent-category-container {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.toggle-children {
    color: #6c757d;
    font-size: 0.8em;
    line-height: 1;
    min-width: 16px;
}

.toggle-children .toggle-icon {
    transition: transform 0.2s ease;
}

.toggle-children.collapsed .toggle-icon {
    transform: rotate(-90deg);
}


.child-category-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.child-separator {
    margin-right: 3px;
    display: inline-block;
}

/* 当折叠时隐藏多余内容和分隔符 */
.child-categories-collapse:not(.show) .child-categories-content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.child-categories-collapse:not(.show) .child-separator {
    display: none;
}

/* 确保侧边栏卡片在小屏幕隐藏时不占用空间 */
.gy-sidebar {
    transition: all 0.3s ease;
}
