/* ═══════════════════════════════════════════════════════════════════════════
   HOW IT WORKS SECTION - Premium UI/UX 2025
   ═══════════════════════════════════════════════════════════════════════════ */
.howItWorksPremiumSection {
    --hiw-primary: #F59E0B;
    --hiw-primary-light: #FBBF24;
    --hiw-primary-dark: #D97706;
    --hiw-accent: #10B981;
    --hiw-bg: linear-gradient(165deg, #fffbeb 0%, #fef3c7 35%, #fde68a 70%, #fcd34d 100%);
    --hiw-glass: rgba(255, 255, 255, 0.95);
    --hiw-glass-border: rgba(255, 255, 255, 1);
    --hiw-shadow-soft: 0 4px 20px rgba(245, 158, 11, 0.08);
    --hiw-shadow-medium: 0 12px 40px rgba(245, 158, 11, 0.12);
    --hiw-shadow-strong: 0 24px 60px rgba(245, 158, 11, 0.16);
    --hiw-text-primary: #78350f;
    --hiw-text-secondary: #92400e;
    --hiw-text-muted: #a16207;
    --hiw-radius: 28px;
    --hiw-radius-sm: 16px;
    
    width: 100%;
    padding: clamp(70px, 9vw, 110px) clamp(20px, 5vw, 60px);
    background: var(--hiw-bg);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Background decoration */
.howItWorksPremiumSection::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(ellipse 80% 60% at 10% 90%, rgba(245, 158, 11, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 10%, rgba(16, 185, 129, 0.06) 0%, transparent 55%);
    pointer-events: none;
}

.howItWorksInner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(50px, 7vw, 100px);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Content column */
.howItWorksContent {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(26px, 3.2vw, 34px);
}

/* Eyebrow badge */
.hiwEyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 9px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 100px;
    box-shadow:
        0 6px 18px rgba(217, 119, 6, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hiwEyebrowIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--hiw-primary) 0%, var(--hiw-primary-dark) 100%);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.35);
}

.hiwEyebrowText {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--hiw-primary-dark);
}

/* Heading */
.hiwHeading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hiwTitle {
    font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: clamp(28px, 3.8vw, 42px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.5px;
    color: var(--hiw-text-primary);
    margin: 0;
}

.hiwTitleAccent {
    background: linear-gradient(120deg, #ea580c 0%, #d97706 55%, #b45309 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.hiwIntro {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: clamp(16.5px, 1.8vw, 18px);
    line-height: 1.72;
    letter-spacing: 0.1px;
    color: var(--hiw-text-secondary);
    margin: 0;
    max-width: 62ch;
}

/* Steps timeline */
.hiwSteps {
    list-style: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.hiwSteps::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg,
        rgba(245, 158, 11, 0.55) 0%,
        rgba(217, 119, 6, 0.35) 60%,
        rgba(16, 185, 129, 0.45) 100%);
}

.hiwStep {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
}

.hiwStepMarker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--hiw-primary-light) 0%, var(--hiw-primary) 45%, var(--hiw-primary-dark) 100%);
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    box-shadow:
        0 8px 20px rgba(217, 119, 6, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hiwStepCard {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 18px 22px 19px;
    box-shadow:
        0 10px 30px rgba(217, 119, 6, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease-out;
}

.hiwStep:hover .hiwStepCard {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.65);
    box-shadow:
        0 16px 38px rgba(217, 119, 6, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hiwStepHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.hiwStepTitle {
    font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: clamp(17.5px, 1.9vw, 19.5px);
    font-weight: 800;
    letter-spacing: -0.2px;
    line-height: 1.3;
    color: var(--hiw-text-primary);
    margin: 0;
}

.hiwStepMeta {
    flex-shrink: 0;
    padding: 5px 13px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.12) 100%);
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 100px;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--hiw-primary-dark);
    white-space: nowrap;
}

.hiwStepText {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: clamp(16px, 1.7vw, 17px);
    line-height: 1.65;
    letter-spacing: 0.1px;
    color: var(--hiw-text-secondary);
    margin: 0;
}

/* Bulk discounts offer card */
.hiwSavings {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 640px;
    padding: 20px 24px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(236, 253, 245, 0.8) 100%);
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 20px;
    box-shadow:
        0 10px 28px rgba(5, 150, 105, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hiwSavingsTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hiwSavingsTitle {
    font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.1px;
    line-height: 1.35;
    color: #065f46;
}

.hiwSavingsBadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    border-radius: 100px;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
    white-space: nowrap;
}

.hiwSavingsTiers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hiwSavingsTier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.06);
}

.hiwSavingsTierValue {
    font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.15;
    background: linear-gradient(120deg, #059669 0%, #047857 60%, #065f46 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hiwSavingsTierLabel {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #33534a;
}

.hiwSavingsNote {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    letter-spacing: 0.1px;
    text-align: center;
    color: #2c5245;
}

/* Image Wrapper */
.howItWorksImageWrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 84px;
}

.hiwImageBox {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.howItWorksImageGlow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hiw-primary) 0%, var(--hiw-accent) 100%);
    border-radius: var(--hiw-radius);
    filter: blur(70px);
    opacity: 0.2;
    animation: hiwGlowPulse 5s ease-in-out infinite;
}

@keyframes hiwGlowPulse {
    0%, 100% { opacity: 0.15; transform: scale(0.95); }
    50% { opacity: 0.25; transform: scale(1.02); }
}

