/* Data Visualization & Statistics Styles */
/* Used by: about.html, data.html, and any other pages with stats/maps */

/* ===== STATISTICS SECTION ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

/* Enhanced stat card for data page */
.stat-card.enhanced {
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #4CAF50;
    border: none;
}

.stat-card:hover {
    background: #f0f0f0;
}

.stat-card.enhanced:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
    line-height: 1;
    margin-top: 4px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

/* ===== CONTENT SECTIONS ===== */
.about-content,
.data-content {
    max-width: 900px;
    margin: 40px auto;
    line-height: 1.7;
}

.about-content h2,
.data-content h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    color: #333;
}

.about-content p,
.about-content li,
.data-content p,
.data-content li {
    margin-bottom: 15px;
}

.about-content ul,
.about-content ol,
.data-content ul,
.data-content ol {
    margin-left: 20px;
}

.about-content a,
.data-content a {
    color: #007bff;
    text-decoration: none;
}

.about-content a:hover,
.data-content a:hover {
    text-decoration: underline;
}

/* ===== MAP STYLES ===== */
#about-map,
#data-map,
.choropleth-map {
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 500px;
    width: 100%;
    margin: 20px 0;
}

/* Leaflet tooltip customization for all maps */
.leaflet-tooltip {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}

/* Map container wrapper */
.map-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.map-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.map-description {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

/* ===== DATA PAGE SPECIFIC STYLES ===== */
.chart-container {
    background: white;
    border: 0.5px solid #007bff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.data-table th {
    background: #4CAF50;
    color: white;
    padding: 15px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 20px;
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    transition: width 0.3s ease;
}

.section-header {
    font-size: 1.5rem;
    color: #333;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .stat-card {
        padding: 40px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .about-content,
    .data-content {
        margin: 20px;
        padding: 0 10px;
    }
    
    #about-map,
    #data-map,
    .choropleth-map {
        height: 400px;
    }
    
    .two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-header {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    #about-map,
    #data-map,
    .choropleth-map {
        height: 300px;
    }
    
    .chart-container,
    .stat-card {
        padding: 15px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}