/* ======= WORKFLOW PAGE SPECIFIC STYLES ======= */

.page-header {
    padding: 140px 0 80px;
    margin-bottom: 2rem;
}

.mr-1 {
    margin-right: 0.5rem;
}

.ml-1 {
    margin-left: 0.5rem;
}

.nav-links a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

/* Horizontal Flow Layout (取代舊有垂直 Timeline) */
.horizontal-flow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    position: relative;
    padding-bottom: 2rem;
}

.flow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.step-header {
    padding: 1rem 0;
    text-align: center;
    border-radius: 8px 8px 0 0;
    color: white;
    margin-bottom: -1px;
    /* seamless connection to the card below */
}

.bg-orange {
    background-color: var(--accent);
}

.bg-green {
    background-color: var(--success);
}

.step-icon-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.2rem;
    margin: 0.5rem 0 0.8rem 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.flow-step:hover .step-icon-box {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.step-icon-box i {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    color: white;
}

.step-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    opacity: 1;
    letter-spacing: 2px;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-sm);
    flex-grow: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.border-top-blue {
    border-top: 3px solid var(--primary);
}

.border-top-orange {
    border-top: 3px solid var(--accent);
}

.border-top-green {
    border-top: 3px solid var(--success);
}

.flow-arrow {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--border-color);
    z-index: 10;
}

/* Remove arrow for the last item */
.flow-step:last-child .flow-arrow {
    display: none;
}

.role-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.bg-blue-light {
    background-color: rgba(45, 55, 72, 0.1);
}

.bg-orange-light {
    background-color: rgba(255, 106, 0, 0.1);
}

.bg-green-light {
    background-color: rgba(16, 185, 129, 0.1);
}

.text-blue {
    color: var(--primary);
}

.text-primary {
    color: var(--primary);
}

.task-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.task-list li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.sys-automation {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fdf6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    display: inline-block;
}

/* Features grid specific for 4 items */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
}

.text-small {
    font-size: 0.9rem;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .horizontal-flow {
        gap: 1rem;
    }

    .glass-card {
        padding: 1rem;
    }

    .flow-arrow {
        right: -15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .horizontal-flow {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* Hide arrows on tablet when wrapping */
    .flow-arrow {
        display: none;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .horizontal-flow {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .grid-4 {
        grid-template-columns: 1fr;
    }
}