* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    direction: rtl;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select,
.search-input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    min-width: 150px;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #f44336;
    color: white;
}

.btn-secondary:hover {
    background: #da190b;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.stats {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.stats h3 {
    margin-bottom: 1rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
}

.places-list {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.places-list h3 {
    margin-bottom: 1rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.place-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.place-card:hover {
    background: #f0f0f0;
    transform: translateX(-5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.place-card.active {
    background: #e3f2fd;
    border-color: #667eea;
}

.place-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.place-info {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0;
}

.place-info i {
    width: 20px;
    color: #667eea;
}

/* Map */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
}

.map-loading.show {
    display: block;
}

.map-loading i {
    font-size: 2rem;
    color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

.modal-body h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.modal-body .info-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.modal-body .info-label {
    font-weight: bold;
    min-width: 120px;
    color: #666;
}

.modal-body .info-value {
    flex: 1;
    color: #333;
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.leaflet-popup-content {
    margin: 1rem;
    min-width: 200px;
}

.popup-title {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.popup-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0;
}

.popup-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.popup-btn:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .filter-select,
    .search-input {
        width: 100%;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}
