/* =============== INTERACTIVE MOBILE WORKFLOW STYLES =============== */

/* Hide mobile workflow by default */
.mobile-workflow {
    display: none !important;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    padding: 15px 0;
    flex-direction: column;
}

/* Mobile Header */
.mobile-workflow-header {
    text-align: center;
    padding: 12px 20px 8px;
    background: linear-gradient(180deg, #1a1a1a 0%, rgba(26, 26, 26, 0.95) 100%);
    flex-shrink: 0;
    margin-bottom: 6px;
}

.mobile-workflow-header h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-workflow-header p {
    color: #cbd5e0;
    font-size: 1.05rem;
    line-height: 1.4;
    margin: 0;
    max-width: 320px;
    margin: 0 auto;
}

/* Sticky Progress Bar */
.mobile-sticky-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-bottom: 1px solid rgba(69, 167, 239, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    margin-bottom: 12px;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    margin: 0 auto;
}

.progress-step {
    background: transparent;
    border: none;
    color: #718096;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step:hover:not(.active) {
    color: #9ca3af;
}

.progress-step:hover:not(.active) .step-number {
    border-color: #6b7280;
    background: rgba(255, 255, 255, 0.15);
}

.progress-step.active {
    color: #45a7ef;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #45a7ef;
    border-color: #45a7ef;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(69, 167, 239, 0.5);
}

.step-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #4a5568;
    position: relative;
    margin: 0 2px;
}

.progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #45a7ef;
    transition: width 0.3s ease;
}

.progress-step.active + .progress-line::after {
    width: 100%;
}

/* Swipeable Steps Container */
.mobile-steps-wrapper {
    position: relative;
    overflow: hidden;
    padding: 8px 0;
    flex: none;
    display: flex;
    align-items: center;
    min-height: 0;
    margin-bottom: 15px;
}

