/**
 * Nafra Overseas - Interactive Process Flow Pipeline (Clean White Theme)
 * 7 Process cards connected by dynamic 60fps animated plasma energy conduit
 */

/* ==========================================================================
   1. CLEAN WRAPPER & CANVAS CONTAINER
   ========================================================================== */
.pipeline-circuit-section {
    position: relative;
    padding: 3.5rem 0 2.5rem;
    overflow: hidden;
    scroll-margin-top: 110px;
}

.pipeline-clean-wrapper {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    scroll-margin-top: 110px;
}

.pipeline-canvas-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#pipelineEnergyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   2. 7 PROCESS CARDS (WHITE LIQUID-GLASS LUXURY THEME)
   ========================================================================== */
.pipeline-nodes-wrapper {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1.15rem;
    align-items: stretch;
}

.pipeline-node {
    position: relative;
    z-index: 4;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    padding: 1.6rem 0.85rem 1.45rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: url('../images/cursor/cursor-leaf-pointer.png') 2 2, pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.pipeline-node:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(16, 185, 129, 0.6);
    background: #FFFFFF;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.16);
}

/* Active Node State: Elevated, Glowing Emerald Halo */
.pipeline-node.is-active {
    border-color: #10B981;
    background: #FFFFFF;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 14px 35px rgba(16, 185, 129, 0.28), 0 0 0 3.5px rgba(16, 185, 129, 0.22);
}

/* Shockwave Expanding Ring on Laser Impact */
.pipeline-node::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 25px;
    border: 2.5px solid #10B981;
    opacity: 0;
    pointer-events: none;
}

.pipeline-node.just-activated::before {
    animation: nodeShockwaveLight 0.85s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes nodeShockwaveLight {
    0% { transform: scale(0.95); opacity: 0.95; border-color: #F59E0B; }
    50% { opacity: 0.7; border-color: #10B981; }
    100% { transform: scale(1.15); opacity: 0; border-color: transparent; }
}

/* Terminal Connection Ports */
.pipeline-port {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #10B981;
    transform: translateY(-50%);
    z-index: 4;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pipeline-port.port-in {
    left: -6px;
}

.pipeline-port.port-out {
    right: -6px;
}

.pipeline-node.is-active .pipeline-port {
    background: #10B981;
    border-color: #FFFFFF;
    box-shadow: 0 0 10px #10B981, 0 0 20px rgba(16, 185, 129, 0.8);
}

/* Node Icon Badge */
.pipeline-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #059669;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pipeline-node:hover .pipeline-icon-box {
    transform: scale(1.12);
    color: #D97706;
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.pipeline-node.is-active .pipeline-icon-box {
    transform: scale(1.15);
    color: #FFFFFF;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-color: #10B981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

/* Step Identification Pill */
.pipeline-step-pill {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
    transition: all 0.3s ease;
}

.pipeline-node.is-active .pipeline-step-pill {
    background: #10B981;
    color: #FFFFFF;
    border-color: #10B981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.pipeline-node-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 0.96rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
    margin: 0 0 0.35rem 0;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-node-subtitle {
    font-size: 0.74rem;
    color: #64748B;
    line-height: 1.35;
    margin: 0;
    font-weight: 500;
}

.pipeline-node.is-active .pipeline-node-subtitle {
    color: #059669;
    font-weight: 600;
}

/* ==========================================================================
   3. RESPONSIVE ADAPTATIONS
   ========================================================================== */
@media (max-width: 1200px) {
    .pipeline-nodes-wrapper {
        gap: 0.75rem;
    }
    .pipeline-node {
        padding: 1.3rem 0.6rem 1.1rem;
    }
    .pipeline-icon-box {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    .pipeline-node-title {
        font-size: 0.88rem;
    }
}

@media (max-width: 992px) {
    .pipeline-nodes-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .pipeline-nodes-wrapper {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        position: relative;
        z-index: 4;
    }
    .pipeline-node {
        position: relative;
        z-index: 4;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: row;
        text-align: left;
        padding: 1rem 1.25rem;
        gap: 1rem;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    }
    .pipeline-icon-box {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .pipeline-node-title {
        min-height: unset;
        justify-content: flex-start;
        font-size: 0.95rem;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }
    .pipeline-port {
        display: none;
    }
}
