/* ============================================================
   mindmap.css — Professional Interactive Mind Map (AB-Group)
   ============================================================ */

/* ---- Container ---- */
.mindmap-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/hero.png') center/cover no-repeat;
    padding-top: 80px;
    overflow: hidden;
}

.mindmap-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(10,14,23,0.4) 0%,
        rgba(10,14,23,0.95) 75%,
        rgba(10,14,23,1) 100%);
    z-index: 1;
}

.mindmap-container {
    position: relative;
    z-index: 2;
    width: 800px;
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* ---- SVG connector lines ---- */
#mm-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

#mm-svg line {
    stroke: rgba(201, 168, 76, 0.15);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    transition: opacity 0.5s ease, stroke 0.5s ease, stroke-width 0.5s ease;
}

#mm-svg line.active-line {
    stroke: rgba(201, 168, 76, 0.6);
    stroke-width: 2;
    stroke-dasharray: none;
}

#mm-svg line.dimmed-line {
    opacity: 0;
}

/* ---- Center Logo / Globe ---- */
.center-logo {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow:
        0 0 40px rgba(201, 168, 76, 0.2),
        inset 0 0 40px rgba(201, 168, 76, 0.1);
    z-index: 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.center-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.center-logo:hover {
    box-shadow:
        0 0 60px rgba(201, 168, 76, 0.45),
        0 0 100px rgba(201, 168, 76, 0.15);
    transform: scale(1.05) rotate(5deg);
}

.center-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.center-logo:hover img { opacity: 1; }

/* ---- Orbit wrapper (STABLE, NO ROTATION ANIMATION HERE) ---- */
#orbit-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ---- Individual Node (Glassmorphism) ---- */
.mm-node {
    position: absolute;
    pointer-events: auto;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(20, 27, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.8rem 1.4rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    z-index: 8;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    
    /* Smooth movement via JS top/left */
    transition:
        opacity 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        background 0.4s ease,
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        scale 0.3s ease;
}

.mm-node .node-icon {
    font-size: 1.2rem;
    color: var(--accent-gold);
    flex-shrink: 0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.mm-node .node-label {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Professional Hover State */
.mm-node:hover:not(.active):not(.hidden) {
    background: rgba(30, 42, 68, 0.9);
    border-color: var(--accent-gold);
    box-shadow: 0 0 25px rgba(201, 168, 76, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 12;
}

.mm-node:hover .node-icon {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

/* Focused State */
.mm-node.focused {
    background: rgba(20, 27, 45, 0.95);
    border-color: var(--accent-gold);
    box-shadow: 
        0 0 40px rgba(201, 168, 76, 0.4),
        0 0 100px rgba(201, 168, 76, 0.1);
    z-index: 20;
    transform: translate(-50%, -50%) scale(1.15);
}

.mm-node.dimmed {
    opacity: 0.15;
    pointer-events: none;
    filter: blur(2px);
}

/* Sub-nodes */
.mm-node.sub-node {
    background: rgba(10, 14, 23, 0.85);
    border-color: rgba(59, 130, 246, 0.4);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.mm-node.sub-node .node-icon {
    font-size: 1rem;
    color: var(--accent-blue);
}

.mm-node.sub-node:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

@keyframes pop-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---- Description Panel (Glassmorphism Panel) ---- */
#mm-desc-panel {
    position: absolute;
    z-index: 30;
    width: 280px;
    background: rgba(20, 27, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.8rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    pointer-events: none;
    
    opacity: 0;
    transform: translate(20px, -50%) scale(0.9);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

#mm-desc-panel.visible {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
    pointer-events: auto;
}

#mm-desc-panel .desc-icon {
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    display: block;
}

#mm-desc-panel .desc-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
}

#mm-desc-panel .desc-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

#mm-desc-panel .desc-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, var(--accent-gold), #8a6d2b);
    color: #000;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

#mm-desc-panel .desc-btn:hover {
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
    transform: translateY(-2px);
}

/* ---- ESC Hint ---- */
#mm-esc-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

#mm-esc-hint.visible { opacity: 1; }

/* ---- Line Animation ---- */
@keyframes drawLine {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}
