/* Global Overrides for this page */
body {
    overflow: hidden;
}

.service-map-page {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    background: #f4f7f6;
}

/* Glass Card Utility */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* Hero & Search Bar (Top) */
.service-hero {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
    z-index: 100;
}

.search-bar-mini {
    padding: 8px 20px;
    border-radius: 40px;
}

.search-bar-mini .form-select {
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

/* Split Layout Engine */
.split-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    /* Critical for nested flex scrolling */
}

/* Sidebar: Service List */
.sidebar-list {
    width: 400px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    /* Critical for scroll in flex item */
    overflow-y: auto;
    z-index: 20;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.service-items-wrapper {
    padding: 20px;
    flex: 1;
    /* Take remaining height */
}

/* Individual Service Card */
.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.bg-primary-soft {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Map View (Right Side) */
.map-view-container {
    flex: 1;
    position: relative;
    background: #eef2f3;
}

#turkey-map-wrapper {
    height: 100%;
}

/* Map Overlay Info Box */
.map-overlay-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 1000;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 5px;
}

.leaflet-popup-content h6 {
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    body {
        overflow: auto;
    }

    .service-map-page {
        height: auto;
        min-height: 100vh;
    }

    .split-layout {
        flex-direction: column-reverse;
        overflow: visible;
        display: flex;
        /* Ensure flex context */
    }

    .sidebar-list {
        position: relative;
        /* Reset absolute */
        width: 100%;
        height: auto;
        max-height: 500px;
        overflow-y: auto;
        top: auto;
        bottom: auto;
        left: auto;
    }

    .map-view-container {
        height: 400px;
        min-height: 400px;
        margin-left: 0;
        /* Reset margin */
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    animation: fadeInUp 0.4s ease-out forwards;
}