/* How It Works Section Styles */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #fff3f0;
    --secondary: #6b3e26;
    --accent: #f8a5c2;
    --text-dark: #4a3728;
    --text-light: #8b6f5c;
    --white: #ffffff;
    --gradient-warm: linear-gradient(135deg, #fff3f0 0%, #ffe4dc 100%);
    --shadow-soft: 0 4px 20px rgba(107, 62, 38, 0.1);
    --shadow-medium: 0 8px 30px rgba(107, 62, 38, 0.15);
}

/* Section container */
.how-it-works {
    padding: 80px 24px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(248, 165, 194, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(107, 62, 38, 0.05) 0%, transparent 50%),
        var(--gradient-warm);
    position: relative;
    overflow: hidden;
}

/* Floating stickers */
.how-it-works-floating-stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.how-it-works-sticker {
    position: absolute;
    width: 80px;
    height: auto;
    opacity: 0.08;
    filter: grayscale(20%) blur(1px);
}

.how-it-works-sticker-1 {
    top: 10%;
    right: 5%;
    width: 90px;
}

.how-it-works-sticker-2 {
    bottom: 15%;
    left: 3%;
    width: 85px;
    transform: scaleX(-1);
}

.how-it-works .container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.how-it-works .section-header {
    text-align: center;
    margin-bottom: 56px;
}

.how-it-works .section-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.how-it-works .section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--secondary);
    margin-bottom: 12px;
}

.how-it-works .section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 550px;
    margin: 0 auto;
}

/* ===== STEPS CONTAINER ===== */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Connecting line */
.steps-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 60px;
    bottom: 60px;
    width: 4px;
    background: linear-gradient(180deg,
            var(--accent) 0%,
            var(--secondary) 50%,
            var(--accent) 100%);
    border-radius: 4px;
    transform: translateX(-50%);
    z-index: 0;
}

/* ===== STEP ITEM ===== */
.step-item {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item:nth-child(odd) {
    flex-direction: row;
}

.step-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* Step number bubble */
.step-number {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent) 0%, #e8879f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    box-shadow:
        0 8px 24px rgba(248, 165, 194, 0.4),
        0 0 0 6px rgba(255, 255, 255, 0.8);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* Step content card */
.step-content {
    flex: 1;
    max-width: calc(50% - 60px);
    background: var(--white);
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow:
        0 10px 40px rgba(107, 62, 38, 0.08),
        0 4px 12px rgba(107, 62, 38, 0.04);
    border: 2px solid transparent;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 20px;
}

.step-item:nth-child(odd) .step-content {
    margin-right: auto;
    text-align: left;
    flex-direction: row;
}

.step-item:nth-child(even) .step-content {
    margin-left: auto;
    text-align: left;
    flex-direction: row-reverse;
}

.step-content:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 48px rgba(107, 62, 38, 0.12),
        0 6px 20px rgba(248, 165, 194, 0.15);
    border-color: var(--accent);
}

/* Mockup illustration in step */
.step-img {
    width: 120px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
    filter: drop-shadow(0 4px 12px rgba(107, 62, 38, 0.15));
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.step-content:hover .step-img {
    transform: scale(1.08);
}

/* Step text */
.step-text {
    flex: 1;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 900px) {
    .steps-container::before {
        left: 32px;
    }

    .step-item,
    .step-item:nth-child(odd),
    .step-item:nth-child(even) {
        flex-direction: row;
        padding-left: 80px;
    }

    .step-number {
        left: 32px;
        transform: translateX(-50%);
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .step-content,
    .step-item:nth-child(odd) .step-content,
    .step-item:nth-child(even) .step-content {
        max-width: 100%;
        margin: 0;
        flex-direction: row;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 640px) {
    .how-it-works {
        padding: 40px 16px;
    }

    .how-it-works .section-header {
        margin-bottom: 24px;
    }

    .how-it-works .section-badge {
        padding: 6px 14px;
        font-size: 12px;
        margin-bottom: 8px;
    }

    .how-it-works .section-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .how-it-works .section-subtitle {
        font-size: 0.85rem;
    }

    /* Hide timeline line on mobile */
    .steps-container::before {
        display: none;
    }

    .step-item {
        margin-bottom: 16px;
    }

    .step-item,
    .step-item:nth-child(odd),
    .step-item:nth-child(even) {
        padding-left: 0;
    }

    /* Hide step number on mobile */
    .step-number {
        display: none;
    }

    /* Vertical card layout */
    .step-content {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
        gap: 10px;
        border-radius: 16px;
        max-width: 100%;
    }

    .step-item:nth-child(odd) .step-content,
    .step-item:nth-child(even) .step-content {
        flex-direction: column;
        margin: 0 auto;
    }

    /* Bigger image in center */
    .step-img {
        width: 100%;
        max-width: 180px;
        height: auto;
        margin: 0 auto;
    }

    .step-text {
        text-align: center;
    }

    .step-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .step-desc {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* ===== RESPONSIVE - VERY SMALL MOBILE ===== */
@media (max-width: 400px) {
    .how-it-works {
        padding: 32px 12px;
    }

    .how-it-works .section-header {
        margin-bottom: 18px;
    }

    .how-it-works .section-title {
        font-size: 1.25rem;
    }

    .step-item {
        margin-bottom: 12px;
    }

    .step-content {
        padding: 12px 10px;
        gap: 8px;
        border-radius: 14px;
    }

    .step-img {
        max-width: 150px;
    }

    .step-title {
        font-size: 0.85rem;
    }

    .step-desc {
        font-size: 0.7rem;
    }
}