/* 案例页面专用样式 */

/* 粒子效果容器 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: float 15s infinite linear;
}

/* 粒子忽大忽小和碰撞效果 */
.particle:nth-child(1) {
    width: 8px;
    height: 8px;
    left: 10%;
    animation: 
        float 12s infinite linear,
        pulse 3s infinite ease-in-out,
        bounce 8s infinite ease-in-out;
    animation-delay: 0s, 0s, 1s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 20%;
    animation: 
        float 14s infinite linear,
        pulse 2.5s infinite ease-in-out,
        bounce 6s infinite ease-in-out;
    animation-delay: 2s, 0.5s, 2s;
}

.particle:nth-child(3) {
    width: 10px;
    height: 10px;
    left: 30%;
    animation: 
        float 16s infinite linear,
        pulse 4s infinite ease-in-out,
        bounce 10s infinite ease-in-out;
    animation-delay: 4s, 1s, 0s;
}

.particle:nth-child(4) {
    width: 7px;
    height: 7px;
    left: 40%;
    animation: 
        float 13s infinite linear,
        pulse 2s infinite ease-in-out,
        bounce 7s infinite ease-in-out;
    animation-delay: 1s, 1.5s, 3s;
}

.particle:nth-child(5) {
    width: 9px;
    height: 9px;
    left: 50%;
    animation: 
        float 15s infinite linear,
        pulse 3.5s infinite ease-in-out,
        bounce 9s infinite ease-in-out;
    animation-delay: 3s, 0s, 1.5s;
}

.particle:nth-child(6) {
    width: 5px;
    height: 5px;
    left: 60%;
    animation: 
        float 11s infinite linear,
        pulse 2.8s infinite ease-in-out,
        bounce 5s infinite ease-in-out;
    animation-delay: 5s, 2s, 4s;
}

.particle:nth-child(7) {
    width: 8px;
    height: 8px;
    left: 70%;
    animation: 
        float 14s infinite linear,
        pulse 3.2s infinite ease-in-out,
        bounce 8s infinite ease-in-out;
    animation-delay: 2.5s, 0.8s, 2.5s;
}

.particle:nth-child(8) {
    width: 6px;
    height: 6px;
    left: 80%;
    animation: 
        float 13s infinite linear,
        pulse 2.3s infinite ease-in-out,
        bounce 6s infinite ease-in-out;
    animation-delay: 4.5s, 1.2s, 0.5s;
}

.particle:nth-child(9) {
    width: 7px;
    height: 7px;
    left: 90%;
    animation: 
        float 15s infinite linear,
        pulse 3.8s infinite ease-in-out,
        bounce 9s infinite ease-in-out;
    animation-delay: 1.5s, 2.5s, 3.5s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(20px);
        opacity: 0;
    }
}

/* 忽大忽小脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.8);
    }
}

/* 碰撞弹跳动画 */
@keyframes bounce {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-15px);
    }
    50% {
        transform: translateX(10px);
    }
    75% {
        transform: translateX(-8px);
    }
}

/* 首屏标题区域 */
.page-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/statics/images/pattern.svg') repeat;
    opacity: 0.1;
}

.page-title .container {
    position: relative;
    z-index: 2;
}

.page-title h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.page-title .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    min-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    color: white;
}
/* 
.page-title .tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
} */

/* 分类导航 */
.category-nav {
    background: white;
    padding: 30px 0;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom:none;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 25px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #ff7f2a 0%, #ff9955 100%);
    color: white;
    border-color: #ff7f2a;
    box-shadow: 0 5px 15px rgba(255, 127, 42, 0.3);
}

/* 案例列表区域 */
.cases-section {
    padding: 80px 0;
    background: #fafafa;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* 案例卡片 */
.case-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #ff7f2a;
}

/* 案例图片 */
.case-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.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-info {
    padding: 25px;
}

.case-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff7f2a 0%, #ff9955 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.case-type {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    border: 1px solid #e9ecef;
}

.case-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin: 15px 0;
    line-height: 1.4;
}

.case-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* 案例特性标签 */
.case-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.case-detail-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff7f2a 0%, #ff9955 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 127, 42, 0.25);
}

.case-detail-btn:hover {
    background: linear-gradient(135deg, #e57220 0%, #ff7f2a 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 127, 42, 0.4);
}

.case-detail-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 127, 42, 0.35);
}

