/* ========================================
   服务案例页样式
   ======================================== */

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-blue) 100%);
    padding: 140px 0 60px;
    text-align: center;
    color: #fff;
}

.page-header h1 {
    font-size: var(--fs-h1);
    margin-bottom: var(--space-sm);
}

.page-header p {
    font-size: var(--fs-body);
    opacity: 0.9;
}

/* 筛选栏 */
.filter-section {
    background-color: #fff;
    padding: 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    box-shadow: 0 1px 0 0 var(--border-color);
}

.filter-section .container {
    display: flex;
    justify-content: center;
}

.filter-tabs {
    display: flex;
    gap: 0;
    justify-content: center;
    margin-bottom: 0;
}

.filter-tab {
    padding: 16px 24px;
    border-radius: 0;
    background-color: transparent;
    color: var(--text-body);
    font-size: var(--fs-body);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    position: relative;
}

.filter-tab:hover {
    background-color: transparent;
    color: var(--text-title);
    border-color: transparent;
}

.filter-tab.active {
    background-color: transparent;
    color: var(--text-title);
    border-color: var(--primary-red);
}

/* 案例列表 */
.cases-section {
    background-color: var(--bg-light);
    min-height: 600px;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.case-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.case-card.hidden {
    display: none;
}

.case-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.case-image .img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 36, 99, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.case-card:hover .case-overlay {
    opacity: 1;
}

.btn-view {
    padding: 12px 32px;
    background-color: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--fs-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-view:hover {
    background-color: #c92a37;
    transform: scale(1.05);
}

.case-content {
    padding: var(--space-lg);
}

.case-content h3 {
    font-size: var(--fs-h4);
    color: var(--text-title);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.case-highlight {
    font-size: var(--fs-small);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.tag {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
}

.tag-shipping {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag-air {
    background-color: #fff3e0;
    color: #f57c00;
}

.tag-land {
    background-color: #e8f5e9;
    color: #388e3c;
}

.tag-ningbo {
    background-color: #fce4ec;
    color: #c2185b;
}

.tag-shenzhen {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.tag-dalian {
    background-color: #e0f2f1;
    color: #00796b;
}

.btn-detail {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: var(--fs-small);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
}

.btn-detail:hover {
    color: var(--primary-dark);
}

/* 案例详情抽屉 */
.case-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition-normal);
}

.case-drawer.active {
    visibility: visible;
    opacity: 1;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 90%;
    height: 100%;
    background-color: #fff;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
}

.case-drawer.active .drawer-content {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-title);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
}

.drawer-close:hover {
    background-color: var(--primary-red);
    color: #fff;
}

.drawer-body {
    padding: var(--space-xl);
}

/* 抽屉内容样式 */
.drawer-header {
    margin-bottom: var(--space-xl);
}

.drawer-header h2 {
    font-size: var(--fs-h3);
    color: var(--text-title);
    margin-bottom: var(--space-md);
}

.drawer-gallery.carousel {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 300px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img,
.carousel-slide .img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicator.active {
    background: white;
}

.drawer-section {
    margin-bottom: var(--space-xl);
}

.drawer-section h3 {
    font-size: var(--fs-h4);
    color: var(--text-title);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
}

.drawer-section p {
    font-size: var(--fs-body);
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.drawer-section ul {
    list-style: none;
}

.drawer-section ul li {
    padding: var(--space-sm) 0;
    font-size: var(--fs-body);
    color: var(--text-body);
    padding-left: 24px;
    position: relative;
}

.drawer-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
}

.drawer-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.meta-item {
    background-color: var(--bg-light);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
}

.meta-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-value {
    font-size: var(--fs-body);
    color: var(--text-title);
    font-weight: 500;
}

.drawer-cta {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.drawer-cta .btn {
    width: 100%;
}

/* 响应式 */
@media (max-width: 1024px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 40px;
    }
    
    .page-header h1 {
        font-size: var(--fs-h2);
    }
    
    .filter-section {
        top: var(--header-height-mobile);
    }
    
    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-sm);
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .drawer-content {
        width: 100%;
        max-width: 100%;
    }
    
    .drawer-body {
        padding: var(--space-lg);
    }
    
    .drawer-meta {
        grid-template-columns: 1fr;
    }
}
