/* ==============================================
   RESEARCH PAGE — Timeline Report Styles
   ============================================== */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

/* === Base === */
.research-page {
    min-height: 100vh;
    background: linear-gradient(165deg, #0a0a12 0%, #0d0d18 40%, #0a0a12 100%);
    color: #e0e0e8;
    font-family: 'Inter', -apple-system, sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* === Background Grid === */
.research-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* === Header === */
.research-header {
    position: relative;
    z-index: 1;
    padding: 120px 32px 32px;
    max-width: 960px;
    margin: 0 auto;
}

.research-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #00d2ff80;
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.3s ease;
}

.research-header .back-link:hover {
    color: #00d2ff;
}

.research-header .back-link svg {
    width: 16px;
    height: 16px;
}

.research-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #00d2ff80;
    margin-bottom: 12px;
}

.research-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #e8e8f0, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px;
}

.research-subtitle {
    font-size: 15px;
    color: #7878a0;
    line-height: 1.7;
    max-width: 680px;
    margin: 0;
}

/* === Legend === */
.research-legend {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-label {
    font-size: 11px;
    color: #888;
}

/* === Stats Grid === */
.research-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.stat-card {
    background: #ffffff06;
    border: 1px solid #ffffff10;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #00d2ff;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-sub {
    font-size: 10px;
    color: #555;
    margin-top: 2px;
}

/* === Timeline Container === */
.timeline-container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 32px 60px;
}

/* === Event Card === */
.event-wrapper {
    position: relative;
    margin-bottom: 0;
}

/* Timeline connector */
.event-connector {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 0;
}

/* Timeline dot */
.event-dot {
    position: absolute;
    left: 14px;
    top: 24px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #0a0a12;
    z-index: 1;
}

/* Card body */
.event-card {
    margin-left: 56px;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 24px;
}

/* Card header */
.event-card-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.event-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.event-header-info {
    flex: 1;
}

.event-era-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.event-era-badge {
    font-size: 11px;
    font-weight: 700;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.event-year {
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.event-title {
    font-size: 20px;
    font-weight: 800;
    color: #e8e8f0;
    margin-top: 4px;
    letter-spacing: -0.3px;
    font-family: 'Playfair Display', serif;
}

.event-chevron {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.event-chevron.expanded {
    transform: rotate(180deg);
}

/* Summary */
.event-summary {
    padding: 0 24px 16px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #9898a8;
    font-style: italic;
}

/* === Expanded Content === */
.event-expanded {
    padding: 0 24px 24px;
    display: none;
}

.event-expanded.active {
    display: block;
}

/* Tab navigation */
.event-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.event-tab {
    background: transparent;
    color: #888;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    font-family: inherit;
}

.event-tab.active {
    color: #000;
}

/* Tab panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* === Overview Tab === */
.overview-section {
    margin-bottom: 20px;
}

.overview-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.cause-item {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #b0b0b8;
    line-height: 1.5;
}

.cause-index {
    font-weight: 700;
    flex-shrink: 0;
}

.beneficiary-item {
    font-size: 13px;
    color: #b0b0b8;
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 2px solid #2a9d8f40;
    line-height: 1.5;
}

.country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.country-tag {
    background: #e9c46a15;
    border: 1px solid #e9c46a30;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #e9c46a;
    font-weight: 500;
}

/* === PESTEL Tab === */
.pestel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.pestel-card {
    border-radius: 10px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.pestel-bg-letter {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 60px;
    opacity: 0.06;
    font-weight: 900;
}

.pestel-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.pestel-text {
    font-size: 13px;
    line-height: 1.6;
    color: #c8c8d0;
}

/* === SWOT Tab === */
.swot-country-section {
    margin-bottom: 20px;
}

.swot-country-name {
    font-size: 14px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
}

.swot-phase {
    margin-bottom: 12px;
}

.swot-phase-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

.swot-phase-label.before {
    color: #888;
}

.swot-phase-label.after {
    color: #00d2ff;
}

.swot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.swot-cell {
    border-radius: 8px;
    padding: 10px;
}

.swot-cell-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.swot-cell-text {
    font-size: 12px;
    line-height: 1.5;
    color: #b0b0b8;
}

/* === Timeline Footer === */
.timeline-footer {
    margin-left: 56px;
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #00d2ff10, #0a0a1200);
    border: 1px solid #00d2ff20;
    border-radius: 14px;
    text-align: center;
}

.timeline-footer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00d2ff80;
    margin-bottom: 8px;
}

.timeline-footer-quote {
    font-size: 15px;
    color: #7878a0;
    line-height: 1.7;
    font-style: italic;
    margin: 0;
}

/* === Research Card Styles (index.html) === */
.work-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.research-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(165deg, #0a0a12 0%, #0d0d18 100%) !important;
    position: relative;
    overflow: hidden;
}

.research-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.work-card:hover .research-thumbnail {
    opacity: 1;
    transform: scale(1.05);
}

.research-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00d2ff;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid #00d2ff30;
    border-radius: 20px;
    padding: 4px 12px;
    position: relative;
    z-index: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
    .research-header {
        padding: 100px 20px 24px;
    }

    .timeline-container {
        padding: 20px 16px 40px;
    }

    .event-connector {
        left: 16px;
    }

    .event-dot {
        left: 6px;
        width: 18px;
        height: 18px;
    }

    .event-card {
        margin-left: 40px;
    }

    .event-card-header {
        padding: 16px;
        gap: 10px;
    }

    .event-icon {
        font-size: 22px;
    }

    .event-title {
        font-size: 16px;
    }

    .event-summary {
        padding: 0 16px 12px;
        font-size: 12.5px;
    }

    .event-expanded {
        padding: 0 16px 16px;
    }

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

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

    .timeline-footer {
        margin-left: 40px;
    }

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

@media (max-width: 480px) {
    .event-card {
        margin-left: 32px;
    }

    .event-connector {
        left: 12px;
    }

    .event-dot {
        left: 4px;
        width: 16px;
        height: 16px;
    }

    .timeline-footer {
        margin-left: 32px;
    }
}
