/* ═══════════════════════════════════════════════
   NerveConnect — Cases Grid & Single View
   ═══════════════════════════════════════════════ */

/* ── Country Filter Tabs ── */
.ncf-country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-family: 'GaryMCH', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ncf-country-filter__tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    background: #fff;
    border: 1px solid #c9d8ef;
    border-radius: 24px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}

.ncf-country-filter__tab:hover {
    background: #eef4ff;
    color: #215AA9;
    border-color: #215AA9;
}

.ncf-country-filter__tab--active,
.ncf-country-filter__tab--active:visited {
    background: #215AA9 !important;
    color: #fff !important;
    border-color: #215AA9 !important;
}

.ncf-country-filter__tab--active:hover {
    background: #1a4a8c !important;
    color: #fff !important;
}

/* ── Empty state for filtered grid ── */
.ncf-country-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
    font-family: 'GaryMCH', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 1px dashed #c9d8ef;
    border-radius: 10px;
    background: #fafcff;
    grid-column: 1 / -1;
}

.ncf-country-empty span {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

/* ── Loading overlay for AJAX filter ── */
.ncf-loading {
    position: relative;
    pointer-events: none;
    min-height: 200px;
}

.ncf-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .7);
    z-index: 10;
}

.ncf-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #c9d8ef;
    border-top-color: #215AA9;
    border-radius: 50%;
    z-index: 11;
    animation: ncf-spin .6s linear infinite;
}

@keyframes ncf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Grid wrapper ── */
.ncf-cases-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: 'GaryMCH', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ncf-cases-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.ncf-cols-1 {
    grid-template-columns: 1fr;
}

.ncf-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ncf-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ncf-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {

    .ncf-cols-3,
    .ncf-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {

    .ncf-cols-2,
    .ncf-cols-3,
    .ncf-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ── Case card ── */
.ncf-case-card {
    background: #fff;
    border: 1px solid #e0e6f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(33, 90, 169, .07);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .2s, transform .2s;
}

.ncf-case-card:hover {
    box-shadow: 0 6px 24px rgba(33, 90, 169, .14);
    transform: translateY(-2px);
}

.ncf-case-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ncf-case-card__id {
    font-size: 12px;
    font-weight: 700;
    color: #215AA9;
    background: #eef4ff;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .4px;
}

.ncf-case-card__date {
    font-size: 12px;
    color: #999;
}

.ncf-case-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ncf-case-card__symptoms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ncf-case-card__insight {
    font-size: 13.5px;
    color: #555;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
    border-left: 3px solid #215AA9;
    padding-left: 10px;
}

.ncf-case-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #777;
    margin-top: auto;
}

.ncf-case-card__meta-item {
    display: block;
}

.ncf-case-card__link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #215AA9;
    text-decoration: none;
    transition: color .15s;
}

.ncf-case-card__link:hover {
    color: #1a4a8c;
    text-decoration: underline;
}

/* ── Badges ── */
.ncf-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.ncf-badge--gender {
    background: #f0f5ff;
    color: #215AA9;
    border: 1px solid #c9d8ef;
}

.ncf-badge--age {
    background: #fff7ed;
    color: #c2570a;
    border: 1px solid #fed7aa;
}

.ncf-badge--country {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── Symptom tags ── */
.ncf-symptom-tag {
    display: inline-block;
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 4px;
    background: #eef4ff;
    color: #215AA9;
    border: 1px solid #c9d8ef;
    white-space: nowrap;
}

.ncf-symptom-tag--more {
    background: #f4f4f4;
    color: #888;
    border-color: #ddd;
}

.ncf-symptom-tag--loc {
    background: #fdf4ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

.ncf-symptom-tag--clinical {
    background: #fff7ed;
    color: #c2570a;
    border-color: #fed7aa;
}

.ncf-symptom-tag--action {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.ncf-symptom-tag--outcome {
    background: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
}

/* ── Grid pagination ── */
.ncf-cases-pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.ncf-cases-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #c9d8ef;
    border-radius: 6px;
    color: #444;
    font-size: 13px;
    text-decoration: none;
    background: #fff;
    transition: all .15s;
}

.ncf-cases-pagination .page-numbers:hover,
.ncf-cases-pagination .page-numbers.current {
    background: #215AA9;
    color: #fff;
    border-color: #215AA9;
}

/* ── Empty state ── */
.ncf-cases-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    border: 1px dashed #c9d8ef;
    border-radius: 10px;
    background: #fafcff;
}

/* ════════════════════════════════════════════
   Single Case View
   ════════════════════════════════════════════ */

.ncf-single-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ncf-single-back {
    display: inline-block;
    font-size: 13px;
    color: #215AA9;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.ncf-single-back:hover {
    text-decoration: underline;
}

.ncf-single-header {
    margin-bottom: 32px;
}

.ncf-single-title-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ncf-single-title {
    font-size: 28px;
    font-weight: 800;
    color: #215AA9;
    margin: 0;
}

.ncf-single-date {
    font-size: 14px;
    color: #999;
}

.ncf-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ncf-single-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ncf-single-section {
    background: #fff;
    border: 1px solid #e0e6f0;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(33, 90, 169, .05);
}

.ncf-single-section--insight {
    border-color: #215AA9;
    background: linear-gradient(135deg, #f0f5ff 0%, #fff 100%);
}

.ncf-single-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #215AA9;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eef8;
}

.ncf-single-field {
    margin-bottom: 14px;
}

.ncf-single-field:last-child {
    margin-bottom: 0;
}

.ncf-single-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #999;
    margin-bottom: 6px;
}

.ncf-single-field-value {
    font-size: 14px;
    color: #333;
}

.ncf-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ncf-single-text-block {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
}

.ncf-insight-quote {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    font-style: italic;
    margin: 0;
    padding-left: 18px;
    border-left: 4px solid #215AA9;
}

.ncf-single-footer {
    margin-top: 40px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.ncf-back-btn {
    display: inline-block;
    margin-top: 12px;
    background: #215AA9;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.ncf-back-btn:hover {
    background: #1a4a8c;
    color: #fff;
}