/*
 * ══════════════════════════════════════════════
 *  CONSULTING.CSS — Estilos do Painel de Consultoria
 * ══════════════════════════════════════════════
 *
 *  Propósito : Estilos específicos do diagrama de processos da consultoria.
 */

/* Background Blueprint Tech Grid */
.blueprint-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.75;
}

/* Diagram Container */
.diagram-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG Connections Layer */
.diagram-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Base Connection Lines */
.base-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Active Animated Glowing Lines */
.active-flow {
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 8, 12;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Classes applied by JS when the flow is active */
.active-flow.active {
    opacity: 1;
    animation: dash-flow 1.5s linear infinite;
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -40;
    }
}

/* Flow line colors */
.flow-diag {
    stroke: #38bdf8;
}

.flow-arq {
    stroke: #38bdf8;
}

.flow-entr {
    stroke: #38bdf8;
}

.flow-res {
    stroke: #38bdf8;
}

/* Central Hub: Consultoria CapCode */
.hub-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hub-inner-core {
    position: relative;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.02) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.15);
    z-index: 2;
    transition: all 0.6s ease;
}

/* Pulse glow animation for the core hub when diagram is active */
.diagram-container.active-hub .hub-inner-core {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 35px rgba(14, 165, 233, 0.35);
    color: #fff;
}

.hub-outer-ring {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(56, 189, 248, 0.25);
    border-radius: 50%;
    animation: spin-slow 25s linear infinite;
    pointer-events: none;
}

.hub-icon {
    font-size: 28px;
    animation: pulse-slow 3s ease-in-out infinite;
}

.hub-label {
    position: absolute;
    top: 106%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    white-space: nowrap;
}

.hub-label-title {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.9);
}

.hub-label-sub {
    font-size: 7.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1px;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.05em;
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.75;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

/* Capsule Nodes Styling */
.diagram-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    width: 172px;
    height: 56px;
    z-index: 5;
    opacity: 0.2;
    transform: scale(0.95);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

/* Interactive Hover only on active nodes */
.diagram-node.active:hover {
    transform: translateY(-3px) scale(1.03) !important;
    background: rgba(255, 255, 255, 0.03);
}

/* Positions matching our SVG layout coordinates (Fase 3 on bottom-left, Fase 4 on bottom-right) */
.node-diag {
    top: 12%;
    left: 5%;
}

.node-arq {
    top: 12%;
    right: 5%;
}

.node-entr {
    top: 72%;
    left: 5%;
}

.node-res {
    top: 72%;
    right: 5%;
}

.node-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.node-icon {
    font-size: 15px;
    display: block;
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.node-title {
    font-size: 9.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.5s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-subtitle {
    font-size: 7.5px;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.5s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-glow {
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    border: 1px solid transparent;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    box-shadow: 0 0 20px transparent;
}

/* Active State Styles */
.diagram-node.active {
    opacity: 1;
    transform: scale(1);
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.diagram-node.active .node-title {
    color: #fff;
}

.diagram-node.active .node-subtitle {
    color: rgba(255, 255, 255, 0.55);
}

/* 🎨 Node 1: Diagnóstico (Sky Blue) */
.diagram-node.active.node-diag .node-icon-wrapper {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.diagram-node.active.node-diag .node-glow {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    opacity: 1;
}

/* 🎨 Node 2: Arquitetura (Sky Blue) */
.diagram-node.active.node-arq .node-icon-wrapper {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.diagram-node.active.node-arq .node-glow {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    opacity: 1;
}

/* 🎨 Node 3: Entrega (Sky Blue) */
.diagram-node.active.node-entr .node-icon-wrapper {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.diagram-node.active.node-entr .node-glow {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    opacity: 1;
}

/* 🎨 Node 4: Resultado (Sky Blue) */
.diagram-node.active.node-res .node-icon-wrapper {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.diagram-node.active.node-res .node-glow {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    opacity: 1;
}