/* ===== HOW IT WORKS SECTION STYLES ===== */
/* File: styles/sections/how-it-works.css */

/* ===== HOW IT WORKS SECTION CONTAINER ===== */
.how-it-works {
    padding: var(--spacing-4xl) 0;
    background: linear-gradient(180deg, var(--bg-lighter) 0%, var(--bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* ===== SECTION TITLE ===== */
.how-it-works .section-title {
    text-align: center;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-4xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    animation: slideInDown 0.6s ease-out;
}

.how-it-works .section-title i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== STEPS GRID ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ===== CONNECTING LINE (DESKTOP ONLY) ===== */
@media (min-width: 769px) {
    .steps-grid {
        position: relative;
    }

    .steps-grid::before {
        content: '';
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,
            transparent,
            var(--accent-orange) 10%,
            var(--accent-orange) 90%,
            transparent);
        z-index: 1;
    }
}

/* ===== STEP CARD ===== */
.step-card {
    background: var(--bg-lighter);
    border: var(--border-width-base) solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-orange);
    box-shadow: var(--shadow-lg);
}

/* ===== STEP NUMBER ===== */
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
    color: white;
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    border-radius: 50%;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 4px 15px rgba(254, 132, 0, 0.3);
    transition: var(--transition-base);
    position: relative;
}

.step-card:hover .step-number {
    transform: scale(1.1) rotateZ(10deg);
    box-shadow: 0 8px 25px rgba(254, 132, 0, 0.4);
}

/* ===== STEP CONTENT ===== */
.step-card h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    transition: color 0.3s;
}

.step-card:hover h3 {
    color: var(--accent-orange);
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ===== ICON BADGES ===== */
.step-card::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--accent-orange-subtle);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.step-card:hover::before {
    opacity: 1;
}

/* ===== ARROWS BETWEEN STEPS (MOBILE) ===== */
@media (max-width: 768px) {
    .step-card {
        position: relative;
    }

    .step-card:not(:last-child)::after {
        content: '↓';
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5rem;
        color: var(--accent-orange);
        font-weight: bold;
        animation: bounce 2s ease-in-out infinite;
    }

    @keyframes bounce {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
        }
        50% {
            transform: translateX(-50%) translateY(8px);
        }
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INDIVIDUAL STEP ANIMATIONS ===== */
.step-card {
    animation: slideUp 0.6s ease-out backwards;
}

.step-card:nth-child(1) {
    animation-delay: 0.2s;
}

.step-card:nth-child(2) {
    animation-delay: 0.4s;
}

.step-card:nth-child(3) {
    animation-delay: 0.6s;
}

.step-card:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .how-it-works .section-title {
        font-size: 2rem;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .step-number {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .step-card h3 {
        font-size: 1.1rem;
    }

    .step-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .how-it-works {
        padding: var(--spacing-3xl) 0;
    }

    .how-it-works .section-title {
        font-size: 1.8rem;
        margin-bottom: var(--spacing-2xl);
    }

    .how-it-works .section-title i {
        font-size: 1.8rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        margin: 0;
    }

    .step-card {
        padding: var(--spacing-2xl) var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        margin-bottom: var(--spacing-md);
    }

    .step-card h3 {
        font-size: 1.1rem;
    }

    .step-card p {
        font-size: 0.9rem;
    }

    .step-card:nth-child(1)::after {
        animation-delay: 0s;
    }

    .step-card:nth-child(2)::after {
        animation-delay: 0.2s;
    }

    .step-card:nth-child(3)::after {
        animation-delay: 0.4s;
    }
}

@media (max-width: 480px) {
    .how-it-works {
        padding: var(--spacing-2xl) 0;
    }

    .how-it-works .section-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-xl);
        flex-direction: column;
    }

    .how-it-works .section-title i {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .steps-grid {
        gap: 2.5rem;
    }

    .step-card {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: var(--border-radius-md);
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: var(--spacing-md);
    }

    .step-card h3 {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    .step-card p {
        font-size: 0.85rem;
        line-height: var(--line-height-normal);
    }

    .step-card::before {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .step-number {
        animation: none;
    }

    .step-card, .how-it-works .section-title {
        animation: none;
    }

    .how-it-works .section-title i {
        animation: none;
    }

    .step-card:hover {
        transform: none;
    }

    .step-card:hover .step-number {
        transform: none;
    }

    .step-card:not(:last-child)::after {
        animation: none;
    }
}
