/* ========================================
   案例展示页面 - 全新现代化设计
   设计风格：现代、高端、动态、沉浸
   特色：瀑布流布局、3D效果、玻璃拟态、微交互
   ======================================== */

/* ========================================
   0. 矩阵式图片墙背景
   ======================================== */
.matrix-wall {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.matrix-row {
    display: flex;
    gap: 12px;
    width: max-content;
    will-change: transform;
    flex-shrink: 0;
}

.matrix-row:nth-child(odd) {
    animation: matrix-scroll-left 40s linear infinite;
}

.matrix-row:nth-child(even) {
    animation: matrix-scroll-right 45s linear infinite;
}

.matrix-row:nth-child(1) { animation-duration: 35s; }
.matrix-row:nth-child(2) { animation-duration: 40s; }
.matrix-row:nth-child(3) { animation-duration: 38s; }
.matrix-row:nth-child(4) { animation-duration: 42s; }
.matrix-row:nth-child(5) { animation-duration: 36s; }

@keyframes matrix-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes matrix-scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.matrix-item {
    width: 240px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.matrix-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.4);
}

.matrix-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) saturate(0.8);
    transition: all 0.4s ease;
}

.matrix-item:hover img {
    filter: brightness(1) saturate(1.1);
}

.matrix-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(220, 38, 38, 0.2) 0%,
        transparent 50%,
        rgba(249, 115, 22, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.matrix-item:hover::after {
    opacity: 1;
}

.matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(15, 15, 15, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(26, 26, 46, 0.4) 0%, transparent 50%),
        linear-gradient(180deg, rgba(15, 15, 15, 0.85) 0%, rgba(15, 15, 15, 0.7) 50%, rgba(15, 15, 15, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

/* 矩阵墙悬停暂停 */
.matrix-wall:hover .matrix-row {
    animation-play-state: paused;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .matrix-item {
        width: 160px;
        height: 100px;
    }
    
    .matrix-row {
        gap: 8px;
    }
    
    .matrix-wall {
        gap: 8px;
    }
}

/* ========================================
   1. 页面头部装饰
   ======================================== */
.cases-hero {
    position: relative;
    padding: 160px 0 80px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
}

.cases-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(249, 115, 22, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cases-hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-float 20s linear infinite;
}

@keyframes grid-float {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

.cases-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(220, 38, 38, 0.6);
    border-radius: 50%;
    animation: particle-rise 15s infinite;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.8);
}

@keyframes particle-rise {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* 浮动光球 */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.4) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation: float-orb-1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.3) 0%, transparent 70%);
    top: 50%;
    right: 5%;
    animation: float-orb-2 25s ease-in-out infinite;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.35) 0%, transparent 70%);
    bottom: 20%;
    left: 30%;
    animation: float-orb-3 18s ease-in-out infinite;
}

@keyframes float-orb-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(20px, 40px) scale(0.9); }
    75% { transform: translate(-30px, 20px) scale(1.05); }
}

@keyframes float-orb-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 50px) scale(1.15); }
    66% { transform: translate(30px, -20px) scale(0.95); }
}

@keyframes float-orb-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -40px) scale(1.1); }
}

/* 扫描线效果 */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), transparent);
    animation: scan 8s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

.cases-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cases-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.cases-hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: dot-blink 1.5s ease-in-out infinite;
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.cases-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.cases-hero-title span {
    background: linear-gradient(135deg, #dc2626 0%, #f97316 50%, #dc2626 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cases-hero-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cases-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: stat-glow 3s ease-in-out infinite;
}

@keyframes stat-glow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.8; }
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.stat-number span {
    background: linear-gradient(135deg, #dc2626, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* ========================================
   2. 筛选区域 - 玻璃拟态风格
   ======================================== */
.cases-filter-section {
    position: relative;
    z-index: 100;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cases-filter-section.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.cases-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    position: relative;
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #dc2626, #f97316);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.filter-btn:hover {
    color: #dc2626;
    transform: translateY(-2px);
}

.filter-btn.active {
    color: #ffffff;
    border-color: transparent;
}

.filter-btn.active::before {
    opacity: 1;
}

.filter-btn .btn-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #dc2626, #f97316, #dc2626);
    background-size: 200% 200%;
    border-radius: inherit;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -2;
    animation: glow-rotate 3s linear infinite;
}

.filter-btn.active .btn-glow {
    opacity: 0.5;
}

@keyframes glow-rotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ========================================
   3. 案例瀑布流布局
   ======================================== */
.cases-section {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

/* 案例区域背景装饰 */
.cases-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(249, 115, 22, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

.cases-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .cases-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cases-masonry {
        grid-template-columns: 1fr;
    }
}

/* 案例卡片 - 3D悬浮效果 */
.case-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.case-card:nth-child(3n+1) {
    transform: translateY(0);
}

.case-card:nth-child(3n+2) {
    transform: translateY(30px);
}

.case-card:nth-child(3n+3) {
    transform: translateY(60px);
}

.case-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(220, 38, 38, 0.1);
}

/* 卡片边框流动效果 */
.case-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(220, 38, 38, 0.3) 50%,
        transparent 60%
    );
    background-size: 300% 300%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: border-shine 3s ease infinite;
}

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

