/* Map Hero Section */
.map-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

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


.hero-stats {
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    color: white;
    padding: 15px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-top: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Map Controls */
.map-controls-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}


.map-legend {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ngo-marker {
    background: #007bff;
}

.project-marker {
    background: #dc3545;
}

.user-location-marker {
    background: #ffc107;
}

/* Map Container */
.map-container {
    position: relative;
    background: var(--bg-secondary);
}

/* Enhanced Loading and Error Overlays */
.map-loading, .map-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

[data-theme="dark"] .map-loading,
[data-theme="dark"] .map-error {
    background: rgba(26, 26, 26, 0.95);
}

.loading-content, .error-content {
    text-align: center;
    max-width: 400px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

[data-theme="dark"] .loading-content,
[data-theme="dark"] .error-content {
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.loading-title, .error-title {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.loading-message, .error-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.loading-progress {
    width: 100%;
}

.progress {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

/* Info Panel */
.map-info-panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

[data-theme="dark"] .map-info-panel {
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-content h5 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.feature-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Stats Panel */
.map-stats-panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: fit-content;
}

[data-theme="dark"] .map-stats-panel {
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.stats-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.text-primary {
    background: rgba(0, 123, 255, 0.1);
}

.stat-icon.text-success {
    background: rgba(40, 167, 69, 0.1);
}

.stat-icon.text-warning {
    background: rgba(255, 193, 7, 0.1);
}

.stat-icon.text-info {
    background: rgba(23, 162, 184, 0.1);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    /* color: #2d3748; */
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    /* color: #718096; */
    margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        margin-top: 25px;
    }
    
    .stat-item {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.8px;
    }
    
    .map-legend {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .map-filters {
        justify-content: center !important;
    }
    
    #ngoMap {
        height: 400px !important;
    }
    
    .feature-card {
        flex-direction: column;
        text-align: center;
    }
}



.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #28a745;
    margin-top: 5px;
}

/* Enhanced Map Search */
.map-search-box {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1000;
    width: 320px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

[data-theme="dark"] .map-search-box {
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.map-search-box .form-control::placeholder {
    color: #6c757d;
}

[data-theme="dark"] .map-search-box .form-control::placeholder {
    color: var(--text-muted);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
}

.suggestions-list {
    padding: 0;
}

.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f7fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f7fafc;
}

.suggestion-item:last-child {
    border-bottom: none;
}

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

.suggestion-icon.ngo {
    background: #007bff;
}

.suggestion-icon.project {
    background: #dc3545;
}

.suggestion-icon.location {
    background: #28a745;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    font-size: 0.9rem;
}

.suggestion-subtitle {
    color: #718096;
    margin: 0;
    font-size: 0.8rem;
}

/* Enhanced Filter Styling */
.filter-group {
    position: relative;
}

.filter-group .form-select {
    min-width: 120px;
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-group .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.map-info-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 10px;
    padding: 0;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.info-panel-header h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.info-panel-content {
    padding: 15px;
    transition: all 0.3s ease;
}

.info-panel-content.collapsed {
    display: none;
}

.stat-mini {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.stat-mini-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-mini-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

/* Fullscreen mode */
.map-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: white;
}

.map-container.fullscreen #ngoMap {
    height: 100vh !important;
}

/* Enhanced marker animations */
.leaflet-marker-icon {
    transition: all 0.3s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

/* Improved responsive design */
@media (max-width: 768px) {
    .map-search-box {
        width: calc(100% - 30px);
        top: 10px;
        left: 15px;
        right: 15px;
    }
    
    .map-info-overlay {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
    }
    
    .map-controls-bar .map-filters {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .map-filters > * {
        width: 100%;
    }
}

/* Loading animation improvements */
.map-loading {
    backdrop-filter: blur(5px);
}

.map-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Enhanced button styles */
.btn-outline-secondary:hover,
.btn-outline-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Search input enhancements */
.map-search-box .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Tooltip styles for map elements */
.map-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    position: absolute;
    z-index: 1001;
}