.howItWorksImageFrame {
    position: relative;
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(255, 251, 235, 0.95) 25%,
            rgba(255, 255, 255, 0.97) 50%,
            rgba(236, 253, 245, 0.93) 75%,
            rgba(255, 255, 255, 0.98) 100%
        );
    border-radius: 20px;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 
        0 25px 70px rgba(245, 158, 11, 0.15),
        0 12px 35px rgba(245, 158, 11, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.howItWorksImageFrame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 0% 0%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    border-radius: 22px;
    pointer-events: none;
}

.howItWorksImageFrame:hover {
    transform: scale(1.02);
    box-shadow: 
        0 35px 90px rgba(245, 158, 11, 0.2),
        0 18px 45px rgba(245, 158, 11, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 1);
}

.howItWorksImageFrame img {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
    border-radius: 14px;
    position: relative;
    z-index: 1;
}

/* Floating Badge */
.howItWorksFloatingBadge .hiwBadgeTextShort {
    display: none;
}

@media (max-width: 600px) {
    .howItWorksFloatingBadge .hiwBadgeTextFull {
        display: none;
    }

    .howItWorksFloatingBadge .hiwBadgeTextShort {
        display: inline;
    }
}

.howItWorksFloatingBadge {
    position: absolute;
    bottom: -56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 14px 26px 14px 16px;
    background: linear-gradient(140deg, #059669, #047857, #065f46);
    color: white;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: clamp(13px, 1.25vw, 16px);
    letter-spacing: 0.3px;
    line-height: 1.4;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 
        0 4px 12px rgba(5, 150, 105, 0.3),
        0 8px 28px rgba(5, 150, 105, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    z-index: 2;
    animation: hiwBadgeFloat 4s ease-in-out infinite;
}

.howItWorksFloatingBadge .hiwBadgeDot {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    vertical-align: middle;
}

@keyframes hiwBadgeFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

.howItWorksFloatingBadge svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-sizing: content-box;
    color: #047857;
    stroke: #047857;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .howItWorksInner {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .howItWorksImageWrapper {
        order: -1;
        gap: 48px;
    }
    
    .howItWorksContent {
        align-items: center;
    }
    
    .hiwHeading {
        align-items: center;
    }
    
    .hiwIntro {
        max-width: 68ch;
    }
    
    .hiwSteps {
        max-width: 640px;
        margin: 0 auto;
        text-align: left;
    }
    
    .hiwSavings {
        max-width: 640px;
        text-align: left;
    }
    
    .howItWorksFloatingBadge {
        bottom: -18px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .howItWorksImageFrame img {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .howItWorksPremiumSection {
        padding: 50px 16px;
    }
    
    .howItWorksImageFrame {
        padding: 12px;
    }
    
    .howItWorksImageFrame img {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .hiwTitle {
        font-size: clamp(26px, 7vw, 32px);
        letter-spacing: -0.4px;
    }
    
    .hiwIntro {
        font-size: 16px;
        line-height: 1.65;
    }
    
    .hiwEyebrow {
        padding: 7px 15px 7px 8px;
    }
    
    .hiwEyebrowText {
        font-size: 12.5px;
        letter-spacing: 1.1px;
    }
    
    .hiwSteps {
        gap: 14px;
    }
    
    .hiwSteps::before {
        left: 19px;
        top: 24px;
        bottom: 24px;
    }
    
    .hiwStep {
        grid-template-columns: 40px 1fr;
        gap: 12px;
    }
    
    .hiwStepMarker {
        width: 40px;
        height: 40px;
        margin-top: 2px;
        border-width: 2.5px;
        border-radius: 13px;
        font-size: 17px;
    }
    
    .hiwStepCard {
        padding: 15px 16px 16px;
        border-radius: 15px;
    }
    
    .hiwStepHead {
        margin-bottom: 6px;
    }
    
    .hiwStepTitle {
        font-size: 17px;
    }
    
    .hiwStepMeta {
        padding: 4px 11px;
        font-size: 12.5px;
    }
    
    .hiwStepText {
        font-size: 15.5px;
        line-height: 1.6;
    }
    
    .howItWorksFloatingBadge {
        gap: 8px;
        padding: 10px 16px 10px 10px;
        font-size: clamp(14px, 4vw, 16px);
        letter-spacing: 0.2px;
        bottom: -24px;
        left: 50%;
        transform: translateX(-50%);
    }

    .howItWorksFloatingBadge svg {
        width: 14px;
        height: 14px;
        padding: 6px;
    }

    .howItWorksFloatingBadge .hiwBadgePrefix {
        display: none;
    }
    
    .howItWorksImageWrapper {
        gap: 44px;
    }
    
    .hiwSavings {
        gap: 12px;
        padding: 18px 16px 16px;
    }
    
    .hiwSavingsTop {
        justify-content: center;
        text-align: center;
    }
    
    .hiwSavingsTitle {
        font-size: 16.5px;
    }
    
    .hiwSavingsTiers {
        gap: 10px;
    }
    
    .hiwSavingsTierValue {
        font-size: 19px;
    }
    
    .hiwSavingsNote {
        font-size: 14px;
    }
}

/* Very narrow screens: let the info pills wrap instead of overflowing the card */
@media (max-width: 359px) {
    .hiwStepMeta {
        white-space: normal;
        text-align: left;
        line-height: 1.35;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .howItWorksImageGlow,
    .howItWorksFloatingBadge {
        animation: none;
    }
    
    .howItWorksImageFrame:hover {
        transform: none;
    }
    
    .hiwStepCard,
    .hiwStep:hover .hiwStepCard {
        transform: none;
        transition: none;
    }
}
