/* dashboard/css/dashboard.css */
/* Dashboard-specific styles with all fixes applied and Market Segments integration */

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    font-size: 14px;
    position: relative;
    min-height: 100vh;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #E6007E;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --background: #ffffff;
    --background-secondary: #fafafa;
    --border-color: #f0f0f0;
    --border-color-strong: #e0e0e0;
    
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    --success-bg: #f0f9f0;
    --warning-bg: #fff8f0;
    --danger-bg: #fff8f8;
    --info-bg: #f0f8ff;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);

    /* Additional color variables for enhanced compatibility */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-600: #666666;
    --gray-700: #424242;
    --gray-900: #1a1a1a;
    --green-100: #f0f9f0;
    --green-400: #4caf50;
    --green-500: #27ae60;
    --green-600: #1b5e20;
    --red-50: #fff8f8;
    --red-100: #ffebee;
    --red-200: #ffcdd2;
    --red-400: #ef5350;
    --red-500: #e74c3c;
    --red-600: #c62828;
    --amber-400: #ffca28;
    --amber-500: #f39c12;
    --amber-600: #ff8f00;
    --blue-100: #f0f8ff;
    --blue-600: #3498db;
}

/* Layout components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
}

/* Header styles */
.header {
    text-align: center;
    padding: 60px 0 40px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 60px;
    display: block;
    visibility: visible;
    width: 100%;
}

.title {
    font-size: 32px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    display: block;
    visibility: visible;
}

.subtitle {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
    margin-bottom: 0;
    display: block;
    visibility: visible;
}

/* Controls section */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-group {
    display: flex;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    color: #666666;
    font-weight: 400;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Button styles */
.filter-btn, .export-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #666666;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover, .export-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.filter-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

/* Market sector filter buttons - styled like navigation buttons */
.filter-group .filter-buttons {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.filter-group .filter-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #666;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

.filter-group .filter-btn::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.filter-group .filter-btn:hover,
.filter-group .filter-btn.active {
    color: #1a1a1a;
    background: none;
    border: none;
}

.filter-group .filter-btn.active::after {
    transform: scaleX(1);
}

/* Centered filter group for profit pools page - exactly matching contracting models and news */
.filter-group-centered {
    margin-bottom: 40px;
}

.filter-group-centered .filter-label {
    font-size: 14px;
    color: #666666;
    font-weight: 400;
    margin-bottom: 16px;
    text-align: center;
    display: block;
}

.filter-group-centered .filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.filter-group-centered .filter-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    position: relative;
    transition: color 0.2s ease;
}

.filter-group-centered .filter-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.filter-group-centered .filter-btn.active, .filter-group-centered .filter-btn:hover {
    color: #1a1a1a;
}

.filter-group-centered .filter-btn.active::after {
    transform: scaleX(1);
}

/* Export section - positioned after stats tiles */
.export-section {
    margin: 30px 0;
    text-align: right;
}

.export-group-centered {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.export-btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Stats section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: #f8f8f8;
    margin-bottom: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.stat-item {
    background: #ffffff;
    padding: 24px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #666666;
    font-weight: 400;
}

/* Chart sections */
.chart-section {
    margin-bottom: 80px;
}

.chart-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.chart-description {
    font-size: 14px;
    color: #666666;
    margin-bottom: 32px;
    font-weight: 400;
    line-height: 1.5;
}

.chart-container {
    margin-bottom: 24px;
}

/* Insights styles */
.insights {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.insights-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.insights-list {
    list-style: none;
    padding: 0;
}

.insights-list li {
    font-size: 13px;
    color: #666666;
    margin-bottom: 8px;
    position: relative;
    padding-left: 12px;
    line-height: 1.4;
}

.insights-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a1a1a;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    background: rgba(26, 26, 26, 0.95);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 260px;
    line-height: 1.4;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Chart-specific styles */
.axis-label {
    font-family: inherit;
    font-size: 11px;
    fill: #999999;
    font-weight: 400;
}

.tick-label {
    font-family: inherit;
    font-size: 10px;
    fill: #666666;
    font-weight: 400;
}

.chart-label {
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    fill: #1a1a1a;
}

.value-label {
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    fill: white;
}

.grid-line {
    stroke: #f0f0f0;
    stroke-width: 0.5;
}

.domain {
    display: none;
}

.tick line {
    display: none;
}

.heatmap-cell {
    stroke: #ffffff;
    stroke-width: 1;
    cursor: pointer;
}

.heatmap-text {
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    fill: #1a1a1a;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.legend {
    font-size: 11px;
    fill: #666666;
}

.trend-line {
    fill: none;
    stroke-width: 2;
}

.trend-point {
    stroke: #ffffff;
    stroke-width: 2;
}

/* Global Navigation */
.global-nav {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Horizontal Navigation */
.horizontal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid #f0f0f0;
    overflow-x: auto;
    overflow-y: hidden;
}

.nav-item {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    min-width: fit-content;
}

.nav-item:hover {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-item.active {
    background: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26,26,26,0.15);
}

/* FIXED: Content sections for navigation with smooth transitions */
.content-section {
    display: none;
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.content-section.active {
    display: block !important;
    opacity: 1 !important;
}

.content-section.fade-in {
    display: block !important;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.content-section.fade-out {
    display: block !important;
    opacity: 1;
    animation: fadeOut 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Ensure specific sections are properly visible */
#case-studies,
#macro-environment,
#market-segments {
    z-index: 1;
    position: relative;
}

#case-studies.active,
#macro-environment.active,
#market-segments.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* Simple icons using CSS */
.icon-home::before { content: "⌂"; }
.icon-analytics::before { content: "◗"; }
.icon-capabilities::before { content: "★"; }
.icon-segments::before { content: "▣"; }
.icon-contracts::before { content: "◐"; }
.icon-tools::before { content: "◎"; }
.icon-settings::before { content: "⚙"; }
.icon-help::before { content: "?"; }

/* Value Chain Guide Styles */
.value-chain-overview {
    margin-bottom: 60px;
}

.phase-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 40px 0 60px 0;
    padding: 20px 0;
}

.phase-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 1px;
    background: #f0f0f0;
    z-index: 1;
}

.phase-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    max-width: 140px;
}

.phase-item:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: none;
    box-shadow: none;
}

.phase-item.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    transform: none;
    box-shadow: none;
}