@keyframes border-shine {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* 卡片图片区域 */
.case-image-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.case-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.case-card:hover .case-image-wrapper::after {
    opacity: 1;
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card:hover .case-img {
    transform: scale(1.1);
}

/* 分类标签 */
.case-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    transition: all 0.3s ease;
}

.case-card:hover .case-category-tag {
    background: #dc2626;
    color: #ffffff;
    transform: scale(1.05);
}

/* 悬停遮罩层 */
.case-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

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

.case-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
    border-radius: 50px;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.case-card:hover .case-view-btn {
    transform: translateY(0) scale(1);
    opacity: 1;
}

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

.case-view-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.case-view-btn:hover svg {
    transform: translateX(4px);
}

/* 卡片信息区域 */
.case-info {
    padding: 1.75rem;
    background: #ffffff;
}

.case-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.case-card:hover .case-title {
    color: #dc2626;
}

.case-desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.case-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.case-client {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.case-client::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.case-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    color: #64748b;
    transition: all 0.3s ease;
}

.case-card:hover .case-arrow {
    background: #dc2626;
    color: #ffffff;
    transform: translateX(4px);
}

/* ========================================
   4. 合同展示区域 - 玻璃拟态画廊
   ======================================== */
.contracts-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.contracts-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* 合同区域浮动光球 */
.contracts-section .floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.contracts-section .orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.25) 0%, transparent 70%);
    top: 20%;
    left: -10%;
    animation: float-orb-contracts-1 22s ease-in-out infinite;
}

.contracts-section .orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    bottom: 10%;
    right: -5%;
    animation: float-orb-contracts-2 18s ease-in-out infinite;
}

@keyframes float-orb-contracts-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.1); }
}

@keyframes float-orb-contracts-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -60px) scale(1.15); }
}

.contracts-section .section-header {
    position: relative;
    z-index: 2;
}

.contracts-section .section-tag {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
    color: #ef4444;
}

.contracts-section .section-title {
    color: #ffffff;
}

.contracts-section .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* 合同画廊网格 */
.contracts-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    perspective: 1000px;
    position: relative;
    z-index: 2;
}

@media (max-width: 1200px) {
    .contracts-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .contracts-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .contracts-gallery {
        grid-template-columns: 1fr;
    }
}

/* 合同卡片 - 玻璃拟态 */
.contract-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.contract-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(220, 38, 38, 0.2);
}

.contract-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.contract-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.contract-card:hover .contract-img {
    transform: scale(1.05);
}

.contract-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: all 0.4s ease;
}

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

.contract-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: #ffffff;
    font-weight: 600;
    border-radius: 50px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contract-card:hover .contract-view-btn {
    transform: translateY(0);
    opacity: 1;
}

.contract-view-btn svg {
    width: 18px;
    height: 18px;
}

.contract-info {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.3);
}

.contract-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.contract-client {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 合同徽章 */
.contract-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #dc2626, #f97316);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 2;
    animation: badge-shine 3s ease-in-out infinite;
}

@keyframes badge-shine {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(220, 38, 38, 0.2); }
}

/* ========================================
   5. 模态框 - 高级效果
   ======================================== */
.contract-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.contract-modal.active {
    opacity: 1;
    visibility: visible;
}

.contract-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.contract-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.contract-modal.active .contract-modal-content {
    transform: scale(1) translateY(0);
}

