/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #ffffff;
    font-size: 14px;
}

/* Color Variables - Red Theme */
:root {
    --primary-red: #dc2626;
    --dark-red: #991b1b;
    --light-red: #fef2f2;
    --medium-red: #fee2e2;
    --accent-red: #ef4444;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --white: #ffffff;
    --light-gray: #f3f4f6;
    --border-gray: #e5e7eb;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-brand i {
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-red);
}

/* Hero Section */
.hero {
    background: #ffffff;
    padding: 3rem 1rem 2rem;
    margin-top: 60px;
    text-align: center;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-gray);
}

/* Removed grey overlay pattern */

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    background: var(--white);
    padding: 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-gray);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 400;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Market Sections */
.market-section {
    padding: 2rem 0;
    background: var(--white);
}

.market-section:nth-child(even) {
    background: var(--white);
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-red);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 400;
}

/* Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-gray);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.highlight-card {
    border: 2px solid var(--primary-red);
    background: linear-gradient(135deg, var(--white) 0%, var(--light-red) 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--medium-red);
}

.card-header i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Growth Trajectory */
.growth-trajectory {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 0.5rem;
    border: 1px solid var(--medium-red);
}

.trajectory-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trajectory-point .year {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 0.4rem;
}

.trajectory-point .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-red);
}

.trajectory-arrow {
    color: var(--primary-red);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.projection-note {
    text-align: center;
    font-style: italic;
    color: var(--text-medium);
    font-weight: 500;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Segment Growth */
.segment-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.segment-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.segment-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.segment-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.segment-cagr {
    font-weight: 500;
    color: var(--primary-red);
    font-size: 0.85rem;
}

.segment-bar {
    width: 100%;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.segment-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-red));
    border-radius: 6px;
    transition: width 1s ease-in-out;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.stat-box {
    background: var(--light-red);
    border: 1px solid var(--medium-red);
    border-radius: 0.5rem;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 0.2rem;
}

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

/* Ecosystem */
.ecosystem-stats {
    margin-bottom: 1rem;
}

.ecosystem-item {
    background: var(--light-red);
    border-radius: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--medium-red);
    text-align: center;
}

.eco-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.eco-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.eco-note {
    display: block;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-style: italic;
}

.key-hubs, .segments {
    margin-top: 1rem;
}

.key-hubs h4, .segments h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.hubs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hub-item {
    background: var(--white);
    padding: 0.5rem;
    border-radius: 0.3rem;
    border: 1px solid var(--border-gray);
    font-weight: 400;
    font-size: 0.85rem;
}

.segments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.segment-tag {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Global Segments */
.global-segments {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.global-segment-item {
    background: var(--light-red);
    border-radius: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--medium-red);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.segment-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.segment-info {
    flex: 1;
}

.segment-info h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.segment-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 0.2rem;
}

.segment-growth {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 400;
}

/* Investment Trends */
.investment-trends {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.investment-stat {
    background: var(--light-red);
    border-radius: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--medium-red);
    text-align: center;
}

.investment-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 0.3rem;
}

.investment-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.investment-note {
    display: block;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-style: italic;
}

.booming-areas, .capital-flows {
    margin-top: 1rem;
}

.booming-areas h4, .capital-flows h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.areas-list, .flows-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.area-tag, .flow-tag {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.growth-note {
    text-align: center;
    font-style: italic;
    color: var(--text-medium);
    font-weight: 500;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Investment Banner */
.investment-banner {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.2);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
    justify-content: center;
}

.banner-content i {
    font-size: 1.5rem;
    color: var(--white);
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.banner-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.banner-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Comparison Section */
.comparison-section {
    background: var(--white);
    padding: 2rem 0;
    border-top: 1px solid var(--border-gray);
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.position-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-gray);
    transition: transform 0.3s ease;
}

.position-card:hover {
    transform: translateY(-10px);
}

.position-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.position-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

.position-card p {
    color: var(--text-medium);
    line-height: 1.4;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    /* DARK BACKGROUND */
    background: var(--text-dark);
    color: var(--white);
    padding: 1rem 0 0.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 0.5rem;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.footer-section h4 {
    color: var(--primary-red);   /* Red headings */
    font-weight: 600;
    margin: 0;
    font-size: 0.8rem;
}

.footer-section p {
    opacity: 0.8;
    font-size: 0.8rem;
    color: var(--white);         /* White text */
    margin: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.7;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        max-width: 400px;
    }
    
    .section-title {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .market-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 0.8rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .position-grid {
        grid-template-columns: 1fr;
    }
}

/* Chart containers */
.trajectory-chart,
.global-trajectory-chart,
.global-tech-chart {
    margin-top: 0.5rem;
    background: var(--white);
    border-radius: 0.3rem;
    padding: 0.5rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Combined content layouts */
.combined-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.combined-content-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.combined-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.combined-charts-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.segment-section,
.stats-section,
.chart-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.segment-section h4,
.stats-section h4,
.chart-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-gray);
    flex-shrink: 0;
}

/* Ecosystem row layout */
.ecosystem-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .combined-content,
    .combined-charts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .combined-charts-vertical {
        gap: 1rem;
    }
    
    .combined-content-vertical {
        gap: 1rem;
    }
    
    .segment-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .ecosystem-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}