/* Services Section - Revamp with Swiper */

/* Services Section - CSS Scroll Snap (No JS) */

/* Scroll Container */
/* Services Section - CSS Scroll Snap (No JS) */

/* Scroll Container */
.services-scroll-container {
    display: flex;
    overflow: hidden !important;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    position: relative;
    /* Gradient Mask for fade effect */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    background: transparent;
    /* Ensure no background blocks */
    direction: ltr !important;
    /* Critical: Force LTR for correct scroll physics */
}

/* Restore RTL direction for cards when in Arabic mode */
html[dir="rtl"] .service-story-card {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .metric {
    flex-direction: row;
    /* Icon adjustments if needed */
}

.marquee-track {
    display: flex;
    /* Use max-content to ensure track takes full width of duplicate items */
    width: max-content !important;
    gap: 0 !important;
    /* using margins */
    padding: 0;
    margin: 0;
    animation: scroll 40s linear infinite;
    will-change: transform;
    flex-shrink: 0;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move exactly half way - assuming 1:1 duplication */
        transform: translateX(-50%);
    }
}

/* Service Story Card */
.service-story-card {
    flex: 0 0 300px;
    /* Rigid width */
    width: 300px;
    min-width: 300px;
    flex-shrink: 0 !important;
    /* Critical: Prevent squashing */
    scroll-snap-align: unset;
    margin-right: 1.5rem !important;
    /* USE MARGIN INSTEAD OF GAP - Critical for 50% math */

    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
    height: 500px;
    /* Fixed Height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .services-scroll-container .service-story-card {
        flex: 0 0 350px;
        /* Desktop: fixed width cards */
    }
}

