/* ... (Keep existing variables and base styles) ... */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* Single Accent Color: Electric Blue */
    --primary-main: #2563eb; 
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    
    /* Dark Theme Palette */
    --bg-body: #020617; 
    --bg-surface: #0f172a; 
    --bg-surface-hover: #1e293b;
    
    /* Text Colors */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-on-primary: #ffffff;

    /* Spacing */
    --spacing-md: 24px;
    --spacing-lg: 32px;
    
    /* UI Elements */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-full: 9999px;
    
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --border-color: rgba(255, 255, 255, 0.05);
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Cairo', sans-serif; color: var(--text-main); background-color: var(--bg-body); line-height: 1.6; direction: rtl; text-align: right; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
button { font-family: 'Cairo', sans-serif; cursor: pointer; border: none; outline: none; }

/* Utilities */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.text-center { text-align: center; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 20px 0; transition: 0.3s ease; background: transparent; }
.navbar.scrolled { background: rgba(2, 6, 23, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); padding: 15px 0; }
.nav-logo { font-size: 1.8rem; font-weight: 800; color: var(--text-main); letter-spacing: -1px; }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-main); }

/* Hero */
.hero { position: relative; width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; background: #000; }
.hero-video-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, rgba(2,6,23,0.95) 0%, rgba(2,6,23,0.4) 100%); z-index: 1; }
.hero-video-placeholder { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; background: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover; animation: slowZoom 20s infinite alternate; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 0 20px; }
.hero h1 { font-size: 5rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px; color: white; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero p { font-size: 1.5rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 40px; font-weight: 400; }
.hero-btns { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }

/* Buttons */
.btn { padding: 16px 36px; border-radius: var(--radius-full); font-weight: 700; font-size: 1.1rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 10px; }
.btn-primary { background: var(--primary-main); color: white; box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(37, 99, 235, 0.6); background: var(--primary-light); }
.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(37, 211, 102, 0.4); background: #4ade80; }
.btn-youtube { background: #FF0000; color: white; }
.btn-youtube:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(255, 0, 0, 0.4); background: #ff4d4d; }
.btn-outline { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); color: white; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }

/* --- Mobile Components --- */
.mobile-bottom-nav {
    display: none; /* Desktop hidden */
}

.btn-mini {
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.action-grid-mobile {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .navbar { display: none; } /* Hide desktop nav */
    
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(2, 6, 23, 0.85);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 0;
        justify-content: space-around;
        z-index: 2000;
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .mobile-nav-item.active {
        color: var(--primary-main);
    }
    
    .mobile-nav-item ion-icon {
        font-size: 1.4rem;
    }

    .action-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 400px;
        margin: 30px auto 0;
    }
    
    .btn-mini {
        width: 100%;
        font-size: 0.85rem;
    }

    /* Features Grid Mobile */
    .desktop-only { display: none !important; }
    
    .feature-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 20px;
    }
    
    .feature-card-mobile {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .feature-card-mobile .f-icon {
        font-size: 1.8rem;
        color: var(--primary-main);
    }
    
    .feature-card-mobile h4 {
        font-size: 0.9rem;
        color: #fff;
    }
    
    .feature-card-mobile p {
        font-size: 0.75rem;
        color: var(--text-muted);
        line-height: 1.3;
    }

    /* Target Audience Mini Row */
    .target-row-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 20px 0;
    }
    
    .target-card-mini {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        padding: 15px 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }
    
    .target-card-mini ion-icon {
        font-size: 1.5rem;
        color: var(--primary-main);
    }
    
    .target-card-mini span {
        font-size: 0.75rem;
        font-weight: 700;
        color: #fff;
    }

    /* How Grid Mobile */
    .how-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 30px;
    }
    
    .how-card-mobile {
        background: rgba(37, 99, 235, 0.05);
        border: 1px solid rgba(37, 99, 235, 0.1);
        border-radius: 12px;
        padding: 20px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .how-card-mobile span {
        width: 25px;
        height: 25px;
        background: var(--primary-main);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        font-weight: 900;
    }
    
    .how-card-mobile h4 {
        font-size: 0.9rem;
        color: #fff;
    }
    
    .how-card-mobile p {
        font-size: 0.75rem;
        color: var(--text-muted);
    }
}

/* --- Reusable Video Background --- */
.video-bg-container {
    position: relative;
    overflow: hidden;
}

.video-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-bg-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* Dimmed for text readability */
}

/* Ensure content sits on top */
.video-bg-container .container,
.video-bg-container h2,
.video-bg-container p,
.video-bg-container .btn {
    position: relative;
    z-index: 2;
}

/* --- Moving Brands Background --- */
.brands-bg-section {
    position: relative;
    background: var(--bg-surface);
    overflow: hidden;
}

.brands-marquee-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 0;
    opacity: 0.1; /* Increased from 0.05 for clarity */
    pointer-events: none;
    transform: rotate(-5deg) scale(1.2); /* Slight angle for style */
}

