/* ===== MAP SECTION STYLES ===== */
/* Extracted from styles.css for the integrated map section */

.map-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.map-stats .stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-stats .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.map-stats .stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color, #1e40af);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color, #1e40af), var(--secondary-color, #3b82f6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.map-stats .stat-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-controls {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
    border-color: #1e40af;
}

.filter-btn.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.interactive-map {
    height: 500px;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.map-legend {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.map-legend h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color, #1e40af);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.legend-item:hover {
    background: rgba(30, 64, 175, 0.05);
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.legend-text {
    font-weight: 500;
    color: #374151;
}

.map-info {
    text-align: center;
    margin-top: 2rem;
}

.map-info p {
    color: #6b7280;
    font-style: italic;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .map-section {
        padding: 3rem 0;
    }
    
    .map-stats {
        gap: 2rem;
        margin: 2rem 0;
    }
    
    .map-stats .stat-item {
        padding: 1.5rem;
        min-width: 140px;
    }
    
    .map-stats .stat-number {
        font-size: 2.5rem;
    }
    
    .filter-buttons {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .interactive-map {
        height: 400px;
        margin: 1.5rem 0;
    }
    
    .legend-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .legend-item {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .map-stats {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        justify-content: center;
    }
    
    .interactive-map {
        height: 350px;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
    }
}

/* Leaflet overrides */
.map-section .leaflet-container {
    font-family: inherit;
}

.map-section .leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.map-section .leaflet-popup-content {
    margin: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.map-section .leaflet-popup-tip {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Map fade-in animation */
.map-section .interactive-map {
    opacity: 0;
    animation: fadeInMap 1s ease-out 0.5s forwards;
}

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

/* Force legend 3-column layout */
.map-section .legend-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    .map-section .legend-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .map-section .legend-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Leaflet attribution */
.map-section .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 10px !important;
    padding: 2px 5px !important;
}