.phase-item.active .phase-number,
.phase-item.active .phase-duration {
    opacity: 0.7;
}

.phase-number {
    font-size: 12px;
    font-weight: 500;
    color: #666666;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.phase-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.phase-duration {
    font-size: 11px;
    color: #999999;
    transition: all 0.2s ease;
}

.phase-details {
    background: #fafafa;
    border-radius: 8px;
    padding: 32px;
    margin: 40px 0;
    display: none;
    border: 1px solid #f0f0f0;
}

.phase-details.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phase-details-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.phase-icon {
   display: none;
}

.phase-details-title {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.phase-details-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    max-width: 80ch;
}

.phase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.objectives-section, .activities-section {
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title::before {
    display: none;
}

.activities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.activity-item {
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #cccccc;
}

.activity-title {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.activity-description {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

.objectives-list {
    list-style: none;
    padding: 0;
}

.objectives-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

.objectives-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: bold;
}

.stakeholders-section {
    grid-column: 1 / -1;
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-top: 20px;
}

.stakeholders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stakeholder-category {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stakeholder-title {
    font-weight: 500;
    font-size: 12px;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stakeholder-list {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

/* ========== MARKET SEGMENTS STYLES ========== */

/* Header Section for Market Segments */
.header-section {
    text-align: center;
    padding: 60px 0 40px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.main-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.main-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    line-height: 1.6;
}

/* Segment Cards */
.segments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    width: 100%;
}

.segment-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.segment-card:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: none;
    box-shadow: none;
}

.segment-card.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: none;
    box-shadow: none;
}

.segment-card.active .segment-name,
.segment-card.active .segment-desc,
.segment-card.active .stat-primary,
.segment-card.active .stat-label,
.segment-card.active .stat-secondary {
    color: #ffffff;
}

.segment-card.active .metric-success,
.segment-card.active .metric-warning,
.segment-card.active .metric-danger,
.segment-card.active .metric-moderate {
    background: #ffffff;
    color: var(--green-600);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.segment-card.active .metric-warning {
    color: var(--amber-600);
}

.segment-card.active .metric-danger {
    color: var(--red-600);
}

.segment-card.active .metric-moderate {
    color: var(--gray-600);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    flex-shrink: 0;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: var(--background);
    transition: all 0.2s ease;
}

.segment-card:hover .icon-wrapper {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.segment-card.active .icon-wrapper {
    background: #ffffff;
    border-color: #ffffff;
    color: #1a1a1a;
}

.card-title-wrapper {
    flex: 1;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.segment-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.segment-desc {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.segment-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-primary {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-secondary {
    font-size: 13px;
}

.metric-success { color: var(--green-600); }
.metric-warning { color: var(--amber-600); }
.metric-danger { color: var(--red-600); }
.metric-moderate { color: var(--gray-600); }

.card-indicator {
    display: none;
}

/* Market Summary */
.market-summary {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 32px;
    margin: 0 auto 32px auto;
    max-width: 1200px;
    width: 100%;
}

.summary-header {
    text-align: center;
    margin-bottom: 24px;
}

.summary-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.data-timestamp {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.summary-metric {
    text-align: center;
    background: var(--background);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.summary-metric .metric-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.summary-metric .metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Overview Panel */
.overview-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 32px;
    margin: 0 auto 32px auto;
    max-width: 1200px;
    width: 100%;
}

.panel-header {
    margin-bottom: 32px;
    text-align: center;
}

.header-text h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.header-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.metric-card {
    background: var(--background);
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.metric-card:hover {
    background: var(--background-secondary);
}

.metric-card.critical {
    background: var(--danger-bg);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 400;
}

.trend-badge.positive {
    background: var(--success-bg);
    color: var(--success-color);
}

.trend-badge.negative {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.trend-badge.neutral {
    background: var(--background-secondary);
    color: var(--text-secondary);
}

.metric-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.1;
}

.metric-note {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* Value Chain Panel */
.value-chain-panel {
    background: #ffffff;
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0 auto 32px auto;
    box-shadow: var(--shadow-sm);
    max-width: 1200px;
    width: 100%;
    position: relative;
}

/* Exploration hint */
.exploration-hint {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-md);
    margin-top: 24px;
    border: 2px dashed var(--border-color-strong);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.exploration-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.hint-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hint-action {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hint-action::after {
    content: '→';
    font-weight: bold;
}

.chain-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: nowrap;
}

.chain-stage {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    flex: 1;
    max-width: 280px;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: center;
    transform: translateY(0);
}

.chain-stage::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), #4a90e2);
    border-radius: 8px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.chain-stage:hover {
    border-color: var(--primary-color);
    color: #1a1a1a;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(230, 0, 126, 0.15);
}

.chain-stage:hover::before {
    opacity: 0.1;
}

.chain-stage.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.2);
}

.chain-stage.active::before {
    opacity: 0;
}

.chain-stage.active .stage-title,
.chain-stage.active .stage-subtitle {
    color: #ffffff;
}

.chain-stage.active .stage-metric {
    background: #ffffff;
    color: #1a1a1a;
}

.chain-stage.active .stage-metric.success {
    background: #ffffff;
    color: var(--green-600);
    border: 1px solid var(--green-600);
}

.chain-stage.active .stage-metric.danger {
    background: #ffffff;
    color: var(--red-600);
    border: 1px solid var(--red-600);
}

.stage-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stage-number {
    width: 24px;
    height: 24px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.chain-stage.active .stage-number {
    background: #ffffff;
    color: #1a1a1a;
}

.profit-signal {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.profit-signal.high { background: var(--green-500); }
.profit-signal.medium { background: var(--amber-500); }
.profit-signal.low { background: var(--red-500); }

.stage-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.3;
}

.stage-subtitle {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
    line-height: 1.4;
}

.stage-metric {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.stage-metric.success {
    background: var(--green-100);
    color: var(--green-600);
}

.stage-metric.danger {
    background: var(--red-100);
    color: var(--red-600);
}

.chain-connector {
    display: flex;
    align-items: center;
    opacity: 0.3;
}

.connector-line {
    width: 32px;
    height: 2px;
    background: var(--gray-300);
    border-radius: 1px;
}

/* Details Panel - Progressive Disclosure */
.details-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 32px;
    margin: 0 auto 32px auto;
    max-width: 1200px;
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.details-panel.revealed {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
    pointer-events: auto;
    margin-bottom: 32px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.details-header-content {
    flex: 1;
    text-align: center;
}

.details-close-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.details-close-btn:hover {
    background: var(--background-secondary);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.details-close-btn:active {
    transform: scale(0.95);
}

.details-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.details-header p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
}

.details-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

/* Player Items */
.players-section {
    /* Container for player items */
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-item {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.player-item:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.player-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.player-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.avatar-circle.success { background: var(--success-color); }
.avatar-circle.warning { background: var(--warning-color); }
.avatar-circle.danger { background: var(--danger-color); }
.avatar-circle.neutral { background: var(--text-secondary); }

.player-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.player-role {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.player-metrics {
    display: flex;
    gap: 12px;
}

.player-metrics .metric {
    font-size: 12px;
    font-weight: 400;
    padding: 4px 8px;
    background: var(--background-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.player-metrics .metric.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.player-metrics .metric.danger {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.player-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.success { background: var(--success-color); }
.status-indicator.warning { background: var(--warning-color); }
.status-indicator.danger { background: var(--danger-color); }

.status-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Insights */
.insights-section {
    /* Container for insights */
}

.insights-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
}

.insight-item:hover {
    box-shadow: var(--shadow-sm);
}

.insight-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.insight-icon.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.insight-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.insight-icon.info {
    background: var(--info-bg);
    color: var(--info-color);
}

.insight-content h5 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.insight-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Intelligence Panel - Progressive Disclosure */
.intelligence-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 32px;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.intelligence-panel.revealed {
    opacity: 1;
    max-height: 3000px;
    transform: translateY(0);
    pointer-events: auto;
    margin-bottom: 32px;
}

.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.intelligence-card {
    background: var(--gray-50);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.intelligence-card.alert {
    background: var(--red-50);
    border-color: var(--red-200);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.header-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-badge {
    background: var(--blue-100);
    color: var(--blue-600);
}

.header-badge.success {
    background: var(--green-100);
    color: var(--green-600);
}

.header-badge.danger {
    background: var(--red-100);
    color: var(--red-600);
}

/* Profit Distribution */
.profit-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.distribution-item {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 12px;
}

.dist-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.dist-bar {
    height: 8px;
    background: var(--border-color-strong);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-fill.high { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.bar-fill.medium { background: linear-gradient(90deg, var(--amber-500), var(--amber-400)); }
.bar-fill.low { background: linear-gradient(90deg, var(--red-500), var(--red-400)); }

.dist-value {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    text-align: right;
}

/* Opportunities */
.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opportunity-item {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.opportunity-item:hover {
    box-shadow: var(--shadow-sm);
}

.opp-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--success-bg);
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.opp-content {
    flex: 1;
}

.opp-content h5 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.opp-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.opp-metric {
    font-size: 14px;
    font-weight: 600;
    color: var(--success-color);
    background: var(--success-bg);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* Risks */
.risks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.risk-item {
    background: #ffffff;
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.risk-severity {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.risk-severity.critical { background: var(--red-500); }
.risk-severity.high { background: var(--red-400); }
.risk-severity.medium { background: var(--amber-500); }

.risk-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.risk-content p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0;
}

/* KPI Banner */
.kpi-banner-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.kpi-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 24px;
    text-align: left;
    border: 1px solid #f0f0f0;
}

.kpi-value {
    font-size: 28px;
    font-weight: 600;
    color: #E6007E;
    display: block;
    margin-bottom: 8px;
}

.kpi-label {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

/* Bubble Chart */
.bubble-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(26,26,26,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

#modal-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    color: #1a1a1a;
}

#modal-aliases {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: #1a1a1a;
    text-decoration: none;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.modal-section-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 12px;
}

.benefits-risks, .details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-list {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.modal-list li {
    font-size: 14px;
    color: #333;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.5;
}

.modal-list li::before {
    position: absolute;
    left: -20px;
    top: 5px;
    font-weight: bold;
}

#modal-benefits .modal-list li::before {
    content: '✓';
    color: #28a745;
}

#modal-risks .modal-list li::before {
    content: '✗';
    color: #dc3545;
}

.detail-item {
    font-size: 14px;
}

.detail-item strong {
    display: block;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

#modal-examples {
    font-size: 14px;
    color: #333;
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

/* Additional grid for insights */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* FIXED: Case Study styles */
.case-study-explorer {
    margin-top: 40px;
    width: 100%;
    position: relative;
}

.case-study-filters {
    display: flex !important;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    position: relative;
    visibility: visible;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    display: block;
    visibility: visible;
}

.case-studies-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    min-height: 200px !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.case-study-card {
    display: block !important;
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px !important;
    padding: 24px !important;
    width: 100% !important;
    min-height: 200px !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.case-study-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 12px;
    color: #666;
}

.card-outcome {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
}

.card-outcome.successful { background-color: #28a745; }
.card-outcome.mixed { background-color: #ffc107; color: #1a1a1a; }
.card-outcome.unsuccessful { background-color: #dc3545; }

.card-body {
    flex-grow: 1;
}

.card-details {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.card-details li {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
}

.card-details li strong {
    color: #1a1a1a;
    font-weight: 500;
    min-width: 90px;
    display: inline-block;
}

.card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.card-lesson {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.card-lesson strong {
    color: #1a1a1a;
    font-weight: 500;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-detail {
    margin-bottom: 12px;
}

/* Sub Navigation */
.sub-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.sub-nav-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    position: relative;
    transition: color 0.2s ease;
}

.sub-nav-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sub-nav-btn.active, .sub-nav-btn:hover {
    color: #1a1a1a;
}

.sub-nav-btn.active::after {
    transform: scaleX(1);
}

.view-container {
    display: none;
}

.view-container.active {
    display: block;
    animation: fadeIn 0.5s;
}

/* Visualization filter buttons */
.viz-filters {
    border-bottom: none;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.viz-filters .filter-btn {
    background: #f8f8f8;
}

.viz-filters .filter-btn.active {
    background: #1a1a1a;
    color: white;
}

/* Radar Chart */
.radar-stroke {
    fill: #E6007E;
    fill-opacity: 0.7;
    stroke: #E6007E;
    stroke-width: 2px;
}

.radar-point {
    fill: #E6007E;
    stroke: white;
    stroke-width: 1px;
}

#radar-chart-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

#radar-chart-controls label {
    font-size: 14px;
    font-weight: 500;
}

#radar-model-select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-family: inherit;
    font-size: 14px;
}

#radar-chart-container .axis-label {
    font-size: 11px;
    text-anchor: middle;
    fill: #333;
}

#radar-chart-container .radar-stroke {
    fill: #E6007E;
    fill-opacity: 0.1;
    stroke: #E6007E;
    stroke-width: 2;
}

#radar-chart-container .radar-point {
    fill: #E6007E;
    stroke: white;
    stroke-width: 1;
}

/* Distribution Charts */
.dist-chart {
    display: flex;
    flex-direction: column;
}

#distribution-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.dist-chart h4 {
    margin-bottom: 15px;
    font-weight: 500;
}

.dist-bar-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.dist-label {
    width: 120px;
    color: #666;
}

.dist-bar-container {
    flex-grow: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 4px;
}

.dist-bar {
    height: 100%;
    background: #1a1a1a;
    border-radius: 4px;
}

.dist-value {
    width: 80px;
    text-align: right;
    color: #333;
    font-weight: 500;
}

/* Evolution Timeline */
#evolution-timeline-wrapper {
    padding: 20px 0;
}

#evolution-timeline {
    position: relative;
    border-left: 3px solid #f0f0f0;
    padding: 10px 0 10px 30px;
    margin-left: 20px;
}

#evolution-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #f0f0f0;
}

.timeline-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #666;
    border: 3px solid #f0f0f0;
}

.timeline-item:hover::before {
    background-color: #E6007E;
}

.timeline-era {
    font-weight: 500;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
}

.timeline-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.timeline-models {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.timeline-summary {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

/* Model Directory */
.directory-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

#directory-search {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

#directory-complexity-filter {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
}

#model-directory-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.directory-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.directory-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.directory-item-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.directory-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

.directory-item-title .compare-btn {
    font-size: 11px;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}

.directory-item p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.directory-item-strategy {
    font-size: 13px;
    color: #333;
    font-style: italic;
}

.directory-item-strategy strong {
    font-style: normal;
}

.directory-item-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.tag {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 120px;
    text-align: center;
}

.tag-complexity-Low { background-color: #d4edda; color: #155724; }
.tag-complexity-Low-Medium { background-color: #d4edda; color: #155724; }
.tag-complexity-Medium { background-color: #fff3cd; color: #856404; }
.tag-complexity-Medium-High { background-color: #fff3cd; color: #856404; }
.tag-complexity-High { background-color: #f8d7da; color: #721c24; }
.tag-complexity-Very-High { background-color: #f8d7da; color: #721c24; }

.tag-innovation-Low { background-color: #f8d7da; color: #721c24; }
.tag-innovation-Low-Medium { background-color: #f8d7da; color: #721c24; }
.tag-innovation-Medium { background-color: #fff3cd; color: #856404; }
.tag-innovation-Medium-High { background-color: #fff3cd; color: #856404; }
.tag-innovation-High { background-color: #d1ecf1; color: #0c5460; }
.tag-innovation-Very-High { background-color: #d4edda; color: #155724; }
.tag-innovation-Maximum { background-color: #d4edda; color: #155724; }

#comparison-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.comparison-tray { 
    background-color: #fafafa; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #f0f0f0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.comparison-list { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.comparison-item { 
    background: white; 
    border: 1px solid #ddd; 
    padding: 5px 10px; 
    border-radius: 6px; 
    font-size: 13px; 
}

.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
}

.comparison-table th, .comparison-table td { 
    padding: 12px; 
    text-align: left; 
    border-bottom: 1px solid #e0e0e0; 
    vertical-align: top; 
}

.comparison-table th { 
    font-weight: 500; 
    font-size: 14px; 
}

.comparison-table td { 
    font-size: 13px; 
}

.comparison-table tr:last-child td { 
    border-bottom: none; 
}

.comparison-table .benefits-list li, .comparison-table .risks-list li { 
    list-style: none; 
    padding-left: 15px; 
    position: relative; 
    margin-bottom: 5px; 
}

.comparison-table .benefits-list li::before { 
    content: '✓'; 
    color: #28a745; 
    position: absolute; 
    left: 0; 
}

.comparison-table .risks-list li::before { 
    content: '✗'; 
    color: #dc3545; 
    position: absolute; 
    left: 0; 
}

/* FIXED: Macro Environment Page */
.macro-narrative {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    gap: 40px !important;
    margin-bottom: 60px !important;
    width: 100% !important;
    position: relative !important;
    visibility: visible !important;
}

.narrative-item {
    background: #fafafa !important;
    padding: 25px !important;
    border-radius: 8px !important;
    border: 1px solid #f0f0f0 !important;
    display: block !important;
    position: relative !important;
    min-height: 150px !important;
    visibility: visible !important;
}

.narrative-title {
    font-size: 18px !important;
    font-weight: 500 !important;
    margin-bottom: 15px !important;
    color: #1a1a1a !important;
    display: block !important;
    visibility: visible !important;
}

.narrative-text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #666666 !important;
}

.table-container {
    overflow-x: auto !important;
    width: 100% !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 20px !important;
}

.macro-impact-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.macro-impact-table th,
.macro-impact-table td {
    padding: 12px 15px !important;
    text-align: left !important;
    border-bottom: 1px solid #e0e0e0 !important;
    display: table-cell !important;
    visibility: visible !important;
}

.macro-impact-table th {
    background-color: #fafafa !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.macro-impact-table tr:last-child td {
    border-bottom: none !important;
}

.macro-impact-table td:first-child {
    font-weight: 500 !important;
    color: #1a1a1a !important;
}

/* Responsive styles */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet breakpoint for Market Segments */
    .segments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .chain-stage {
        min-width: 160px;
        padding: 12px;
    }
    
    .chain-flow {
        gap: 8px;
    }
}

/* Mobile Navigation - Removed (using horizontal nav) */

@media (max-width: 768px) {
    .title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .controls-section {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .chart-container svg {
        width: 100%;
        height: auto;
    }
    
    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    
    .stat-value {
        font-size: 24px;
    }
    
    .case-studies-container {
        grid-template-columns: 1fr !important;
    }
    
    .macro-narrative {
        grid-template-columns: 1fr !important;
    }
    
    .case-study-filters {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Horizontal navigation mobile styles */
    .horizontal-nav {
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px;
        gap: 1px;
        justify-content: flex-start;
    }
    
    .nav-item {
        padding: 10px 16px;
        font-size: 13px;
        min-width: fit-content;
        flex-shrink: 0;
    }

    /* Market Segments responsive */
    .segments-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .chain-flow {
        flex-direction: column;
        gap: 16px;
    }
    
    .details-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .intelligence-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .distribution-item {
        grid-template-columns: 100px 1fr 50px;
        gap: 8px;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 40px 0 30px 0;
        margin-bottom: 40px;
    }
    
    .chart-section {
        margin-bottom: 60px;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .player-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .player-metrics {
        flex-direction: column;
        gap: 4px;
    }

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


/* Capabilities Section - Consistent with site design */
#capabilities .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
}

/* Cross-phase container */
.cross-phase-container {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cross-phase-container:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.cross-phase-container.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color), var(--shadow-sm);
}

.cross-phase-container h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

/* Phase timeline */
.capabilities-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 40px 0 60px 0;
    padding: 20px 0;
}

.capabilities-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.capabilities-phase-button {
    background: var(--background);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.capabilities-phase-button:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.capabilities-phase-button.active,
.capabilities-phase-button.highlight-invert {
    background: var(--text-primary);
    color: var(--background);
    border-color: var(--text-primary);
}

.phase-connector {
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin: 0 8px;
}

/* Ecosystem pillars */
.ecosystem-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.ecosystem-pillar {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ecosystem-pillar:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.ecosystem-pillar.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color), var(--shadow-sm);
}

.ecosystem-pillar h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.ecosystem-pillars-header {
    text-align: center;
    margin-bottom: 24px;
}

.ecosystem-pillars-header h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

/* Details container */
.capabilities-details-container {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 40px auto;
    max-width: 1200px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.capabilities-details-container.visible {
    opacity: 1;
}

.capabilities-details-container.hidden {
    display: none;
}

/* Details header */
.capabilities-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.capabilities-details-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.capabilities-details-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    max-width: 80ch;
}

.details-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.details-close:hover {
    color: var(--text-primary);
    background: var(--background-secondary);
}

/* Tab navigation */
.capabilities-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    gap: 8px;
    flex-wrap: wrap;
}

.capabilities-tab-button {
    padding: 12px 0;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
    padding-left: 4px;
    padding-right: 4px;
}

.capabilities-tab-button:hover {
    color: var(--text-primary);
}

.capabilities-tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
}

/* Tab content */
.capabilities-tab-content {
    display: none !important;
}

.capabilities-tab-content.active {
    display: block !important;
}

.capabilities-content-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.capabilities-content-section {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.capabilities-section-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Special styling for Core vs Advanced sections */
.capabilities-content-section[data-type="core"] {
    border-left: 4px solid var(--success-color);
}

.capabilities-content-section[data-type="advanced"] {
    border-left: 4px solid var(--primary-color);
}

.capabilities-content-section[data-type="core"] .capabilities-section-title {
    border-bottom-color: var(--success-color);
}

.capabilities-content-section[data-type="advanced"] .capabilities-section-title {
    border-bottom-color: var(--primary-color);
}

/* Enhanced capability items for Core capabilities */
.capabilities-content-section[data-type="core"] .capabilities-list li {
    border-left: 3px solid var(--success-color);
    background: var(--success-bg);
}

.capabilities-content-section[data-type="advanced"] .capabilities-list li {
    border-left: 3px solid var(--primary-color);
    background: var(--info-bg);
}

.capabilities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.capabilities-list li {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    line-height: 1.4;
    transition: all 0.2s ease;
    position: relative;
}

.capabilities-list li:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.capabilities-list li::before {
    content: none;
}

/* Info flow content */
.info-flow-section {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.info-flow-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--info-color);
    display: inline-block;
}

.info-flow-subsection {
    margin-bottom: 20px;
}

.info-flow-subsection-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--info-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--info-color);
}

.info-flow-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.info-flow-list li {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    line-height: 1.4;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid var(--info-color);
}

.info-flow-list li:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.info-flow-list li::before {
    content: '→';
    position: absolute;
    right: 8px;
    top: 10px;
    color: var(--info-color);
    font-weight: 500;
}

/* Risk content */
.risk-item {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--warning-color);
    transition: all 0.2s ease;
}

.risk-item:hover {
    border-color: var(--border-color-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.risk-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--warning-color);
    display: inline-block;
}

.risk-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
    background: var(--background);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--warning-color);
}

.risk-detail strong {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

/* Responsive design */
@media (max-width: 768px) {
    .capabilities-timeline {
        flex-direction: column;
        gap: 16px;
    }
    
    .capabilities-timeline::before {
        display: none;
    }
    
    .phase-connector {
        display: none;
    }
    
    .ecosystem-pillars {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .capabilities-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .ecosystem-pillars {
        grid-template-columns: 1fr;
    }
    
    .capabilities-details-container {
        padding: 24px;
        margin: 20px auto;
    }
}

/* News Module Styles */
.news-filters-section {
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-section {
    padding: 0;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-style: italic;
}

.news-item {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.news-item:hover {
    border-color: #e0e0e0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-category {
    background: var(--primary-color);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-date {
    color: #666666;
    font-size: 14px;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-summary {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 15px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f8f8f8;
}

.news-source {
    color: #999999;
    font-size: 13px;
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.news-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* News filter buttons */
.news-filter-btn {
    margin-right: 8px;
}

/* Mobile responsiveness for news */
@media (max-width: 768px) {
    .news-item {
        padding: 20px;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .news-filter-btn {
        margin-right: 0;
    }
}

/* News Header Updates */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.header-text {
    flex: 1;
}

.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.last-updated-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
}

.update-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.update-time {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    background: var(--background-secondary, #f8f9fa);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm, 4px);
    border: 1px solid var(--border-color, #e5e5e5);
}

/* Centered News Header */
.news-header-centered {
    text-align: center;
    padding: 40px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.news-header-centered .title {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.news-last-updated-centered {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: none; /* Hidden by default, shown when data loads */
}

/* News Search Section */
.news-search-section {
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.news-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 2px solid var(--border-color, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.news-search-input:focus {
    outline: none;
    border-color: var(--primary-color, #1a1a1a);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.news-search-input.has-search {
    border-color: var(--primary-color, #1a1a1a);
    background: #f8f9fa;
}

.news-search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: none;
}

.news-search-clear:hover {
    background: var(--background-secondary, #f0f0f0);
    color: var(--text-primary, #1a1a1a);
}

.news-search-clear.visible {
    display: block;
}

.search-results-count {
    text-align: center;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
    font-style: italic;
}

/* Section-based News Layout */
.news-navigation {
    margin: 2rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.news-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-nav-buttons::-webkit-scrollbar {
    display: none;
}

.news-nav-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.news-nav-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-nav-btn.active, .news-nav-btn:hover {
    color: #1a1a1a;
}

.news-nav-btn.active::after {
    transform: scaleX(1);
}

.news-content-area {
    margin-top: 2rem;
}

.news-section-content {
    min-height: 400px;
}

/* Market News specific styling */
.market-news-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.market-subsection {
    background: var(--background-secondary, #f8f9fa);
    border-radius: var(--radius-md, 8px);
    padding: 1.5rem;
    border: 1px solid var(--border-color, #e5e5e5);
}

.subsection-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color, #e5e5e5);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 2rem;
    text-align: center;
}

/* Enhanced news articles styling */
.news-articles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    background: white;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--radius-sm, 6px);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--border-color-strong, #d0d0d0);
    transform: translateY(-1px);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.news-source {
    background: var(--primary-color, #1a1a1a);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full, 20px);
    font-weight: 600;
    font-size: 0.8rem;
}

.news-date {
    color: var(--text-secondary, #666);
    font-weight: 500;
}

.news-title {
    margin-bottom: 1rem;
}

.news-title a {
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-title a:hover {
    color: var(--primary-color, #1a1a1a);
    text-decoration: underline;
}

.news-description {
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-companies {
    font-size: 0.875rem;
    color: var(--text-tertiary, #888);
    font-style: italic;
    border-top: 1px solid var(--border-color, #e5e5e5);
    padding-top: 1rem;
    margin-top: 1rem;
}

.no-articles {
    text-align: center;
    color: var(--text-secondary, #666);
    font-style: italic;
    padding: 3rem;
    background: var(--background-secondary, #f8f9fa);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, #e5e5e5);
}

/* International news sections */
.international-news-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.international-country-section {
    background: var(--background, #ffffff);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.country-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin: 0;
    padding: 1rem 1.5rem;
    background: var(--background-secondary, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e5e5e5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.international-country-section .news-articles {
    padding: 1rem;
}

.international-country-section .news-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-light, #f0f0f0);
    padding-bottom: 1rem;
}

.international-country-section .news-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Responsive adjustments for news sections */
@media (max-width: 768px) {
    .market-news-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .market-subsection,
    .news-item {
        padding: 1rem;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .section-title,
    .subsection-title {
        font-size: 1.1rem;
    }
    
    .search-group {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .news-search-input {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .news-search-clear {
        right: 0.75rem;
        font-size: 1.25rem;
    }
    
    .international-news-container {
        gap: 1.5rem;
    }
    
    .country-title {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .international-country-section .news-articles {
        padding: 0.875rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-meta {
        align-items: flex-start;
        width: 100%;
    }
    
    .last-updated-indicator {
        align-items: flex-start;
        font-size: 0.8rem;
    }
}