/* ==========================================================================
   Work Process Widget — v2 Visual Journey
   Plugin: Developercode Core
   ========================================================================== */

:root {
    --wpr-primary: #FF6B00;
    --wpr-primary-rgb: 255, 107, 0;
    --wpr-dark: #0A1628;
    --wpr-dark-rgb: 10, 22, 40;
    --wpr-text: #1e293b;
    --wpr-text-muted: #64748b;
    --wpr-bg: #f8fafc;
    --wpr-white: #ffffff;
    --wpr-border: rgba(10, 22, 40, 0.07);
}

/* ---------- Section ----------------------------------------------------- */
.wpr {
    position: relative;
    padding: 100px 0;
    background: var(--wpr-bg);
    overflow: hidden;
}

.wpr__inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* ---------- Header ------------------------------------------------------ */
.wpr__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.wpr__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 18px;
    opacity: 0;
    transform: translateY(20px);
}

.wpr__eyebrow-road {
    display: inline-flex;
    align-items: center;
    height: 2px;
    flex-shrink: 0;
}

.wpr__eyebrow-road-line {
    display: block;
    width: 48px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--wpr-primary) 0px, var(--wpr-primary) 8px, transparent 8px, transparent 14px);
    opacity: 0.5;
}

.wpr__eyebrow-truck {
    width: 16px;
    height: 16px;
    color: var(--wpr-primary);
    flex-shrink: 0;
    margin-left: -2px;
    animation: wpr-drive 3s ease-in-out infinite;
}

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

.wpr__eyebrow-text {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--wpr-primary);
    white-space: nowrap;
}

.wpr__title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--wpr-text);
    margin: 0 0 16px;
    opacity: 0;
    transform: translateY(20px);
}

.wpr__title-highlight { color: var(--wpr-primary); }

.wpr__intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--wpr-text-muted);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
}

/* ==========================================================================
   STEPS — Visual journey with road connector
   ========================================================================== */

.wpr__journey {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

/* Road connector behind steps */
.wpr__road {
    position: absolute;
    top: 140px;
    left: 40px;
    right: 40px;
    height: 4px;
    z-index: 1;
    border-radius: 2px;
    overflow: hidden;
}

.wpr__road-bg {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, #cbd5e1 0px, #cbd5e1 14px, transparent 14px, transparent 24px);
    opacity: 0.4;
}

.wpr__road-progress {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(90deg, var(--wpr-primary), rgba(var(--wpr-primary-rgb), 0.3));
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpr.wpr-animated .wpr__road-progress {
    width: 100%;
}

/* Animated truck on the road */
.wpr__road-truck {
    position: absolute;
    top: -11px;
    left: 0;
    width: 26px;
    height: 26px;
    color: var(--wpr-primary);
    z-index: 3;
    filter: drop-shadow(0 2px 6px rgba(var(--wpr-primary-rgb), 0.4));
    transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpr.wpr-animated .wpr__road-truck {
    left: calc(100% - 26px);
}

/* Steps grid */
.wpr__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* ---------- Step card --------------------------------------------------- */
.wpr__step {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
}

/* Step number badge — on the road line */
.wpr__step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wpr-white);
    border: 3px solid var(--wpr-border);
    margin: 0 auto 20px;
    position: relative;
    z-index: 4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpr__step-badge-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--wpr-text-muted);
    transition: color 0.3s ease;
}

/* Active state after animation */
.wpr.wpr-animated .wpr__step-badge {
    border-color: var(--wpr-primary);
    box-shadow: 0 0 0 6px rgba(var(--wpr-primary-rgb), 0.08);
}

.wpr.wpr-animated .wpr__step-badge-num {
    color: var(--wpr-primary);
}

.wpr__step:hover .wpr__step-badge {
    background: var(--wpr-primary);
    border-color: var(--wpr-primary);
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(var(--wpr-primary-rgb), 0.12);
}

.wpr__step:hover .wpr__step-badge-num {
    color: #fff;
}

/* Step image card */
.wpr__step-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--wpr-white);
    border: 1px solid var(--wpr-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wpr__step:hover .wpr__step-card {
    border-color: rgba(var(--wpr-primary-rgb), 0.2);
    box-shadow: 0 16px 48px rgba(var(--wpr-dark-rgb), 0.1);
    transform: translateY(-6px);
}

/* Image */
.wpr__step-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.wpr__step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpr__step:hover .wpr__step-image img {
    transform: scale(1.06);
}

/* Overlay gradient */
.wpr__step-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(var(--wpr-dark-rgb), 0.4) 100%);
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.wpr__step:hover .wpr__step-image::after {
    opacity: 0.2;
}

