/* Research Section Styles */
/* Extends corvair.ai style.css */

:root {
    --research-coral: #D4856A;
    --research-coral-hover: #C47259;
    --research-success: #2E7D32;
    --research-warning: #ED6C02;
    --research-danger: #D32F2F;
    --research-paradox: #7B1FA2;
}

/* Card and section illustrations */
.card-illustration {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}
.section-illustration {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

/* ==========================================
   VIDEO HERO (research pages)
   ========================================== */
.hero-advisory-video {
    position: relative;
    overflow: hidden;
}
.hero-advisory-video .hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-advisory-video .hero-video.loaded {
    opacity: 1;
}
.hero-advisory-video .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,37,64,0.8) 0%, rgba(15,53,88,0.7) 100%);
    z-index: 1;
}
.hero-advisory-video .container {
    position: relative;
    z-index: 2;
}

/* ==========================================
   HERO
   ========================================== */
.hero-research {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #061a2e 100%);
    color: white;
    padding: 100px 0 80px;
}
.hero-research h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}
.hero-research .lead {
    font-family: var(--bs-editorial-font-family);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 700px;
}

/* ==========================================
   CATEGORY BADGES
   ========================================== */
.category-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.category-badge-durable { background: rgba(46, 125, 50, 0.12); color: #2E7D32; }
.category-badge-transitioning { background: rgba(237, 108, 2, 0.12); color: #ED6C02; }
.category-badge-exposed { background: rgba(211, 47, 47, 0.12); color: #D32F2F; }
.category-badge-paradox { background: rgba(123, 31, 162, 0.12); color: #7B1FA2; }

/* ==========================================
   ASSESSMENT PROGRESS BAR
   ========================================== */
/* Segmented progress bar */
.assessment-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 1100;
    display: flex;
}
.progress-sections {
    display: flex;
    width: 100%;
    gap: 2px;
}
.progress-segment {
    position: relative;
    height: 100%;
    background: rgba(0, 0, 0, 0.08);
}
.progress-segment-fill {
    height: 100%;
    transition: width 0.3s ease;
}
.assessment-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}
.assessment-progress-fill.study-vulnerability { background: var(--bs-accent); }
.assessment-progress-fill.study-adoption { background: var(--bs-accent-gold); }
.assessment-progress-fill.study-friction { background: var(--research-coral); }

/* ==========================================
   ASSESSMENT CONTAINER & TRANSITIONS
   ========================================== */
.assessment-container {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.question-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.question-enter {
    opacity: 0;
    transform: translateY(12px);
}
.question-visible {
    opacity: 1;
    transform: translateY(0);
}
.question-exit {
    opacity: 0;
    transform: translateY(-12px);
}

/* ==========================================
   TRADEOFF PAIR
   ========================================== */
.tradeoff-statements {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}
.tradeoff-statement {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    background: var(--bs-light-warm);
    font-size: 0.95rem;
    line-height: 1.5;
}
.tradeoff-statement-a { border-left: 3px solid var(--bs-accent); }
.tradeoff-statement-b { border-right: 3px solid var(--bs-accent); }
.tradeoff-scale {
    display: flex;
    justify-content: center;
    gap: 0;
}
.tradeoff-scale .btn-check + .btn {
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0;
    border: 1px solid #dee2e6;
    background: white;
    color: var(--bs-secondary);
    min-width: 100px;
    transition: all 0.2s ease;
}
.tradeoff-scale .btn-check:checked + .btn {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}
.tradeoff-scale .btn-check + .btn:first-of-type { border-radius: 8px 0 0 8px; }
.tradeoff-scale .btn-check + .btn:last-of-type { border-radius: 0 8px 8px 0; }

/* ==========================================
   SCENARIO VIGNETTE
   ========================================== */
.scenario-card {
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-family: var(--bs-editorial-font-family);
    font-size: 1rem;
    line-height: 1.6;
}
.scenario-card.study-vulnerability { background: rgba(0, 150, 136, 0.06); border-left: 4px solid var(--bs-accent); }
.scenario-card.study-adoption { background: rgba(201, 151, 59, 0.06); border-left: 4px solid var(--bs-accent-gold); }
.scenario-card.study-friction { background: rgba(212, 133, 106, 0.06); border-left: 4px solid var(--research-coral); }

/* ==========================================
   CONFIDENCE PROBE
   ========================================== */
.confidence-probe {
    margin-top: 16px;
    padding: 16px;
    background: var(--bs-light);
    border-radius: 8px;
    text-align: center;
}
.confidence-probe .probe-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary);
    margin-bottom: 8px;
}
.confidence-probe .btn-group .btn {
    font-size: 0.8rem;
    padding: 6px 16px;
}

/* ==========================================
   MAXDIFF GRID
   ========================================== */
.maxdiff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.maxdiff-card {
    padding: 20px;
    border: 2px solid #e6e6e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
    background: white;
}
.maxdiff-card:hover {
    border-color: var(--bs-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.maxdiff-card-selected-most {
    border-color: var(--research-success) !important;
    background: rgba(46, 125, 50, 0.04);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}
.maxdiff-card-selected-least {
    border-color: var(--research-danger) !important;
    background: rgba(211, 47, 47, 0.04);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}
.maxdiff-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 8px;
}
.maxdiff-label-most { background: rgba(46, 125, 50, 0.12); color: var(--research-success); }
.maxdiff-label-least { background: rgba(211, 47, 47, 0.12); color: var(--research-danger); }

/* ==========================================
   LIKERT SCALE
   ========================================== */
.likert-scale {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.likert-scale .btn-check + .btn {
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #dee2e6;
    background: white;
    color: var(--bs-secondary);
    border-radius: 0;
    transition: all 0.2s ease;
}
.likert-scale .btn-check:checked + .btn {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}
.likert-scale .btn-check + .btn:first-of-type { border-radius: 8px 0 0 8px; }
.likert-scale .btn-check + .btn:last-of-type { border-radius: 0 8px 8px 0; }

/* ==========================================
   DEMOGRAPHICS FORM
   ========================================== */
.demographics-form {
    max-width: 700px;
    margin: 0 auto;
}
.demographics-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
}
.demographics-form .form-select {
    border-radius: 8px;
}
.demographics-section-header {
    font-family: var(--bs-heading-font-family);
    font-size: 1.25rem;
    color: var(--bs-primary);
    margin-bottom: 8px;
}
.demographics-section-note {
    font-size: 0.85rem;
    color: var(--bs-secondary);
    margin-bottom: 24px;
}

/* ==========================================
   LOADING / SUBMISSION STATE
   ========================================== */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}
.submission-loading {
    text-align: center;
    padding: 80px 0;
}
.submission-loading .icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.submission-loading p {
    font-size: 1.1rem;
    color: var(--bs-secondary);
}

/* ==========================================
   RESULTS PAGE
   ========================================== */
.result-hero {
    text-align: center;
    padding: 48px 0;
}
.result-hero .profile-name {
    font-family: var(--bs-heading-font-family);
    font-size: 3rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 12px;
}
.result-hero .study-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 16px;
}
.study-badge-vulnerability { background: var(--bs-accent); }
.study-badge-adoption { background: var(--bs-accent-gold); }
.study-badge-friction { background: var(--research-coral); }

