/* ============================================
   Sinam - Premium Modern UI with Theme Support
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark Theme (Default) */
:root, [data-theme="dark"] {
    --bg: #050508;
    --bg-gradient: linear-gradient(135deg, #050508 0%, #0a0f1a 50%, #0d1117 100%);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --card: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-secondary: #a1a1aa;
    --muted: rgba(255, 255, 255, 0.6);
    --primary: #00d4aa;
    --primary-glow: rgba(0, 212, 170, 0.4);
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --gold: #f5a623;
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(99, 102, 241, 0.2));
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 212, 170, 0.15);
    --header-bg: rgba(5, 5, 8, 0.85);
    --header-border: rgba(255, 255, 255, 0.05);
    --video-brightness: 0.5;
    --video-blur: 3px;
    --video-opacity: 0.7;
    --overlay-opacity: 0.6;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 9999px;
}

/* Light Theme */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    --surface: rgba(0, 0, 0, 0.03);
    --surface-hover: rgba(0, 0, 0, 0.06);
    --card: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.08);
    --text: #1e293b;
    --text-secondary: #64748b;
    --muted: rgba(0, 0, 0, 0.5);
    --primary: #059669;
    --primary-glow: rgba(5, 150, 105, 0.25);
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.25);
    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-accent: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-glow: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(79, 70, 229, 0.1));
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(5, 150, 105, 0.1);
    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(0, 0, 0, 0.05);
    --video-brightness: 1.1;
    --video-blur: 4px;
    --video-opacity: 0.3;
    --overlay-opacity: 0.7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent text clipping for Arabic text */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] li {
    overflow: visible !important;
    text-overflow: unset !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
}

main {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1280px, 90%);
    margin: 0 auto;
}

/* ==================== Intro ==================== */
.intro {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: grid;
    place-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 212, 170, 0.15), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(99, 102, 241, 0.15), transparent 50%);
}

.intro.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.intro-label {
    display: inline-flex;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: var(--bg);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.intro-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-content p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* ==================== Background ==================== */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
}

/* Background Video */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    filter: blur(var(--video-blur)) brightness(var(--video-brightness)) saturate(0.9);
    opacity: var(--video-opacity);
    transition: filter 0.5s ease, opacity 0.5s ease;
}

/* Overlay for shadow/darkening effect */
.bg-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, var(--bg) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
    opacity: var(--overlay-opacity);
    z-index: 1;
    transition: background 0.5s ease, opacity 0.5s ease;
}

[data-theme="light"] .bg-overlay {
    background: 
        linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.4) 30%, rgba(248, 250, 252, 0.5) 70%, rgba(248, 250, 252, 0.95) 100%);
}

.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 212, 170, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99, 102, 241, 0.08), transparent);
    z-index: 2;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: blobFloat 20s ease-in-out infinite;
    will-change: transform;
    z-index: 3;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.3), rgba(0, 184, 148, 0.1));
    top: -150px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.1));
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(245, 166, 35, 0.05));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
}

.grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
    z-index: 4;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==================== Scroll Progress ==================== */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    box-shadow: 0 0 20px var(--primary-glow);
    z-index: 999;
}

