/* KSA Interactive Map Custom Styling */
.ksa_map_wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: #111a24;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 550px;
    background: #111a24;
}

/* Back to Macro View Button */
.ksa_back_to_regions_btn {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.ksa_back_to_regions_btn span {
    color: #FFF;
}

.ksa_back_to_regions_btn:hover {
    background: #9b8168;
    border-color: #9b8168;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 129, 104, 0.45);
}

.ksa_back_to_regions_btn svg {
    transition: transform 0.2s ease;
}

.ksa_back_to_regions_btn:hover svg {
    transform: translateX(-3px);
}

/* ==========================================================================
   Macro View: 4 Primary City Region Badges (Al Madinah, Jeddah, Makkah, Riyadh)
   ========================================================================== */
.ksa-region-badge-overlay {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    user-select: none;
}

.ksa-region-badge-overlay:hover {
    transform: translate(-50%, -104%) scale(1.06);
    z-index: 25;
}

.ksa-region-pill {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #334155;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ksa-region-badge-overlay:hover .ksa-region-pill {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ksa-pin-stem {
    width: 2px;
    height: 16px;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.ksa-pin-dot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -3px;
}

.ksa-pin-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border: 2px solid #222222;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.ksa-pin-sublabel {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    margin-top: 3px;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   Macro View: Subtle Province & Neighboring Country Labels
   ========================================================================== */
.ksa-subregion-label-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    letter-spacing: 0.3px;
    user-select: none;
}

.ksa-country-label-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

/* ==========================================================================
   Zoomed-in Region View: District Names & Dashed Polygons
   ========================================================================== */
.ksa-district-label-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.ksa-district-label-overlay span {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.4px;
    opacity: 0.95;
}

/* ==========================================================================
   Zoomed-in Region View: Project Location Pin Cards (Image 2 style)
   ========================================================================== */
.ksa-project-badge-overlay {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 15;
    user-select: none;
}

.ksa-project-badge-overlay:hover,
.ksa-project-badge-overlay.active {
    transform: translate(-50%, -106%) scale(1.08);
    z-index: 30;
}

.ksa-project-pill {
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.ksa-project-badge-overlay:hover .ksa-project-pill {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
}

.ksa-project-badge-overlay.active .ksa-project-pill {
    background: #9b8168;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(155, 129, 104, 0.6);
}

.ksa-project-stem {
    width: 2px;
    height: 26px;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    transition: background-color 0.2s ease;
}

.ksa-project-badge-overlay.active .ksa-project-stem {
    background: #9b8168;
}

/* Target Ring Marker (Target Bullseye) */
.ksa-target-ring {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(20, 26, 36, 0.7);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -3px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
}

.ksa-target-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.2s ease;
}

.ksa-project-badge-overlay.active .ksa-target-ring {
    border-color: #9b8168;
    box-shadow: 0 0 10px rgba(155, 129, 104, 0.9);
}

.ksa-project-badge-overlay.active .ksa-target-dot {
    background: #9b8168;
}

/* Highlighted state in left listing */
.ksa_portal .portal.highlight {
    border-color: #9b8168;
    box-shadow: 0 0 20px rgba(155, 129, 104, 0.35);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}