/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#map {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #AAD3DF 0%, #AAD3DF 100%);
    min-height: 688px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Controls section */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.continent-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/*.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}*/

/* Legend styles */
.legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.legend h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

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

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Continent colors */
.legend-color.asia { background-color: #FF6B6B; }
.legend-color.europe { background-color: #4ECDC4; }
.legend-color.africa { background-color: #45B7D1; }
.legend-color.north-america { background-color: #96CEB4; }
.legend-color.south-america { background-color: #FFEAA7; }
.legend-color.oceania { background-color: #DDA0DD; }

/* Map container */
#map {
    height: 688px;
    border-radius: 15px;
    /*box-shadow: 0 8px 32px rgba(0,0,0,0.2);*/
    overflow: hidden;
    /*margin-bottom: 20px;*/
}

/* Info panel */
.info-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.info-panel h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.info-panel p {
    color: #666;
    line-height: 1.6;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content-map {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
}

#modal-body {
    padding: 0 30px 30px 30px;
}

.country-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0 -30px 30px -30px;
    border-radius: 15px 15px 0 0;
}

.country-flag {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
}

.country-name {
    font-size: 2rem;
    margin-bottom: 5px;
}

.country-continent {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.info-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-card p {
    color: #666;
    line-height: 1.5;
}

/* Loading indicator */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.2rem;
    color: #333;
}

.inner-box {
    margin-bottom: 90px!important;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .continent-filters {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #map {
        min-height:400px;
        height: 400px;
    }
    .inner-box {
        margin-bottom: 0!important;
        padding-bottom: 0px;
    }
    .map-img {
        margin-bottom: 0;
    }
    
    .map-container {
        padding-bottom: 108%;
    }

    .modal-content-map {
        width: 95%;
        margin: 10% auto;
    }
    
    .country-info {
        grid-template-columns: 1fr;
    }
}

/* Custom Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.leaflet-popup-content {
    margin: 15px;
    line-height: 1.6;
}

.popup-header {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
}

.popup-continent {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.popup-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.popup-btn:hover {
    background: #5a6fd8;
}


/* City Markers Styles */
.city-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.city-marker-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-marker-icon:hover {
    transform: scale(1.1);
}

.city-marker-pin {
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    /*animation: bounce 2s infinite;*/  
    /*margin-bottom:10px;*/
}

.city-marker-label {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
    white-space: nowrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* City Modal Styles */
.city-modal-content-map {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.city-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.city-name {
    color: #2c3e50;
    /*margin: 10px 0;*/
    margin: 0 auto;
    font-size: 24px;
}

.city-location {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

.services-section h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 18px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item-map {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #191919;
    transition: all 0.3s ease;
}

.service-item-map:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.service-icon {
    font-size: 24px;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.service-content h4 {
    /*margin: 0 0 5px 0;*/
    color: #191919;
    font-size: 16px;
}

.service-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.4;
}

.city-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.3);
}

/* Legend Symbol Style */
.legend-symbol {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
}

/* Enhanced Filter Button Styles */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

/* Responsive Design for City Modal */
@media (max-width: 768px) {
    .city-modal-content-map {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .service-item-map {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .service-icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .city-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

/* Enhanced Map Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 15px;
    line-height: 1.4;
}

.popup-header {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.popup-continent {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 10px;
}

.popup-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.popup-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-1px);
}



/* Country and City Filter Styles */
.country-city-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.filter-select-bak {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2C197.3L159.3%2C69.6c-3.6-3.6-8-5.4-12.4-5.4s-8.8%2C1.8-12.4%2C5.4L5.4%2C197.3c-7.2%2C7.2-7.2%2C18.8%2C0%2C26.1c7.2%2C7.2%2C18.8%2C7.2%2C26.1%2C0l127.3-127.3l127.3%2C127.3c7.2%2C7.2%2C18.8%2C7.2%2C26.1%2C0C294.2%2C216.1%2C294.2%2C204.5%2C287%2C197.3z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

.filter-select-bak:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.filter-select-bak:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.filter-select-bak option {
    background-color: #4a5c8b; /* Darker background for options */
    color: white;
}

.filter-select-bak:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.services-section, .city-actions {
    padding: 10px 15px;
}


@media (min-width: 769px) {
    .map-container {
        padding-bottom: 39%;
    }
}


.city-marker-pin img { width:30px!important;  margin-top:10px!important;  }

/*.services-list .service-icon:nth-child(2):after {
  content: "✈️";
}
*/
.city-modal-content-map { position:relative; }
.city-close {
    position: absolute;
    right: 0;
}
