/* Cases Page Styles */

.cases-hero {
    padding: 140px 24px 60px;
    text-align: center;
    position: relative;
}

.cases-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent);
}

.cases-hero-container {
    position: relative;
    z-index: 1;
}

.cases-hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
}

.cases-hero p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Filters Bar */
.filters-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab .ico {
    width: 15px;
    height: 15px;
    opacity: 0.85;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Cases Grid */
.cases-grid-section {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.02), transparent);
}

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

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(99, 102, 241, 0.16);
    border-color: var(--primary);
}

/* 自研产品推荐卡：高亮边框 */
.case-card-featured {
    border-color: rgba(79, 172, 254, 0.55);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.18);
}

.case-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(6px);
}

.case-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
}

.case-actions .case-detail-btn {
    flex: 1;
    width: auto;
}

.case-link-btn {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.case-link-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

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

.case-image {
    height: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 线稿封面图与图标徽标样式见 css/common.css（全站共用） */

/* 压暗渐变，让彩色图块与深色页面自然衔接 */
.case-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.case-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.case-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.case-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.case-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.case-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.case-client {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.case-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.case-tech {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.case-tech span {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.case-detail-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.case-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Case Modal */
.case-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    overflow-y: auto;
}

.case-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
}

.modal-header {
    padding: 40px 40px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-tags {
    display: flex;
    gap: 8px;
}

.modal-body {
    padding: 32px 40px;
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-section h3 .ico {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.modal-section p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

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

.modal-section ul li {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

/* .modal-section ul li::before 的线性勾号定义见文件末尾「线性图标尺寸」区块 */

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-tech span {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.modal-cta {
    padding: 32px 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: rgba(99, 102, 241, 0.05);
}

.modal-cta p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.modal-cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ 线性图标尺寸 ============ */
.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close .ico {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.case-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-link-btn .ico {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

/* 弹窗方案列表的线性勾号 */
.modal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 15px;
    height: 15px;
    background-color: var(--success);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5 10-11'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5 10-11'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

@media (max-width: 768px) {
    .cases-hero h1 {
        font-size: 32px;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .filter-tab {
        white-space: nowrap;
    }

    .modal-header,
    .modal-body,
    .modal-cta {
        padding: 24px;
    }
}