/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
   :root {
    /* Premium Dark Theme Colors */
    --bg-main: #060913;
    --bg-secondary: #0f1423;
    
    /* Accents (Cyan/Purple/Blue gradients) */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #10b981;
    
    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Fonts */
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

html[dir="ltr"] body {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Utilities & Reusables
   ========================================================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-secondary);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--accent-secondary);
    color: white;
}

/* ==========================================================================
   Animated Background (Mesh)
   ========================================================================== */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mesh-blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: var(--accent-tertiary);
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition-fast);
}

html[dir="rtl"] .nav-link::after {
    right: 0;
}

html[dir="ltr"] .nav-link::after {
    left: 0;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px; /* Offset for nav */
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-glass-card {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px;
    animation: hover-float 6s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
}

.main-glass-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 42px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
}

.hero-logo-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    clip-path: inset(0 0 0 5%);
}

@keyframes hover-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    padding: 60px;
    text-align: center;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-content strong {
    color: var(--text-main);
    font-family: var(--font-en);
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    padding-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: var(--font-en);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: var(--transition-slow);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 25px;
    transition: var(--transition-fast);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--text-main);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    transition: var(--transition-fast);
}

.service-card:hover .service-title,
.service-card:hover .service-desc {
    color: white; /* Contrast if gradient is used, else rely on text-main */
}

.service-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================================================
   Clients Section
   ========================================================================== */
.clients-marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.clients-marquee-container::before,
.clients-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

/* RTL Gradients */
html[dir="rtl"] .clients-marquee-container::before {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}
html[dir="rtl"] .clients-marquee-container::after {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}

/* LTR Gradients */
html[dir="ltr"] .clients-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}
html[dir="ltr"] .clients-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}

.clients-marquee {
    display: flex;
    width: max-content;
    gap: 30px;
}

.clients-marquee:hover {
    animation-play-state: paused;
}

.client-logo {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-fast);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 50% !important;
    border: none;
}

.client-logo:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

html[dir="ltr"] .clients-marquee {
    animation: scroll-marquee-ltr 30s linear infinite;
}

html[dir="rtl"] .clients-marquee {
    animation: scroll-marquee-rtl 30s linear infinite;
}

@keyframes scroll-marquee-ltr {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-230px * 5)); } /* adjust based on items */
}

@keyframes scroll-marquee-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(230px * 5)); } /* width + gap */
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
    background: var(--bg-secondary);
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-muted);
    max-width: 400px;
}

.footer-links h3, .footer-social h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-links ul li {
    margin-bottom: 15px;
}

html[dir="rtl"] .footer-links ul li a:hover {
    color: var(--accent-primary);
    padding-right: 5px;
}
html[dir="ltr"] .footer-links ul li a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.social-icon:hover {
    transform: translateY(-5px);
}

.social-icon.fb:hover { background: #1877f2; border-color: #1877f2; }
.social-icon.ig:hover { background: #e1306c; border-color: #e1306c; }
.social-icon.wa:hover { background: #25d366; border-color: #25d366; }

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-desc {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Add mobile menu logic in JS if needed */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
}
