      :root {
        /* Darkened color scheme (9% darker) */
        --primary-blue: #45a9d0;
        --primary-teal: #4db9b7;
        --dark-blue: #0c9dcf;
        --medium-blue: #1e97b5;
        --light-background: #e8e8e8;
        --very-light-blue: #c2dae0;
        --light-blue-bg: rgba(194, 218, 224, 0.1);
      }
/* Dark background for main content area */
body {
    background-color: #0b1020; /* Dark blue-gray background */
}

/* Dark background for all white boxes/cards */
.bg-white {
    background-color: #1e293b !important; /* Dark slate background */
}

/* Alternative: if you're using specific container classes */
.container,
.card,
.box,
.panel,
.section {
    background-color: #1e293b !important;
}

/* For any divs that might have white backgrounds */
div[style*="background-color: white"],
div[style*="background-color: #fff"],
div[style*="background-color: #ffffff"] {
    background-color: #1e293b !important;
}







/* ============================================
   NEW: Crime Safety Assessment Section (Severity-Tier)
   ============================================ */

.crime-safety-assessment-section {
    width: 90%;
    margin: 60px auto;
    padding: 40px 20px;
}

.safety-assessment-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Safety Score Badge */
.safety-score-badge {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: 2px solid rgba(124, 58, 237, 0.4);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.safety-score-badge:hover {
    transform: translateY(-5px);
}

.badge-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.badge-icon {
    font-size: 3em;
}

.badge-title {
    font-size: 1.3em;
    color: #a78bfa;
    font-weight: 600;
}

.badge-grade {
    font-size: 5em;
    font-weight: 800;
    margin: 10px 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.badge-score {
    font-size: 3em;
    font-weight: 700;
    margin: 10px 0;
}

.score-max {
    font-size: 0.5em;
    color: #94a3b8;
    font-weight: 400;
}

.badge-description {
    font-size: 1.3em;
    color: #cbd5e1;
    margin: 15px 0;
    font-weight: 500;
}

.badge-percentile {
    font-size: 1.1em;
    color: #a78bfa;
    padding: 12px 20px;
    background: rgba(167, 139, 250, 0.1);
    border-radius: 10px;
    display: inline-block;
    margin-top: 15px;
}

/* Grade Colors */
.grade-a, .grade-aplus { 
    color: #22c55e; 
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
}
.grade-aminus { 
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.5);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(74, 222, 128, 0.05) 100%);
}
.grade-b, .grade-bplus, .grade-bminus { 
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.5);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
}
.grade-c, .grade-cplus, .grade-cminus { 
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.5);
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(251, 146, 60, 0.05) 100%);
}
.grade-d, .grade-dplus, .grade-dminus { 
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.5);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.15) 0%, rgba(248, 113, 113, 0.05) 100%);
}
.grade-f { 
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
}