/* Icon floating on image */
.wpr__step-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    z-index: 3;
    transition: all 0.35s ease;
}

.wpr__step-icon svg {
    width: 20px;
    height: 20px;
}

.wpr__step:hover .wpr__step-icon {
    background: var(--wpr-primary);
    border-color: var(--wpr-primary);
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 4px 16px rgba(var(--wpr-primary-rgb), 0.4);
}

/* Body */
.wpr__step-body {
    padding: 20px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wpr__step-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--wpr-text);
    margin: 0 0 8px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.wpr__step:hover .wpr__step-title {
    color: var(--wpr-primary);
}

.wpr__step-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--wpr-text-muted);
    margin: 0;
}

/* ==========================================================================
   CTA
   ========================================================================== */

.wpr__footer {
    text-align: center;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(20px);
}

.wpr__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--wpr-primary);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 18px rgba(var(--wpr-primary-rgb), 0.3);
}

.wpr__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(var(--wpr-primary-rgb), 0.4);
}

.wpr__cta svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.wpr__cta:hover svg { transform: translateX(4px); }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.wpr.wpr-animated .wpr__eyebrow  { animation: wpr-up .6s .1s cubic-bezier(.16,1,.3,1) forwards; }
.wpr.wpr-animated .wpr__title    { animation: wpr-up .6s .2s cubic-bezier(.16,1,.3,1) forwards; }
.wpr.wpr-animated .wpr__intro    { animation: wpr-up .6s .3s cubic-bezier(.16,1,.3,1) forwards; }
.wpr.wpr-animated .wpr__journey  { animation: wpr-up .6s .35s cubic-bezier(.16,1,.3,1) forwards; }
.wpr.wpr-animated .wpr__step     { animation: wpr-up .6s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(.4s + var(--wpr-i,0) * .12s); }
.wpr.wpr-animated .wpr__footer   { animation: wpr-up .6s 1s cubic-bezier(.16,1,.3,1) forwards; }

@keyframes wpr-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* No-animation */
.wpr--no-anim .wpr__eyebrow,
.wpr--no-anim .wpr__title,
.wpr--no-anim .wpr__intro,
.wpr--no-anim .wpr__journey,
.wpr--no-anim .wpr__step,
.wpr--no-anim .wpr__footer {
    opacity: 1 !important; transform: none !important; animation: none !important;
}
.wpr--no-anim .wpr__road-progress { width: 100% !important; transition: none !important; }
.wpr--no-anim .wpr__road-truck { left: calc(100% - 26px) !important; transition: none !important; }
.wpr--no-anim .wpr__eyebrow-truck { animation: none !important; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .wpr { padding: 80px 0; }

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

    .wpr__road { display: none; }
}

@media (max-width: 768px) {
    .wpr { padding: 60px 0; }
    .wpr__inner { padding: 0 20px; }
    .wpr__header { margin-bottom: 36px; }

    .wpr__steps {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .wpr__step-badge {
        width: 40px;
        height: 40px;
        margin-bottom: 14px;
    }

    .wpr__step-badge-num { font-size: 14px; }

    .wpr__cta { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .wpr__inner { padding: 0 16px; }
    .wpr__step-badge { width: 36px; height: 36px; }
    .wpr__step-badge span { font-size: 12px; }
    .wpr__step-title { font-size: 15px; }
    .wpr__title { font-size: 22px; }
}

/* Editor */
.elementor-editor-active .wpr__eyebrow,
.elementor-editor-active .wpr__title,
.elementor-editor-active .wpr__intro,
.elementor-editor-active .wpr__journey,
.elementor-editor-active .wpr__step,
.elementor-editor-active .wpr__footer {
    opacity: 1 !important; transform: none !important; animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .wpr__eyebrow, .wpr__title, .wpr__intro,
    .wpr__journey, .wpr__step, .wpr__footer {
        opacity: 1 !important; transform: none !important; animation: none !important;
    }
    .wpr__road-progress { width: 100% !important; transition: none !important; }
    .wpr__road-truck { left: calc(100% - 26px) !important; transition: none !important; }
    .wpr__eyebrow-truck { animation: none !important; }
}
