/* Freelance Workflow Component Styles */
:root {
    --primary: #ff4c4b;
    --primary-600: #ff4c4b;
    --primary-400: #ff7a79;
    --muted: #0f172a;
}

.freelance-workflow-section {
    position: relative;
    background: #ffffff;
    overflow: hidden;
}

.freelance-workflow-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
            rgba(255, 76, 75, 0.04) 1px,
            transparent 1px
        ),
        linear-gradient(90deg, rgba(255, 76, 75, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.workflow-container {
    position: relative;
    width: 100%;
    max-width: 1464px;
    padding: 60px 20px 90px;
    margin: 0 auto;
    z-index: 1;
}

.headerworkflow {
    text-align: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.8s ease forwards;
}
.workflow-button {
    width: fit-content;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.headerworkflow h1 {
    font-size: 2.75em;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.headerworkflow p {
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
}

.main-content {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    max-width: 1464px;
    margin: 0 auto;
    justify-content: space-between;
}

.steps-info {
    flex: 1;
    max-width: 500px;
    padding-top: 20px;
}

.steps-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.2;
}

.steps-description {
    font-size: 1.1em;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 32px;
}

.animation-grid {
    position: relative;
    width: 56%;
    height: 350px;
    margin: 0;
}

/* Arrow Container (SVG overlay) */
.arrow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 97%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: block;
}

.connection-arrow {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.connection-arrow.active {
    opacity: 1;
    animation: drawArrow 0.8s ease forwards;
}

@keyframes drawArrow {
    from {
        stroke-dashoffset: var(--path-length);
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Widgets Grid (4x2) */
.widgets-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 20px 20px;
    padding: 8px 12px;
}

.widget {
    background: #ffffff;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease,
        filter 0.3s ease;
    opacity: 0;
    transform: scale(0.94) translateY(10px);
    cursor: pointer;
    z-index: 10;
    width: 100%;
    height: fit-content;
    filter: grayscale(100%);
}

.widget.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: grayscale(0%);
}

.widget:not(.active) {
    opacity: 0.2;
    filter: grayscale(100%);
}

.widget:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.widget.highlight {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
}

.widget-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    color: #fff;
}

.widget-title {
    font-size: 13px;
    font-weight: 700;
    color: #0b1220;
    margin-bottom: 3px;
}

.widget-description {
    font-size: 11px;
    color: #000000;
    line-height: 1.4;
}

.status-badge {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 14px 28px;
    border-radius: 100px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #111827;
    z-index: 100;
    opacity: 0;
    animation: slideUp 0.5s ease forwards 0.5s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px);
    }
}

.status-badge .status-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-600);
    border-radius: 50%;
    margin-right: 12px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.floating-shape {
    position: absolute;
    opacity: 0.12;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .headerworkflow h1 {
        font-size: 2.1em;
    }

    .main-content {
        flex-direction: column;
        gap: 40px;
    }

    .steps-info {
        max-width: 100%;
        text-align: center;
    }

    .animation-grid {
        width: 100%;
        height: 500px;
    }

    .widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .workflow-container {
        padding: 40px 15px 60px;
    }

    .headerworkflow h1 {
        font-size: 1.8em;
    }

    .steps-title {
        font-size: 1.8em;
    }

    .animation-grid {
        height: 500px;
    }
    .workflow-button {
        width: 100%;
    }
    #statusText {
        text-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .headerworkflow h1 {
        font-size: 1.5em;
    }

    .steps-title {
        font-size: 1.5em;
    }

    .steps-description {
        font-size: 1em;
    }

    .widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 5px 8px;
    }

    .widget {
        padding: 10px;
    }

    .widget-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .widget-title {
        font-size: 11px;
    }

    .widget-description {
        font-size: 10px;
    }
}
