.interactive-hub-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.interactive-hub-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1; /* Keep it square */
    margin: 0 auto;
}

.hub-item {
    position: absolute;
    width: 30%;
    height: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.hub-item:hover {
    z-index: 10;
}

.hub-item-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.hub-item-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
    transition: color 0.3s ease;
}

.hub-item-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
    position: relative;
}

.hub-item-inner:hover .hub-item-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.hub-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-item-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

/* Connecting Lines */
.hub-item-line {
    position: absolute;
    background-color: #ccc;
    z-index: 1;
}

/* Positioning the 4 items (Top, Right, Bottom, Left) */
.hub-pos-top {
    top: 0;
    left: 35%;
}
.hub-pos-top .hub-item-line {
    width: 4px;
    height: 100%;
    bottom: -100%;
    left: calc(50% - 2px);
}

.hub-pos-right {
    top: 35%;
    right: 0;
}
.hub-pos-right .hub-item-line {
    height: 4px;
    width: 100%;
    left: -100%;
    top: calc(50% - 2px);
}

.hub-pos-bottom {
    bottom: 0;
    left: 35%;
    flex-direction: column-reverse; /* Put title below */
}
.hub-pos-bottom .hub-item-inner {
    flex-direction: column-reverse;
}
.hub-pos-bottom .hub-item-title {
    margin-bottom: 0;
    margin-top: 10px;
}
.hub-pos-bottom .hub-item-line {
    width: 4px;
    height: 100%;
    top: -100%;
    left: calc(50% - 2px);
}

.hub-pos-left {
    top: 35%;
    left: 0;
}
.hub-pos-left .hub-item-line {
    height: 4px;
    width: 100%;
    right: -100%;
    top: calc(50% - 2px);
}


/* Popover */
.hub-item-popover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    width: 200px; /* Default width, overriden by elementor control */
    pointer-events: none;
    text-align: center;
}

.hub-item-inner:hover .hub-item-popover {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Popover positioning: Top and Bottom moved to the RIGHT to avoid titles/lines */
.hub-pos-top .hub-item-popover {
    left: 120%;
    top: 50%;
    transform: translate(0, -50%) scale(0.9);
}
.hub-pos-top .hub-item-inner:hover .hub-item-popover {
    transform: translate(0, -50%) scale(1);
}

.hub-pos-bottom .hub-item-popover {
    left: 120%;
    top: 50%;
    transform: translate(0, -50%) scale(0.9);
}
.hub-pos-bottom .hub-item-inner:hover .hub-item-popover {
    transform: translate(0, -50%) scale(1);
}

/* Left and Right remain on their respective outsides */
.hub-pos-left .hub-item-popover {
    left: -20px;
    transform: translate(-100%, -50%) scale(0.9);
}
.hub-pos-left .hub-item-inner:hover .hub-item-popover {
    transform: translate(-100%, -50%) scale(1);
}

.hub-pos-right .hub-item-popover {
    left: 120%;
    transform: translate(0, -50%) scale(0.9);
}
.hub-pos-right .hub-item-inner:hover .hub-item-popover {
    transform: translate(0, -50%) scale(1);
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .interactive-hub-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
        height: auto;
        aspect-ratio: auto;
    }
    
    .hub-item {
        position: relative;
        width: 100%;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .hub-item-line {
        display: none;
    }
    
    .hub-pos-bottom .hub-item-inner {
        flex-direction: column;
    }
    
    .hub-pos-bottom .hub-item-title {
        margin-bottom: 10px;
        margin-top: 0;
    }
    
    .hub-item-popover {
        position: relative;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin-top: 10px;
        width: 100% !important; /* Force full width on mobile */
        display: none;
    }
    
    .hub-item-inner:active .hub-item-popover,
    .hub-item-inner:focus .hub-item-popover,
    .hub-item-inner:hover .hub-item-popover {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}