/* ==================== Theme Toggle ==================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon.sun {
    opacity: 0;
    transform: translateY(20px) rotate(-90deg);
}

.theme-icon.moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: translateY(-20px) rotate(90deg);
}

/* ==================== Header ==================== */
.site-header {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    z-index: 100;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: var(--header-bg);
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-ar {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-en {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-weight: 600;
}

.nav-links a {
    position: relative;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-btn {
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn.active {
    color: var(--bg);
    background: var(--gradient-primary);
    border-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-full);
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 12px 40px var(--primary-glow);
}

.btn-secondary {
    border: 1px solid var(--card-border);
    color: var(--text);
    background: var(--surface);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

/* ==================== Sections ==================== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section.alt {
    background: rgba(255, 255, 255, 0.02);
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
    padding: 0.5rem 0.5rem 0.75rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section > .container > p {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    padding: 0.5rem 1rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.about-license {
    margin-top: -2rem !important;
    margin-bottom: 3rem !important;
    font-size: 0.95rem;
    color: var(--primary) !important;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    max-width: 500px !important;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Hero ==================== */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-kicker {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    background: var(--primary-glow);
    border-radius: var(--radius-full);
    border: 1px solid var(--primary);
    opacity: 0.9;
}

.hero-copy h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-text {
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 500px;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.floating-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.floating-tags span {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    animation: tagFloat 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.floating-tags span:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-hover);
}

.floating-tags span:nth-child(2) { animation-delay: -1s; }
.floating-tags span:nth-child(3) { animation-delay: -2s; }
.floating-tags span:nth-child(4) { animation-delay: -0.5s; }

@keyframes tagFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Video Shell */
.video-shell {
    background: var(--card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-shell::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.video-shell:hover::before {
    opacity: 0.5;
}

.video-shell:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 60px var(--primary-glow);
}

.intro-video {
    width: 100%;
    border-radius: var(--radius-md);
    display: block;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: var(--surface);
}

/* ==================== Cards ==================== */
.cards,
.steps,
.projects-grid,
.stats-grid {
    display: grid;
    gap: 1.5rem;
}

.cards,
.steps,
.projects-grid {
    grid-template-columns: repeat(3, 1fr);
}

.stats-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

.card,
.step,
.project-card,
.stat-card {
    background: var(--card);
    padding: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.card::before,
.step::before,
.project-card::before,
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover,
.step:hover,
.project-card:hover,
.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 40px var(--primary-glow);
    transform: translateY(-5px);
}

.card:hover::before,
.step:hover::before,
.project-card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, display 0s;
}

/* Idea Card - Special Styling */
.idea-card {
    grid-column: 1 / -1;
    background: var(--gradient-glow);
    border: 2px solid var(--primary);
    text-align: center;
    padding: 3rem 2rem;
}

.idea-card h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.idea-card p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}

.card h3,
.step h3,
.project-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    line-height: 1.5;
    padding: 0.25rem 0.5rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card p,
.step p,
.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    line-height: 1.8;
    padding: 0.25rem 0.5rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==================== Process Timeline ==================== */
.process-timeline {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    display: grid;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
    align-items: stretch;
}

.process-timeline > .process-step {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 200px;
    flex: 1 1 200px;
    min-width: 200px;
}

.timeline-track {
    display: none;
}

.process-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    align-self: stretch;
}

.step-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 30px var(--primary-glow), 0 0 0 6px var(--bg), 0 0 0 8px var(--primary);
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
}

.step-number span {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bg);
    line-height: 1;
    display: inline-block;
    text-align: center;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: 0;
    white-space: nowrap;
    width: auto;
    height: 1.3rem;
    min-height: 1.3rem;
    max-height: 1.3rem;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    will-change: transform;
}

.process-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 12px 40px var(--primary-glow), 0 0 0 8px var(--bg), 0 0 0 10px var(--primary);
}

.step-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    position: absolute;
    top: 50%;
    right: -50%;
    transform: translateY(-50%);
    z-index: 1;
}

.process-step:last-child .step-line {
    display: none;
}

.step-content {
    background: var(--card);
    padding: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 4px 4px;
}

.step-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.process-step:hover .step-content {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 50px var(--primary-glow);
}