/* Severity Breakdown Card */
.severity-breakdown-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.severity-breakdown-card h3 {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.severity-subtitle {
    color: #94a3b8;
    font-size: 1.1em;
    margin-bottom: 30px;
}

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

.severity-tier {
    background: rgba(51, 65, 85, 0.5);
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.severity-tier:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tier-icon {
    font-size: 2.5em;
}

.tier-info {
    flex: 1;
}

.tier-name {
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.tier-examples {
    font-size: 0.9em;
    color: #94a3b8;
}

.tier-stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 15px 0;
}

.tier-rate {
    font-size: 2.5em;
    font-weight: 800;
    color: #a78bfa;
}

.tier-label {
    font-size: 0.9em;
    color: #94a3b8;
}

.tier-assessment {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.95em;
    color: #cbd5e1;
}

/* Tier-specific colors */
.tier-critical {
    border-color: rgba(239, 68, 68, 0.5);
}
.tier-critical .tier-icon {
    filter: hue-rotate(0deg);
}

.tier-serious {
    border-color: rgba(251, 146, 60, 0.5);
}

.tier-moderate {
    border-color: rgba(251, 191, 36, 0.5);
}

.tier-minor {
    border-color: rgba(148, 163, 184, 0.5);
}

/* Peer Comparison Card */
.peer-comparison-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.peer-comparison-card h3 {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.comparison-subtitle {
    color: #94a3b8;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.peer-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.peer-group {
    background: rgba(51, 65, 85, 0.4);
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.peer-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(100, 116, 139, 0.3);
}

.peer-icon {
    font-size: 1.5em;
}

.peer-label {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
}

.peer-city-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.peer-city-item:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateX(5px);
}

.peer-city-item.current-city {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: 2px solid rgba(167, 139, 250, 0.4);
    padding: 20px;
    font-weight: 700;
}

.peer-city-name {
    color: #e2e8f0;
    font-size: 1.05em;
}

.peer-city-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #ffffff;
}

.score-grade {
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
}

/* Safety Summary Box */
.safety-summary-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.safety-summary-box h4 {
    color: #a78bfa;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.summary-text {
    color: #e2e8f0;
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 25px;
}

.methodology-note {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #a78bfa;
    color: #cbd5e1;
    font-size: 0.95em;
}

.methodology-note strong {
    color: #a78bfa;
}

/* Crime Score Unavailable State */
.crime-score-unavailable {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.unavailable-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.crime-score-unavailable h3 {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.crime-score-unavailable p {
    color: #94a3b8;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 10px 0;
}

.unavailable-note {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .severity-tiers {
        grid-template-columns: 1fr;
    }
    
    .peer-cities-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-grade {
        font-size: 3.5em;
    }
    
    .badge-score {
        font-size: 2em;
    }
}


/* ============================================
   SaferHood AI Overall Score Section Styles
   ============================================ */

.saferhood-score-section {
    width: 90%;
    margin: 120px auto 40px auto;
    padding: 0;
}

.score-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(69, 169, 208, 0.3);
}

/* Main Score Hero Section */
.score-hero {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.score-main-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

/* Large Score Circle */
.score-circle-large {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 5px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
}

.score-inner {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.score-circle-large .score-number {
    font-size: 4.5em;
    font-weight: 800;
    color: white;
    line-height: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.score-max {
    font-size: 2.7em;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 5px;
}

.score-grade {
    font-size: 3.5em;
    font-weight: 700;
    color: white;
    margin-top: 5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* Score Description */
.score-description {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.score-title {
    font-size: 2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.score-address {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.score-descriptor {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.score-percentile {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.score-percentile strong {
    color: #10b981;
    font-size: 1.2em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hidden Gem Badge */
.hidden-gem-badge {
    background: linear-gradient(135deg, rgba(23, 0, 77, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 2px solid rgba(28, 0, 95, 0.4);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.gem-icon {
       width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.gem-content h4 {
    color: #11c7f9;
    font-size: 1.4em;
    margin-bottom: 5px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

.gem-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    margin: 0;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

/* Highlights Section */
.highlights-section {
    margin: 40px 0;
}

.highlights-title {
    color: white;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.highlight-card {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(77, 185, 183, 0.1) 100%);
    border: 1px solid rgba(69, 169, 208, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.3);
}

.highlight-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.highlight-title {
    color: #45a9d0;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.highlight-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
    line-height: 1.4;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Category Breakdown */
.category-breakdown {
    margin: 40px 0;
}

.breakdown-title {
    color: white;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.category-bars {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.category-row {
    background: rgba(69, 169, 208, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(69, 169, 208, 0.2);
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-name {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.category-score {
    color: white;
    font-size: 1.3em;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 1.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.category-bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bonus-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Insights Section */
.insights-section {
    margin: 40px 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.insights-column {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(77, 185, 183, 0.05) 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.strengths-column {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.considerations-column {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
}

.insights-heading {
    color: white;
    font-size: 1.3em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-icon {
    font-size: 1.4em;
}

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

.insights-list li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.insights-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #45a9d0;
    font-size: 1.5em;
    line-height: 1;
}

.strengths-column .insights-list li::before {
    color: #10b981;
}

.considerations-column .insights-list li::before {
    color: #fbbf24;
}

/* Disclaimer */
.score-disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: rgba(69, 169, 208, 0.05);
    border-left: 4px solid #45a9d0;
    border-radius: 8px;
}

.score-disclaimer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
}

.score-disclaimer strong {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .score-container {
        padding: 25px;
    }
    
    .score-main-display {
        flex-direction: column;
        gap: 30px;
    }
    
    .score-circle-large {
        width: 180px;
        height: 180px;
    }
    
    .score-number {
        font-size: 3em;
    }
    
    .score-title {
        font-size: 2em;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

        
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .category-name {
        font-size: 1em;
    }
}

/* Animation for score counting */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.score-number {
    animation: countUp 0.8s ease;
}



/* Tier Grade Display - Large Letter Grade */
.tier-grade-display {
    font-size: 4em;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 12px;
}

/* Smaller label showing the actual rate */
.tier-label-small {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-top: 5px;
}

/* Grade-specific colors */
.tier-grade-display.grade-a,
.tier-grade-display.grade-aplus {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.tier-grade-display.grade-b,
.tier-grade-display.grade-bplus,
.tier-grade-display.grade-bminus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.tier-grade-display.grade-c,
.tier-grade-display.grade-cplus,
.tier-grade-display.grade-cminus {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.tier-grade-display.grade-d,
.tier-grade-display.grade-dplus,
.tier-grade-display.grade-dminus {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.15);
}

.tier-grade-display.grade-f {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* Adjust tier-stats to center the content */
.tier-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 15px 0;
}




/* Ensure text is visible on dark backgrounds */
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6,
.bg-white p,
.bg-white span,
.bg-white div {
    color: #e2e8f0 !important; /* Light gray text */
}

/* Keep borders visible */
.bg-white {
    border-color: #334155 !important; /* Darker border */
}
      /* Crime Data Section Styles */
      .crime-data-section {
        width: 90%;
        margin: 40px auto;
        padding: 40px 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      }
    
      .section-header {
          text-align: center;
          margin-bottom: 40px;
      }
    
      .section-header h2 {
          color: #fff;
          font-size: 2.5em;
          margin-bottom: 10px;
          font-weight: 600;
      }
    
      .section-header p {
          color: #fff;
          font-size: 1.1em;
          max-width: 600px;
          margin: 0 auto;
          line-height: 1.6;
      }
    
      .controls-container {
          width: 100%;
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
          border-radius: 15px;
          padding: 30px;
          margin-bottom: 30px;
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.3);
          box-sizing: border-box;
      }
    
      .city-selector {
          display: flex;
          flex-wrap: wrap;
          gap: 15px;
          align-items: center;
          justify-content: center;
      }
    
      .crime-type-selector {
          display: flex;
          flex-direction: column;
          gap: 15px;
          align-items: center;
      }
    
      .crime-type-buttons {
          display: flex;
          gap: 10px;
          flex-wrap: wrap;
          justify-content: center;
      }
    
      .crime-type-btn {
          padding: 10px 20px;
          border: 2px solid rgba(232, 232, 232, 0.3);
          border-radius: 25px;
          background: transparent;
          color: white;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.3s ease;
          font-size: 0.9em;
      }
    
      .crime-type-btn:hover {
          background: rgba(232, 232, 232, 0.1);
          transform: translateY(-2px);
      }
    
      .crime-type-btn.active {
          background: var(--light-background);
          color: var(--primary-blue);
          border-color: var(--light-background);
          box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
      }
    
      .city-selector label {
          color: white;
          font-weight: 600;
          font-size: 1.1em;
      }
    
      .city-dropdown {
          padding: 12px 20px;
          border: 2px solid var(--primary-teal);
          border-radius: 25px;
          font-size: 1em;
          min-width: 200px;
          background: var(--light-background);
          color: var(--medium-blue);
          cursor: pointer;
          transition: all 0.3s ease;
          box-shadow: 0 4px 15px rgba(77, 185, 183, 0.2);
      }
    
      .city-dropdown:focus {
          outline: none;
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(77, 185, 183, 0.4);
          border-color: var(--primary-blue);
      }
    
      .update-btn {
          background: linear-gradient(45deg, var(--dark-blue), var(--medium-blue));
          color: white;
          border: none;
          padding: 12px 30px;
          border-radius: 25px;
          font-size: 1em;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.3s ease;
          box-shadow: 0 4px 15px rgba(30, 151, 181, 0.3);
      }
    
      .update-btn:hover {
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(30, 151, 181, 0.5);
          background: linear-gradient(45deg, var(--medium-blue), var(--primary-blue));
      }
    
      .chart-container {
          width: 100%;
          background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
          border-radius: 15px;
          padding: 30px;
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
          margin-bottom: 30px;
          border: 2px solid var(--primary-teal);
          box-sizing: border-box;
      }
    
      .chart-header {
          text-align: center;
          margin-bottom: 30px;
      }
    
      .chart-title {
          color: var(--medium-blue);
          font-size: 1.8em;
          margin-bottom: 10px;
          font-weight: 600;
      }
    
      .chart-subtitle {
          color: var(--dark-blue);
          font-size: 1em;
      }
    
      .chart-wrapper {
          position: relative;
          height: 500px;
          margin-bottom: 20px;
          background: var(--light-blue-bg);
          border-radius: 10px;
          padding: 10px;
      }
    
      .stats-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
          gap: 20px;
          margin-top: 30px;
      }
    
      .stat-card {
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
          color: white;
          padding: 25px;
          border-radius: 12px;
          text-align: center;
          box-shadow: 0 8px 25px rgba(69, 169, 208, 0.3);
          border: 2px solid rgba(232, 232, 232, 0.2);
          transition: all 0.3s ease;
      }

      .stat-card.high-crime {
          background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
          box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
          border-color: rgba(165, 42, 42, 0.3);
      }

      .stat-card.low-crime {
          background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
          box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
          border-color: rgba(56, 142, 60, 0.3);
      }
    
      .stat-card:hover {
          transform: translateY(-3px);
          box-shadow: 0 12px 35px rgba(69, 169, 208, 0.4);
      }
      
    
      .stat-number {
          font-size: 2em;
          font-weight: bold;
          margin-bottom: 5px;
      }
    
      .stat-label {
          font-size: 0.9em;
          opacity: 0.9;
      }
    
      .loading {
          text-align: center;
          padding: 60px;
          color: var(--dark-blue);
          font-size: 1.2em;
          background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
          border-radius: 10px;
          border: 2px solid var(--primary-teal);
      }
    
      .error {
          background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
          color: var(--medium-blue);
          padding: 20px;
          border-radius: 12px;
          margin-bottom: 20px;
          text-align: center;
          border: 2px solid var(--primary-blue);
          box-shadow: 0 5px 15px rgba(69, 169, 208, 0.2);
          font-weight: 600;
      }
    
      /* Responsive Design */
      @media (max-width: 768px) {
          .crime-data-section {
              width: 95%;
              padding: 20px 10px;
          }

          .controls-container,
          .chart-container {
              padding: 20px;
          }

          .city-selector {
              flex-direction: column;
              align-items: stretch;
          }
    
          .city-dropdown,
          .update-btn {
              width: 100%;
              margin-bottom: 10px;
          }
    
          .section-header h2 {
              font-size: 2em;
          }
    
          .chart-wrapper {
              height: 400px;
          }
    
          .stats-grid {
              grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
          }
      }

      /* Extra small screens */
      @media (max-width: 480px) {
          .crime-data-section {
              width: 98%;
              padding: 15px 5px;
          }

          .controls-container,
          .chart-container {
              padding: 15px;
          }

          .section-header h2 {
              font-size: 1.8em;
          }

          .chart-wrapper {
              height: 350px;
          }

          .crime-type-buttons {
              gap: 8px;
          }

          .crime-type-btn {
              padding: 8px 16px;
              font-size: 0.8em;
          }
      }
    
      /* Animation for chart loading */
      @keyframes fadeIn {
          from { opacity: 0; transform: translateY(20px); }
          to { opacity: 1; transform: translateY(0); }
      }
    
      .chart-container.loaded {
          animation: fadeIn 0.6s ease-out;
      }


      /* Hospital Data Section Styles */
      .hospital-data-section {
        width: 90%;
        margin: 40px auto;
        padding: 40px 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      }

      .hospital-search-section {
        width: 90%;
        margin: 40px auto;
        padding: 40px 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      }

      .address-info {
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
          border-radius: 15px;
          padding: 20px 30px;
          margin-bottom: 30px;
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.3);
          color: white;
          text-align: center;
      }

      .address-info h3 {
          margin: 0 0 10px 0;
          font-size: 1.4em;
          font-weight: 600;
      }

      .address-info p {
          margin: 0;
          opacity: 0.9;
      }

      .map-container {
          width: 100%;
          background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
          border-radius: 15px;
          padding: 30px;
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
          margin-bottom: 30px;
          border: 2px solid var(--primary-teal);
          box-sizing: border-box;
      }

      .map-header {
          text-align: center;
          margin-bottom: 20px;
      }

      .map-title {
          color: var(--medium-blue);
          font-size: 1.8em;
          margin-bottom: 10px;
          font-weight: 600;
      }

      #map {
          height: 400px;
          border-radius: 10px;
          border: 2px solid var(--primary-teal);
      }

      .hospitals-container {
          background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
          border-radius: 15px;
          padding: 30px;
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
          border: 2px solid var(--primary-teal);
          box-sizing: border-box;
      }

      .hospitals-header {
          text-align: center;
          margin-bottom: 30px;
      }

      .hospitals-title {
          color: var(--medium-blue);
          font-size: 1.8em;
          margin-bottom: 10px;
          font-weight: 600;
      }

      .hospitals-subtitle {
          color: var(--dark-blue);
          font-size: 1em;
      }

      .hospital-card {
          background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
          border-radius: 15px;
          padding: 25px;
          margin-bottom: 20px;
          box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
          border: 2px solid rgba(69, 169, 208, 0.1);
          transition: all 0.3s ease;
          position: relative;
          overflow: hidden;
      }

      .hospital-card:hover {
          transform: translateY(-3px);
          box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
          border-color: var(--primary-teal);
      }

      .hospital-card::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 4px;
          background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
      }

      .hospital-header {
          display: flex;
          justify-content: space-between;
          align-items: flex-start;
          margin-bottom: 20px;
          flex-wrap: wrap;
      }

      .hospital-info {
          flex: 1;
          margin-right: 20px;
      }

      .hospital-name {
          color: var(--medium-blue);
          font-size: 1.4em;
          font-weight: 600;
          margin-bottom: 8px;
          text-decoration: none;
      }

      .hospital-name:hover {
          color: var(--primary-blue);
      }

      .hospital-address {
          color: var(--dark-blue);
          font-size: 0.95em;
          line-height: 1.4;
          margin-bottom: 8px;
      }

      .hospital-distance {
          color: var(--primary-teal);
          font-weight: 600;
          font-size: 0.9em;
      }

      .score-circle {
          width: 70px;
          height: 70px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          font-size: 1.2em;
          color: white;
          margin-left: 20px;
          flex-shrink: 0;
          box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      }

      .score-excellent { 
          background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
      }
      .score-good { 
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
      }
       .score-fair { 
          background: linear-gradient(135deg, #facc15 0%, #abfa00 100%);
      }
      .score-poor { 
          background: linear-gradient(135deg, #ef4444 0%, #abfa00 100%);
      }

      .quality-badge {
          display: inline-flex;
          align-items: center;
          padding: 8px 16px;
          border-radius: 20px;
          font-size: 0.9em;
          font-weight: 600;
          margin-bottom: 20px;
      }

      .quality-excellent { 
          background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
          color: #15803d;
          border: 2px solid rgba(34, 197, 94, 0.3);
      }
      .quality-good { 
          background: linear-gradient(135deg, rgba(69, 169, 208, 0.2) 0%, rgba(30, 151, 181, 0.2) 100%);
          color: var(--medium-blue);
          border: 2px solid rgba(69, 169, 208, 0.3);
      }
      .quality-fair { 
          background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
          color: #b45309;
          border: 2px solid rgba(245, 158, 11, 0.3);
      }
      .quality-poor { 
          background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
          color: #b91c1c;
          border: 2px solid rgba(239, 68, 68, 0.3);
      }

      .scores-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
          gap: 15px;
          margin-bottom: 20px;
      }

      .score-item {
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
          color: white;
          padding: 15px;
          border-radius: 10px;
          text-align: center;
          box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
          transition: all 0.3s ease;
      }

      .score-item:hover {
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(69, 169, 208, 0.4);
      }

      .score-value {
          font-size: 1.3em;
          font-weight: bold;
          margin-bottom: 5px;
      }

      .score-label {
          font-size: 0.8em;
          opacity: 0.9;
      }

      .strengths-concerns {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 20px;
          margin-bottom: 20px;
      }

      .strengths, .concerns {
          padding: 15px;
          border-radius: 10px;
      }

      .strengths {
          background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
          border: 2px solid rgba(34, 197, 94, 0.2);
      }

      .concerns {
          background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
          border: 2px solid rgba(239, 68, 68, 0.2);
      }

      .strengths h4 {
          color: #15803d;
          margin: 0 0 10px 0;
          font-size: 1em;
          font-weight: 600;
      }

      .concerns h4 {
          color: #b91c1c;
          margin: 0 0 10px 0;
          font-size: 1em;
          font-weight: 600;
      }

      .strengths ul, .concerns ul {
          margin: 0;
          padding: 0;
          list-style: none;
      }

      .strengths li {
          color: #166534;
          font-size: 0.9em;
          margin-bottom: 5px;
          display: flex;
          align-items: center;
      }

      .concerns li {
          color: #991b1b;
          font-size: 0.9em;
          margin-bottom: 5px;
          display: flex;
          align-items: center;
      }

      .strengths li::before {
          content: '✓';
          color: #22c55e;
          font-weight: bold;
          margin-right: 8px;
      }

      .concerns li::before {
          content: '⚠';
          color: #ef4444;
          font-weight: bold;
          margin-right: 8px;
      }

      .view-details-btn {
          background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
          color: white;
          text-decoration: none;
          padding: 12px 24px;
          border-radius: 25px;
          font-weight: 600;
          font-size: 0.9em;
          display: inline-flex;
          align-items: center;
          transition: all 0.3s ease;
          box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
      }

      .view-details-btn:hover {
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(69, 169, 208, 0.5);
          color: white;
          text-decoration: none;
      }

      .error-container {
          background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
          color: var(--medium-blue);
          padding: 40px;
          border-radius: 15px;
          text-align: center;
          border: 2px solid var(--primary-blue);
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
      }

      .no-results {
          background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
          padding: 40px;
          border-radius: 15px;
          text-align: center;
          border: 2px solid var(--primary-teal);
          box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
      }

      .no-results h3 {
          color: var(--medium-blue);
          font-size: 1.5em;
          margin-bottom: 15px;
          font-weight: 600;
      }

      .no-results p {
          color: var(--dark-blue);
          font-size: 1em;
      }

      /* Responsive Design */
      @media (max-width: 768px) {
          .hospital-data-section, .hospital-search-section {
              width: 95%;
              padding: 20px 10px;
          }

          .map-container,
          .hospitals-container {
              padding: 20px;
          }

          .hospital-header {
              flex-direction: column;
          }

          .hospital-info {
              margin-right: 0;
              margin-bottom: 15px;
          }

          .score-circle {
              margin-left: 0;
              align-self: center;
          }

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

          .strengths-concerns {
              grid-template-columns: 1fr;
          }

          .section-header h2 {
              font-size: 2em;
          }

          #map {
              height: 300px;
          }
      }

      @media (max-width: 480px) {
          .hospital-data-section, .hospital-search-section {
              width: 98%;
              padding: 15px 5px;
          }

          .map-container,
          .hospitals-container {
              padding: 15px;
          }

          .section-header h2 {
              font-size: 1.8em;
          }

          #map {
              height: 250px;
          }

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

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

      .hospital-card {
          animation: fadeIn 0.6s ease-out;
      }


.shootings-data-section {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    padding: 40px 20px;
    margin: 40px auto;
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

.shootings-data-section .section-header h2 {
    color: #fff;
}

.shootings-data-section .section-header p {
    color: #fff;
}

.shootings-map-container {
    background: transparent;
    border: none;
}

.shootings-map-header {
    margin-bottom: 20px;
    text-align: center;

}

.shootings-map-title {
    color: #fff;
}

.shootings-map-subtitle {
    color: #fff;
}

    
    #shootings-map {
        height: 600px;
        border-radius: 10px;
        border: 2px solid var(--primary-teal);
        margin-bottom: 20px;
    }
    
    .map-filters {
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
        border-radius: 15px;
        padding: 25px;
        margin-bottom: 20px;
        box-shadow: 0 8px 25px rgba(69, 169, 208, 0.3);
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        align-items: center;
    }
    
    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-group label {
        color: white;
        font-weight: 600;
        font-size: 0.9em;
    }
    
    .filter-select {
        padding: 10px 15px;
        border: 2px solid var(--primary-teal);
        border-radius: 20px;
        font-size: 0.9em;
        background: var(--light-background);
        color: var(--medium-blue);
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(77, 185, 183, 0.2);
    }
    
    .filter-select:focus {
        outline: none;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(77, 185, 183, 0.4);
        border-color: var(--primary-blue);
    }
    
    .filter-buttons {
        display: flex;
        gap: 10px;
        justify-content: center;
        grid-column: 1 / -1;
    }
    
    .filter-btn {
        background: linear-gradient(45deg, var(--dark-blue), var(--medium-blue));
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 0.9em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(30, 151, 181, 0.3);
    }
    
    .filter-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(30, 151, 181, 0.5);
        background: linear-gradient(45deg, var(--medium-blue), var(--primary-blue));
    }
    
    .clear-btn {
        background: linear-gradient(45deg, #8e44ad, #9b59b6);
        box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
    }
    
    .clear-btn:hover {
        box-shadow: 0 6px 20px rgba(142, 68, 173, 0.5);
        background: linear-gradient(45deg, #9b59b6, #8e44ad);
    }
    
.incident-count {
    background: transparent;
    border: none;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.incident-count-number {
    color: #ef4444;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.incident-count-label {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
    
    .map-legend {
        background: transparent;
        border-radius: 10px;
        padding: 20px;
        border: none;
    }
    
    .legend-title {
        color: var(--medium-blue);
        font-size: 1.1em;
        font-weight: 600;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .legend-items {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8em;
        color: var(--dark-blue);
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 1px solid #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
        .shootings-data-section {
            width: 95%;
            padding: 20px 10px;
        }
        
        .shootings-map-container {
            padding: 20px;
        }
        
        #shootings-map {
            height: 400px;
        }
        
        .map-filters {
            grid-template-columns: 1fr;
            padding: 20px;
        }
        
        .filter-buttons {
            flex-direction: column;
            gap: 8px;
        }
        
        .legend-items {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 480px) {
        .shootings-data-section {
            width: 98%;
            padding: 15px 5px;
        }
        
        .shootings-map-container {
            padding: 15px;
        }
        
        #shootings-map {
            height: 350px;
        }
        
        .legend-items {
            grid-template-columns: 1fr;
        }
    }
    
    /* Custom popup styles */
    .incident-popup {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        min-width: 200px;
    }
    
    .incident-popup h4 {
        margin: 0 0 10px 0;
        color: var(--medium-blue);
        font-weight: 600;
        font-size: 1.1em;
    }
    
    .incident-popup p {
        margin: 4px 0;
        font-size: 0.9em;
        color: var(--dark-blue);
    }
    
    .incident-popup .popup-label {
        font-weight: 600;
        color: var(--primary-teal);
    }


    /* Schools Section Styles */
    /* Schools Section Styles */



/* Schools Section Dark Theme Styles */
.schools-data-section {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main container - dark background */
.schools-container {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-sizing: border-box;
    margin-top: 30px;
}

.schools-header {
    text-align: center;
    margin-bottom: 30px;
}

.schools-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.schools-subtitle {
    color: #d1d5db;
    font-size: 1em;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* School cards - dark background */
.school-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.school-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
    border-color: var(--primary-teal);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.school-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
}

.school-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.school-info {
    flex: 1;
}

.school-name {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.school-level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.school-level-elementary { 
    background: linear-gradient(135deg, #10b981, #059669); 
}
.school-level-middle { 
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); 
}
.school-level-high { 
    background: linear-gradient(135deg, #8b5cf6, #7c3aed); 
}
.school-level-other { 
    background: linear-gradient(135deg, #64748b, #475569); 
}

.school-address {
    color: #d1d5db;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.4;
}

.school-distance {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.85em;
}

/* Score circle adjustments for dark theme */
.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.score-excellent { 
    background: linear-gradient(135deg, #22c55e, #16a34a); 
}
.score-good { 
    background: linear-gradient(135deg, #3b82f6, #2563eb); 
}
.score-fair { 
    background: linear-gradient(135deg, #59ff00, #59ff00); 
}
.score-poor { 
    background: linear-gradient(135deg, #59ff00, #59ff00); 
}

/* Metrics grid - dark background for better contrast */
.school-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.metric-item {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
    border-radius: 8px;
    border: 1px solid rgba(69, 169, 208, 0.3);
    color: white;
}

.metric-value {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 2px;
}

.metric-label {
    font-size: 0.75em;
    color: #fff;
    opacity: 1;
    font-weight: 500;
}

.text-green { color: #4ade80 !important; }
.text-yellow { color: #fbbf24 !important; }
.text-red { color: #f87171 !important; }

/* Risk indicators for dark theme */
.risk-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.risk-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
}

.risk-label {
    color: #d1d5db;
    font-weight: 500;
}

.risk-value {
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.risk-low { 
    background: rgba(34, 197, 94, 0.2); 
    color: #4ade80; 
}
.risk-medium { 
    background: rgba(245, 158, 11, 0.2); 
    color: #fbbf24; 
}
.risk-high { 
    background: rgba(239, 68, 68, 0.2); 
    color: #f87171; 
}

/* Highlights sections for dark theme */
.school-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.highlights-section {
    padding: 10px;
    border-radius: 8px;
}

.strengths-section {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.concerns-section {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.highlights-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: 600;
}

.strengths-section h4 { 
    color: #4ade80; 
}
.concerns-section h4 { 
    color: #f87171; 
}

.highlights-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.highlights-section li {
    font-size: 0.8em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.strengths-section li { 
    color: #86efac; 
}
.concerns-section li { 
    color: #fca5a5; 
}

.strengths-section li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.concerns-section li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: #f87171;
}

/* Action buttons */
.school-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.website-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.phone-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.details-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Stats overview cards - dark theme */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(69, 169, 208, 0.15) 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-teal);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Map container for dark theme */
.map-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.2);
}

.map-header {
    margin-bottom: 20px;
    text-align: center;
}

.map-title {
    color: #fff;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.map-header p {
    color: #d1d5db;
    margin: 0;
}

/* View more button */
.view-more-container {
    text-align: center;
    margin-top: 30px;
}

.view-more-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .schools-grid {
        grid-template-columns: 1fr;
    }

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

    .school-highlights {
        grid-template-columns: 1fr;
    }

    .risk-indicators {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .schools-data-section {
        width: 98%;
        padding: 15px 5px;
    }

    .schools-container {
        padding: 15px;
    }

    .school-card {
        padding: 15px;
    }

    .school-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}






    .ems-data-section {
      width: 90%;
      margin: 40px auto;
      padding: 40px 20px;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  .coverage-alert {
      background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 30px;
      border: 2px solid;
      display: flex;
      align-items: center;
      gap: 20px;
      box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
  }
  
  .alert-icon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5em;
      color: white;
      flex-shrink: 0;
  }
  
.alert-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.alert-content p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.4;
}
  
  .ems-container {
      background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
      border-radius: 15px;
      padding: 30px;
      box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
      border: 2px solid var(--primary-teal);
      box-sizing: border-box;
  }
  
  .ems-header {
      text-align: center;
      margin-bottom: 30px;
  }
  
  .ems-title {
      color: var(--medium-blue);
      font-size: 1.8em;
      margin-bottom: 10px;
      font-weight: 600;
  }
  
  .ems-subtitle {
      color: var(--dark-blue);
      font-size: 1em;
      margin: 0;
  }
  
  .ems-station-card {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 20px;
      box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
      border: 2px solid rgba(69, 169, 208, 0.1);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
  }
  
  .ems-station-card.primary-station {
      border: 3px solid var(--primary-teal);
      box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
  }
  
  .ems-station-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
  }
  
  .ems-station-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
      border-color: var(--primary-teal);
  }
  
  .station-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 20px;
  }
  
  .station-info {
      flex: 1;
  }
  
  .station-name {
      color: var(--medium-blue);
      font-size: 1.4em;
      font-weight: 600;
      margin: 0 0 8px 0;
      line-height: 1.3;
  }
  
  .station-address {
      color: var(--dark-blue);
      font-size: 0.95em;
      margin: 0 0 8px 0;
      line-height: 1.4;
  }
  
  .station-distance {
      color: var(--primary-teal);
      font-weight: 600;
      font-size: 0.9em;
  }
  
  .response-time-circle {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: white;
      margin-left: 20px;
      flex-shrink: 0;
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
  
  .time-value {
      font-size: 1.5em;
      font-weight: bold;
      line-height: 1;
  }
  
  .time-label {
      font-size: 0.8em;
      opacity: 0.9;
  }
  
  .response-breakdown {
      background: rgba(69, 169, 208, 0.1);
      border-radius: 10px;
      padding: 15px;
      margin-bottom: 20px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 15px;
  }
  
  .breakdown-item {
      text-align: center;
  }
  
  .breakdown-label {
      display: block;
      color: var(--dark-blue);
      font-size: 0.85em;
      margin-bottom: 4px;
  }
  
  .breakdown-value {
      color: var(--medium-blue);
      font-weight: 600;
      font-size: 1.1em;
  }
  
  .breakdown-value.highlight {
      color: var(--primary-teal);
      font-size: 1.2em;
  }
  
  .response-category {
      padding: 15px;
      border-radius: 10px;
      border: 2px solid;
      text-align: center;
  }
  
  .response-category strong {
      display: block;
      margin-bottom: 5px;
      font-size: 1.1em;
  }
  
  .response-category p {
      margin: 0;
      font-size: 0.9em;
      opacity: 0.8;
  }
  
  .additional-stations {
      margin-top: 30px;
  }
  
  .additional-stations h4 {
      color: var(--medium-blue);
      font-size: 1.2em;
      margin-bottom: 15px;
      text-align: center;
  }
  
  .stations-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 15px;
  }
  
  .station-mini-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  
  .station-mini-info {
      flex: 1;
  }
  
  .station-mini-name {
      color: var(--medium-blue);
      font-size: 1em;
      margin: 0 0 4px 0;
      font-weight: 600;
  }
  
  .station-mini-address {
      color: var(--dark-blue);
      font-size: 0.85em;
      margin: 0 0 4px 0;
  }
  
  .station-mini-distance {
      color: var(--primary-teal);
      font-size: 0.8em;
      margin: 0;
      font-weight: 600;
  }
  
  .mini-response-time {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 0.9em;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  
  .emergency-tips {
      margin-top: 30px;
      padding: 20px;
      background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(77, 185, 183, 0.1) 100%);
      border-radius: 15px;
      border: 2px solid rgba(69, 169, 208, 0.2);
  }
  
  .emergency-tips h4 {
      color: var(--medium-blue);
      font-size: 1.2em;
      margin-bottom: 20px;
      text-align: center;
  }
  
  .tips-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
  }
  
  .tip-card {
      background: rgba(255, 255, 255, 0.8);
      border-radius: 10px;
      padding: 15px;
      text-align: center;
      border: 1px solid rgba(69, 169, 208, 0.2);
      transition: all 0.3s ease;
  }
  
  .tip-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 15px rgba(69, 169, 208, 0.2);
  }
  
  .tip-icon {
      font-size: 1.5em;
      margin-bottom: 8px;
  }
  
  .tip-card h5 {
      color: var(--medium-blue);
      font-size: 0.95em;
      margin: 0 0 8px 0;
      font-weight: 600;
  }
  
  .tip-card p {
      color: var(--dark-blue);
      font-size: 0.85em;
      margin: 0;
      line-height: 1.4;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
      .ems-data-section {
          width: 95%;
          padding: 20px 10px;
      }
      
      .ems-container {
          padding: 20px;
      }
      
      .station-header {
          flex-direction: column;
          align-items: center;
          text-align: center;
      }
      
      .station-info {
          margin-bottom: 15px;
      }
      
      .response-time-circle {
          margin-left: 0;
      }
      
      .response-breakdown {
          grid-template-columns: 1fr;
          gap: 10px;
      }
      
      .coverage-alert {
          flex-direction: column;
          text-align: center;
      }
      
      .stations-grid {
          grid-template-columns: 1fr;
      }
      
      .tips-grid {
          grid-template-columns: repeat(2, 1fr);
      }
  }
  
  @media (max-width: 480px) {
      .ems-data-section {
          width: 98%;
          padding: 15px 5px;
      }
      
      .ems-container {
          padding: 15px;
      }
      
      .tips-grid {
          grid-template-columns: 1fr;
      }
  }





  /* Chemical Data Section Styles */
.chemical-data-section {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chemical-container {
    background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
    border: 2px solid var(--primary-teal);
    box-sizing: border-box;
    margin-top: 30px;
}

.chemical-header {
    text-align: center;
    margin-bottom: 30px;
}

.chemical-title {
    color: #ffffff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.chemical-subtitle {
    color: #f1f1f1;
    font-size: 1em;
}

.chemical-filters {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(69, 169, 208, 0.3);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--primary-teal);
    border-radius: 20px;
    font-size: 0.9em;
    background: var(--light-background);
    color: var(--medium-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(77, 185, 183, 0.2);
}

.filter-select:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 185, 183, 0.4);
    border-color: var(--primary-blue);
}

.chemical-map-container {
    background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
    margin-bottom: 30px;
    border: 2px solid var(--primary-teal);
    box-sizing: border-box;
}

.chemical-map-header {
    text-align: center;
    margin-bottom: 20px;
}

.chemical-map-title {
    color: #ffffff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

#chemical-map {
    height: 500px;
    border-radius: 10px;
    border: 2px solid var(--primary-teal);
    margin-bottom: 20px;
}

.facility-count {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(69, 169, 208, 0.1);
    text-align: center;
}

.facility-count-number {
    color: var(--medium-blue);
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 5px;
}

.facility-count-label {
    color: var(--dark-blue);
    font-size: 0.9em;
}

.chemical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chemical-facility-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
    border: 2px solid rgba(69, 169, 208, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chemical-facility-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
    border-color: var(--primary-teal);
}

.chemical-facility-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
}

.facility-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.facility-info {
    flex: 1;
}

.facility-name {
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.facility-industry-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
}

.facility-address {
    color: var(--dark-blue);
    font-size: 0.9em;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.facility-distance {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.85em;
}

.risk-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.score-value {
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 0.7em;
    opacity: 0.9;
    text-align: center;
}

.risk-excellent { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.risk-good { 
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
}
.risk-fair { 
    background: linear-gradient(135deg, #f59e0b 0%, #a2f104 100%);
}
.risk-poor { 
    background: linear-gradient(135deg, #ef4444 0%, #a2f104 100%);
}

.risk-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 15px;
}

.risk-low { 
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    color: #15803d;
    border: 2px solid rgba(34, 197, 94, 0.3);
}
.risk-medium { 
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: #b45309;
    border: 2px solid rgba(245, 158, 11, 0.3);
}
.risk-high { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #b91c1c;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.chemical-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.chemical-score-item {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    color: white;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
    transition: all 0.3s ease;
}

.chemical-score-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.4);
}

.chemical-score-value {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 4px;
}

.chemical-score-label {
    font-size: 0.75em;
    opacity: 0.9;
}

.facility-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-section {
    padding: 12px;
    border-radius: 8px;
}

.strengths-section {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.concerns-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.detail-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: 600;
}

.strengths-section h4 { color: #15803d; }
.concerns-section h4 { color: #b91c1c; }

.detail-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.detail-section li {
    font-size: 0.8em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.strengths-section li { color: #166534; }
.concerns-section li { color: #991b1b; }

.strengths-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.concerns-section li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: #ef4444;
}

.facility-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.facility-action-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.facility-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.5);
    color: white;
    text-decoration: none;
}

.chemical-legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(69, 169, 208, 0.1);
}

.legend-title {
    color: var(--medium-blue);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: var(--dark-blue);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chemical-data-section {
        width: 95%;
        padding: 20px 10px;
    }
    
    .chemical-container,
    .chemical-map-container {
        padding: 20px;
    }
    
    .chemical-grid {
        grid-template-columns: 1fr;
    }
    
    .facility-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .facility-info {
        margin-bottom: 15px;
    }
    
    .risk-score-circle {
        margin-left: 0;
    }
    
    .facility-details {
        grid-template-columns: 1fr;
    }
    
    .chemical-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    
    #chemical-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .chemical-data-section {
        width: 98%;
        padding: 15px 5px;
    }
    
    .chemical-container,
    .chemical-map-container {
        padding: 15px;
    }
    
    .chemical-facility-card {
        padding: 15px;
    }
    
    .facility-actions {
        flex-direction: column;
    }
    
    .facility-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    #chemical-map {
        height: 350px;
    }
}



.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-teal);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--very-light-blue);
}

.search-result-gang {
    font-weight: 600;
    color: var(--medium-blue);
}

.search-result-city {
    font-size: 0.9em;
    color: var(--dark-blue);
}

.filter-group {
    position: relative;
}






/* Gang Activity Section Styles */

#gang-map {
    height: 500px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid var(--primary-teal);
    margin-bottom: 20px;
}

/* MapLibre specific styles */
.maplibregl-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.maplibregl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.gang-data-section {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.safety-alert {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
}

.alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
    flex-shrink: 0;
}

.alert-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.alert-content p {
    margin: 0;
    color: var(--dark-blue);
    line-height: 1.4;
}

.gang-container {
    background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
    border: 2px solid var(--primary-teal);
    box-sizing: border-box;
    margin-top: 30px;
}

.gang-header {
    text-align: center;
    margin-bottom: 30px;
}

.gang-title {
    color: var(--medium-blue);
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.gang-subtitle {
    color: var(--dark-blue);
    font-size: 1em;
}

.gang-filters {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(69, 169, 208, 0.3);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--primary-teal);
    border-radius: 20px;
    font-size: 0.9em;
    background: var(--light-background);
    color: var(--medium-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(77, 185, 183, 0.2);
}

.filter-select:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 185, 183, 0.4);
    border-color: var(--primary-blue);
}

.filter-btn {
    background: linear-gradient(45deg, var(--dark-blue), var(--medium-blue));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 151, 181, 0.3);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 151, 181, 0.5);
    background: linear-gradient(45deg, var(--medium-blue), var(--primary-blue));
}

.clear-btn {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

.clear-btn:hover {
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.5);
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.gang-map-container {
    background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
    margin-bottom: 30px;
    border: 2px solid var(--primary-teal);
    box-sizing: border-box;
}

.gang-map-header {
    text-align: center;
    margin-bottom: 20px;
}

.gang-map-title {
    color: var(--medium-blue);
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

#gang-map {
    height: 500px;
    border-radius: 10px;
    border: 2px solid var(--primary-teal);
    margin-bottom: 20px;
}

.territory-count {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(69, 169, 208, 0.1);
    text-align: center;
}

.territory-count-number {
    color: var(--medium-blue);
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 5px;
}

.territory-count-label {
    color: var(--dark-blue);
    font-size: 0.9em;
}

.gang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gang-territory-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
    border: 2px solid rgba(69, 169, 208, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gang-territory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
    border-color: var(--primary-teal);
}

.gang-territory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.territory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.territory-info {
    flex: 1;
}

.territory-name {
    color: var(--medium-blue);
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.territory-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.territory-area {
    color: var(--dark-blue);
    font-size: 0.9em;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.territory-distance {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.85em;
}

.territory-risk-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.risk-value {
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1;
}

.risk-label {
    font-size: 0.7em;
    opacity: 0.9;
    text-align: center;
}

.risk-excellent { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.risk-good { 
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
}
.risk-fair { 
    background: linear-gradient(135deg, #f59e0b 0%, #c8ff00 100%);
}
.risk-poor { 
    background: linear-gradient(135deg, #ef4444 0%, #c8ff00 100%);
}

.territory-details {
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.detail-section h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: 600;
    color: #b91c1c;
}

.territory-details ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.territory-details li {
    color: #991b1b;
    font-size: 0.9em;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.territory-details li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    font-size: 0.8em;
}

.safety-recommendations {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.safety-recommendations h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    font-weight: 600;
    color: #15803d;
    text-align: center;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #166534;
    font-size: 0.85em;
    padding: 5px;
}

.rec-icon {
    font-size: 1.1em;
}

.gang-legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(69, 169, 208, 0.1);
}

.legend-title {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: var(--dark-blue);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.view-more-container {
    text-align: center;
    margin-top: 30px;
}

.view-more-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.5);
}

.error-container {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
    color: var(--medium-blue);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--primary-blue);
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
}

.no-results {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--primary-teal);
    box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
}

.no-results h3 {
    color: var(--medium-blue);
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-results p {
    color: var(--dark-blue);
    font-size: 1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gang-data-section {
        width: 95%;
        padding: 20px 10px;
    }
    
    .gang-container,
    .gang-map-container {
        padding: 20px;
    }
    
    .gang-grid {
        grid-template-columns: 1fr;
    }
    
    .territory-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .territory-info {
        margin-bottom: 15px;
    }
    
    .territory-risk-circle {
        margin-left: 0;
    }
    
    .gang-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    
    #gang-map {
        height: 400px;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gang-data-section {
        width: 98%;
        padding: 15px 5px;
    }
    
    .gang-container,
    .gang-map-container {
        padding: 15px;
    }
    
    .gang-territory-card {
        padding: 15px;
    }
    
    #gang-map {
        height: 350px;
    }
}


.location-risk-card {
    animation: fadeIn 0.6s ease-out;
}

.risk-score-display {
    text-align: center;
}

@media (max-width: 768px) {
    .location-risk-card > div {
        flex-direction: column;
        gap: 20px;
    }
    
    .risk-factors {
        min-width: auto !important;
        width: 100%;
    }
}

/* Animation for territory cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gang-territory-card {
    animation: fadeIn 0.6s ease-out;
}

/* AQI Progress Bar Visualization */
.aqi-progress-container {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 30px;
}

.aqi-progress-header {
    text-align: center;
    margin-bottom: 30px;
}

.aqi-progress-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.aqi-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.aqi-bar-container {
    width: 100%;
    height: 60px;
    background: linear-gradient(to right, 
        #22c55e 0% 10%, 
        #f59e0b 10% 20%, 
        #f97316 20% 30%, 
        #ef4444 30% 40%, 
        #7c2d12 40% 60%, 
        #4c1d95 60% 100%);
    border-radius: 30px;
    position: relative;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.aqi-indicator {
    position: absolute;
    top: -45px;
    width: 80px;
    transform: translateX(-50%);
    z-index: 10;
    transition: left 0.5s ease;
}

.aqi-indicator-bubble {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
}

.aqi-indicator-arrow {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid white;
    margin: -3px auto 0 auto;
}

.aqi-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: white;

}

.aqi-value-display {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.aqi-current-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.aqi-current-level {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.aqi-current-description {
    font-size: 0.9em;
    color: #d1d5db;
}

/* Alternative: Simple Color-coded Card */
.aqi-card-simple {
    padding: 30px;
    border-radius: 15px;
    color: white;
    text-align: center;
    max-width: 350px;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.aqi-card-value {
    font-size: 3.5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.aqi-card-level {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.aqi-card-description {
    font-size: 0.95em;
    opacity: 0.9;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .aqi-bar-container {
        height: 50px;
    }
    
    
    .aqi-card-value {
        font-size: 2.8em;
    }
    
    .aqi-labels {
        font-size: 10px;
    }
}

/* Air Quality Section Styles - Add this to your main <style> section */
.air-quality-data-section {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
    
  .air-quality-alert {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

    

.air-quality-map-container {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 30px;
}
    
    .air-quality-map-header {
        text-align: center;
        margin-bottom: 20px;
            color: #d1d5db;

    }
    
   .air-quality-map-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}
    
    .county-count {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
        border-radius: 10px;
        padding: 15px 20px;
        margin-bottom: 20px;
        border: 2px solid rgba(69, 169, 208, 0.1);
        text-align: center;
    }
    
    .county-count-number {
        color: var(--medium-blue);
        font-size: 1.4em;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .county-count-label {
        color: #d1d5db;
        font-size: 0.9em;
    }
    
    #air-quality-map {
        height: 500px;
        border-radius: 10px;
        border: 2px solid var(--primary-teal);
        margin-bottom: 20px;
    }
    
    .trend-analysis {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        border: 2px solid rgba(69, 169, 208, 0.1);
    }
    
    .trend-analysis-header h4 {
        color: var(--medium-blue);
        font-size: 1.1em;
        font-weight: 600;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .trend-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .trend-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        border-radius: 8px;
        background: rgba(69, 169, 208, 0.1);
    }
    
    .trend-positive {
        background: rgba(34, 197, 94, 0.1);
        border: 1px solid rgba(34, 197, 94, 0.2);
    }
    
    .trend-negative {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.2);
    }
    
    .trend-neutral {
        background: rgba(156, 163, 175, 0.1);
        border: 1px solid rgba(156, 163, 175, 0.2);
    }
    
    .trend-icon {
        font-size: 1.2em;
    }
    
    .trend-text {
        font-size: 0.9em;
        color: var(--dark-blue);
    }
    
.air-quality-legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}
    
.air-quality-container {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-sizing: border-box;
}

    
    .air-quality-header {
        text-align: center;
        margin-bottom: 30px;
        
    }
    
    .air-quality-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.air-quality-subtitle {
    color: #d1d5db;
    font-size: 1em;
}
    .air-quality-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .county-card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
        border-radius: 15px;
        padding: 25px;
        box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
        border: 2px solid rgba(69, 169, 208, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .county-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
        border-color: var(--primary-teal);
    }
    
    .county-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
    }
    
    .county-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 15px;
    }
    
    .county-info {
        flex: 1;
    }
    
    .county-name {
        color: var(--medium-blue);
        font-size: 1.2em;
        font-weight: 600;
        margin: 0 0 8px 0;
        line-height: 1.3;
    }
    
    .county-year-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 0.75em;
        font-weight: 600;
        color: white;
        margin-bottom: 8px;
        background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    }
    
    .county-distance {
        color: var(--primary-teal);
        font-weight: 600;
        font-size: 0.85em;
    }
    
    .aqi-score-circle {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
        margin-left: 20px;
        flex-shrink: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }




    .stat-card.excellent-air {
    border-color: #45a9d0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(69, 169, 208, 0.3) 100%);
}

.stat-card.good-air {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.3) 100%);
}

.stat-card.fair-air {
    border-color: #84cc16;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(245, 158, 11, 0.3) 100%);
}

.stat-card.poor-air {
    border-color: #ef8844ff;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(239, 68, 68, 0.3) 100%);
}
    
   .aqi-excellent { 
    background: linear-gradient(135deg, #22c55e 0%, #45a9d0 100%);
}




/* Good (51-100): Pure Green */
.aqi-good { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Fair (101-150): Yellow with shade of Green */
.aqi-fair { 
    background: linear-gradient(135deg, #f59e0b 0%, #84cc16 100%);
}

/* Poor (151+): Red */
.aqi-poor { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
    
    .aqi-level-badge {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.9em;
        font-weight: 600;
        margin-bottom: 15px;
    }
    
    .aqi-level-good { 
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
        color: #15803d;
        border: 2px solid rgba(34, 197, 94, 0.3);
    }
    .aqi-level-moderate { 
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
        color: #b45309;
        border: 2px solid rgba(245, 158, 11, 0.3);
    }
    .aqi-level-unhealthy-sensitive { 
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.2) 100%);
        color: #c2410c;
        border: 2px solid rgba(249, 115, 22, 0.3);
    }
    .aqi-level-unhealthy { 
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
        color: #b91c1c;
        border: 2px solid rgba(239, 68, 68, 0.3);
    }
    
    .county-metrics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .county-assessment {
        background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(77, 185, 183, 0.1) 100%);
        border-radius: 10px;
        padding: 15px;
        border: 1px solid rgba(69, 169, 208, 0.2);
    }
    
    .assessment-section h4 {
        color: var(--medium-blue);
        font-size: 1em;
        font-weight: 600;
        margin: 0 0 10px 0;
    }
    
    .assessment-section ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .assessment-section li {
        color: var(--dark-blue);
        font-size: 0.9em;
        margin-bottom: 5px;
        padding-left: 15px;
        position: relative;
    }
    
    .assessment-section li::before {
        content: '•';
        position: absolute;
        left: 0;
        color: var(--primary-teal);
        font-weight: bold;
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
        .air-quality-data-section {
            width: 95%;
            padding: 20px 10px;
        }
        
        .air-quality-container,
        .air-quality-map-container {
            padding: 20px;
        }
        
        .air-quality-grid {
            grid-template-columns: 1fr;
        }
        
        .county-header {
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        
        .county-info {
            margin-bottom: 15px;
        }
        
        .aqi-score-circle {
            margin-left: 0;
        }
        
        .county-metrics-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        
        #air-quality-map {
            height: 400px;
        }
    }
    
    @media (max-width: 480px) {
        .air-quality-data-section {
            width: 98%;
            padding: 15px 5px;
        }
        
        .air-quality-container,
        .air-quality-map-container {
            padding: 15px;
        }
        
        .county-card {
            padding: 15px;
        }
        
        .county-metrics-grid {
            grid-template-columns: 1fr;
        }
        
        #air-quality-map {
            height: 350px;
        }
    }

.enhanced-trend-analysis {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
    
    .trend-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        margin-bottom: 20px;
    }
    
   .trend-main-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
    .trend-icon {
        font-size: 1.5em;
    }
    
    .trend-details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 20px;
    }
    
.trend-stat-card {
    background: rgba(69, 169, 208, 0.15);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.trend-stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.trend-stat-label {
    font-size: 0.9em;
    color: #d1d5db;
}
    
    .trend-positive {
        color: #22c55e;
    }
    
    .trend-negative {
        color: #ef4444;
    }
    
    .trend-neutral {
        color: #45a9d0;
    }
    
.yearly-progression {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}
    
    .yearly-progression h5 {
        color: var(--medium-blue);
        margin-bottom: 10px;
        text-align: center;
    }
    
    .years-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 5px 0;
    }
    
    .year-item {
        flex-shrink: 0;
        background: white;
        border-radius: 8px;
        padding: 10px 12px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        min-width: 80px;
    }
    
    .year-number {
        font-weight: bold;
        color: var(--medium-blue);
        font-size: 0.9em;
    }
    
    .year-aqi {
        font-size: 1.1em;
        font-weight: bold;
        margin: 2px 0;
    }
    
    .year-good-days {
        font-size: 0.8em;
        color: var(--dark-blue);
    }
    
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .trend-details-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .trend-main-indicator {
            flex-direction: column;
            text-align: center;
            padding: 10px 15px;
            font-size: 1em;
        }
    }









    .crime-insights-section {
        width: 90%;
        margin: 40px auto;
        padding: 40px 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    
    .crime-loading {
        text-align: center;
        padding: 60px;
        background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-background) 100%);
        border-radius: 15px;
        border: 2px solid var(--primary-teal);
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 4px solid var(--light-background);
        border-top: 4px solid var(--primary-blue);
        border-radius: 50%;
        margin: 0 auto 20px;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .crime-error {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        color: #991b1b;
        padding: 30px;
        border-radius: 15px;
        text-align: center;
        border: 2px solid #ef4444;
        font-weight: 600;
    }
    
    .crime-overview-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .overview-card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
        border-radius: 15px;
        padding: 25px;
        box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
        border: 2px solid rgba(69, 169, 208, 0.1);
        display: flex;
        align-items: center;
        gap: 20px;
        transition: all 0.3s ease;
    }
    
    .overview-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
    }
    
    .overview-icon {
        font-size: 2.5em;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
        border-radius: 12px;
    }
    
    .overview-content h3 {
        margin: 0;
        color: var(--medium-blue);
        font-size: 1.4em;
        font-weight: 600;
    }
    
    .overview-content p {
        margin: 5px 0 0 0;
        color: var(--dark-blue);
        font-size: 0.9em;
    }
    
    .crime-trend-card {
        background: linear-gradient(135deg, var(--light-background) 0%, var(--very-light-blue) 100%);
        border-radius: 15px;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(69, 169, 208, 0.2);
        border: 2px solid var(--primary-teal);
        margin-bottom: 30px;
    }
    
    .trend-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
    }
    
    .trend-header h3 {
        margin: 0;
        color: var(--medium-blue);
        font-size: 1.6em;
    }
    
    .trend-badge {
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 600;
        font-size: 0.9em;
    }
    
    .trend-badge.increasing {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        color: #991b1b;
        border: 2px solid #ef4444;
    }
    
    .trend-badge.decreasing {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border: 2px solid #22c55e;
    }
    
    .trend-badge.stable {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
        color: #1e40af;
        border: 2px solid #3b82f6;
    }
    
    .trend-content {
        display: flex;
        align-items: center;
        justify-content: space-around;
        margin-bottom: 25px;
    }
    
    .trend-metric {
        text-align: center;
    }
    
    .metric-value {
        font-size: 2.2em;
        font-weight: bold;
        color: var(--medium-blue);
        margin-bottom: 5px;
    }
    
    .metric-label {
        color: #ffffff;
        font-size: 0.9em;
    }
    
    .trend-arrow {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 30px;
    }
    
    .arrow-icon {
        font-size: 2.5em;
        font-weight: bold;
    }
    
    .arrow-icon.up {
        color: #ef4444;
        transform: rotate(-45deg);
    }
    
    .arrow-icon.down {
        color: #22c55e;
        transform: rotate(45deg);
    }
    
    .arrow-icon.stable {
        color: #3b82f6;
    }
    
    .change-percent {
        font-size: 1.4em;
        font-weight: bold;
        margin-top: 5px;
    }
    
    .trend-summary {
        padding: 20px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 10px;
        border: 1px solid rgba(69, 169, 208, 0.2);
        color: var(--dark-blue);
        line-height: 1.6;
    }
    
    .crime-categories-container {
        margin-bottom: 30px;
    }
    
    .categories-title {
        color: var(--medium-blue);
        font-size: 1.6em;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .crime-categories-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .category-card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
        border-radius: 15px;
        padding: 25px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        border: 2px solid;
        transition: all 0.3s ease;
    }
    
    .category-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    }
    
    .violent-crimes {
        border-color: #ef444433;
        background: linear-gradient(135deg, #fee2e2 0%, rgba(255, 255, 255, 0.9) 100%);
    }
    
    .property-crimes {
        border-color: #f59e0b33;
        background: linear-gradient(135deg, #fef3c7 0%, rgba(255, 255, 255, 0.9) 100%);
    }
    
    .society-crimes {
        border-color: #3b82f633;
        background: linear-gradient(135deg, #dbeafe 0%, rgba(255, 255, 255, 0.9) 100%);
    }
    
    .category-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .category-icon {
        font-size: 1.5em;
    }
    
    .category-header h4 {
        margin: 0;
        color: var(--medium-blue);
        font-size: 1.2em;
    }
    
    .category-value {
        font-size: 2em;
        font-weight: bold;
        color: var(--medium-blue);
        margin-bottom: 10px;
    }
    
    .category-change {
        font-size: 1.1em;
        font-weight: 600;
        margin-bottom: 20px;
    }
    
    .category-change.increase {
        color: #ef4444;
    }
    
    .category-change.decrease {
        color: #22c55e;
    }
    
    .category-details {
        padding-top: 15px;
        border-top: 1px solid rgba(69, 169, 208, 0.2);
    }
    
    .detail-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        color: var(--dark-blue);
        font-size: 0.9em;
    }
    
    .detail-item span:last-child {
        font-weight: 600;
        color: var(--medium-blue);
    }
    
    .year-comparison-container {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
        border-radius: 15px;
        padding: 30px;
        box-shadow: 0 8px 25px rgba(69, 169, 208, 0.2);
        border: 2px solid rgba(69, 169, 208, 0.1);
        margin-bottom: 30px;
    }
    
    .comparison-title {
        color: var(--medium-blue);
        font-size: 1.4em;
        margin-bottom: 25px;
        text-align: center;
    }
    
    .year-bars {
        display: flex;
        align-items: flex-end;
        justify-content: space-around;
        height: 200px;
        padding: 20px 0;
        border-bottom: 2px solid var(--primary-teal);
    }
    
    .year-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        max-width: 100px;
    }
    
    .bar {
        width: 60px;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
        border-radius: 5px 5px 0 0;
        position: relative;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .bar:hover {
        transform: scaleY(1.05);
        box-shadow: 0 -5px 15px rgba(69, 169, 208, 0.3);
    }
    
    .bar-value {
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-weight: bold;
        color: var(--medium-blue);
        font-size: 0.9em;
    }
    
    .bar-year {
        margin-top: 10px;
        color: var(--dark-blue);
        font-weight: 600;
    }
    
    .safety-assessment-card {
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
        border-radius: 15px;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(69, 169, 208, 0.3);
        color: white;
    }
    
    .assessment-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
    }
    
    .assessment-header h3 {
        margin: 0;
        font-size: 1.6em;
    }
    
    .safety-score {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        border: 3px solid white;
    }
    
    .score-value {
        font-size: 2em;
    }
    
    .score-label {
        font-size: 0.8em;
        opacity: 0.8;
    }
    
    .assessment-content {
        margin-bottom: 25px;
        line-height: 1.6;
        font-size: 1.05em;
    }
    
    .assessment-factors {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .factor-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    
    .factor-icon {
        font-size: 1.2em;
    }
    
    .factor-text {
        font-size: 0.9em;
    }

    
    /* Responsive Design */
    @media (max-width: 768px) {
        .crime-insights-section {
            width: 95%;
            padding: 20px 10px;
        }
        
        .crime-overview-grid {
            grid-template-columns: 1fr;
        }
        
        .trend-content {
            flex-direction: column;
            gap: 20px;
        }
        
        .trend-arrow {
            transform: rotate(90deg);
            padding: 20px 0;
        }
        
        .crime-categories-grid {
            grid-template-columns: 1fr;
        }
        
        .year-bars {
            overflow-x: auto;
            padding-bottom: 10px;
        }
        
        .assessment-header {
            flex-direction: column;
            gap: 20px;
            text-align: center;
        }
    }












    /* Updated Main Trend Card Styles */
.crime-trend-card {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trend-header h3 {
    font-size: 1.4em;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

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

.comparison-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.comparison-btn.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: transparent;
    color: #fff;
}

/* Comparison Stats Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.comparison-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.comparison-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #4f46e5, #7c3aed);
}

.comparison-card.safer::before {
    background: linear-gradient(to bottom, #10b981, #059669);
}

.comparison-card.less-safe::before {
    background: linear-gradient(to bottom, #ef4444, #dc2626);
}

.comparison-title {
    font-size: 0.95em;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rate-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.rate-value {
    font-size: 2.2em;
    font-weight: 700;
    color: #fff;
}

.rate-label {
    font-size: 0.9em;
    color: #fff;
}

.comparison-bar {
    position: relative;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.bar-city {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    z-index: 3;
}

.bar-state {
    background: rgba(251, 191, 36, 0.7);
    z-index: 2;
}

.bar-national {
    background: rgba(156, 163, 175, 0.5);
    z-index: 1;
}

.bar-label {
    font-size: 0.85em;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.comparison-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.city {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.legend-dot.state {
    background: #fbbf24;
}

.legend-dot.national {
    background: #9ca3af;
}

.legend-text {
    font-size: 0.85em;
    color: #fff;
}

/* Difference Indicators */
.difference-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 10px;
}

.difference-badge.better {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.difference-badge.worse {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.difference-badge.similar {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Summary Section */
.crime-summary {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.summary-text {
    color: #e5e7eb;
    line-height: 1.6;
    font-size: 1.05em;
}

.summary-highlight {
    font-weight: 600;
    color: #fff;
}

/* Loading State */
.comparison-loading {
    text-align: center;
    padding: 40px;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-selector {
        flex-direction: column;
        width: 100%;
    }
    
    .comparison-btn {
        width: 100%;
    }
}



    .crime-menu-section {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.crime-menu-header {
    margin-bottom: 20px;
}

.crime-menu-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
}

/* Crime Type Dropdown Menu */
.crime-type-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.crime-type-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
}

.crime-type-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.crime-type-button.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Crime Trend Display */
.crime-trend-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 120px;
}

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

.trend-crime-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #fff;
}

.trend-badge-large {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1em;
}

.trend-badge-large.up {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.trend-badge-large.down {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.trend-badge-large.stable {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

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

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

.trend-stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
}

.trend-stat-label {
    font-size: 0.85em;
    color: #fff;
    margin-top: 5px;
}

/* Top 5 Crimes Section */
.top-crimes-section {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.top-crimes-header {
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-crimes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crime-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.crime-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.crime-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crime-rank {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1em;
}

.crime-rank.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.crime-rank.silver {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.crime-rank.bronze {
    background: linear-gradient(135deg, #a16207, #92400e);
}

.crime-info {
    display: flex;
    flex-direction: column;
}

.crime-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.05em;
}

.crime-count {
    font-size: 0.9em;
    color: #fff;
}

.crime-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crime-percentage {
    font-size: 0.9em;
    color: #fff;
}

.crime-trend-mini {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.crime-trend-mini.up {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.crime-trend-mini.down {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}



/* Safety Score Box Styles */
.safety-ruler-box {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.safety-ruler-header {
    text-align: center;
    margin-bottom: 30px;
}

.safety-ruler-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.safety-ruler-subtitle {
    color: #fff;
    font-size: 1em;
}

/* The Ruler/Gauge */
.safety-ruler-container {
    position: relative;
    margin: 40px 0;
}

.safety-ruler {
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(to right, 
        #f59e0b 0%,      /* Orange - Dangerous */
        #f5c842 25%,     /* Yellow - Below Average */
        #22c55e 50%,     /* Green - Average */
        #34b797 75%,     /* Greenish Blue - Safe */
        #45a9d0 100%     /* Brand Teal - Very Safe */
    );
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Score Marker */
.safety-marker {
    position: absolute;
    top: -25px;
    transform: translateX(-50%);
    transition: left 1.5s ease-out;
}

.safety-marker-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #fff;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.safety-marker-score {
    background: #fff;
    color: #1e1e2e;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* Labels under the ruler */
.safety-ruler-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 10px;
}

.safety-label {
    font-size: 0.85em;
    color: #fff;
    text-align: center;
}

/* Details section */
.safety-details {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.safety-detail-item {
    text-align: center;
}

.safety-detail-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.safety-detail-label {
    font-size: 0.85em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}







.hospital-insights-section {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    padding: 40px 20px;
    margin: 40px auto;
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hospital-insights-section .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.hospital-insights-section .section-header h2 {
    color: #fff;
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.hospital-insights-section .section-header p {
    color: #fff;
    font-size: 1em;
}

/* Stats Container */
.hospital-insights-section .stats-container {
    margin-bottom: 30px;
}

.hospital-insights-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hospital-insights-section .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.hospital-insights-section .stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.hospital-insights-section .stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #45a9d0;
    margin-bottom: 5px;
}

.hospital-insights-section .stat-label {
    color: #fff;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hospital Cards */
.hospital-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hospital-dark-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.hospital-dark-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(69, 169, 208, 0.3);
}

.hospital-dark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hospital-info-section {
    flex: 1;
}

.hospital-dark-name {
    color: #fff;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
}

.hospital-location {
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.hospital-distance-badge {
    display: inline-block;
    background: rgba(69, 169, 208, 0.2);
    color: #45a9d0;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    margin-top: 10px;
}

/* Score Display */
.hospital-score-display {
    display: flex;
    align-items: center;
}

.score-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.score-ring .score-value {
    font-size: 1.8em;
    color: #fff;
}

.score-ring .score-label {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.score-excellent {
    background: linear-gradient(135deg, #45a9d0 0%, #1e97b5 100%);
}

.score-good {
    background: linear-gradient(135deg, #45a9d0 0%, #1e97b5 100%);
}

.score-fair {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
}
.score-poor {
    background: linear-gradient(135deg, #f59e0b 0%, #a2f104 100%);
}
/* Metrics Grid */
.hospital-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-value {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-good {
    color: #45a9d0;  /* Brand blue for 7+ */
}

.metric-fair {
    color: #22c55e;  /* Light green for 4-6 */
}

.metric-poor {
    color: #f59e0b;  /* Orange for below 4 */
}

.metric-name {
    color: #fff;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Insights Section */
.hospital-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.insight-column {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-column h4 {
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 10px;
    font-weight: 600;
}

.strengths-column {
    border-color: rgba(69, 169, 208, 0.3);  /* Brand blue border */
    background: rgba(69, 169, 208, 0.05);   /* Brand blue background */
}

.strengths-column h4 {
    color: #45a9d0;  /* Brand blue */
}

.strengths-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strengths-column li {
    color: #fff;
    font-size: 0.9em;
    padding: 5px 0;
    border-bottom: 1px solid rgba(69, 169, 208, 0.1);  /* Brand blue */
}

.strengths-column li:last-child {
    border-bottom: none;
}

.concerns-column {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.concerns-column h4 {
    color: #f59e0b;
}

.concerns-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.concerns-column li {
    color: #fff;
    font-size: 0.9em;
    padding: 5px 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.concerns-column li:last-child {
    border-bottom: none;
}

/* No Data Notice */
.no-data-notice {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.no-data-notice p {
    color: #fff;
    margin: 0;
    font-size: 0.95em;
}

/* Details Button */
.hospital-details-btn {
    display: inline-block;
    background: linear-gradient(135deg, #45a9d0 0%, #1e97b5 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.hospital-details-btn:hover {
    background: linear-gradient(135deg, #1e97b5 0%, #45a9d0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(69, 169, 208, 0.3);
}

/* Error and No Results States */
.hospital-error-container,
.no-hospitals-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

.hospital-error-container h3,
.no-hospitals-container h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.hospital-error-container p,
.no-hospitals-container p {
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.error-subtitle,
.no-results-subtitle {
    font-size: 0.85em !important;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hospital-dark-header {
        flex-direction: column;
    }
    
    .hospital-score-display {
        margin-top: 15px;
    }
    
    .hospital-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hospital-insights {
        grid-template-columns: 1fr;
    }
    
    .hospital-insights-section .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}





.yearly-progression-chart {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(69, 169, 208, 0.2);
}

.yearly-progression-chart h5 {
    color: white;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

#airQualityTrendChart {
    max-height: 300px !important;
}

/* AQI Zone Chart */
.aqi-zone-chart-container {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95) 0%, rgba(25, 25, 40, 0.95) 100%);
    border-radius: 16px;
    padding: 28px 24px 20px;
    margin-top: 24px;
    border: 1px solid rgba(69, 169, 208, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.aqi-zone-chart-title {
    color: #ffffff;
    text-align: center;
    margin: 0 0 4px 0;
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.aqi-zone-chart-subtitle {
    color: #6b7280;
    text-align: center;
    margin: 0 0 22px 0;
    font-size: 0.85em;
    font-weight: 400;
}

.aqi-zone-chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

.aqi-zone-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.aqi-zone-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 0.78em;
    font-weight: 500;
}

.aqi-zone-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .aqi-zone-chart-wrapper {
        height: 260px;
    }
    
    .aqi-zone-chart-container {
        padding: 20px 14px 16px;
    }
    
    .aqi-zone-legend {
        gap: 10px;
    }
    
    .aqi-zone-legend-item {
        font-size: 0.72em;
    }
}

@media (max-width: 480px) {
    .aqi-zone-chart-wrapper {
        height: 220px;
    }
    
    .aqi-zone-legend {
        gap: 6px 12px;
    }
}












.gang-data-section-dark {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}

.safety-alert-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.safety-alert-dark .alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
    flex-shrink: 0;
}

.safety-alert-dark .alert-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #45a9d0;
}

.safety-alert-dark .alert-content p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.4;
}

.gang-map-container-dark {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(42, 42, 62, 0.95) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-sizing: border-box;
    margin-top: 30px;
}

.gang-map-container-dark .gang-map-header {
    text-align: center;
    margin-bottom: 20px;
}

.gang-map-container-dark .gang-map-title {
    color: #45a9d0;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.gang-map-container-dark #gang-map {
    height: 500px;
    border-radius: 10px;
    border: 2px solid rgba(69, 169, 208, 0.4);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.territory-count-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.9) 0%, rgba(30, 30, 46, 0.9) 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
    text-align: center;
}

.territory-count-dark .territory-count-number {
    color: #45a9d0;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 5px;
}

.territory-count-dark .territory-count-label {
    color: #9ca3af;
    font-size: 0.9em;
}

.error-container-dark,
.no-results-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    color: #d1d5db;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.error-container-dark h3,
.no-results-dark h3 {
    color: #45a9d0;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

.error-container-dark p,
.no-results-dark p {
    color: #d1d5db;
    font-size: 1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gang-data-section-dark {
        width: 95%;
        padding: 20px 10px;
    }
    
    .gang-map-container-dark {
        padding: 20px;
    }
    
    .location-risk-card-dark > div {
        flex-direction: column;
        gap: 20px;
    }
    
    .risk-factors-dark {
        min-width: auto !important;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gang-data-section-dark {
        width: 98%;
        padding: 15px 5px;
    }
    
    .gang-map-container-dark {
        padding: 15px;
    }
    
    #gang-map {
        height: 350px;
    }
}

/* Animation for dark theme */
@keyframes fadeInDark {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.location-risk-card-dark {
    animation: fadeInDark 0.6s ease-out;
}











.facility-safety-message,
.facility-moderate-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.5s ease-in;
}

.facility-safety-message {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.facility-moderate-message {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.1) 0%, rgba(69, 169, 208, 0.05) 100%);
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.safety-icon,
.moderate-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.safety-icon {
    background: #22c55e;
    color: white;
}

.moderate-icon {
    background: #45a9d0;
    color: white;
}

.facility-safety-message p,
.facility-moderate-message p {
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.facility-safety-message p {
    color: #15803d;
}

.facility-moderate-message p {
    color: var(--medium-blue);
}

/* Update grid to be 2x2 instead of 5 items */
.chemical-scores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

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

/* Responsive adjustment for small screens */
@media (max-width: 480px) {
    .chemical-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facility-safety-message,
    .facility-moderate-message {
        flex-direction: column;
        text-align: center;
    }
}



.chemical-data-section-dark {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}

.section-header-dark {
    text-align: center;
    margin-bottom: 40px;
}

.section-header-dark h2 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-header-dark p {
    color: #9ca3af;
    font-size: 1.1em;
}

/* Stats Container Dark */
.stats-container-dark {
    margin-bottom: 30px;
}

.stat-card-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.9) 0%, rgba(30, 30, 46, 0.9) 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
}

.stat-card-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-color: #45a9d0;
}

.stat-card-dark .stat-number {
    color: #45a9d0;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-card-dark .stat-label {
    color: #9ca3af;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-dark.stat-good .stat-number {
    color: #22c55e;
}

.stat-card-dark.stat-concern .stat-number {
    color: #f59e0b;
}

/* Map Container Dark */
.chemical-map-container-dark {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(42, 42, 62, 0.95) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 30px;
}

.chemical-map-container-dark .chemical-map-title {
    color: #ffffff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.facility-count-dark {
    background: rgba(42, 42, 62, 0.8);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
    text-align: center;
}

.facility-count-dark .facility-count-number {
    color: #45a9d0;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 5px;
}

.facility-count-dark .facility-count-label {
    color: #9ca3af;
    font-size: 0.9em;
}

/* Filters Dark */
.chemical-filters-dark {
    background: rgba(69, 169, 208, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.chemical-filters-dark .filter-group label {
    color: #d1d5db;
    font-weight: 600;
    font-size: 0.9em;
}

.filter-select-dark {
    padding: 10px 15px;
    border: 2px solid rgba(69, 169, 208, 0.4);
    border-radius: 20px;
    font-size: 0.9em;
    background: rgba(30, 30, 46, 0.9);
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select-dark:focus {
    outline: none;
    border-color: #45a9d0;
    box-shadow: 0 0 0 3px rgba(69, 169, 208, 0.2);
}

/* Map Dark */
#chemical-map {
    height: 500px;
    border-radius: 10px;
    border: 2px solid rgba(69, 169, 208, 0.4);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Legend Dark */
.chemical-legend-dark {
    background: rgba(42, 42, 62, 0.8);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}

.chemical-legend-dark .legend-title {
    color: #45a9d0;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.chemical-legend-dark .legend-item {
    color: #d1d5db;
}

/* Facilities Container Dark */
.chemical-container-dark {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(42, 42, 62, 0.95) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-top: 30px;
}

.chemical-container-dark .chemical-title {
    color: #ffffff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.chemical-container-dark .chemical-subtitle {
    color: #ffffff;
    font-size: 1em;
}

/* Facility Cards Dark */
.chemical-facility-card-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chemical-facility-card-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-color: #45a9d0;
}

.chemical-facility-card-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #45a9d0 0%, #4db9b7 100%);
}

.chemical-facility-card-dark .facility-name {
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.chemical-facility-card-dark .facility-address {
    color: #d1d5db;
    font-size: 0.9em;
    margin: 0 0 8px 0;
}

.chemical-facility-card-dark .facility-distance {
    color: #4db9b7;
    font-weight: 600;
}

/* Scores Grid Dark */
.chemical-scores-grid-dark {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.chemical-score-item-dark {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.2) 0%, rgba(77, 185, 183, 0.2) 100%);
    border: 1px solid rgba(69, 169, 208, 0.3);
    color: #d1d5db;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.chemical-score-item-dark:hover {
    transform: translateY(-2px);
    border-color: #45a9d0;
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.3) 0%, rgba(77, 185, 183, 0.3) 100%);
}

.chemical-score-item-dark .chemical-score-value {
    color: #ffffff;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 4px;
}

.chemical-score-item-dark .chemical-score-label {
    font-size: 0.75em;
    color: #9ca3af;
}

/* Safety Messages Dark */
.facility-safety-message-dark,
.facility-moderate-message-dark {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.5s ease-in;
}

.facility-safety-message-dark {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.facility-moderate-message-dark {
    background: rgba(69, 169, 208, 0.15);
    border: 1px solid rgba(69, 169, 208, 0.4);
}

.facility-safety-message-dark p {
    color: #4ade80;
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.facility-moderate-message-dark p {
    color: #60a5fa;
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

/* Details Sections Dark */
.strengths-section-dark {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.concerns-section-dark {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.strengths-section-dark h4 {
    color: #4ade80;
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: 600;
}

.concerns-section-dark h4 {
    color: #f87171;
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: 600;
}

.strengths-section-dark li {
    color: #86efac;
    font-size: 0.8em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.concerns-section-dark li {
    color: #fca5a5;
    font-size: 0.8em;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.strengths-section-dark li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.concerns-section-dark li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: #f87171;
}

/* Error and No Results Dark */
.error-container-dark,
.no-results-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    color: #d1d5db;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.error-container-dark h3,
.no-results-dark h3 {
    color: #45a9d0;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chemical-data-section-dark {
        width: 95%;
        padding: 20px 10px;
    }
    
    .chemical-filters-dark {
        flex-direction: column;
        gap: 15px;
    }
    
    .chemical-scores-grid-dark {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .chemical-data-section-dark {
        width: 98%;
        padding: 15px 5px;
    }
    
    .facility-safety-message-dark,
    .facility-moderate-message-dark {
        flex-direction: column;
        text-align: center;
    }
}







.ems-data-section-dark {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}

.section-header-dark h2 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.section-header-dark p {
    color: #9ca3af;
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 30px;
}

/* Stats Cards Dark */
.stats-container-dark {
    margin-bottom: 30px;
}

.stat-card-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.9) 0%, rgba(30, 30, 46, 0.9) 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
}

.stat-card-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-color: #45a9d0;
}

.stat-card-dark .stat-number {
    color: #ffffff;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-card-dark .stat-label {
    color: #9ca3af;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-dark.stat-excellent .stat-number {
    color: #4ade80;
}

.stat-card-dark.stat-good .stat-number {
    color: #22c55e;
}

.stat-card-dark.stat-concern .stat-number {
    color: #fbbf24;
}

/* Coverage Alert Dark */
.coverage-alert-dark {
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.coverage-alert-dark .alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
    flex-shrink: 0;
}

.coverage-alert-dark .alert-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.coverage-alert-dark .alert-content p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.4;
}

/* Map Container Dark */
.map-container-dark {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(42, 42, 62, 0.95) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 30px;
}

.map-container-dark .map-title {
    color: #45a9d0;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

/* EMS Container Dark */
.ems-container-dark {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(42, 42, 62, 0.95) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-top: 30px;
}

.ems-container-dark .ems-title {
    color: #45a9d0;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.ems-container-dark .ems-subtitle {
    color: #9ca3af;
    font-size: 1em;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Station Cards Dark */
.ems-station-card-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ems-station-card-dark.primary-station {
    border: 3px solid #45a9d0;
    box-shadow: 0 12px 35px rgba(69, 169, 208, 0.3);
}

.ems-station-card-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #45a9d0 0%, #4db9b7 100%);
}

.ems-station-card-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-color: #45a9d0;
}

.ems-station-card-dark .station-name {
    color: #45a9d0;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ems-station-card-dark .station-address {
    color: #d1d5db;
    font-size: 0.95em;
    margin: 0 0 8px 0;
}

.ems-station-card-dark .station-distance {
    color: #4db9b7;
    font-weight: 600;
    font-size: 0.9em;
}

/* Response Breakdown Dark */
.response-breakdown-dark {
    background: rgba(69, 169, 208, 0.15);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.response-breakdown-dark .breakdown-label {
    display: block;
    color: #9ca3af;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.response-breakdown-dark .breakdown-value {
    color: #60a5fa;
    font-weight: 600;
    font-size: 1.1em;
}

.response-breakdown-dark .breakdown-value.highlight {
    color: #45a9d0;
    font-size: 1.2em;
}

/* Response Category Dark */
.response-category-dark {
    padding: 15px;
    border-radius: 10px;
    border: 2px solid;
    text-align: center;
}

.response-category-dark p {
    margin: 0;
    font-size: 0.9em;
    color: #d1d5db;
}

/* Additional Stations Dark */
.additional-stations-dark h4 {
    color: #45a9d0;
    font-size: 1.2em;
    margin: 30px 0 15px 0;
    text-align: center;
}

.additional-stations-dark .station-mini-name {
    color: #45a9d0;
    font-size: 1em;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.additional-stations-dark .station-mini-address {
    color: #d1d5db;
    font-size: 0.85em;
    margin: 0 0 4px 0;
}

.additional-stations-dark .station-mini-distance {
    color: #4db9b7;
    font-size: 0.8em;
    margin: 0;
    font-weight: 600;
}

.additional-stations-dark .mini-response-time {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Emergency Tips Dark */
.emergency-tips-dark {
    margin-top: 30px;
    padding: 20px;
    background: rgba(69, 169, 208, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(69, 169, 208, 0.3);
}

.emergency-tips-dark h4 {
    color: #45a9d0;
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
}

.tip-card-dark {
    background: rgba(42, 42, 62, 0.8);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
}

.tip-card-dark:hover {
    transform: translateY(-2px);
    border-color: #45a9d0;
    background: rgba(42, 42, 62, 0.95);
}

.tip-card-dark h5 {
    color: #60a5fa;
    font-size: 0.95em;
    margin: 8px 0;
    font-weight: 600;
}

.tip-card-dark p {
    color: #d1d5db;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.4;
}

/* Error and No Results Dark */
.error-container-dark,
.no-results-dark {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.95) 0%, rgba(30, 30, 46, 0.95) 100%);
    color: #d1d5db;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(69, 169, 208, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.error-container-dark h3,
.no-results-dark h3 {
    color: #45a9d0;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ems-data-section-dark {
        width: 95%;
        padding: 20px 10px;
    }
    
    .response-breakdown-dark {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .coverage-alert-dark {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ems-data-section-dark {
        width: 98%;
        padding: 15px 5px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}



/* Improved Crime Comparison Visualization Styles */
.bar-chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px 0;
    position: relative;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 120px;
}

.bar-wrapper {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.bar {
    width: 70px;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.bar:hover {
    transform: translateY(-5px);
    filter: brightness(1.2);
}

.bar.city {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.bar.state {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.bar.national {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 20px rgba(107, 114, 128, 0.4);
}

.bar-value {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.bar-label {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    text-align: center;
}

.comparison-indicator {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.indicator-better {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.indicator-worse {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.indicator-same {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Stats cards below chart */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-change {
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.change-positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.change-negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}



@keyframes growUp {
    from {
        height: 0 !important;
    }
    to {
        height: inherit;
    }
}




/* Minimal Report Header Styles */
.report-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-bottom: 2px solid rgba(69, 169, 208, 0.3);
}

.report-header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.report-logo:hover {
    opacity: 0.8;
    transform: translateX(-2px);
}

.logo-image {
    height: 40px;
    width: auto;
}

.report-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.add-address-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #45a9d0, #3b82f6);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.add-address-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.4);
    background: linear-gradient(135deg, #3b82f6, #45a9d0);
}

.plus-icon {
    width: 20px;
    height: 20px;
}

.btn-text {
    font-size: 0.95rem;
}

/* Adjust main content to account for fixed header */
.crime-data-section:first-of-type,
.hospital-data-section:first-of-type,
main > section:first-child {
    margin-top: 80px; /* Add space for the fixed header */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .report-header {
        padding: 12px 15px;
    }
    
    .report-title {
        font-size: 1rem;
        display: none; /* Hide title on mobile to save space */
    }
    
    .logo-image {
        height: 35px;
    }
    
    .add-address-btn {
        padding: 8px 15px;
    }
    
    .btn-text {
        display: none; /* Show only icon on mobile */
    }
    
    .plus-icon {
        width: 24px;
        height: 24px;
    }
     /* Adjust SaferHood Score section for smaller header on mobile */
    .saferhood-score-section {
        margin-top: 90px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .report-title {
        font-size: 1.1rem;
    }
}



/* Schools expand/collapse */
.school-hidden {
    display: none !important;
}

.schools-grid.expanded .school-hidden {
    display: block !important;
}



/*11/24/2025 hide trend box for now */
.crime-type-menu,
.crime-menu-header,
.crime-menu-title,
.crime-trend-card {
    display: none !important;
}
#crimeMenuSection {
    display: none !important;
}



/* =============================================================================
   POPULATION TIER RANKING SECTION STYLES
   Add this to explore.css
============================================================================= */

/* Main Section Container */
.tier-ranking-section {
    width: 90%;
    margin: 60px auto;
    padding: 40px 20px;
}

.tier-ranking-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.tier-ranking-section .section-header h2 {
    color: #45a9d0;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.tier-ranking-section .section-header p {
    color: #94a3b8;
    font-size: 1.15em;
}

.tier-ranking-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Rank Hero Card */
.rank-hero-card {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 2px solid rgba(69, 169, 208, 0.4);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rank-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.rank-tier-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tier-label-text {
    color: #94a3b8;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tier-name-text {
    color: #45a9d0;
    font-size: 1.4em;
    font-weight: 700;
    padding: 8px 20px;
    background: rgba(69, 169, 208, 0.15);
    border-radius: 25px;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.rank-display {
    text-align: center;
}

.rank-number-large {
    font-size: 5em;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(69, 169, 208, 0.4);
}

.rank-hash {
    color: #45a9d0;
    font-size: 0.6em;
    vertical-align: top;
}

.rank-context {
    color: #94a3b8;
    font-size: 1.3em;
    margin-top: 10px;
}

.rank-context strong {
    color: #ffffff;
}

/* Percentile Bar */
.rank-percentile-bar {
    width: 100%;
    max-width: 600px;
}

.percentile-track {
    position: relative;
    height: 12px;
    background: linear-gradient(90deg, #22c55e 0%, #fbbf24 50%, #ef4444 100%);
    border-radius: 6px;
    overflow: visible;
}

.percentile-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px 0 0 6px;
}

.percentile-marker {
    position: absolute;
    top: -6px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 4px solid #45a9d0;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.percentile-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 0.9em;
}

.label-safe {
    color: #22c55e;
}

.label-dangerous {
    color: #ef4444;
}

/* Rank Summary Badge */
.rank-summary {
    margin-top: 10px;
}

.rank-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 600;
}

.badge-excellent {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    color: #22c55e;
    border: 2px solid rgba(34, 197, 94, 0.4);
}

.badge-concern {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.badge-average {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.2) 0%, rgba(69, 169, 208, 0.1) 100%);
    color: #45a9d0;
    border: 2px solid rgba(69, 169, 208, 0.4);
}

/* Ranking Lists Grid */
.ranking-lists-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 968px) {
    .ranking-lists-grid {
        grid-template-columns: 1fr;
    }
}

/* Ranking List Cards */
.ranking-list-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.safest-card {
    border-color: rgba(34, 197, 94, 0.4);
}

.dangerous-card {
    border-color: rgba(239, 68, 68, 0.4);
}

.all-cities-card {
    border-color: rgba(69, 169, 208, 0.4);
}

.all-cities-card .list-header {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.list-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    border-bottom: 2px solid rgba(71, 85, 105, 0.3);
}

.safest-card .list-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.dangerous-card .list-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.list-icon {
    font-size: 2em;
}

.list-title-group h3 {
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
}

.list-title-group p {
    color: #94a3b8;
    font-size: 0.95em;
    margin: 5px 0 0 0;
}

/* Ranking List Items */
.ranking-list {
    padding: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.ranking-list::-webkit-scrollbar {
    width: 8px;
}

.ranking-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.ranking-list::-webkit-scrollbar-thumb {
    background: rgba(69, 169, 208, 0.5);
    border-radius: 4px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    margin: 8px 0;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.ranking-item:hover {
    background: rgba(51, 65, 85, 0.7);
    transform: translateX(5px);
}

.current-city-highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.15) 100%) !important;
    border: 2px solid rgba(34, 197, 94, 0.6);
}

.current-city-highlight-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0.15) 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.6);
}

.rank-position {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-weight: 700;
    font-size: 1em;
    border-radius: 8px;
    flex-shrink: 0;
}

.rank-position.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.city-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.city-name {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 1.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-state {
    color: #94a3b8;
    font-size: 0.85em;
}

.city-score {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.score-number {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.your-city-tag {
    position: absolute;
    top: -8px;
    right: 15px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.your-city-tag.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Nearby Rank Card */
.nearby-rank-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(69, 169, 208, 0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nearby-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-bottom: 2px solid rgba(69, 169, 208, 0.3);
}

.nearby-icon {
    font-size: 2em;
}

.nearby-title-group h3 {
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
}

.nearby-title-group p {
    color: #94a3b8;
    font-size: 0.95em;
    margin: 5px 0 0 0;
}

.nearby-cities-list {
    padding: 20px;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    margin: 8px 0;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nearby-item:hover {
    background: rgba(51, 65, 85, 0.6);
}

.safer-than-you {
    border-left: 4px solid #22c55e;
}

.less-safe-than-you {
    border-left: 4px solid #fbbf24;
}

.your-city-row {
    background: linear-gradient(135deg, rgba(69, 169, 208, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%) !important;
    border: 2px solid rgba(69, 169, 208, 0.5);
    border-left: 4px solid #45a9d0;
}

.nearby-rank {
    width: 50px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 1em;
    flex-shrink: 0;
}

.your-city-row .nearby-rank {
    color: #45a9d0;
}

.nearby-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nearby-name {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 1.05em;
}

.you-badge {
    background: #45a9d0;
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.nearby-score {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.score-num {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1em;
}

/* Methodology Note */
.tier-methodology-note {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 25px;
    border-radius: 12px;
    border-left: 4px solid #45a9d0;
    color: #94a3b8;
    font-size: 0.95em;
    line-height: 1.6;
}

.tier-methodology-note strong {
    color: #45a9d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tier-ranking-section {
        width: 95%;
        padding: 30px 15px;
    }
    
    .rank-hero-card {
        padding: 25px;
    }
    
    .rank-number-large {
        font-size: 3.5em;
    }
    
    .ranking-item {
        padding: 12px 14px;
    }
    
    .city-name {
        font-size: 0.95em;
    }
    
    .nearby-item {
        flex-wrap: wrap;
    }
    
    .nearby-info {
        flex-basis: 100%;
        order: 1;
    }
    
    .nearby-rank {
        order: 0;
    }
    
    .nearby-score {
        order: 2;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .tier-ranking-section .section-header h2 {
        font-size: 1.6em;
    }
    
    .rank-number-large {
        font-size: 3em;
    }
    
    .list-header {
        padding: 18px;
    }
    
    .list-title-group h3 {
        font-size: 1.2em;
    }
}


/* Crime Tabs Section */
.crime-tabs-section {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(24, 24, 38, 0.95) 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.crime-tabs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
}

.crime-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crime-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crime-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.crime-tab-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.crime-tab-content {
    min-height: 200px;
}

.crime-tab-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.crime-tab-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.crime-tab-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crime-tab-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.crime-tab-rank.gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.crime-tab-rank.silver { background: linear-gradient(135deg, #9ca3af, #6b7280); color: #fff; }
.crime-tab-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.crime-tab-info {
    display: flex;
    flex-direction: column;
}

.crime-tab-name {
    color: #fff;
    font-weight: 500;
    font-size: 0.95em;
}

.crime-tab-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
    margin-top: 2px;
}

.crime-tab-item-right {
    text-align: right;
}

.crime-tab-percentage {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1em;
}





/* Expandable Crime Breakdown Styles */
.crime-tab-item.has-breakdown {
    cursor: pointer;
}

.crime-tab-item.has-breakdown:hover {
    background: rgba(69, 169, 208, 0.1);
}

.crime-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(69, 169, 208, 0.2);
    color: #45a9d0;
    font-size: 0.75em;
    margin-left: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.crime-expand-btn:hover {
    background: rgba(69, 169, 208, 0.3);
}

.crime-expand-btn.expanded {
    transform: rotate(180deg);
}

.crime-breakdown-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-bottom: 0;
}

.crime-breakdown-container.expanded {
    max-height: 500px;
    margin-bottom: 8px;
}

.crime-breakdown-list {
    padding: 8px 0 8px 40px;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 10px 10px;
    margin-top: -8px;
    border-top: 1px solid rgba(69, 169, 208, 0.2);
}

.crime-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px 8px 12px;
    border-left: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

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

.crime-breakdown-item:hover {
    background: rgba(69, 169, 208, 0.05);
    border-left-color: #45a9d0;
}

.crime-breakdown-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crime-breakdown-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
}

.crime-breakdown-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
    text-align: right;
}

.crime-breakdown-item.zero-count {
    opacity: 0.4;
}

.breakdown-hint {
    font-size: 0.7em;
    color: rgba(69, 169, 208, 0.7);
    margin-left: 8px;
}






.crime-tab-item.zero-incidents {
    opacity: 0.5;
}

.crime-tab-item.zero-incidents .crime-tab-count {
    color: rgba(76, 175, 80, 0.7);
}

.crime-tab-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.crime-tab-total-value {
    color: #fff;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .crime-tabs-nav {
        gap: 6px;
    }
    .crime-tab-btn {
        padding: 6px 10px;
        font-size: 0.75em;
    }
}


/* ============================================
   SHARED REPORT BANNER STYLES
   ============================================ */

/* Shared Report Banner */
.shared-report-banner {
    background: linear-gradient(135deg, #1a1f2e, #252b3d);
    border-bottom: 4px solid #45a9d0;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.shared-report-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 35px 50px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 25px;
}

.agent-info-section {
    display: flex;
    align-items: center;
    gap: 25px;
}

.agent-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #45a9d0;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.agent-photo-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(69, 169, 208, 0.1);
    border: 4px solid #45a9d0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.3);
}

.agent-photo-placeholder svg {
    width: 50px;
    height: 50px;
    color: #45a9d0;
}

.agent-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shared-label {
    color: #9ca3af;
    font-size: 1.05em;
    font-weight: 400;
}

.agent-name {
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.agent-company {
    color: #45a9d0;
    font-size: 1.15em;
    font-weight: 600;
}

.agent-license {
    color: #6b7280;
    font-size: 0.95em;
    font-weight: 500;
}

.agent-contact-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.agent-contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(69, 169, 208, 0.15);
    color: #45a9d0;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.agent-contact-btn svg {
    width: 20px;
    height: 20px;
}

.agent-contact-btn:hover {
    background: #45a9d0;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 169, 208, 0.4);
}

.shared-report-footer {
    background: rgba(0, 0, 0, 0.25);
    padding: 16px 50px;
    text-align: center;
    color: #d1d5db;
    font-size: 1em;
    font-weight: 500;
}

.shared-report-footer strong {
    color: #ffffff;
}

.shared-report-footer .separator {
    margin: 0 15px;
    color: #4b5563;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shared-report-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .agent-info-section {
        flex-direction: column;
    }
    
    .agent-contact-section {
        justify-content: center;
    }
    
    .shared-report-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .shared-report-footer .separator {
        display: none;
    }
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.share-modal-content {
    background: linear-gradient(135deg, #1a1f2e, #252b3d);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(69, 169, 208, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.3em;
}

.share-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.share-modal-close:hover {
    color: #ffffff;
}

.share-modal-body {
    padding: 25px;
}

.share-modal-body p {
    color: #d1d5db;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.share-address-display {
    background: rgba(69, 169, 208, 0.1);
    padding: 15px;
    border-radius: 8px;
    color: #ffffff;
    margin-bottom: 20px;
    border-left: 3px solid #45a9d0;
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.share-link-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(69, 169, 208, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 0.95em;
}

.copy-link-btn {
    padding: 12px 25px;
    background: #45a9d0;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-link-btn:hover {
    background: #3a9bc2;
}

.copy-link-btn.copied {
    background: #10b981;
}

.share-link-info {
    color: #9ca3af;
    font-size: 0.9em;
}

.share-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 15px;
    border-radius: 8px;
    color: #f87171;
}

.share-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.generate-link-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-link-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shared-report-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .agent-info-section {
        flex-direction: column;
    }
    
    .agent-contact-section {
        justify-content: center;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-report-btn,
    .add-address-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   HEADER BUTTONS (Share + New Address)
   ============================================ */

/* Header buttons container */
.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Share Report Button */
.share-report-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.share-report-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.share-report-btn .share-icon {
    width: 18px;
    height: 18px;
}

/* Update existing add-address-btn to match font */
.add-address-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #45a9d0, #3a9bc2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.add-address-btn:hover {
    background: linear-gradient(135deg, #3a9bc2, #2d8aa8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(69, 169, 208, 0.4);
}

.add-address-btn .plus-icon {
    width: 18px;
    height: 18px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-report-btn,
    .add-address-btn {
        width: 100%;
        justify-content: center;
    }
}



/* National Average Comparison Styles */
.crime-comparison {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.comparison-good {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.comparison-bad {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.comparison-neutral {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}











/* ============================================
   ECONOMIC DATA SECTION CSS
   Add this to your explore.css file
   Matches existing dark theme patterns
   ============================================ */

/* Main Section Container - matches .air-quality-data-section */
.economic-data-section {
    width: 90%;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Stat Trend indicator (YoY change) */
.stat-trend {
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 8px;
}

/* Economic Alert - matches .air-quality-alert */
.economic-alert {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.economic-alert .alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.economic-alert .alert-content h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
    font-weight: 600;
}

.economic-alert .alert-content p {
    color: #d1d5db;
    font-size: 1em;
    line-height: 1.6;
    margin: 0;
}

/* Economic Map Container - matches .air-quality-map-container */
.economic-map-container {
    background: linear-gradient(135deg, #0b1020 0%, #111a33 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-bottom: 30px;
}

.economic-map-header {
    text-align: center;
    margin-bottom: 25px;
}

.economic-map-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Economic Details Grid */
.economic-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.economic-detail-item {
    background: rgba(69, 169, 208, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(69, 169, 208, 0.2);
    transition: all 0.3s ease;
}

.economic-detail-item:hover {
    border-color: #45a9d0;
    transform: translateY(-2px);
}

.economic-detail-item .detail-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.economic-detail-item .detail-info {
    flex: 1;
}

.economic-detail-item .detail-label {
    color: #9ca3af;
    font-size: 0.85em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.economic-detail-item .detail-value {
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 700;
}

/* Economic Insights Grid - strengths/concerns */
.economic-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.economic-insight-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(69, 169, 208, 0.2);
}

.economic-insight-card.strengths {
    border-left: 4px solid #22c55e;
}

.economic-insight-card.concerns {
    border-left: 4px solid #f59e0b;
}

.economic-insight-card h4 {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 12px;
    font-weight: 600;
}

.economic-insight-card p {
    color: #d1d5db;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

/* Economic Badges */
.economic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.economic-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
}

.economic-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: badge-pulse 2s infinite;
}

.economic-badge.warning {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.economic-badge.warning .badge-dot {
    background: #ef4444;
}

.economic-badge.caution {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.economic-badge.caution .badge-dot {
    background: #f59e0b;
}

.economic-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.economic-badge.info .badge-dot {
    background: #3b82f6;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Trend Stat Percentage */
.trend-stat-pct {
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 5px;
}

/* Economic Legend - matches .air-quality-legend */
.economic-legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(69, 169, 208, 0.3);
    margin-top: 20px;
}

/* Decade Summary Section */
.economic-decade-summary {
    background: rgba(69, 169, 208, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(69, 169, 208, 0.2);
}

.decade-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    color: #9ca3af;
    font-size: 0.85em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    display: block;
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 700;
}

/* Economic Chart Container */
.economic-chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(69, 169, 208, 0.2);
}

.economic-chart-container .chart-wrapper {
    position: relative;
}

.economic-legend .legend-title {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.economic-legend .legend-items {
    text-align: center;
}

.economic-legend .legend-item {
    font-size: 0.85em;
}

/* Responsive Design */
@media (max-width: 992px) {
    .economic-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .economic-data-section {
        width: 95%;
        padding: 30px 15px;
    }

    .economic-alert {
        flex-direction: column;
        text-align: center;
    }

    .economic-alert .alert-icon {
        margin-bottom: 15px;
    }

    .economic-details-grid {
        grid-template-columns: 1fr;
    }

    .economic-insights-grid {
        grid-template-columns: 1fr;
    }

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

    .economic-badges {
        justify-content: center;
    }

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

@media (max-width: 480px) {
    .economic-map-container {
        padding: 20px 15px;
    }

    .economic-map-title {
        font-size: 1.4em;
    }

    .trend-details-grid {
        grid-template-columns: 1fr;
    }
}



/* Hospital Expandable Details */
.hospital-details-expand {
    margin-top: 15px;
    border-top: 1px solid rgba(69, 169, 208, 0.2);
    padding-top: 15px;
}

.details-toggle-btn {
    background: rgba(69, 169, 208, 0.1);
    border: 1px solid rgba(69, 169, 208, 0.3);
    color: #45a9d0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.details-toggle-btn:hover {
    background: rgba(69, 169, 208, 0.2);
    border-color: rgba(69, 169, 208, 0.5);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.hospital-details-content {
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

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

.details-category {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.details-category h5 {
    color: #ffffff;
    font-size: 14px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.detail-label {
    color: #a0aec0;
    font-size: 12px;
}

.detail-value {
    font-weight: 600;
    font-size: 13px;
}

.detail-value.good {
    color: #22c55e;
}

.detail-value.fair {
    color: #facc15;
}

.detail-value.poor {
    color: #f87171;
}

@media (max-width: 480px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}



/* Hospital Expandable Details */
.hospital-details-expand {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.details-toggle-btn {
    background: rgba(69, 169, 208, 0.1);
    border: 1px solid rgba(69, 169, 208, 0.3);
    color: #45a9d0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
}

.details-toggle-btn:hover {
    background: rgba(69, 169, 208, 0.2);
    border-color: rgba(69, 169, 208, 0.5);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.hospital-details-content {
    margin-top: 20px;
}

.details-category-header {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.details-category-header:first-child {
    margin-top: 0;
}


/* Hospital Map Legend */
.hospital-map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(69, 169, 208, 0.3);
    z-index: 1000;
}

.hospital-map-legend .legend-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hospital-map-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0aec0;
    font-size: 12px;
    margin-bottom: 4px;
}

.hospital-map-legend .legend-ring {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px dashed;
    background: transparent;
}

/* Make map container relative for legend positioning */
.hospital-map-container-dark {
    position: relative;
}



/* Hospitals expand/collapse */
.hospital-hidden {
    display: none !important;
}

.hospital-cards-container.expanded .hospital-hidden {
    display: block !important;
}

.hospital-card-wrapper {
    width: 100%;
}

/* School Dark Cards - matching hospital style */
.school-dark-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    box-sizing: border-box;
}

.school-dark-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(69, 169, 208, 0.3);
}

.school-dark-card.school-card-alt {
    background: #2a2a3e;
}

.school-dark-card.school-card-alt:hover {
    background: #323248;
}

.school-dark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.school-info-section {
    flex: 1;
}

.school-dark-name {
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.school-location {
    color: #a0a0b0;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.school-distance-badge {
    color: #45a9d0;
    font-size: 0.85em;
    font-weight: 500;
}

.school-score-display {
    margin-left: 20px;
}

.school-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.school-actions .action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.school-actions .website-btn {
    background: rgba(69, 169, 208, 0.2);
    color: #45a9d0;
    border: 1px solid rgba(69, 169, 208, 0.3);
}

.school-actions .website-btn:hover {
    background: rgba(69, 169, 208, 0.3);
}

.school-actions .phone-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.school-actions .phone-btn:hover {
    background: rgba(34, 197, 94, 0.3);
}

/* Make schools grid single column like hospitals */
.schools-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.school-card-wrapper {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Responsive metric grid for schools */
.school-dark-card .hospital-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.school-dark-card .metric-card {
    min-width: 0;
    padding: 12px 8px;
}

.school-dark-card .metric-name {
    font-size: 0.65em;
    line-height: 1.2;
    word-wrap: break-word;
}

/* Solid AQI stat cards */
.aqi-stat-solid {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aqi-stat-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.aqi-stat-solid .stat-label {
    color: rgba(255, 255, 255, 0.85) !important;
}


/* Economic Comparison Section */
.economic-comparison-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 24px;
    margin-top: 24px;
    border: 1px solid rgba(69, 169, 208, 0.15);
}

.econ-compare-title {
    color: #fff;
    margin: 0 0 4px 0;
    font-size: 1.15em;
    font-weight: 700;
}

.econ-compare-subtitle {
    color: #6b7280;
    margin: 0 0 22px 0;
    font-size: 0.85em;
}

/* Pay Bar Comparison */
.econ-compare-block {
    margin-bottom: 28px;
}

.econ-compare-label {
    color: #d1d5db;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.econ-compare-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.econ-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.econ-bar-name {
    color: #9ca3af;
    font-size: 0.82em;
    width: 120px;
    flex-shrink: 0;
    text-align: right;
}

.econ-bar-track {
    flex: 1;
    height: 22px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 11px;
    overflow: hidden;
}

.econ-bar-fill {
    height: 100%;
    border-radius: 11px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.econ-bar-county { background: linear-gradient(90deg, #2d8db5, #45a9d0); }
.econ-bar-state { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.econ-bar-national { background: linear-gradient(90deg, #d97706, #f59e0b); }

.econ-bar-value {
    font-size: 0.88em;
    font-weight: 700;
    width: 85px;
    flex-shrink: 0;
}

.econ-compare-insight {
    margin-top: 10px;
    color: #9ca3af;
    font-size: 0.82em;
    text-align: center;
}

.econ-insight-positive { color: #22c55e; font-weight: 600; }
.econ-insight-negative { color: #ef4444; font-weight: 600; }
.econ-insight-neutral { color: #f59e0b; font-weight: 600; }

/* Percentile Ring Cards */
.econ-percentile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.econ-percentile-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.econ-ring-svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
    margin: 0 auto 8px;
    display: block;
}

.econ-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.econ-ring-fill {
    fill: none;
    stroke: #45a9d0;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease;
}
.econ-percentile-number {
    position: absolute;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
}

.econ-percentile-label {
    color: #d1d5db;
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 2px;
}

.econ-percentile-detail {
    color: #ffffff;
    font-size: 0.72em;
}

@media (max-width: 768px) {
    .econ-percentile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .econ-bar-name {
        width: 80px;
        font-size: 0.75em;
    }
    
    .econ-bar-value {
        width: 70px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .econ-percentile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .econ-bar-name {
        width: 60px;
    }
}




/* ===================== NEW SCHOOL SAFETY CARD ===================== */
.safety-card { padding: 1.25rem; }

/* ---- collapsed hero header ---- */
.sf-head {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}
.sf-info { flex: 1; min-width: 0; }
.sf-name {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}
.sf-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

/* ---- serious-incident flags ---- */
.sf-flags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.sf-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(226,75,74,0.18);
    color: #ff9b9b;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(226,75,74,0.35);
}

/* ---- the progress ring ---- */
.sf-ring {
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}
.sf-ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.sf-ring-bg { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 6; }
.sf-ring-fg {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 207.3;                       /* 2πr, r=33 */
    stroke-dashoffset: calc(207.3 - (207.3 * var(--pct) / 100));
    transition: stroke-dashoffset 0.5s ease;
}
.sf-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sf-ring-letter { font-size: 26px; font-weight: 700; color: #ffffff; line-height: 1; }
.sf-ring-score { font-size: 11px; color: rgba(255,255,255,0.7); }

/* ring stroke color by grade */
.sf-ring-A .sf-ring-fg { stroke: #1D9E75; }
.sf-ring-B .sf-ring-fg { stroke: #639922; }
.sf-ring-C .sf-ring-fg { stroke: #EF9F27; }
.sf-ring-D .sf-ring-fg { stroke: #E24B4A; }
.sf-ring-F .sf-ring-fg { stroke: #A32D2D; }

/* ---- chevron ---- */
.sf-chev {
    font-size: 20px;
    color: rgba(255,255,255,0.5);
    align-self: flex-start;
    font-style: normal;
    transition: transform 0.25s ease;
}
.sf-head.sf-open .sf-chev { transform: rotate(180deg); }

/* ---- expandable body ---- */
.sf-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.sf-body.sf-open {
    max-height: 600px;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 16px;
    padding-top: 16px;
}

/* ---- category rows ---- */
.sf-rows { display: flex; flex-direction: column; gap: 11px; }
.sf-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 3px 0;
}
.sf-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.sf-row-label {
    font-size: 13.5px;
    color: rgba(255,255,255,0.85);
    line-height: 1.35;
}
.sf-letter { font-size: 14px; font-weight: 700; flex-shrink: 0; }
.sf-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}
.sf-bar-fill { height: 100%; border-radius: 20px; transition: width 0.5s ease; }
.sf-row-val {
    width: 108px;
    font-size: 12px;
    text-align: right;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}
.sf-letter { font-weight: 700; margin-left: 4px; }

/* bar + letter color by grade */
.sf-fill-A { background: #1D9E75; } .sf-text-A { color: #5DCAA5; }
.sf-fill-B { background: #639922; } .sf-text-B { color: #97C459; }
.sf-fill-C { background: #EF9F27; } .sf-text-C { color: #FAC775; }
.sf-fill-D { background: #E24B4A; } .sf-text-D { color: #F09595; }
.sf-fill-F { background: #A32D2D; } .sf-text-F { color: #F09595; }

/* ---- action buttons ---- */
.sf-actions { display: flex; gap: 10px; margin-top: 16px; }
.sf-btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: background 0.2s ease;
}
.sf-btn:hover { background: rgba(255,255,255,0.08); }

/* ---- not-gradeable / no-data ---- */
.sf-head-nograde { cursor: default; }
.sf-ring-empty {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-ring-empty i { font-size: 26px; color: rgba(255,255,255,0.35); font-style: normal; }
.sf-nograde-note { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; font-style: italic; }

/* ===================== HOSPITAL QUALITY CARD ===================== */
.hq-card { padding: 1.5rem; }

.hq-head { display:flex; align-items:flex-start; gap:16px; cursor:pointer; }
.hq-info { flex:1; min-width:0; }
.hq-name { font-size:19px; font-weight:700; color:#fff; line-height:1.3; }
.hq-addr { font-size:13px; color:rgba(255,255,255,0.6); margin-top:6px; }
.hq-dist {
    display:inline-block; margin-top:9px; background:rgba(69,169,208,0.15);
    color:#45a9d0; font-size:12px; padding:3px 11px; border-radius:20px;
}
.hq-chev {
    font-size:18px; color:rgba(255,255,255,0.5); font-style:normal;
    align-self:center; transition:transform .25s ease;
}
.hq-head.open .hq-chev { transform:rotate(180deg); }

/* ring */
.hq-ring { position:relative; width:72px; height:72px; flex-shrink:0; }
.hq-ring-label {
    position:absolute; inset:0; display:flex; flex-direction:column;
    align-items:center; justify-content:center;
}
.hq-ring-letter { font-size:24px; font-weight:700; color:#fff; line-height:1; }
.hq-ring-score { font-size:11px; color:rgba(255,255,255,0.6); }
.hq-r-A .hq-ring-fg { stroke:#1D9E75; }
.hq-r-B .hq-ring-fg { stroke:#639922; }
.hq-r-C .hq-ring-fg { stroke:#EF9F27; }
.hq-r-D .hq-ring-fg { stroke:#E24B4A; }
.hq-r-F .hq-ring-fg { stroke:#A32D2D; }

/* card body */
.hq-body { max-height:0; overflow:hidden; transition:max-height .4s ease; }
.hq-body.open {
    max-height:8000px; border-top:1px solid rgba(255,255,255,0.09);
    margin-top:18px; padding-top:6px;
}

/* group */
.hq-group { border-bottom:1px solid rgba(255,255,255,0.07); }
.hq-group:last-child { border-bottom:none; }
.hq-group-head {
    display:flex; align-items:center; gap:10px; cursor:pointer;
    padding:14px 0;
}
.hq-group-title {
    flex:1; font-size:11px; font-weight:600; letter-spacing:0.09em;
    color:rgba(255,255,255,0.55); text-transform:uppercase;
}
.hq-group-count { font-size:11px; color:rgba(255,255,255,0.3); }
.hq-group-chev {
    font-size:14px; color:rgba(255,255,255,0.4); font-style:normal;
    transition:transform .25s ease;
}
.hq-group-head.open .hq-group-chev { transform:rotate(180deg); }
.hq-group-head.open .hq-group-title { color:rgba(255,255,255,0.8); }

.hq-group-body { max-height:0; overflow:hidden; transition:max-height .35s ease; }
.hq-group-body.open { max-height:2000px; padding-bottom:14px; }

/* metric row */
.hq-metric { padding:11px 0; }
.hq-metric-top {
    display:flex; justify-content:space-between; align-items:baseline;
    gap:12px; margin-bottom:8px;
}
.hq-metric-title { font-size:13.5px; color:rgba(255,255,255,0.88); line-height:1.4; }
.hq-metric-grade { font-size:14px; font-weight:700; flex-shrink:0; }
.hq-metric-na {
    font-size:11.5px; color:rgba(255,255,255,0.32);
    font-style:italic; flex-shrink:0; white-space:nowrap;
}
.hq-na .hq-metric-title { color:rgba(255,255,255,0.45); }

.hq-bar { height:6px; background:rgba(255,255,255,0.08); border-radius:20px; overflow:hidden; }
.hq-bar-empty { background:rgba(255,255,255,0.04); }
.hq-bar-fill { height:100%; border-radius:20px; transition:width .6s ease; }

.hq-f-A { background:#1D9E75; } .hq-c-A { color:#5DCAA5; }
.hq-f-B { background:#639922; } .hq-c-B { color:#97C459; }
.hq-f-C { background:#EF9F27; } .hq-c-C { color:#FAC775; }
.hq-f-D { background:#E24B4A; } .hq-c-D { color:#F09595; }
.hq-f-F { background:#A32D2D; } .hq-c-F { color:#F09595; }



/* ===================== TRI INDUSTRIAL RELEASES ===================== */
.tri-list { display: flex; flex-direction: column; gap: 16px; }

.tri-card {
    background: #141c2b;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
}

/* ---- header ---- */
.tri-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tri-info { flex: 1; min-width: 0; }
.tri-name { font-size: 17px; font-weight: 600; color: #fff; line-height: 1.3; }
.tri-meta { font-size: 12.5px; color: rgba(255,255,255,0.58); margin-top: 5px; }
.tri-dist { font-size: 12.5px; color: #45a9d0; margin-top: 5px; font-weight: 500; }

.tri-lbs { text-align: right; flex-shrink: 0; }
.tri-lbs-n { font-size: 20px; font-weight: 700; color: #fff; line-height: 1; }
.tri-lbs-l { font-size: 10.5px; color: rgba(255,255,255,0.38); margin-top: 3px; }
.tri-zero { color: #5DCAA5 !important; }
/* ---- hazard flags ---- */
.tri-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tri-flag {
    font-size: 11.5px; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    display: inline-flex; align-items: center; gap: 5px;
}
.f-carc { background: rgba(226,75,74,0.16);  color: #ff9b9b; border: 1px solid rgba(226,75,74,0.32); }
.f-pfas { background: rgba(139,111,212,0.16); color: #B9A5E8; border: 1px solid rgba(139,111,212,0.34); }
.f-pbt  { background: rgba(239,159,39,0.15);  color: #FAC775; border: 1px solid rgba(239,159,39,0.30); }
.f-none { background: rgba(29,158,117,0.15);  color: #5DCAA5; border: 1px solid rgba(29,158,117,0.30); }

/* ---- section sub-label ---- */
.tri-sub {
    font-size: 11px; color: rgba(255,255,255,0.38);
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 9px;
}

/* ---- pathway bar ---- */
.tri-paths { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07); }
.tri-pbar {
    display: flex; height: 8px; border-radius: 20px;
    overflow: hidden; background: rgba(255,255,255,0.07);
}
.tri-pbar div { height: 100%; }
.p-air   { background: #5A9BD5; }
.p-water { background: #3FBFB0; }
.p-land  { background: #9C7B4F; }

.tri-legend { display: flex; gap: 16px; margin-top: 9px; flex-wrap: wrap; }
.tri-pl {
    font-size: 11.5px; color: rgba(255,255,255,0.58);
    display: flex; align-items: center; gap: 5px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ---- chemical rows ---- */
.tri-chems { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07); }
.tri-chem {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tri-chem:last-of-type { border-bottom: none; }
.tri-chem-name { flex: 1; font-size: 13.5px; color: rgba(255,255,255,0.86); min-width: 0; }
.tri-chem-amt {
    font-size: 12.5px; color: rgba(255,255,255,0.58);
    width: 100px; text-align: right; flex-shrink: 0;
}
.tri-chem-path {
    font-size: 11px; color: rgba(255,255,255,0.38);
    width: 48px; text-align: right; flex-shrink: 0; text-transform: capitalize;
}

.tri-tag {
    font-size: 10px; font-weight: 700; padding: 1px 6px;
    border-radius: 3px; letter-spacing: 0.03em; flex-shrink: 0;
}
.t-carc { background: rgba(226,75,74,0.16);  color: #ff9b9b; }
.t-pfas { background: rgba(139,111,212,0.16); color: #B9A5E8; }

.tri-more { font-size: 12.5px; color: #45a9d0; margin-top: 10px; }

/* ---- caveat ---- */
.tri-caveat {
    font-size: 11.5px; color: rgba(255,255,255,0.38); line-height: 1.55;
    margin-top: 26px; padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px; border: 1px solid rgba(255,255,255,0.07);
}
.tri-caveat strong { color: rgba(255,255,255,0.6); }

@media (max-width: 560px) {
    .tri-head { flex-direction: column; gap: 10px; }
    .tri-lbs { text-align: left; }
    .tri-chem-name { font-size: 13px; }
    .tri-chem-amt { width: 84px; }
}