.mapWrapper {
    width: 100%;
    height: 80vh;
    position: relative;
    margin: 0; /* Map'in margin'ini sıfırla */
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.ol-popup {
    position: absolute;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 280px;
}

/* Leaflet popup içindeki içerik: çoklu mekanlarda scroll ile gezilebilsin */
.popup-container {
    /* Yaklaşık tek mekan kutusu kadar yükseklik - diğerleri scroll ile görünsün */
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px; /* MacOS'ta gizli scrollbar için küçük tampon */
}

.ol-popup:after, .ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
}

.ol-popup:before {
    border-top-color: #cccccc;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
}

.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
}

.ol-popup-closer:after {
    content: "✖";
}

/* Loading spinner styles */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* No results message styles */
.map-no-results-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    max-width: 400px;
    text-align: center;
}

.map-no-results-overlay .icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 15px;
}

.map-no-results-overlay h4 {
    color: #dc3545;
    margin-bottom: 10px;
    font-size: 18px;
}

.map-no-results-overlay p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.map-no-results-overlay .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-no-results-overlay .close-btn:hover {
    color: #666;
}
.th-hero-wrapper {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 20px 0; /* üst boşluğu daha da azalt */
}

.map-search-column {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 16px; /* üst boşluğu sıfırla */
}

/* Sağdaki harita kapsayıcısının iç boşluklarını azalt */
.map-right {
    padding: 0 12px 16px 12px; /* üst boşluğu sıfırla */
}

.map-filter.hero-form {
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0;
    border-radius: 0;
    width: 100%;
    max-width: 420px;
    box-shadow: none;
}

.map-filter__card {
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    margin: 0; /* Kartın margin'ini sıfırla */
}

.map-filter__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-filter__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.map-filter__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.map-filter__hint {
    margin: 0;
    font-size: 0.86rem;
    color: #94a3b8;
}

.map-filter__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.map-filter__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
}

.map-filter__field select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d0d6e1;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.map-filter__field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.map-filter__field .select2-container {
    width: 100% !important;
}

.map-filter__field .select2-container--bootstrap-5 .select2-selection {
    border-radius: 12px;
    border: 1px solid #d0d6e1;
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.map-filter__field .select2-container--bootstrap-5 .select2-selection__rendered {
    color: #1e293b;
    padding-left: 0;
    font-size: 0.875rem;
}

.map-filter__field .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.map-filter__actions button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    font-weight: 600;
    padding: 12px 18px;
    letter-spacing: 0.02em;
}

.map-filter__actions button img {
    width: 18px;
    height: 18px;
}

.map-filter .form-messages {
    font-size: 0.82rem;
    color: #94a3b8;
}

@media (max-width: 1399.98px) {
    .th-hero-wrapper {
        padding: 16px 0;
    }

    .map-search-column {
        padding: 0 16px;
    }

    .map-right {
        padding: 0 12px 16px 12px;
    }
}

@media (max-width: 1199.98px) {
    .th-hero-wrapper {
        padding: 20px 0;
    }

    .map-search-column {
        padding: 0 16px 24px;
        background: transparent;
    }

    .map-right {
        padding: 0 16px 16px 16px;
    }

    .map-filter.hero-form {
        max-width: 100%;
    }

    .map-filter__card {
        border-radius: 18px;
    }
}

@media (max-width: 575.98px) {
    .map-search-column {
        padding: 0 12px 20px;
    }

    .map-filter__card {
        padding: 22px 18px;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
    }
}

/* Lazy Loading Görsel Optimizasyonu - Harita Popup'ları için */
.lazy-image-container {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.lazy-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
    pointer-events: none;
}

.lazy-image-container.loaded::before {
    animation: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: relative;
    z-index: 2;
}

.lazy-image.lazy-loading {
    opacity: 0;
}

.lazy-image.lazy-loaded {
    opacity: 1;
}

.lazy-image.lazy-error {
    opacity: 1;
    filter: grayscale(100%);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Görsel yüklenme animasyonu için hafif bir fade-in */
.lazy-image-container.loaded .lazy-image {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
