/* ============================================
   PROCESS FLOW TIMELINE STYLES
   File: /css/sections/placement/placement-process-flow.css
   Purpose: Animated process flow with connecting line and dots
   Last Updated: [CURRENT_DATE]
============================================ */

/* ===== PROCESS FLOW SECTION ===== */
.process-flow-section {
    background: linear-gradient(135deg, rgba(20, 33, 61, 0.03) 0%, rgba(252, 163, 17, 0.03) 100%);
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

/* Section Header */
.process-flow-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.process-flow-title {
    font-size: 2.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--nsb-primary);
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
}

.process-flow-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--nsb-accent);
    border-radius: 2px;
}

/* ===== PROCESS FLOW CONTAINER ===== */
.process-flow-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}

/* Connecting Line - Desktop (Horizontal) */
.process-flow-line {
    position: absolute;
    top: 120px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--nsb-accent);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.3);
}

/* Line Draw Animation */
.process-flow-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--nsb-accent);
    animation: drawLine 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

/* Moving Dot Animation */
.process-flow-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--nsb-accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--nsb-accent);
    animation: moveDot 8s linear infinite;
    z-index: 2;
}

/* Dots at Card Positions */
.process-flow-dot {
    position: absolute;
    top: 120px;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--nsb-primary);
    border: 3px solid var(--nsb-accent);
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* ===== PROCESS CARDS GRID ===== */
.process-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
    position: relative;
    z-index: 4;
}

/* Individual Process Card */
.process-card {
    background: var(--nsb-white);
    border: 2px solid var(--nsb-accent);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.process-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(252, 163, 17, 0.2);
    border-color: var(--nsb-primary);
}

.process-card:hover .process-numeral {
    background: var(--nsb-primary);
    color: var(--nsb-white);
}

/* Roman Numeral */
.process-numeral {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: var(--nsb-white);
    border: 2px solid var(--nsb-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--nsb-primary);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
}

/* Process Icon */
.process-icon {
    font-size: 2.5rem;
    color: var(--nsb-accent);
    margin-bottom: var(--spacing-sm);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Process Title */
.process-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--nsb-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Process Description */
.process-description {
    font-size: 0.95rem;
    color: var(--nsb-text-secondary);
    line-height: 1.5;
}

/* ===== MOBILE VERTICAL LAYOUT ===== */
@media (max-width: 992px) {
    .process-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
    
    .process-flow-line {
        display: none;
    }
    
    .process-flow-dot {
        display: none;
    }
    
    /* Vertical connecting line for mobile */
    .process-flow-container::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
        background: var(--nsb-accent);
        z-index: 1;
    }
    
    /* Vertical line draw animation */
    .process-flow-container::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
        height: 0;
        background: var(--nsb-accent);
        animation: drawLineVertical 2s ease-out forwards;
        animation-delay: 0.5s;
        z-index: 2;
    }
    
    /* Mobile dots */
    .process-card {
        position: relative;
    }
    
    .process-card::before {
        content: '';
        position: absolute;
        top: 50%;
        left: -30px;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        background: var(--nsb-primary);
        border: 3px solid var(--nsb-accent);
        border-radius: 50%;
        z-index: 3;
    }
    
    /* For 3-column layout on tablet, adjust dots */
    .process-card:nth-child(3n+1)::before {
        left: -25px;
    }
    
    .process-card:nth-child(3n+3)::before {
        left: auto;
        right: -25px;
    }
}

@media (max-width: 768px) {
    .process-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-card::before {
        left: -20px;
    }
    
    .process-card:nth-child(odd)::before {
        left: -20px;
        right: auto;
    }
    
    .process-card:nth-child(even)::before {
        left: auto;
        right: -20px;
    }
}

@media (max-width: 576px) {
    .process-cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .process-card {
        padding: var(--spacing-md);
    }
    
    .process-card::before {
        left: -15px;
    }
    
    .process-title {
        min-height: auto;
        margin-bottom: var(--spacing-xs);
    }
    
    .process-icon {
        height: 50px;
        font-size: 2rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes drawLine {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes drawLineVertical {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

@keyframes moveDot {
    0% {
        left: 0;
    }
    100% {
        left: 100%;
    }
}

/* Pause animation on hover */
.process-flow-container:hover .process-flow-line::after {
    animation-play-state: paused;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .process-flow-line::before,
    .process-flow-line::after,
    .process-flow-container::after {
        animation: none;
    }
    
    .process-card {
        transition: none;
    }
}

@media (max-width: 576px) {
    .process-card {
        padding: 1rem !important;
        min-height: auto !important;
    }
    
    .process-title {
        font-size: 1rem !important;
        min-height: 40px !important;
    }
    
    .process-description {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    .process-icon {
        font-size: 1.5rem !important;
        height: 40px !important;
    }
    
    .process-numeral {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* ===== END OF PROCESS FLOW STYLES ===== */