/* Dark Mode Card Styling */
[data-theme="dark"] .service-story-card {
    background: rgba(30, 41, 59, 0.7);
    /* translucent slate */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .service-story-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .card-title {
    color: #f1f5f9;
}

[data-theme="dark"] .card-benefit {
    color: #94a3b8;
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-benefit {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Card Visuals */
/* --- Service Card Visuals (General) --- */
.card-visual {
    flex-grow: 1;
    background: #f1f5f9;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /* Fill remaining space */
    min-height: 0;
    /* Allow flex shrinking if needed */
}

/* Icon Centering for non-story visuals */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.feature-icon i {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}


/* Slide 1: Before/After */
.ba-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 250px;
    cursor: ew-resize;
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ba-before img,
.ba-after img {
    /* Using absolute positioning to replicate functionality visually */
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.ba-before {
    z-index: 1;
    width: 50%;
    /* Default cut */
    border-right: 2px solid white;
    transition: width 0.1s;
    /* JS interactions could animate this */
}

/* Hover effect for basic interaction w/o complex JS */
.ba-container:hover .ba-before {
    width: 20%;
}

.ba-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ba-after .ba-label {
    left: auto;
    right: 1rem;
}

.visual-caption {
    position: absolute;
    bottom: 0.5rem;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: white;
    text-shadow: 0 1px 2px black;
    z-index: 10;
    pointer-events: none;
}

/* Slide 2: Typewriter */
.visual-typewriter {
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem;
    background: #e0e7ff;
    gap: 1rem;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.chat-bubble.user {
    background: white;
    align-self: flex-end;
    border-bottom-left-radius: 0;
    color: var(--text-muted);
}

.chat-bubble.ai {
    background: var(--primary);
    color: white;
    align-self: flex-start;
    border-bottom-right-radius: 0;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Slide 3: Social */
.visual-social {
    background: #fff;
    padding: 1rem;
}

.mock-post {
    width: 80%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.avatar {
    width: 24px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 50%;
}

.name {
    font-size: 0.75rem;
    font-weight: bold;
}

.float-testimonial {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    max-width: 180px;
    animation: float 3s ease-in-out infinite;
    border-right: 4px solid var(--primary);
}

/* Slide 4: Store / Climax */
.climax-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: none;
    color: white;
}

.climax-card .card-benefit {
    color: rgba(255, 255, 255, 0.9) !important;
    /* Fix for invisible text */
}

.visual-store {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-mockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.order-badge {
    background: #22c55e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: bold;
    animation: bounce 2s infinite;
}

/* Footer Metrics */
.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

.metric {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vs-toggle {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.vs-toggle .highlight {
    color: var(--primary);
    font-weight: 700;
}

/* Swiper Pagination Custom */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--text-muted);
    opacity: 0.4;
    border-radius: 50%;
    margin: 0 6px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
    width: 30px;
    border-radius: 99px;
    box-shadow: 0 0 10px var(--primary);
}

/* Hover Effect for Service Cards */
.service-story-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

/* Buttons */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* Highlight Card (Shopify) */
.highlight-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.highlight-card .feature-icon {
    color: #10b981;
}

/* --- New Rich Visuals --- */

/* Visual SCAN (Magic Editor) */
.visual-scan {
    background: #0f172a;
    padding: 0;
}

.scan-image {
    position: relative;
    width: 80%;
    height: 80%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.scan-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7;
    animation: scanMove 2s linear infinite;
}

.magic-particles i {
    position: absolute;
    color: #fca5a5;
    animation: twinkle 1.5s infinite;
}

.magic-particles i:nth-child(1) {
    top: 20%;
    left: 20%;
}

.magic-particles i:nth-child(2) {
    bottom: 30%;
    right: 20%;
    animation-delay: 0.5s;
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}


/* Visual GEO (AI Search) */
.visual-geo {
    flex-direction: column;
    padding: 1rem;
    background: #f0f9ff;
    gap: 0.5rem;
}

.ai-search-mock {
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-bubble {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-bubble i {
    color: var(--primary);
}

.product-suggestion {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    align-items: center;
}

.suggestion-img {
    width: 40px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 4px;
}

.suggestion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.s-line {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
}

.s-line.full {
    width: 100%;
}

.s-line.half {
    width: 60%;
}

/* Visual APP (Notification) */
.visual-app {
    background: #f8fafc;
}

.app-notification {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    width: 85%;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: notifPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.notif-body {
    font-size: 0.85rem;
    line-height: 1.3;
}

@keyframes notifPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Visual CHAT (Whatsapp) */
.visual-chat {
    background: #dcf8c6;
    /* WhatsApp BG Color */
}

.whatsapp-bubble {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-top-left-radius: 0;
    width: 90%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.wa-header {
    font-weight: bold;
    color: #075e54;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.wa-body {
    font-size: 0.85rem;
    color: #111;
}

.wa-time {
    text-align: right;
    font-size: 0.65rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Visual TRACKING */
.track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 60px;
}

.track-step .dot {
    width: 12px;
    height: 12px;
    background: #cbd5e1;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
    transition: 0.3s;
}

.track-step.completed .dot {
    background: #22c55e;
}

.track-step.active .dot {
    background: #f97316;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
}

.track-step span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

.visual-tracking {
    align-items: center;
}

.tracking-timeline {
    display: flex;
    align-items: center;
    width: 90%;
    justify-content: space-between;
    position: relative;
}

.track-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    position: relative;
    top: -10px;
}

.track-line.full {
    background: #22c55e;
}

.pulsing {
    animation: pulseOrange 2s infinite;
}

@keyframes pulseOrange {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

/* Visual DATA */
.visual-data {
    background: #1e293b;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.1);
    width: 80%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.blob {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    /* ... same pulse ... */
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Visual SYNC */
.visual-sync {
    gap: 1rem;
    flex-direction: column;
}

.sync-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
}

.sync-arrow i {
    font-size: 1rem;
    color: #cbd5e1;
    animation: spin 3s linear infinite;
}

.sync-badge {
    font-size: 0.8rem;
    background: #ecfdf5;
    color: #10b981;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-weight: bold;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Visual IMPORT */
.visual-import {
    flex-direction: column;
    gap: 1rem;
}

.import-bar-container {
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.import-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    animation: fillProgress 2s ease-in-out infinite;
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.file-transfer-anim {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
    color: #64748b;
    animation: flyFile 2s infinite;
}

@keyframes flyFile {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateX(20px);
        opacity: 0.5;
    }

    100% {
        transform: translateX(40px);
        opacity: 0;
    }
}

/* AI Logo Grid */
.ai-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: center;
    justify-items: center;
    margin-top: auto;
    padding: 1rem 0;
}

.ai-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
    border-radius: 8px;
    /* Soft roundness */
}

.service-story-card:hover .ai-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

[data-theme='dark'] .ai-logo {
    filter: grayscale(100%) brightness(2) opacity(0.7);
    color: white;
    /* For text-based logos */
    border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme='dark'] .service-story-card:hover .ai-logo {
    filter: grayscale(0%) brightness(1) opacity(1);
}


/* Dark Mode Fixes for Visuals */
[data-theme='dark'] .visual-typewriter {
    background: #1e293b;
    /* Darker background for chat area */
}

[data-theme='dark'] .chat-bubble.user {
    background: #334155;
    /* Darker bubble */
    color: #e2e8f0;
    /* Light text */
}

[data-theme='dark'] .visual-social {
    background: #1e293b;
}

[data-theme='dark'] .mock-post {
    background: #0f172a;
    /* Dark post background */
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme='dark'] .post-img {
    background: #334155;
}

[data-theme='dark'] .float-testimonial {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .visual-geo {
    background: #1e293b;
}

[data-theme='dark'] .search-bubble,
[data-theme='dark'] .product-suggestion {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .visual-app {
    background: #1e293b;
}

[data-theme='dark'] .app-notification {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme='dark'] .notif-header {
    color: #94a3b8;
}

/* Whatsapp Dark Mode */
[data-theme='dark'] .visual-chat {
    background: #0b141a;
    /* WhatsApp Dark BG */
}

[data-theme='dark'] .whatsapp-bubble {
    background: #1f2c34;
    /* WhatsApp Dark Message Bubble */
    color: #e9edef;
}

[data-theme='dark'] .wa-header {
    color: #25d366;
}

[data-theme='dark'] .wa-body {
    color: #e9edef;
}

[data-theme='dark'] .wa-time {
    color: #8696a0;
}

/* AI Logo Grid */
.ai-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 1rem;
    margin: 1rem 0;
}

.ai-logo {
    width: 100%;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.ai-logo:hover {
    transform: scale(1.1);
}

[data-theme="dark"] .ai-logo-grid {
    background: rgba(255, 255, 255, 0.05);
}