/*
 * @kanway-css-index
 * 文件: css/case/case-showcase.css
 * 层级: 案例
 * 引用页面: case-showcase.html
 * 依赖: contact.css
 * 修改指引: .case-showcase-* 可筛选案例墙
 * 索引: css/00-样式文件索引.css
 */
/* Case Showcase — solution UI + on-site video (requirements doc) */

.case-showcase-page {
    padding: 40px 0 72px;
}

.case-showcase-intro {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
    font-size: 15px;
    color: #6c757d;
    line-height: 1.7;
}

.case-showcase-toolbar {
    background: #f8f9fb;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    padding: 16px 18px 8px;
    margin-bottom: 32px;
}

.case-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 10px;
}

.case-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #1d5198;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 52px;
}

.case-showcase-toolbar .case-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.case-filters--scroll {
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    min-width: 0;
}

.case-showcase-toolbar .filter-btn {
    padding: 8px 18px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
    line-height: 1.3;
    white-space: nowrap;
}

.case-filters--scroll .filter-btn {
    flex-shrink: 0;
}

.case-showcase-toolbar .filter-btn:hover,
.case-showcase-toolbar .filter-btn.active {
    border-color: #1d5198;
    background: #1d5198;
    color: #fff;
}

.case-showcase-toolbar .filter-btn:focus-visible {
    outline: 2px solid #1d5198;
    outline-offset: 2px;
}

.case-block {
    margin-bottom: 48px;
    padding: 28px 20px 32px;
    border-radius: 12px;
}

.case-block--design {
    background: #f4f7fb;
}

.case-block--video {
    background: #f9fafb;
    border: 1px solid #e8ecf1;
}

.case-block-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    padding-left: 12px;
    border-left: 4px solid #1d5198;
}

.case-block-desc {
    margin: 0 0 22px;
    padding-left: 16px;
    font-size: 14px;
    color: #6c757d;
}

.case-grid--showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.case-card--showcase {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e5ea;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.case-card--showcase:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(29, 81, 152, 0.12);
}

.case-card--showcase.is-filter-hidden {
    display: none;
}

.case-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #eef2f7, #e2e8f0);
    overflow: hidden;
}

.case-card__media img,
.case-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-card__media.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: case-shimmer 1.2s infinite;
}

@keyframes case-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.case-status {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(29, 81, 152, 0.92);
}

.case-status--custom { background: rgba(230, 126, 34, 0.92); }
.case-status--bilingual { background: rgba(39, 174, 96, 0.92); }
.case-status--onsite { background: rgba(142, 68, 173, 0.92); }

.case-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
}

.case-video-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 4px;
}

.case-card__dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.case-card__dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.case-card__dots button.active {
    background: #fff;
    transform: scale(1.15);
}

.case-card__play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 0;
}

.case-card__play .bx {
    font-family: 'boxicons' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    line-height: 1;
    display: block;
}

.case-card__play--gallery {
    opacity: 1;
    font-size: 32px;
}

/* 视频卡片：播放按钮始终可见 */
.case-card__play[data-open-video] {
    opacity: 1;
}

.case-card__play:focus-visible {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.case-card__body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-card__body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
    line-height: 1.35;
}

.case-card__body p {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.55;
    margin: 0 0 12px;
}

.case-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.case-card__meta span {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f0f4f8;
    color: #495057;
    border: 1px solid #e2e8f0;
}

.case-card__meta .case-card__region,
.case-card__meta .case-card__application {
    background: #e8f0fa;
    color: #1d5198;
    border-color: #c5d9f0;
    font-weight: 600;
}

.case-showcase-toolbar .filter-count {
    font-weight: 500;
    opacity: 0.85;
}

.case-card__actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.case-card__actions a,
.case-card__actions button {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.case-card__actions .btn-similar {
    background: #1d5198;
    color: #fff;
}

.case-card__actions .btn-paired {
    background: #fff;
    color: #1d5198;
    border: 1px solid #1d5198;
}

.case-card__actions .btn-detail {
    color: #1d5198;
    background: transparent;
    padding-left: 0;
}

.case-empty {
    text-align: center;
    padding: 48px 20px;
    color: #6c757d;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #ced4da;
}

.case-empty .bx {
    font-family: 'boxicons' !important;
    font-size: 40px;
    color: #adb5bd;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

.case-showcase-foot {
    margin-top: 16px;
    padding: 36px 24px;
    text-align: center;
    background: linear-gradient(135deg, #1d5198, #3a7bd5);
    color: #fff;
    border-radius: 12px;
}

.case-showcase-foot h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.case-showcase-foot p {
    margin: 0 0 20px;
    opacity: 0.92;
    font-size: 15px;
}

.case-showcase-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.case-showcase-foot-links a {
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.case-showcase-foot .btn-primary {
    background: #fff;
    color: #1d5198;
}

.case-showcase-foot .btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
}

/* Modal */
.case-media-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.case-media-modal[hidden] {
    display: none !important;
}

.case-media-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.case-media-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
}

.case-media-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    line-height: 0;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-media-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-media-modal__close .bx,
.case-media-modal__nav .bx {
    font-family: 'boxicons' !important;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: block;
}

.case-media-modal__nav--prev { left: 10px; }
.case-media-modal__nav--next { right: 10px; }

.case-media-modal__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
}

.case-media-modal__body img,
.case-media-modal__body video {
    max-width: 100%;
    max-height: min(72vh, 640px);
    width: auto;
    height: auto;
    display: block;
}

.case-media-modal__watermark {
    pointer-events: none;
    position: absolute;
    bottom: 12%;
    right: 8%;
    opacity: 0.35;
    max-width: 120px;
}

.case-media-modal__footer {
    padding: 12px 16px 16px;
    background: #1a1a1a;
    color: #eee;
}

.case-media-modal__caption {
    margin: 0 0 10px;
    font-size: 14px;
}

.case-media-modal__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.case-media-modal__tools button,
.case-media-modal__tools select {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    cursor: pointer;
}

.case-arch-thumb {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.case-arch-thumb img {
    max-height: 80px;
    width: auto;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .case-grid--showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .case-grid--showcase {
        grid-template-columns: 1fr;
    }

    .case-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .case-filter-label {
        min-width: 0;
    }

    .case-media-modal__nav {
        width: 36px;
        height: 36px;
    }
}
