.richinnovations-services-map-wrapper {
    body {
        font-family: 'Plus Jakarta Sans', sans-serif;
        overflow-x: hidden;
    }

    .map-container {
        min-height: 800px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: transparent;
        /* Changed from #FFFFFF to allow Elementor Section Background */
        position: relative;
        overflow: hidden;
    }

    .map-bubble {
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 40;
        cursor: pointer;
        border: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: #FFFFFF;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        will-change: transform, box-shadow;
    }

    .map-bubble:hover {
        z-index: 100;
        transform: scale(calc(var(--bubble-scale, 1) + 0.1)) !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 0 15px var(--group-color, #FFED00);
        border-color: var(--group-color, #FFED00);
    }

    .pulse-marker {
        animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }


    .map-tooltip {
        position: absolute;
        bottom: 115%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: #1A1A1A;
        color: #ffffff;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        border: 1px solid rgba(255, 237, 0, 0.3);
        transition: all 0.3s ease;
        z-index: 60;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    }

    .map-bubble:hover .map-tooltip {
        opacity: 1;
        /* Counter-scale geometrically prevents the tooltip from visually stretching during parent bubble inflation clicks! */
        transform: translateX(-50%) translateY(0) scale(calc(1 / (var(--bubble-scale, 1) + 0.1)));
    }

    #connection-path, #connection-path-particles {
        opacity: 0;
        transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
    }
    
    #connection-path.is-visible,
    #connection-path-particles.is-visible {
        opacity: 1 !important;
    }

    /* Desktop Positioning - Now handled dynamically via inline styles from PHP */
    @media (min-width: 1025px) {}

    @media (max-width: 1024px) {
        .map-workspace {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0;
            height: auto !important;
            padding-top: 4rem;
            padding-bottom: 4rem;
        }

        .group-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem;
            /* Constrained to force exactly 3 columns on Mobile */
            width: 100%;
            max-width: 350px;
            padding: 2rem 0;
            margin: 0 auto;
        }

        /* Removed grid overrides */
    }

    /* Tablet Specific Overrides */
    @media (min-width: 768px) and (max-width: 1024px) {
        .group-container {
            gap: 1.5rem;
            /* Constrained to force exactly 4 columns on Tablet */
            max-width: 480px;
        }
    }

    @media (max-width: 1024px) {
        .map-bubble {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            right: auto !important;
            margin: 0; /* Reset margin for clean grid layout flex wrapper */
        }

        .center-node-mobile {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            transform: none !important;
            margin: 4rem auto;
        }

        .tablet-header-fix {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            right: auto !important;
            transform: none !important;
            margin-bottom: 2rem;
            width: 100%;
            text-align: center;
        }

        .tablet-header-fix h2 {
            text-align: center !important;
            border-left: none !important;
            border-right: none !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            border-bottom: 4px solid #1A1A1A;
            padding-bottom: 0.5rem;
        }
    }

    .animate-float {
        animation: float-animation 6s ease-in-out infinite;
    }

    .animate-float:nth-child(even) {
        animation-duration: 8s;
        animation-delay: -2s;
    }

    .animate-float:nth-child(3n) {
        animation-duration: 7s;
        animation-delay: -4s;
    }

    .map-bubble:active {
        transform: scale(calc(var(--bubble-scale, 1) - 0.05)) !important;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes float-animation {

    0%,
    100% {
        transform: translate3d(var(--magnetic-x, 0), var(--magnetic-y, 0), 0) scale(var(--bubble-scale, 1));
    }

    25% {
        transform: translate3d(calc(4px + var(--magnetic-x, 0)), calc(-6px + var(--magnetic-y, 0)), 0) scale(var(--bubble-scale, 1));
    }

    50% {
        transform: translate3d(calc(-2px + var(--magnetic-x, 0)), calc(-10px + var(--magnetic-y, 0)), 0) scale(var(--bubble-scale, 1));
    }

    75% {
        transform: translate3d(calc(-6px + var(--magnetic-x, 0)), calc(-3px + var(--magnetic-y, 0)), 0) scale(var(--bubble-scale, 1));
    }
}

@keyframes flow-particle {
    from {
        stroke-dashoffset: var(--particle-length, 1000);
    }
    to {
        stroke-dashoffset: 0;
    }
}