/* ===================================
   页面标题与搜索排序
=================================== */
.page-title-wrap {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}
.page-title-section {
    width: 100%;
    margin: 25px 0;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 28px;
    color: #333;
}

.page-title span {
    color: #ff9500;
}

.search-sort-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 8px 12px;
    outline: none;
    width: 240px;
    font-size: 14px;
}

.search-icon {
    background-color: #ff9500;
    color: white;
    padding: 8px 14px;
    cursor: pointer;
}

/* ===================================
   核心内容容器
=================================== */
.main-wrap {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}
.main-container {
    width: 100%;
    display: flex;
    gap: 25px;
}

/* ===================================
   左侧分类导航
=================================== */
.category-sidebar {
    width: 220px;
    background-color: #FFF;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #FFE082;
    padding: 20px;
    height: fit-content;
    position: fixed;
    top: 140px;
    left: 20px;
    z-index: 9999;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    overflow-x: hidden;
    list-style: none;
    margin: 0;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #FFE082;
    color: #333;
}

.category-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none !important;
}

.category-item:hover {
    background-color: #FFF8E1;
    color: #FF5722;
}

.category-item.active {
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 100%);
    color: #FFF;
    font-weight: 500;
}

.category-count {
    background-color: #FFE082;
    color: #666;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

.category-item.active .category-count {
    background-color: #FFF;
    color: #FF5722;
}
.category-item a {
    color: inherit !important;
    text-decoration: none !important;
    display: block;
    width: 100%;
}
.category-item.active a {
    color: #fff !important;
}

/* ===================================
   右侧瀑布流
=================================== */
.cases-grid-wrapper {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding-left: 240px !important; 
}
.cases-grid {
    width: 100%;
    column-count: 5;
    column-gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.case-card {
    break-inside: avoid;
    width: 100%;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.25s;
    display: block;
}
.case-card:hover {
    transform: translateY(-5px);
}
.case-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.case-content {
    padding: 14px;
}
.case-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.case-author {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.case-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}
.case-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.lang-switch, .copy-btn {
    font-size: 12px;
    color: #ff9500;
    padding: 5px 9px;
    border: 1px solid #ff9500;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}
.lang-switch.translate-active {
    background: #ff9500;
    color: white;
}
.copy-try-btn {
    background: #007aff;
    color: white;
    border: none;
    padding: 5px 11px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

/* ===================================
   分页
=================================== */
.pagination-wrap {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}
.pagination {
    width: 100%;
    margin: 30px 0;
    text-align: center;
}
.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 10px;
}
.pagination a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}
.pagination li.acti a {
    background: #ff9500;
    color: white;
    border-color: #ff9500;
}

/* ===================================
   统计

   响应式适配
=================================== */
@media (max-width: 1800px) { .cases-grid { column-count: 4; } }
@media (max-width: 1200px) { .cases-grid { column-count: 3; } }
@media (max-width: 992px)  {
    .cases-grid { column-count: 2; }
    .category-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 20px;
        max-height: none;
        left: auto !important;
    }
    .cases-grid-wrapper {
        padding-left: 0 !important;
    }
}
@media (max-width: 768px)  { .cases-grid { column-count: 2; } }
@media (max-width: 480px)  { .cases-grid { column-count: 1; } }