.marquee-row {
    display: flex;
    gap: 50px;
    width: 200%; /* Wide enough to scroll */
    animation: marqueeScroll 20s linear infinite;
    font-size: 5rem;
    font-weight: 900;
    white-space: nowrap;
    color: var(--text-muted);
}

.marquee-row.reverse {
    animation-direction: reverse;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); } /* Ensure content is duplicated to allow seamless reset */
}

/* Ensure all animations use linear timing to avoid 'stops' */
.marquee-row, 
.vertical-col, 
.floating-text, 
.chase-item,
.circle-ring,
.diagonal-row {
    animation-timing-function: linear !important;
    will-change: transform; /* Performance optimization: Use GPU */
}

/* --- Floating Icons Background (Variation 2) --- */
/* --- Floating Brands (Variation for Text) --- */
.icons-bg-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    opacity: 0.15; /* Increased from 0.03/0.1 for clarity */
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 4rem;
    color: var(--text-muted);
    animation: floatUp 15s infinite linear;
}

/* Randomize floating icons positions/delays via nth-child in usage, 
   but we'll set some defaults here for simplicity */
/* --- Floating Brands (Variation for Text) --- */
.floating-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0;
    white-space: nowrap;
    animation: floatUpText 12s infinite linear;
}

/* Random Positions for Brands */
.floating-text:nth-child(1) { left: 10%; animation-duration: 15s; animation-delay: 0s; }
.floating-text:nth-child(2) { left: 30%; animation-duration: 18s; animation-delay: 2s; }
.floating-text:nth-child(3) { left: 50%; animation-duration: 20s; animation-delay: 5s; }
.floating-text:nth-child(4) { left: 70%; animation-duration: 14s; animation-delay: 1s; }
.floating-text:nth-child(5) { left: 85%; animation-duration: 22s; animation-delay: 4s; }
.floating-text:nth-child(6) { left: 20%; animation-duration: 16s; animation-delay: 8s; }
.floating-text:nth-child(7) { left: 60%; animation-duration: 19s; animation-delay: 6s; }
.floating-text:nth-child(8) { left: 40%; animation-duration: 25s; animation-delay: 3s; }

@keyframes floatUpText {
    0% { transform: translateY(100px) scale(0.8); opacity: 0; }
    10% { opacity: 0.1; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* --- Variation 3: Square Chase (Running after each other) --- */
.square-chase-bg {
    position: absolute;
    inset: 40px; /* Padding from edge */
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
    overflow: hidden;
}

.chase-item {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-muted);
    white-space: nowrap;
    animation: squareRun 12s linear infinite;
}

/* Position starting points for the 4 items at corners */
.chase-item:nth-child(1) { top: 0; left: 0; animation-delay: 0s; }
.chase-item:nth-child(2) { top: 0; left: 0; animation-delay: -3s; } /* Quarter lap behind */
.chase-item:nth-child(3) { top: 0; left: 0; animation-delay: -6s; } /* Half lap behind */
.chase-item:nth-child(4) { top: 0; left: 0; animation-delay: -9s; } /* 3/4 lap behind */

/* Run along the perimeter: Right -> Down -> Left -> Up (No Rotation, keeping text inside) */
@keyframes squareRun {
    0%   { top: 0; left: 0; transform: translate(0, 0); }
    25%  { top: 0; left: 100%; transform: translate(-100%, 0); } 
    50%  { top: 100%; left: 100%; transform: translate(-100%, -100%); } 
    75%  { top: 100%; left: 0; transform: translate(0, -100%); } 
    100% { top: 0; left: 0; transform: translate(0, 0); }
}

/* --- Variation 4: Vertical Columns (Rain) --- */
.vertical-marquee-bg {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    opacity: 0.08;
    pointer-events: none;
    overflow: hidden;
}

.vertical-col {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-muted);
    animation: verticalScroll 20s linear infinite;
}

.vertical-col:nth-child(even) {
    animation-direction: reverse;
    color: var(--primary-main); /* Pop color */
    opacity: 0.5;
}

@keyframes verticalScroll {
    from { transform: translateY(-50%); }
    to { transform: translateY(0%); }
}

/* --- Variation 5: Word Cloud (Scattered Static) --- */
.word-cloud-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
    overflow: hidden;
}

.cloud-word {
    position: absolute;
    font-weight: 900;
    color: var(--text-muted);
    opacity: 0.5;
    animation: seamlessFloat 20s linear infinite; /* Changed from drift (alternate) to seamless loop */
}

@keyframes seamlessFloat {
    0% { transform: translateY(50px) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100px) rotate(5deg); opacity: 0; }
}

/* --- Variation 6: Spinning Circle --- */
.spinning-circle-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vw;
    transform: translate(-50%, -50%); /* Centered */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.circle-ring {
    position: absolute;
    border: 2px dashed var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinRing 40s linear infinite;
}