.result-section {
    padding: 40px 0;
}

/* ==========================================
   CHART CONTAINERS
   ========================================== */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.chart-container-radar { max-width: 350px; }
.chart-container-donut { max-width: 240px; }
.chart-container-bars { max-width: 100%; }

/* ==========================================
   SHARE SECTION
   ========================================== */
.share-section {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.share-section .share-card-preview {
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin: 24px auto;
}
.share-section .btn-group .btn {
    font-size: 0.85rem;
}

/* ==========================================
   CROSS-ASSESSMENT NAVIGATION
   ========================================== */
.continue-card {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}
.continue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: var(--bs-accent);
}

/* ==========================================
   RESEARCH PARTICIPATION SELECTOR
   ========================================== */
.participation-selector .card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e6e6e6;
}
.participation-selector .card.selected {
    border-color: var(--bs-accent);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.15);
}
.participation-selector .card:hover {
    border-color: var(--bs-secondary);
}

/* ==========================================
   ERROR & OFFLINE STATES
   ========================================== */
.api-error-banner {
    background: rgba(211, 47, 47, 0.08);
    border: 1px solid rgba(211, 47, 47, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--research-danger);
    text-align: center;
    margin-bottom: 24px;
}
.offline-banner {
    background: rgba(237, 108, 2, 0.08);
    border: 1px solid rgba(237, 108, 2, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--research-warning);
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .hero-research { padding: 80px 0 60px; }
    .hero-research h1 { font-size: 2.25rem; }
    .tradeoff-statements { flex-direction: column; gap: 12px; }
    .tradeoff-scale .btn-check + .btn { min-width: 60px; padding: 8px 8px; font-size: 0.7rem; }
    .maxdiff-grid { grid-template-columns: 1fr; }
    .chart-container-radar { max-width: 220px; }
    .chart-container-donut { max-width: 180px; }
    .result-hero .profile-name { font-size: 2.25rem; }
    .likert-scale .btn-check + .btn { padding: 6px 8px; font-size: 0.65rem; }
}
@media (max-width: 576px) {
    .tradeoff-scale { flex-direction: column; gap: 4px; }
    .tradeoff-scale .btn-check + .btn { border-radius: 8px !important; min-width: 100%; }
    .likert-scale { flex-direction: column; gap: 4px; }
    .likert-scale .btn-check + .btn { border-radius: 8px !important; }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .question-wrapper { transition: none; }
    .assessment-progress-fill { transition: none; }
    .loading-pulse { animation: none; }
}

/* Minimum touch targets */
.tradeoff-scale .btn-check + .btn,
.likert-scale .btn-check + .btn,
.maxdiff-card,
.confidence-probe .btn {
    min-height: 44px;
}