.mobile-steps-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.mobile-step-slide {
    flex: 0 0 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Step Visual */
.step-visual {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #000;
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16/9;
    max-width: 336px;
    margin: 0 auto 8px;
}

.step-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

/* Specific positioning for deliver step image */
.mobile-step-slide[data-step="3"] .step-visual img {
    object-position: center 30%;
}

.mobile-step-slide.active .step-visual img {
    transform: scale(1.05);
}

/* Step Content */
.step-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.step-badge {
    background: linear-gradient(135deg, #45a7ef, #3498db);
    color: #fff;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-header h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.step-intro {
    color: #e8e8e8;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 6px;
    padding: 8px;
    background: rgba(69, 167, 239, 0.08);
    border-left: 3px solid #45a7ef;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Key Points (Always Visible) */
.key-points {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 6px 0 8px;
    flex: 1;
    min-height: 0;
}

.key-point {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(69, 167, 239, 0.08);
    border-radius: 6px;
    border-left: 3px solid #45a7ef;
    transition: all 0.2s ease;
}

.key-point:hover {
    background: rgba(69, 167, 239, 0.12);
    transform: translateX(3px);
}

.point-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.key-point span:last-child {
    color: #e8e8e8;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Learn More Button */
.learn-more-btn {
    background: transparent;
    border: 1px solid rgba(69, 167, 239, 0.3);
    color: #45a7ef;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.learn-more-btn:hover {
    background: rgba(69, 167, 239, 0.1);
    border-color: #45a7ef;
    transform: translateY(-1px);
}

.learn-more-btn svg {
    transition: transform 0.3s ease;
    width: 10px;
    height: 6px;
}

.learn-more-btn.expanded svg {
    transform: rotate(180deg);
}

/* Extended Details (Hidden by Default) */
.extended-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.extended-details.show {
    max-height: 200px;
    opacity: 1;
    padding-top: 12px;
}

.extended-details p {
    color: #cbd5e0;
    font-size: 1.05rem;
    line-height: 1.6;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
}

/* Navigation Arrows */
.step-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(69, 167, 239, 0.2);
    border: 1px solid rgba(69, 167, 239, 0.3);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.step-nav:hover {
    background: rgba(69, 167, 239, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.step-nav-prev {
    left: 10px;
}

.step-nav-next {
    right: 10px;
}

.step-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Mobile Workflow Summary */
.mobile-workflow-summary {
    text-align: center;
    padding: 12px 20px 15px;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, #1a1a1a 100%);
    border-top: 1px solid rgba(69, 167, 239, 0.2);
    position: relative;
    flex-shrink: 0;
    margin-top: 10px;
}

/* Step Summary Items */
.step-summary {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.step-summary.active {
    display: block;
    opacity: 1;
}

.step-summary h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
}

.step-summary h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 40px;
    height: 2px;
    background: #45a7ef;
    transform: translateX(-50%);
    border-radius: 1px;
}

.step-summary p {
    color: #cbd5e0;
    font-size: 0.95rem;
    line-height: 1.3;
    max-width: 280px;
    margin: 18px auto 0;
}

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

/* Desktop workflow visible by default */
.desktop-workflow {
    display: block;
}

/* Show mobile workflow on mobile devices */
@media (max-width: 768px) {
    .mobile-workflow {
        display: flex !important;
    }
    
    /* Hide desktop workflow on mobile */
    .desktop-workflow {
        display: none !important;
    }
}

/* Ensure desktop workflow is visible on desktop */
@media (min-width: 769px) {
    .desktop-workflow {
        display: block !important;
    }
    
    .mobile-workflow {
        display: none !important;
    }
}

/* Touch optimizations */
@media (pointer: coarse) {
    .progress-step,
    .expand-btn,
    .step-nav {
        min-height: 44px;
    }
}

/* Animation keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(69, 167, 239, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(69, 167, 239, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(69, 167, 239, 0);
    }
}


/* Animation classes */
.animate-in {
    animation: slideInUp 0.6s ease-out;
}

.progress-step.active .step-number {
    animation: pulse 2s infinite;
}

/* Compact sticky progress bar */
.mobile-sticky-progress.compact {
    padding: 8px 20px;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.mobile-sticky-progress.compact .step-name {
    opacity: 1;
    transform: scale(0.9);
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.mobile-sticky-progress.compact .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Ensure hover states work even in compact mode */
.mobile-sticky-progress.compact .progress-step:hover:not(.active) {
    color: #9ca3af;
}

.mobile-sticky-progress.compact .progress-step:hover:not(.active) .step-number {
    border-color: #6b7280;
    background: rgba(255, 255, 255, 0.15);
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .mobile-workflow-header h2 {
        font-size: 1.7rem;
    }
    
    .mobile-workflow-header {
        padding: 6px 15px 3px;
    }
    
    .mobile-sticky-progress {
        padding: 6px 15px;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    
    .step-name {
        font-size: 0.8rem;
    }
    
    /* Ensure step names stay visible in compact mode on small screens */
    .mobile-sticky-progress.compact .step-name {
        font-size: 0.75rem;
        opacity: 1;
    }
    
    .step-visual {
        aspect-ratio: 16/9;
        max-width: 288px;
        margin: 0 auto 2px;
    }
    
    .mobile-step-slide {
        padding: 0 15px;
    }
    
    .step-header h3 {
        font-size: 1.3rem;
    }
    
    .step-header {
        margin-bottom: 2px;
    }
    
    .step-intro {
        font-size: 0.9rem;
        padding: 4px;
        margin-bottom: 2px;
    }
    
    .key-point {
        padding: 4px 6px;
    }
    
    .key-point span:last-child {
        font-size: 0.85rem;
    }
    
    .key-points {
        gap: 2px;
        margin: 2px 0 4px;
    }
    
    .mobile-workflow-summary {
        padding: 6px 15px 8px;
    }
    
    .step-summary h3 {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    
    .step-summary h3::after {
        bottom: -6px;
    }
    
    .step-summary p {
        font-size: 0.85rem;
        margin: 12px auto 0;
    }
    
    .mobile-steps-wrapper {
        padding: 2px 0;
    }
}