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

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8f9fa;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* UN Style Variables - Official UN Brand Colors */
:root {
    --un-blue: #009EDB;
    --un-blue-dark: #0077B3;
    --un-blue-light: #4FC3F7;
    --un-white: #FFFFFF;
    --un-black: #000000;
    --un-gray-light: #F8F9FA;
    --un-gray-medium: #E9ECEF;
    --un-gray-dark: #495057;
    --un-accent: #FF6B35;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-muted: #ADB5BD;
    --border-color: #DEE2E6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --gradient-primary: linear-gradient(135deg, var(--un-blue) 0%, var(--un-blue-light) 100%);
    --gradient-header: linear-gradient(90deg, var(--un-blue) 0%, var(--un-blue-dark) 100%);
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition-base: all 0.2s ease-in-out;
}

/* Header Styles - Enhanced UN Professional */
.header {
    background: var(--un-white);
    border-bottom: 3px solid var(--un-blue);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    min-height: 80px;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--un-blue);
    text-decoration: none;
    letter-spacing: -0.025em;
    margin: 0;
    transition: var(--transition-base);
}

.logo:hover {
    color: var(--un-blue-dark);
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--un-blue);
    background: var(--un-gray-light);
    border-color: var(--border-color);
}

.nav-link.active {
    color: var(--un-blue);
    font-weight: 600;
    background: var(--un-gray-light);
    border-color: var(--un-blue);
}

.controls-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.layer-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.layer-selector label {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

#layer-select, #dataset-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--un-white);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    min-width: 160px;
    box-shadow: var(--shadow-sm);
}

#layer-select:focus, #dataset-select:focus {
    outline: none;
    border-color: var(--un-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 219, 0.25);
}

#layer-select:hover, #dataset-select:hover {
    border-color: var(--un-blue-light);
}

.language-switcher {
    display: flex;
    background: var(--un-gray-light);
    border-radius: var(--border-radius-md);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition-base);
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-width: 60px;
}

.lang-btn.active {
    background: var(--un-blue);
    color: var(--un-white);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.lang-btn:hover:not(.active) {
    background: var(--un-white);
    color: var(--un-blue);
    box-shadow: var(--shadow-sm);
}

.control-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition-base);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.control-btn:active {
    transform: translateY(0);
}
/* Map Controls - Professional Style */
.map-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--un-white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    font-family: inherit;
}

.layer-select {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--un-white);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.layer-select:focus {
    outline: none;
    border-color: var(--un-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.1);
}

.layer-select:hover {
    border-color: var(--un-blue-light);
}

/* Hero Section - Government Style */
.hero {
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--un-blue);
    text-shadow: none;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero background image and overlay */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('main.png');
    background-size: 100% auto;
    background-position: center 60%;
    z-index: 0;
    transform: translateY(0);
    transition: transform 0.2s ease-out;
}

/* Wider hero container to occupy more page width */
.hero .container {
    max-width: 1400px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

/* Stats Section - Government Dashboard Style */
.stats-section {
    background: var(--white);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Features Section */
.features-section {
    background: var(--light-gray);
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dataset Section */
.dataset-section {
    background: var(--un-white);
    padding: 4rem 0;
}

.dataset-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 2rem;
    justify-items: center;
}

.dataset-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dataset-image {
    width: 100%;
    max-width: 1100px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Centered caption styling */
.dataset-figure figcaption {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 0.75rem;
}

.dataset-section .section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .dataset-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Impact Section */
.impact-section {
    background: var(--white);
    padding: 4rem 0;
}

.impact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.impact-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.impact-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.impact-highlights {
    list-style: none;
}

.impact-highlights li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.impact-highlights li::before {
    content: "✓";
    background: var(--gradient-accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons - UN Style */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    font-family: inherit;
    cursor: pointer;
}

.btn-primary {
    background: var(--un-blue);
    color: var(--un-white);
    border-color: var(--un-blue);
}

.btn-primary:hover {
    background: var(--un-dark-blue);
    border-color: var(--un-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 158, 219, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--un-blue);
    border-color: var(--un-blue);
}

.btn-secondary:hover {
    background: var(--un-blue);
    color: var(--un-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 158, 219, 0.3);
}

/* About - Contact Section */
.contact-section {
    margin-top: 1.5rem;
}

.contact-info {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--un-gray-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
}

/* Footer - UN Style */
.footer {
    background: var(--un-white);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    justify-items: center;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--un-blue);
    margin-bottom: 0.75rem;
}

.footer-section p {
    max-width: 820px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--un-blue);
}

.footer-links li a.btn-secondary {
    padding: 10px 18px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    text-align: center;
    color: var(--text-primary);
}

/* Map Specific Styles */
#map {
    height: 70vh;
    min-height: 500px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Main Content Styles - UN Professional */
.main {
    flex: 1;
    padding: 2rem 0;
}

.info-panel {
    background: var(--un-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--un-blue);
}

.info-panel h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--un-blue);
    margin-bottom: 1rem;
}