.case-detail-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 127, 42, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .page-title h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .case-info {
        padding: 20px;
    }
    
    .case-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-title {
        padding: 70px 0;
    }
    
    .page-title h1 {
        font-size: 2.5rem;
    }
    
    .page-title .subtitle {
        font-size: 1.1rem;
    }
    
    .category-nav {
        padding: 20px 0;
    }
    
    .category-buttons {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .cases-section {
        padding: 60px 0;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .case-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .page-title {
        padding: 50px 0;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .page-title .subtitle {
        font-size: 1rem;
    }
    
    .cases-section {
        padding: 40px 0;
    }
    
    .cases-grid {
        gap: 20px;
    }
    
    .case-info {
        padding: 20px 15px;
    }
    
    .case-info h3 {
        font-size: 1.2rem;
    }
    
    .case-image {
        height: 180px;
    }
}

/* ========== 案例详情页 ========== */
.case-detail-page .container {
    width: 85%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

/* 案例详情页顶部 hero：与 .page-title 同用，保持紫色背景 + 浅色文字 */
.case-detail-hero {
    padding: 50px 0 40px;
    text-align: left;
}

.case-detail-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.case-detail-hero .hero-content {
    max-width: 100%;
    flex: 1.4;
}

.case-detail-hero .detail-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

.case-detail-hero .detail-back-link:hover {
    color: #fff;
    opacity: 1;
}

.detail-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

.detail-back-link:hover {
    color: #fff;
}

.case-detail-hero .tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.case-detail-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.case-detail-hero .subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    line-height: 1.5;
}

/* 头部右侧封面图（与下方封面保持一致风格） */
.case-detail-hero .case-detail-side-cover {
    flex: 1;
    max-width: 420px;
}

.case-detail-hero .case-detail-cover {
    margin-bottom: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.case-detail-hero .case-detail-cover img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    background: #f5f7fb;
}

.case-detail-container {
    padding-bottom: 60px;
}

/* 详情页整体左右布局：左侧内容，右侧封面图 */
.case-detail-layout {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-top: 40px;
}

.case-detail-main {
    flex: 3;
}

.case-detail-side-cover {
    flex: 2;
    max-width: 420px;
}

.case-detail-cover {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    background: #f5f7fb;
}

.case-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* 内容头部：左侧幻灯片，右侧案例信息 */
.case-detail-header {
    display: flex;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 32px;
}

.case-detail-slider {
    flex: 2;
}

.slider-main {
    position: relative;
    aspect-ratio: 4 / 3;
    min-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: #f5f7fb;
}

.slider-slide {
    position: absolute;
    inset: 0;
    display: none;
}

.slider-slide.active {
    display: block;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s, transform 0.2s;
}

.slider-prev {
    left: 12px;
}

.slider-next {
    right: 12px;
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.slider-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.slider-thumb {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.slider-thumb img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}

.slider-thumb:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.slider-thumb.active {
    opacity: 1;
    border-color: #ff7f2a;
}

.case-detail-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-detail-info-type {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4ff;
    color: #4b5bd5;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start;
}

.case-detail-info-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

.case-detail-info-subtitle {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.case-detail-info-link {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    word-break: break-all;
}

.case-detail-info-link span {
    color: #888;
    margin-right: 4px;
}

.case-detail-info-link a {
    color: #ff7f2a;
    text-decoration: none;
}

.case-detail-info-link a:hover {
    text-decoration: underline;
}

.case-detail-info .case-detail-tags {
    margin-top: 8px;
}

.case-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.case-detail-body {
    margin-bottom: 40px;
}

.case-detail-content {
    width: 85%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color, #333);
    text-align: center;
    display: block!important;
}

.case-detail-content p {
    margin-bottom: 1em;
}

.case-detail-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.case-detail-gallery {
    margin-bottom: 48px;
}

.gallery-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color, #333);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.case-detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 32px;
}

.case-detail-nav .nav-link {
    color: #ff7f2a;
    font-weight: 500;
    text-decoration: none;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.case-detail-nav .nav-link:hover {
    color: #e57220;
}

.case-detail-nav .nav-link.disabled {
    color: #bbb;
    cursor: default;
}

.case-detail-nav .nav-next {
    text-align: right;
}

.case-detail-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom:50px;
}

.case-detail-cta .case-detail-btn {
    margin-top: 0;
}

.case-detail-cta .case-detail-btn.outline {
    background: transparent;
    color: #ff7f2a;
    border: 2px solid #ff7f2a;
    box-shadow: none;
}

.case-detail-cta .case-detail-btn.outline:hover {
    background: rgba(255, 127, 42, 0.08);
    color: #e57220;
    border-color: #e57220;
}

@media (max-width: 768px) {
    .case-detail-hero h1 {
        font-size: 1.75rem;
    }

    .case-detail-layout {
        flex-direction: column;
    }

    .case-detail-side-cover {
        max-width: 100%;
    }

    .case-detail-header {
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .case-detail-nav {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .case-detail-nav .nav-next {
        text-align: left;
    }
}