.contract-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: #ffffff;
    z-index: 10;
    transition: all 0.3s ease;
}

.contract-modal-close:hover {
    background: #dc2626;
    transform: rotate(90deg);
}

.contract-modal-close svg {
    width: 20px;
    height: 20px;
}

.contract-modal-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

/* ========================================
   6. 滚动触发动画
   ======================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-left"] {
    transform: translateX(-30px);
}

[data-animate="fade-right"] {
    transform: translateX(30px);
}

[data-animate="fade-up"] {
    transform: translateY(30px);
}

[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate].animated {
    transform: translate(0) scale(1);
}

/* 错开动画延迟 */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }
[data-animate-delay="6"] { transition-delay: 0.6s; }

/* ========================================
   6.1 案例卡片飞入动画（无旋转）
   ======================================== */
.case-card[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card[data-animate].animated {
    opacity: 1;
    transform: translateY(var(--card-offset, 0));
}

/* 卡片逐个显示的延迟 */
.case-card[data-animate-delay="1"] { transition-delay: 0s; }
.case-card[data-animate-delay="2"] { transition-delay: 0.1s; }
.case-card[data-animate-delay="3"] { transition-delay: 0.2s; }
.case-card[data-animate-delay="4"] { transition-delay: 0.3s; }
.case-card[data-animate-delay="5"] { transition-delay: 0.4s; }
.case-card[data-animate-delay="6"] { transition-delay: 0.5s; }

/* 卡片悬停效果 */
.case-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(220, 38, 38, 0.15),
        0 0 80px rgba(220, 38, 38, 0.05);
}

/* 卡片进入时的光效 */
.case-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
    z-index: 10;
}

.case-card.animated::after {
    animation: card-shine 1s ease forwards;
}

@keyframes card-shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

/* 合同卡片旋转动画 */
.contract-card[data-animate] {
    opacity: 0;
    transform: perspective(1000px) rotateX(30deg) rotateY(-20deg) translateY(30px);
    transform-origin: center bottom;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contract-card[data-animate].animated {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0);
}

/* ========================================
   7. 响应式优化
   ======================================== */
@media (max-width: 768px) {
    .cases-hero {
        padding: 120px 0 60px;
    }
    
    .cases-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .cases-filter-section {
        top: 70px;
        padding: 1rem 0;
    }
    
    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .case-card:nth-child(n) {
        transform: translateY(0);
    }
    
    .case-info {
        padding: 1.25rem;
    }
    
    .case-title {
        font-size: 1.1rem;
    }
    
    .floating-orb {
        display: none;
    }
}

/* ========================================
   8. 加载动画
   ======================================== */
.case-card.loading {
    animation: card-pulse 2s ease-in-out infinite;
}

@keyframes card-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 筛选切换动画 */
.case-card {
    animation: card-appear 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(var(--card-offset, 0)) scale(1);
    }
}

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

/* ========================================
   9. 鼠标跟随光效
   ======================================== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

/* ========================================
   10. 滚动进度条
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #dc2626, #f97316);
    z-index: 10000;
    transition: width 0.1s ease;
}

.scroll-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progress-shine 2s linear infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(100px); }
}

/* ========================================
   11. 文字逐字动画
   ======================================== */
.char-animate {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: char-appear 0.5s ease forwards;
}

@keyframes char-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   12. 连接线动画
   ======================================== */
.connecting-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.3), transparent);
    height: 1px;
    width: 100%;
    animation: line-flow 3s ease-in-out infinite;
}

@keyframes line-flow {
    0%, 100% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* ========================================
   13. 脉冲波纹效果
   ======================================== */
.pulse-ring {
    position: absolute;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ========================================
   14. 霓虹发光文字
   ======================================== */
.neon-text {
    text-shadow: 
        0 0 5px rgba(220, 38, 38, 0.5),
        0 0 10px rgba(220, 38, 38, 0.3),
        0 0 20px rgba(220, 38, 38, 0.2);
    animation: neon-flicker 3s ease-in-out infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* ========================================
   15. 悬浮粒子装饰
   ======================================== */
.floating-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(220, 38, 38, 0.4);
    border-radius: 50%;
    animation: float-dot 10s ease-in-out infinite;
}

@keyframes float-dot {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -15px); }
    50% { transform: translate(-5px, 10px); }
    75% { transform: translate(15px, 5px); }
}
