.cases-page { min-height: 70vh; }
.cases-hero { position: relative; overflow: hidden; background-color: #20314a; }
.cases-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,36,.82), rgba(10,20,36,.35)); }
.cases-hero > * { position: relative; z-index: 1; }
.cases-hero-kicker, .cases-eyebrow { margin: 0 0 6px; color: #55769d; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cases-hero .cases-hero-kicker { color: rgba(255,255,255,.78); }
.cases-content-wrapper { padding-top: 26px; }
.cases-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.cases-stat { padding: 18px; border: 1px solid #e4e8ee; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(31,49,73,.06); }
.cases-stat strong { display: block; color: #20314a; font-size: 1.65rem; }
.cases-stat span { color: #6b7280; font-size: .87rem; }
.cases-toolbar { display: grid; grid-template-columns: minmax(240px,2fr) repeat(3,minmax(140px,1fr)) auto; gap: 12px; align-items: end; margin-bottom: 18px; padding: 16px; }
.cases-toolbar label { display: grid; gap: 6px; color: #4b5563; font-size: .78rem; font-weight: 700; }
.cases-toolbar input, .cases-toolbar select { width: 100%; min-height: 42px; border: 1px solid #d7dce3; border-radius: 9px; background: #fff; padding: 0 12px; color: #1f2937; }
.cases-reset-button { min-height: 42px; border: 1px solid #d7dce3; border-radius: 9px; background: #f7f8fa; padding: 0 16px; cursor: pointer; }
.cases-layout { display: grid; grid-template-columns: minmax(280px,350px) minmax(0,1fr); gap: 18px; align-items: start; }
.cases-sidebar, .case-detail { padding: 18px; }
.cases-sidebar { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; }
.cases-sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cases-sidebar-heading h2 { margin: 0; font-size: 1.2rem; }
.cases-result-count { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 999px; background: #edf3f9; color: #365d88; font-weight: 700; }
.cases-list { display: grid; gap: 9px; }
.case-list-item { width: 100%; border: 1px solid #e2e6eb; border-radius: 11px; background: #fff; padding: 13px; text-align: left; cursor: pointer; transition: .18s ease; }
.case-list-item:hover, .case-list-item.is-active { border-color: #7797ba; background: #f3f7fb; transform: translateY(-1px); }
.case-list-item-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.case-list-item h3 { margin: 0; color: #20314a; font-size: .98rem; }
.case-list-item p { margin: 5px 0 0; color: #6b7280; font-size: .8rem; }
.case-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #edf3f9; color: #365d88; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.case-badge.is-active { background: #e7f6ed; color: #267044; }
.case-badge.is-closed { background: #f2f2f2; color: #5b616a; }
.case-badge.is-warning { background: #fff2dd; color: #8a5a12; }
.case-detail { min-height: 540px; }
.case-empty-state { min-height: 460px; display: grid; place-content: center; justify-items: center; text-align: center; color: #6b7280; }
.case-empty-state i { font-size: 2.2rem; color: #9baabc; }
.case-empty-state h2 { margin: 14px 0 4px; color: #20314a; }
.case-detail-header { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid #e7e9ed; }
.case-detail-header h2 { margin: 3px 0 7px; color: #20314a; font-size: 1.65rem; }
.case-detail-header p { margin: 0; color: #68717d; }
.case-reference { color: #456b96; font-weight: 700; font-size: .82rem; }
.case-meta-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.case-meta { padding: 13px; border-radius: 10px; background: #f7f8fa; }
.case-meta span { display: block; color: #7a828d; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.case-meta strong { display: block; margin-top: 5px; color: #28394e; font-size: .88rem; }
.case-section { margin-top: 24px; }
.case-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.case-section h3 { margin: 0; color: #20314a; font-size: 1.05rem; }
.case-description { color: #505c69; line-height: 1.65; }
.case-documents, .case-events { display: grid; gap: 9px; }
.case-document, .case-event { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #e4e7eb; border-radius: 10px; background: #fff; }
.case-document-icon, .case-event-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: #edf3f9; color: #456b96; }
.case-document h4, .case-event h4 { margin: 0; color: #27384b; font-size: .9rem; }
.case-document p, .case-event p { margin: 4px 0 0; color: #77808b; font-size: .76rem; }
.case-open-document { border: 0; border-radius: 8px; background: #294f78; color: #fff; padding: 8px 11px; cursor: pointer; }
.case-open-document[disabled] { background: #d8dde3; color: #78818c; cursor: not-allowed; }
.case-no-results { padding: 30px 10px; text-align: center; color: #737b86; }
.document-viewer { position: fixed; inset: 0; z-index: 10000; display: none; padding: 24px; background: rgba(12,20,31,.78); }
.document-viewer.is-open { display: grid; place-items: center; }
.document-viewer-shell { width: min(1180px,96vw); height: min(850px,92vh); display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.document-viewer-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e4e6e9; }
.document-viewer-header h2 { margin: 0; color: #20314a; font-size: 1.1rem; }
.document-viewer-header button { border: 0; background: transparent; color: #374151; font-size: 2rem; cursor: pointer; }
.document-viewer iframe { width: 100%; height: 100%; border: 0; background: #f3f4f6; }
body.has-document-viewer { overflow: hidden; }
@media (max-width: 1100px) { .cases-summary { grid-template-columns: repeat(2,1fr); } .cases-toolbar { grid-template-columns: 1fr 1fr; } .cases-layout { grid-template-columns: 1fr; } .cases-sidebar { position: static; max-height: none; } }

/* Blog integration */
#blog-posts-container.is-cases-view {
    width: 100%;
    max-width: none;
    margin-top: 22px;
}

.blog-cases-view {
    width: 100%;
}

.blog-cases-view .cases-content-wrapper {
    padding-top: 0;
}

.blog-cases-view .cases-sidebar,
.blog-cases-view .case-detail,
.blog-cases-view .cases-toolbar {
    border: 1px solid #e4e8ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 33, 39, .065);
}

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

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

    .case-meta-grid {
        grid-template-columns: 1fr;
    }

    .case-detail-header,
    .case-list-item-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .case-document,
    .case-event {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .case-open-document,
    .case-event > .case-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Sprint 9.2: los estilos de contenido relacionado viven en /css/v5/cases-v4.2.css */
