/* Market Insights Page - Optimized Layout */

/* Reduce section spacing */
.content-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

/* Compact cards grid with better utilization */
.cards-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Special grid layouts for different sections */
.cards-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.cards-grid.three-column {
    grid-template-columns: repeat(3, 1fr);
}

.cards-grid.four-column {
    grid-template-columns: repeat(4, 1fr);
}

.cards-grid.mixed-layout {
    grid-template-columns: 2fr 1fr;
}

/* Compact card styles */
.card.compact {
    padding: 1rem;
}

.card.compact .card-header {
    margin-bottom: 0.75rem;
}

.card.compact .card-header h3 {
    font-size: 1rem;
}

/* Make stat boxes smaller and more efficient */
.stats-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.stat-box.compact {
    padding: 0.75rem;
}

.stat-box.compact .stat-value {
    font-size: 1rem;
}

.stat-box.compact .stat-desc {
    font-size: 0.75rem;
}

/* Inline stats for cards with minimal content */
.inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
}

.inline-stat {
    text-align: center;
}

.inline-stat .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-red);
}

.inline-stat .stat-desc {
    font-size: 0.8rem;
    color: var(--text-medium);
}

/* Horizontal layout for simple content */
.horizontal-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Make position cards more compact */
.position-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Reduce padding in ecosystem stats */
.ecosystem-stats {
    padding: 1rem 0;
}

.ecosystem-row {
    gap: 1rem;
}

.ecosystem-item {
    padding: 0.75rem;
}

/* Compact segment items */
.segment-item {
    padding: 0.5rem 0;
}

.segment-bar {
    height: 4px;
    margin-top: 0.25rem;
}

/* Make trend cards more efficient */
.areas-list,
.flows-list {
    gap: 0.5rem;
}

.area-tag,
.flow-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Compact global segments */
.global-segment-item {
    padding: 0.75rem;
}

.global-segment-item .segment-icon {
    font-size: 1.5rem;
}

/* Investment trends compact layout */
.investment-trends {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.investment-stat {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cards-grid.three-column,
    .cards-grid.four-column,
    .cards-grid.mixed-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .horizontal-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .inline-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .chart-container canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile font size optimizations for Market Insights */
    .hero-title {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
        line-height: 1.5;
    }
    
    .stat-number {
        font-size: 1rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    /* Card content mobile optimization */
    .card h3, .card-header h3 {
        font-size: 0.95rem !important;
        line-height: 1.3;
    }
    
    .card p, .card-content p {
        font-size: 0.8rem !important;
        line-height: 1.4;
    }
    
    /* Chart titles and labels */
    .chart-title {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 1024px) {
    .cards-grid.three-column {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid.four-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduce hero section height */
.hero {
    padding: 4rem 2rem 3rem;
}

/* Make main content more compact */
.main-content {
    padding-top: 1rem;
}