

.hero-graphic {
    flex: 1;
    max-width: 600px;
    background: linear-gradient(135deg, #122e62 0%, #113371 50%, #08224f 100%);
    /* background: radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.15), transparent 40%),linear-gradient(135deg, #0a1f44 0%, #0f2a5c 50%, #071733 100%); */

    border-radius: 10px;
    /* box-shadow: 0 0 20px -5px lightgray; */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Container */
.workflow {
    position: relative;
    width: 600px;
    height: 400px;
    margin: auto;
}

.workflow .text{
    position: absolute;
    top: 30px;
    left: 30px;
    color: white;
    margin: 0;
}
/* Nodes */
.node {
    position: absolute;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    /* border: 1px solid rgba(148, 163, 184, 0.2); */
    border: 1px dashed rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(6px);
    white-space: nowrap;
    transition: 0.2s ease-in-out;
}
.node.active{
    font-size: 16px;
    padding: 14px 20px; 
    border: 2px solid rgba(16, 185, 129, 0.4);
}

/* Special AI node */
.node.ai {
    border: 1px dashed rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}
.node:hover,
.node.active:hover,
.node.ai:hover {
    /* padding: 14px 18px; */
    cursor: default;
    box-shadow: 0 0 20px -5px black;
}

/* Node Positions (spread across full width) */
.node-1 { top: 180px; left: 40px; }     /* Lead */
.node-2 { top: 175px; left: 260px; }   /* CRM */
.node-3 { top: 60px; right: 40px; }    /* Database */
.node-4 { bottom: 40px; left: 242px; }   /* AI */
.node-5 { bottom: 40px; right: 40px; }   /* Email */
.node-6 { top: 180px; right: 40px; }   /* Notification */


/* Lines */
.line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transform-origin: left;
    animation: flow 3s linear infinite;
    background-size: 200% 100%;
}

/* Lead → CRM */
.line-lead-to-crm {
    top: 200px;
    left: 150px;
    width: 100px;
    transform: rotate(0deg);
}

/* CRM → Database */
.line-crm-to-db {
    bottom: 320px;
    left: 300px;
}
.line-crm-to-db.line-elbow {
    position: absolute;
}

/* Vertical segment (go up) */
.line-crm-to-db .line-vertical {
    position: absolute;
    width: 2px;
    height: 80px; /* adjust */
    background: linear-gradient(180deg, #2563eb, #7c3aed);
    background-size: 100% 200%;
    animation: flow-vertical 2s linear infinite;
}

/* Horizontal segment (go right) */
.line-crm-to-db .line-horizontal {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 160px; /* adjust */
    background: linear-gradient(90deg, #7c3aed, #2563eb);
    background-size: 200% 100%;
    animation: flow-horizontal 2s linear infinite;
}

.line-ai-to-email {
    bottom: 60px;
    left: 370px;
    width: 110px;
}

.line-crm-to-ai {
    top: 235px;
    left: 300px;
    width: 70px;
    transform: rotate(90deg);
}

.line-crm-to-notification {
    top: 200px;
    left: 350px;
    width: 100px;
    transform: rotate(0deg);
}


@keyframes flow {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}
@keyframes flow-horizontal {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}
@keyframes flow-vertical {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 200%; }
}

@media (max-width: 800px) {
    .hero-graphic {
        max-width: calc(100% - 10px);
        width: 100%;
        height: auto; /* allow height to scale with content */
        padding: 5px;
    }

    .workflow {
        width: 100%;
        height: 300px; /* slightly smaller on mobile */
    }

    .workflow .text {
        top: 10px;
        left: 10px;
        font-size: 14px;
    }

    /* Nodes scale down */
    .node {
        padding: 6px 10px;
        font-size: 12px;
    }

    .node.active {
        font-size: 14px;
        padding: 8px 14px;
    }

    /* Reposition nodes to fit narrower screen */
    .node-1 { top: 40px; left: 5px; }     /* Lead */
    .node-2 { top: calc(50% - 18px); left: calc(50% - 32px); }   /* CRM */
    .node-3 { top: 40px; right: 5px; }    /* Database */
    .node-4 { bottom: 5px; left: calc(50% - 48px); }   /* AI */
    .node-5 { bottom: 5px; right: 5px; }   /* Email */
    .node-6 { top: calc(50% - 14px); right: 5px; }   /* Notification */

    /* Lines scale/reposition */
    .line-lead-to-crm {
        top: 70px;
        left: 90px;
        width: 75px;
        transform: rotate(45deg);
    }

    .line-crm-to-db {
        bottom: calc(50% + 95px);
        left: calc(50%);
    }

    .line-crm-to-db .line-vertical {
        height: 70px;
    }
    .line-crm-to-db .line-horizontal {
        width: 80px;
    }

    .line-ai-to-email {
        bottom: 20px;
        left: calc(50% + 55px);
        width: 40px;
    }

    .line-crm-to-ai {
        top: calc(50% + 25px);
        left: calc(50%);
        transform: rotate(90deg);
        width: 80px;
    }

    .line-crm-to-notification {
        top: calc(50%);
        left: calc(50% + 40px);
        transform: rotate(0deg);
        width: 30px;
    }
}