/* Neighborhoods Page Styles */

/* Enhanced Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95)),
                url('https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=1200&h=800&fit=crop') center/cover;
    color: white;
    text-align: center;
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center; 
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(2) { animation-delay: -2s; }
.floating-icon:nth-child(3) { animation-delay: -4s; }
.floating-icon:nth-child(4) { animation-delay: -1s; }

.floating-icon i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 50px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out;
}

.header-badge i {
    color: #28a745;
    font-size: 1.1rem;
}

.header-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
    font-weight: 700;
}

.header-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.4s both;
    line-height: 1.6;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.stat {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a:hover {
    color: white;
}

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

/* AI Search Section */
.ai-search-section {
    padding: 80px 0;
    background: var(--bg-light);
    position: relative;
    margin-top: -50px;
    z-index: 3;
}

.ai-search-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-assistant {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.ai-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.ai-avatar i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.ai-chat {
    flex: 1;
}

.ai-chat h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.ai-chat p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.ai-input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-input-container input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ai-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

#ai-search-btn {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#ai-search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.quick-queries {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-query {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-query:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-query i {
    font-size: 0.8rem;
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background: white;
}

.map-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    height: 700px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.map-sidebar {
    background: var(--bg-light);
    padding: 30px;
    overflow-y: auto;
}

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

.filter-header h3 {
    color: var(--text-color);
    margin: 0;
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.filter-group h4 i {
    color: var(--primary-color);
}

.range-slider {
    margin-bottom: 20px;
}

.range-slider label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.range-slider input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.range-values span:nth-child(2) {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-filters label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-color);
}

.distance-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.distance-filter select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.btn-full {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
}

.map-display {
    position: relative;
    background: #f0f0f0;
}

.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-layers {
    display: flex;
    gap: 10px;
}

.layer-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.layer-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.layer-btn:hover:not(.active) {
    background: var(--bg-light);
}

.map-view-controls {
    display: flex;
    gap: 5px;
}

.view-control {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-control.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.interactive-map {
    height: 100%;
    background: linear-gradient(45deg, #e9ecef, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.map-placeholder h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.map-placeholder p {
    color: var(--text-light);
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.map-legend h4 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.color-indicator {
    width: 20px;
    height: 12px;
    border-radius: 6px;
}

.legend-item span {
    font-size: 0.8rem;
    color: var(--text-color);
}

/* Neighborhoods Section */
.neighborhoods-section {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-color);
}

.section-header p {
    color: var(--text-light);
    margin: 10px 0 0 0;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.neighborhoods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-light);
}

.tab-btn.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Safety Resources */
.safety-resources {
    padding: 100px 0;
    background: white;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.resource-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.resource-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: transform 0.3s ease;
}

.resource-card:hover .resource-icon {
    transform: scale(1.1) rotate(5deg);
}

.resource-icon i {
    font-size: 2rem;
    color: white;
}

.resource-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.4rem;
}

.resource-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.resource-card ul {
    list-style: none;
    text-align: left;
}

.resource-card li {
    padding: 8px 0;
    color: var(--text-color);
    position: relative;
    padding-left: 20px;
}

.resource-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

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

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 18px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-buttons .btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-buttons .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .map-sidebar {
        order: 2;
        height: auto;
    }
    
    .map-display {
        order: 1;
        height: 500px;
    }
    
    .ai-assistant {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .quick-queries {
        justify-content: center;
    }
    
    .map-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .neighborhoods-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .floating-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .ai-assistant {
        padding: 25px;
    }
    
    .map-sidebar {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .tab-content,
    .modal-footer {
        padding: 20px;
    }
    
    .detail-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        min-width: 120px;
    }
}