.info-panel .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--un-gray-light);
    border-radius: 8px;
    min-width: 120px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--un-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Map Container - UN Style */
.map-container {
    position: relative;
    background: var(--un-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.map-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--un-blue);
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--un-gray-medium);
    border-top: 4px solid var(--un-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section - UN Style */
.hero {
    background: var(--gradient-primary);
    color: var(--un-white);
    padding: 0; /* Overlay text directly on carousel images */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    padding: clamp(0.75rem, 2.5vw, 1.5rem);
    background: rgba(0, 0, 0, 0.30);
    border-radius: var(--border-radius-md);
    width: min(94vw, 800px);
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    color: var(--un-white);
}

.hero p {
    font-size: clamp(0.95rem, 3.6vw, 1.2rem);
    margin-bottom: 1.25rem;
    opacity: 0.95;
    max-width: min(92vw, 640px);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Stats Section - UN Dashboard Style */
.stats-section {
    background: var(--un-white);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--un-gray-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--un-blue);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--un-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .logo-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .impact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .map-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
    
    #map {
        height: 60vh;
        min-height: 400px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3.5rem 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.4;
        max-width: 92%;
    }

    .language-switcher {
        padding: 0.2rem;
        margin-bottom: 0.5rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        min-width: 48px;
        font-size: 0.8rem;
    }
    
    .stats-section,
    .features-section,
    .impact-section,
    .cta-section {
        padding: 2rem 0;
    }
    
    .feature-card,
    .stat-card {
        padding: 1.5rem;
    }
    
    .impact-text h2 {
        font-size: 1.8rem;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
}

/* Carousel styles for homepage hero */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}

.carousel-slide {
    min-width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--un-blue);
    transition: width 0.3s ease;
}

/* Emissions Overview */
.emissions-section {
    padding: 4rem 0;
    background: var(--un-gray-light);
}

.donut-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.donut-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.donut {
    --coal-color: #ff6b6b;    /* red */
    --steel-color: #4dabf7;   /* blue */
    --cement-color: #adb5bd;  /* gray */
    --refining-color: #f59f00;/* orange */
    --other-color: #e9ecef;   /* light gray */

    --coal: 20;
    --steel: 9;
    --cement: 8;
    --refining: 3;
    --other: calc(100 - (var(--coal) + var(--steel) + var(--cement) + var(--refining)));

    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: conic-gradient(
        var(--coal-color) 0% calc(var(--coal) * 1%),
        var(--steel-color) calc(var(--coal) * 1%) calc((var(--coal) + var(--steel)) * 1%),
        var(--cement-color) calc((var(--coal) + var(--steel)) * 1%) calc((var(--coal) + var(--steel) + var(--cement)) * 1%),
        var(--refining-color) calc((var(--coal) + var(--steel) + var(--cement)) * 1%) calc((var(--coal) + var(--steel) + var(--cement) + var(--refining)) * 1%),
        var(--other-color) calc((var(--coal) + var(--steel) + var(--cement) + var(--refining)) * 1%) 100%
    );
    position: relative;
    box-shadow: var(--shadow-md);
}

.donut::after {
    content: "";
    position: absolute;
    inset: 18%;
    background: var(--un-white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm) inset;
}

.donut-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 0.75rem 1.5rem;
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
}
.legend-swatch.coal { background: #ff6b6b; }
.legend-swatch.steel { background: #4dabf7; }
.legend-swatch.cement { background: #adb5bd; }
.legend-swatch.refining { background: #f59f00; }
.legend-swatch.other { background: #e9ecef; border: 1px solid var(--border-color); }

.donut-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .donut {
        width: 180px;
        height: 180px;
    }
    .donut-legend {
        grid-template-columns: 1fr;
    }
}