.process-step:hover .step-content::after {
    opacity: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    margin: 0 auto 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.step-icon svg {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px;
    min-height: 26px;
    max-width: 26px;
    max-height: 26px;
    color: var(--primary);
    flex-shrink: 0;
}

.process-step:hover .step-icon {
    background: var(--primary);
    border-color: var(--primary);
}

.process-step:hover .step-icon svg {
    color: var(--bg);
}

/* Ensure SVGs don't overflow */
.step-content svg,
.step-icon svg {
    display: block;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    color: var(--text);
    line-height: 1.5;
    padding: 0.25rem 0.5rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
    padding: 0.25rem 0.5rem;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-features {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    text-align: right;
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
}

.step-features li {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Animation delays for steps */
.process-step[data-step="1"] { animation-delay: 0s; }
.process-step[data-step="2"] { animation-delay: 0.1s; }
.process-step[data-step="3"] { animation-delay: 0.2s; }
.process-step[data-step="4"] { animation-delay: 0.3s; }

/* Old step styles kept for compatibility */
.step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--bg);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.stat-value::after {
    content: '%';
    font-size: 1.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==================== Filters ==================== */
.filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 2rem 0 3rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--bg);
    border-color: transparent;
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* ==================== Contact ==================== */
.contact-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 3rem auto;
}

.contact-form .full {
    grid-column: 1 / -1;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-hover);
    box-shadow: 0 0 20px var(--primary-glow);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form button {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 200px;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 0.75rem;
    direction: ltr;
}

.country-select-wrapper {
    flex-shrink: 0;
}

.country-select {
    width: 120px;
    min-width: 120px;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background-color: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    padding-left: 0.75rem;
}

[dir="ltr"] .country-select {
    background-position: right 0.75rem center;
    padding-left: 0.5rem;
    padding-right: 2rem;
}

.country-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface-hover);
    box-shadow: 0 0 20px var(--primary-glow);
}

.country-select option {
    background: var(--bg);
    color: var(--text);
    padding: 0.5rem;
}

.phone-input-group input {
    flex: 1;
    direction: ltr;
    text-align: left;
}

/* Service Select */
.service-select {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background-color: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1.2rem center;
    padding-left: 2.5rem;
}

[dir="ltr"] .service-select {
    background-position: right 1.2rem center;
    padding-left: 1.2rem;
    padding-right: 2.5rem;
}

.service-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface-hover);
    box-shadow: 0 0 20px var(--primary-glow);
}

.service-select option {
    background: var(--bg);
    color: var(--text);
    padding: 0.75rem;
}

.service-select option:disabled {
    color: var(--muted);
}

/* Form Message */
.form-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-message.success {
    opacity: 1;
    transform: translateY(0);
    background: rgba(0, 212, 170, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.form-message.error {
    opacity: 1;
    transform: translateY(0);
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.contact-box a,
.contact-box span {
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contact-box a:hover {
    color: var(--primary);
}

/* ==================== Footer ==================== */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.footer p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ==================== 3D Tilt Effect ==================== */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ==================== Glow Effects ==================== */
.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: var(--radius-full);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Active nav indicator */
.nav-links a.active {
    color: var(--primary);
}

/* ==================== LTR (English) Support ==================== */
[dir="ltr"] {
    font-family: 'Space Grotesk', 'Cairo', sans-serif;
}

[dir="ltr"] .nav-links a::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .step-features {
    text-align: left;
}

[dir="ltr"] .step-features li::before {
    order: -1;
}

[dir="ltr"] .scroll-progress {
    right: auto;
    left: 0;
}

[dir="ltr"] .step-line {
    right: auto;
    left: -50%;
}

[dir="ltr"] .hero-grid {
    direction: ltr;
}

[dir="ltr"] .hero-copy {
    text-align: left;
}

[dir="ltr"] .hero-text {
    margin-inline: 0;
}

[dir="ltr"] .hero-actions {
    justify-content: flex-start;
}

[dir="ltr"] .floating-tags {
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    [dir="ltr"] .hero-copy {
        text-align: center;
    }
    
    [dir="ltr"] .hero-text {
        margin-inline: auto;
    }
    
    [dir="ltr"] .hero-actions {
        justify-content: center;
    }
    
    [dir="ltr"] .floating-tags {
        justify-content: center;
    }
}

/* Video placeholder styling */
.intro-video:not([src]),
.intro-video[src=""] {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(99, 102, 241, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Selection styling */
::selection {
    background: var(--primary);
    color: var(--bg);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== Mobile Menu ==================== */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--card-border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    border-color: var(--primary);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 0;
    z-index: 99;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.active {
    max-height: calc(100vh - 70px);
    opacity: 1;
    visibility: visible;
    padding: 1rem;
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--card-border);
}

.mobile-nav a:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--surface);
    color: var(--primary);
}

.mobile-nav .mobile-cta {
    background: var(--gradient-primary);
    color: var(--bg);
    margin-top: 0.75rem;
    font-weight: 700;
    border-bottom: none;
    border-radius: var(--radius-full);
}

.mobile-nav .mobile-cta:hover {
    background: var(--gradient-primary);
    color: var(--bg);
}

/* ==================== Light Theme Specific ==================== */
[data-theme="light"] .intro::before {
    background: 
        radial-gradient(circle at 30% 30%, rgba(5, 150, 105, 0.1), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(79, 70, 229, 0.1), transparent 50%);
}

[data-theme="light"] .blob-1 {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(16, 185, 129, 0.05));
}

[data-theme="light"] .blob-2 {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.05));
}

[data-theme="light"] .blob-3 {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.1), rgba(245, 166, 35, 0.03));
}