.circle-text {
    position: absolute;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

/* Sections & Cards */
.section { padding: 100px 0; position: relative; }
.section-title { font-size: 3rem; font-weight: 800; margin-bottom: 60px; text-align: center; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card { background: var(--bg-surface); border: 1px solid var(--border-color); padding: 40px; border-radius: var(--radius-md); transition: 0.3s; position: relative; overflow: hidden; }
.card:hover { background: var(--bg-surface-hover); transform: translateY(-5px); border-color: var(--primary-main); box-shadow: var(--shadow-glow); }
.card-icon { font-size: 3rem; color: var(--primary-main); margin-bottom: 20px; }
.card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.card p { color: var(--text-muted); }

/* --- Why Buy Specific Grid --- */
.why-buy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 1200px) {
    .why-buy-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .why-buy-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .why-buy-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .why-buy-grid .card:last-child { grid-column: span 2; } /* Center the odd 5th card */
}

/* --- Detailed Features Layout (Rows) --- */
.features-detailed-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h3 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-text h3 ion-icon { color: var(--primary-main); }

.feature-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.feature-text ul {
    list-style: none;
    margin-top: 20px;
}

.feature-text ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--text-on-primary);
    opacity: 0.9;
}

.feature-text ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary-main);
    font-weight: bold;
}

.feature-visual {
    flex: 1;
    height: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    display: block; /* changed from flex */
}

/* Image Handling */
.feature-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures whole image is visible (crucial for mobile screenshots) */
    transition: transform 0.3s ease;
}

.feature-visual:hover img {
    transform: scale(1.02);
}

.ui-mockup {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.2);
    font-weight: bold;
    border: 2px dashed rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
}

/* Steps */
.steps-wrapper { max-width: 800px; margin: 0 auto; border-right: 2px solid var(--bg-surface-hover); padding-right: 40px; }
.step { position: relative; margin-bottom: 50px; }
.step::before { content: ''; position: absolute; right: -51px; top: 5px; width: 20px; height: 20px; background: var(--primary-main); border: 4px solid var(--bg-body); border-radius: 50%; }
.step h3 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 10px; }
.step p { color: var(--text-muted); }

/* Footer */
footer { background: var(--bg-surface); padding: 60px 0; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-muted); }

/* Mobile */
/* Mobile & Tablet Optimization */
@media (max-width: 992px) {
    .section-title { font-size: 2.2rem; }
    
    /* Responsive Circle Animation */
    .spinning-circle-bg { width: 100%; height: 100%; }
    .circle-ring { width: 90% !important; height: 90vw !important; max-width: 600px; max-height: 600px; }
    .circle-ring:nth-child(2) { width: 65% !important; height: 65vw !important; }
    .circle-ring:nth-child(3) { width: 40% !important; height: 40vw !important; }
    .circle-text { font-size: 0.9rem; }
}

@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 15px 0; background: rgba(2,6,23,0.95); }
    .nav-links { display: flex; gap: 15px; font-size: 0.85rem; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
    
    /* Hero */
    .hero h1 { font-size: 2.5rem; line-height: 1.2; }
    .hero p { font-size: 1.1rem; }
    .hero-btns { flex-direction: column; width: 100%; gap: 15px; }
    .btn { width: 100%; justify-content: center; }

    /* Layouts */
    .section { padding: 60px 0; }
    .feature-row, .feature-row.reverse { flex-direction: column; text-align: center; gap: 40px; }
    .feature-text ul li { text-align: center; padding-right: 0; }
    .feature-text ul li::before { position: relative; display: inline-block; margin-left: 10px; right: auto; }
    
    .card-grid { grid-template-columns: 1fr; gap: 20px; }
    .card { padding: 25px; }

    /* Fix navigation grid on details.html */
    .nav-grid { gap: 8px !important; }
    .nav-tab { padding: 8px 12px !important; font-size: 0.85rem !important; flex: 1; justify-content: center; }
    
    /* Fix module tabs on details.html */
    .module-tabs { gap: 10px !important; }
    .mod-tab { width: calc(50% - 10px) !important; padding: 15px 10px !important; }
    .module-detail h3 { font-size: 1.2rem !important; }
    .module-detail p { font-size: 0.95rem !important; }

    /* Timeline */
    .steps-wrapper { margin-right: 0; border-right: none; padding-right: 0; }
    .step::before { display: none; }
    .step { border-right: 3px solid var(--primary-main); padding-right: 20px; margin-bottom: 40px; }

    /* Background Animations Scaling */
    .marquee-row { font-size: 2.5rem; gap: 20px; }
    .vertical-col { font-size: 2rem; }
    .diagonal-row { font-size: 3rem; gap: 40px; }
    .cloud-word { font-size: 1.5rem !important; } /* Force resize scatter */
    .chase-item { font-size: 1.5rem; }
    .square-chase-bg { inset: 5px; }
}
