/* ==========================================================================
   i-doit Hub Visual: Constellation / Free-floating Integration Nodes
   Center = i-doit, surrounded by floating icons + human silhouettes
   Designed for LIGHT backgrounds (section-light)
   ========================================================================== */

.idoit-hub {
    position: relative;
    width: 460px;
    height: 460px;
    margin: 0 auto;
}

/* --- SVG Lines --- */
.idoit-hub-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.idoit-hub-line {
    stroke: rgba(0, 0, 0, 0.12);
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
    opacity: 0;
    transition: opacity 0.8s ease, stroke 0.6s ease;
}

.idoit-hub-line.is-visible {
    opacity: 1;
}

.idoit-hub-line.is-active {
    stroke: rgba(40, 140, 20, 0.3);
}

/* --- Center Hub --- */
.idoit-hub-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a1e2a, #12141e);
    border: 2px solid rgba(99, 229, 38, 0.5);
    box-shadow: 0 0 0 6px rgba(99, 229, 38, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
    color: var(--donamic-primary, #63e526);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.idoit-hub-center.is-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.idoit-hub-center.is-active {
    animation: idoit-glow 2.5s ease-in-out infinite;
}

.idoit-hub-center span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--donamic-primary, #63e526);
}

@keyframes idoit-glow {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(99, 229, 38, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(99, 229, 38, 0.12), 0 0 30px rgba(99, 229, 38, 0.1), 0 8px 24px rgba(0, 0, 0, 0.12);
    }
}

/* --- Floating Nodes (free icons, no cards) --- */
.idoit-hub-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 5;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.idoit-hub-node.is-visible {
    opacity: 1;
    transform: scale(1);
}

.idoit-hub-node-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.idoit-hub-node.is-active .idoit-hub-node-icon {
    color: var(--donamic-primary, #63e526);
    border-color: rgba(99, 229, 38, 0.3);
    box-shadow: 0 0 12px rgba(99, 229, 38, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.idoit-hub-node span {
    font-size: 10px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.35);
    letter-spacing: 0.02em;
    transition: color 0.5s ease;
}

.idoit-hub-node.is-active span {
    color: rgba(0, 0, 0, 0.65);
}

/* --- Pills (ISMS, Reporting) --- */
.idoit-hub .hub-pill {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 5;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s ease;
}

.idoit-hub .hub-pill.is-visible {
    opacity: 1;
    transform: scale(1);
}

.idoit-hub .hub-pill.is-active {
    border-color: rgba(99, 229, 38, 0.3);
}

.idoit-hub .hub-pill svg {
    flex-shrink: 0;
    color: rgba(0, 0, 0, 0.3);
    transition: color 0.4s ease;
}

.idoit-hub .hub-pill.is-active svg {
    color: var(--donamic-primary, #63e526);
}

.idoit-hub .hub-pill span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    transition: color 0.4s ease;
}

.idoit-hub .hub-pill.is-active span {
    color: rgba(0, 0, 0, 0.7);
}

/* --- Human Silhouettes --- */
.idoit-hub-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 5;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.idoit-hub-person.is-visible {
    opacity: 1;
    transform: scale(1);
}

.idoit-hub-person-icon {
    color: rgba(0, 0, 0, 0.2);
    transition: color 0.5s ease;
}

.idoit-hub-person.is-active .idoit-hub-person-icon {
    color: var(--donamic-primary, #63e526);
}

.idoit-hub-person span {
    font-size: 10px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.25);
    letter-spacing: 0.04em;
    transition: color 0.5s ease;
}

.idoit-hub-person.is-active span {
    color: rgba(0, 0, 0, 0.55);
}

/* --- Subtle float animation for nodes --- */
@keyframes idoit-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -4px; }
}

.idoit-hub-node.is-active {
    animation: idoit-float 4s ease-in-out infinite;
}

.idoit-hub-node:nth-child(odd).is-active {
    animation-delay: -1.5s;
}

.idoit-hub-node:nth-child(3n).is-active {
    animation-duration: 5s;
}

/* --- JDisc → i-doit prominent connector --- */
.jdisc-idoit-line {
    stroke: rgba(99, 229, 38, 0.35);
    stroke-width: 3;
    stroke-dasharray: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.jdisc-idoit-line.is-visible {
    opacity: 1;
}

.jdisc-idoit-line.is-active {
    stroke: rgba(99, 229, 38, 0.5);
}

/* i-doit target at bottom of JDisc hub */
.jdisc-idoit-target {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jdisc-idoit-target.is-visible {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .idoit-hub {
        transform: scale(0.85);
        transform-origin: center;
    }
}

@media (max-width: 1024px) {
    .idoit-hub {
        transform: scale(0.72);
        transform-origin: center;
    }
}

@media (max-width: 768px) {
    .idoit-hub {
        display: none;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .idoit-hub-center,
    .idoit-hub-node,
    .idoit-hub .hub-pill,
    .idoit-hub-person {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .idoit-hub-center {
        transform: translate(-50%, -50%) scale(1);
    }

    .idoit-hub-line {
        opacity: 1;
        transition: none;
    }

    .idoit-hub-center.is-active {
        animation: none;
        box-shadow: 0 0 0 10px rgba(99, 229, 38, 0.12), 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .idoit-hub-node.is-active {
        animation: none;
    }
}
