/* ========================================
   成功案例页面专属样式
   ======================================== */

/* 成功案例 Banner 区域 */
.case-hero {
    height: 60vh;
    min-height: 400px;
    background: url('../imgs/anliexiangqing.jpg');
    /* background: linear-gradient(135deg,
            rgba(106, 17, 203, 0.95) 0%,
            rgba(37, 117, 252, 0.85) 100%),
        url('../imgs/anliexiangqing.jpg'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* 修复iOS设备上background-attachment: fixed的问题 */
@supports (-webkit-touch-callout: none) {
    .case-hero {
        background-attachment: scroll;
    }
}

.case-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%); */
    animation: pulse 8s ease-in-out infinite;
}

.case-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.case-hero h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.case-hero p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-decoration {
    font-size: 80px;
    opacity: 0.15;
    margin-top: 30px;
    animation: float 3s ease-in-out infinite;
}

/* 案例分类 */
.case-categories {
    padding: 40px 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 移动端分类按钮横向滚动 */
@media (max-width: 768px) {
    .category-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 15px;
        margin: 0 -15px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .category-filters::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .filter-btn {
        flex-shrink: 0;
    }
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.filter-btn i {
    font-size: 18px;
}

/* 案例区域 */
.case-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 600px;
}

/* 案例网格布局 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
}

/* 案例卡片 */
.case-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.case-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 86, 179, 0.15);
}

/* 案例图片 */
.case-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-card:hover .case-image img {
    transform: scale(1.1);
}

/* 案例悬停遮罩 */
.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 86, 179, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-card:hover .case-overlay {
    opacity: 1;
}

.case-detail-btn {
    padding: 12px 28px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.case-detail-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 案例内容 */
.case-content {
    padding: 25px;
}

/* 分类标签 */
.case-category-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.case-category-tag.medical {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.case-category-tag.security {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.case-category-tag.drgs {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

/* 案例标题 */
.case-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 56px;
    transition: color 0.3s ease;
}

.case-card:hover .case-title {
    color: var(--primary-color);
}

/* 案例描述 */
.case-description {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 案例元信息 */
.case-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: var(--text-light);
}

.case-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-meta i {
    color: var(--primary-color);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .case-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    .case-hero h2 {
        font-size: 42px;
    }

    .category-filters {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .case-hero {
        height: 50vh;
        min-height: 350px;
    }

    .case-hero h2 {
        font-size: 36px;
    }

    .case-hero p {
        font-size: 18px;
    }

    .hero-decoration {
        font-size: 60px;
    }

    .case-section {
        padding: 50px 0;
    }

    .case-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .case-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .category-filters {
        padding: 0 10px;
    }

    .filter-btn {
        font-size: 14px;
        padding: 10px 18px;
    }
}

@media (max-width: 480px) {
    .case-hero h2 {
        font-size: 28px;
    }

    .case-hero p {
        font-size: 16px;
    }

    .case-title {
        font-size: 18px;
    }

    .case-categories {
        padding: 20px 0;
    }

    .category-filters {
        gap: 8px;
    }
}