/* Bubble Grid Styling */
.bubble-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px auto;
    max-width: 800px;
}

.bubble-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1;
    /* Ensure no text selection */
    -webkit-tap-highlight-color: transparent;
}

.bubble-item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    display: block;
    /* Remove gap */
}

/* Tooltip Customization - Hidden by default */
.bubble-tooltip {
    position: absolute;
    bottom: -80px;
    left: 50%;
    /* Start hidden and offset */
    transform: translateX(-50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    font-size: 0.6rem;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* Sync transition with bubble zoom (0.4s) */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Slight border */
    z-index: 101;
    /* Above bubble */
}

.bubble-tooltip h4 {
    color: var(--color-primary);
    margin-bottom: 4px;
    font-size: 0.7rem;
}

/* Hover Effect: Grow 200% (scale 2) - Desktop Only */
@media (hover: hover) {
    .bubble-item:hover {
        transform: scale(2);
        z-index: 100;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }

    .bubble-item:hover .bubble-tooltip {
        opacity: 1;
        visibility: visible;
        bottom: -60px;
        transform: translateX(-50%) scale(0.5);
        /* Counter-scale */
    }

    .bubble-item:nth-child(even):hover {
        transform: translateY(30px) scale(2);
    }
}

/* Active State (Mobile/Touch) */
.bubble-item.active {
    transform: scale(2);
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.bubble-item.active .bubble-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -60px;
    transform: translateX(-50%) scale(0.5);
    /* Counter-scale */
}

.bubble-item:nth-child(even).active {
    transform: translateY(30px) scale(2);
}

/* Offset positioning to create "grappe" (cluster) feel */
.bubble-item:nth-child(even) {
    transform: translateY(30px);
}