[data-theme="light"] .grid {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .section.alt {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .country-select,
[data-theme="light"] .service-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23059669' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

[data-theme="light"] .country-select option,
[data-theme="light"] .service-select option {
    background: #fff;
}

[data-theme="light"] .intro-label {
    color: #fff;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }
    
    .mobile-nav {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }
    
    .site-header {
        position: sticky;
        z-index: 100;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-copy {
        order: 1;
    }

    .hero-media {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-text {
        margin-inline: auto;
    }

    .hero-actions {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }

    .floating-tags {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .cards,
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .process-timeline > .process-step {
        -ms-flex: 1 1 45%;
        flex: 1 1 45%;
    }

    .step-line {
        display: none;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .cards,
    .steps,
    .projects-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        grid-template-columns: 1fr;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 2rem;
    }

    .process-timeline > .process-step {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

    .step-number {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        max-width: 50px;
        max-height: 50px;
        display: grid;
        place-items: center;
    }

    .step-number span {
        font-size: 1.1rem;
        line-height: 1;
        height: 1.1rem;
        min-height: 1.1rem;
        max-height: 1.1rem;
        font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace !important;
        white-space: nowrap;
        letter-spacing: 0;
        transform: translateZ(0);
    }

    .step-content {
        padding: 1.5rem;
    }

    .step-icon {
        width: 45px;
        height: 45px;
    }

    .step-icon svg {
        width: 22px;
        height: 22px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .hero {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .brand-ar {
        font-size: 1.2rem;
    }
    
    .brand-en {
        font-size: 0.65rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .btn-primary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .theme-toggle {
        width: 38px;
        height: 38px;
    }
    
    .mobile-menu-btn {
        width: 38px;
        height: 38px;
    }
    
    .video-shell {
        padding: 0.75rem;
    }
    
    .card,
    .step,
    .project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 92%;
    }
    
    .header-content {
        flex-wrap: nowrap;
    }
    
    .nav-actions .btn-primary {
        display: none;
    }
    
    .lang-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .theme-toggle {
        width: 34px;
        height: 34px;
    }
    
    .theme-icon {
        font-size: 1rem;
    }
    
    .mobile-menu-btn {
        width: 34px;
        height: 34px;
    }
    
    .brand-ar {
        font-size: 1rem;
    }
    
    .brand-en {
        font-size: 0.55rem;
    }

    .hero-copy h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-text {
        font-size: 0.95rem;
    }
    
    .hero-kicker {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }
    
    .section > .container > p {
        font-size: 0.9rem;
    }
    
    .floating-tags span {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
    
    .filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .intro-content h1 {
        font-size: 1.6rem;
    }
    
    .intro-content p {
        font-size: 1rem;
    }
    
    .intro-label {
        font-size: 0.95rem;
        padding: 0.4rem 1.2rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .mobile-nav a {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .step-number {
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
        max-width: 45px;
        max-height: 45px;
        box-shadow: 0 6px 20px var(--primary-glow), 0 0 0 4px var(--bg), 0 0 0 6px var(--primary);
        display: grid;
        place-items: center;
    }

    .step-number span {
        font-size: 1rem;
        line-height: 1;
        height: 1rem;
        min-height: 1rem;
        max-height: 1rem;
        font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace !important;
        white-space: nowrap;
        letter-spacing: 0;
        transform: translateZ(0);
    }

    .step-content h3 {
        font-size: 1.05rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    .step-features li {
        font-size: 0.8rem;
    }

    .phone-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .country-select {
        width: 100%;
    }

    .country-select,
    .service-select {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
}
