/* ==================== CSS Variables ==================== */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-hover: #4f46e5;
    --border-color: #e9ecef;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border-color: #262626;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}
button{
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-primary);
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-base);
}

/* ==================== Hero Section ==================== */
.hero {
    padding: calc(70px + var(--spacing-3xl)) var(--spacing-md) var(--spacing-3xl);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: 10%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.card-icon {
    font-size: 2rem;
}

.card-text {
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-full {
    width: 100%;
}

/* ==================== Section Styles ==================== */
section {
    padding: var(--spacing-3xl) var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ==================== Services Section ==================== */
.services {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== Why Choose Us Section ==================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.benefit-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.benefit-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== Portfolio Section ==================== */
.portfolio {
    background-color: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.portfolio-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base);
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.portfolio-content {
    padding: var(--spacing-lg);
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.portfolio-tags {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.project-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-top: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.project-view-link:hover {
    color: var(--accent-hover);
    transform: translateX(-3px);
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==================== Client Logos Slider Section ==================== */
.client-logos-section {
    background-color: var(--bg-primary);
}

.client-logos-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.client-logos-slider {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.client-logos-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: var(--spacing-xl);
}

.client-logo-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--spacing-2xl);
    flex-shrink: 0;
    justify-items: center;
    align-items: center;
}

.client-logo-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    padding: 0;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);

    opacity: 0.7;
}

.client-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.slider-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
    color: var(--text-primary);
}

.slider-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-btn:disabled:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    transform: scale(1);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.slider-dot:hover {
    background: var(--text-tertiary);
}

.slider-dot.active {
    background: var(--accent-primary);
    width: 32px;
    border-radius: 6px;
}


/* ==================== About Section ==================== */
.about {
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-paragraph {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    font-size: 1.125rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

.about-visual {
    height: 400px;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-xl);
    opacity: 0.1;
}

/* ==================== Contact Section ==================== */
.contact {
    background-color: var(--bg-primary);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    align-items: start;
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.contact-link {
    color: var(--accent-primary);
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-text {
    color: var(--text-secondary);
}

/* ==================== Contact Form ==================== */
.contact-form {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--bg-secondary);
    padding: var(--spacing-3xl) var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-list a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-list a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        display: none;
    }
    html[dir="rtl"] .hero .container{
        grid-template-columns: unset
    }
      html[dir="rtl"] .about-content{
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-logo-slide {
        grid-template-columns: 1fr;
    }
    
    .client-logo-img {
        max-width: 460px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .client-logo-slide {
        grid-template-columns: 1fr;
    }
    
    .client-logo-img {
        max-width: 360px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .slider-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 640px) {
    .client-logos-slider-wrapper {
        gap: var(--spacing-sm);
    }
    
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .client-logo-slide {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .client-logo-img {
        max-width: 340px;
        width: 100%;
    }
}



/* ==================== RTL Adjustments ==================== */

/* Base RTL direction */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Navbar adjustments */
html[dir="rtl"] .nav-wrapper {
  flex-direction: row-reverse;
}


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

/* Mobile menu RTL positioning */
@media (max-width: 768px) {
  html[dir="rtl"] .nav-menu {
    left: auto;
    right: -100%;
  }

  html[dir="rtl"] .nav-menu.active {
    right: 0;
    left: auto;
  }
}

/* Hero section */
html[dir="rtl"] .hero .container {
  grid-template-columns: 1fr 1fr;
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

html[dir="rtl"] .floating-card {
  flex-direction: row-reverse;
}

html[dir="rtl"] .card-1 {
  top: 10%;
  right: 10%;
  left: auto;
}

html[dir="rtl"] .card-2 {
  top: 40%;
  left: 10%;
  right: auto;
}

html[dir="rtl"] .card-3 {
  bottom: 20%;
  right: 20%;
  left: auto;
}

/* Buttons & Sections */
html[dir="rtl"] .section-header {
  text-align: right;
}

html[dir="rtl"] .section-title,
html[dir="rtl"] .section-subtitle {
  text-align: right;
}

/* Services */
html[dir="rtl"] .service-card {
  text-align: right;
}

/* Benefits / Why Choose Us */
html[dir="rtl"] .benefit-card {
  text-align: right;
}

/* Portfolio section */
html[dir="rtl"] .portfolio-card {
  text-align: right;
}

html[dir="rtl"] .portfolio-content {
  text-align: right;
}

/* About section */
html[dir="rtl"] .about-content {
  grid-template-columns: 1fr 1fr;
}

html[dir="rtl"] .about-paragraph {
  text-align: right;
}

/* Contact section */
html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-form {
  text-align: right;
}

html[dir="rtl"] .contact-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .contact-label {
  text-align: right;
}

/* Footer */
html[dir="rtl"] .footer {
  text-align: right;
}

html[dir="rtl"] .footer-content {
  grid-template-columns: 2fr 1.5fr;
}

html[dir="rtl"] .footer-links {
  direction: rtl;
}

html[dir="rtl"] .footer-list a {
  text-align: right;
}

/* Slider buttons */
html[dir="rtl"] .slider-btn {
  transform: scaleX(-1); /* Flip arrow direction */
}

/* Adjust client logos order */
html[dir="rtl"] .client-logos-track {
  flex-direction: row-reverse;
}

/* About stats */
html[dir="rtl"] .stat {
  text-align: center; /* Keep numbers centered */
}

/* Buttons alignment fix for RTL */
html[dir="rtl"] .hero-cta {
  justify-content: flex-start;
}




/* ==================== Responsive Design ==================== */

/* Large Desktop (1440px and above) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop (1200px - 1439px) - Default styles already applied */

/* Laptop/Tablet Landscape (968px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (768px - 967px) */
@media (max-width: 967px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Hero Section */
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero-content {
        max-width: 100%;
        width: 100%;
    }
    
    .hero-visual {
        display: none;
    }
       html[dir="rtl"] .hero .container{
        grid-template-columns: unset
    }

    html[dir="rtl"] .about-content{
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        gap: var(--spacing-sm);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    /* Benefits */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-visual {
        height: 300px;
        order: -1;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Client Logos */
    .client-logo-slide {
        grid-template-columns: 1fr;
    }
    
    .client-logo-img {
        max-width: 500px;
    }
    
    /* Section Spacing */
    section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
}

/* Mobile Landscape / Small Tablet (640px - 767px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg);
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero */
    .hero {
        padding: calc(70px + var(--spacing-2xl)) var(--spacing-md) var(--spacing-2xl);
        min-height: 70vh;
    }
    
    .hero-content {
        max-width: 100%;
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    /* Section Headers */
    .section-title {
        font-size: 1.875rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Services */
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-title {
        font-size: 1.25rem;
    }
    
    /* Benefits */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .benefit-card {
        padding: var(--spacing-md);
    }
    
    .benefit-icon {
        font-size: 2.5rem;
    }
    
    /* Portfolio */
    .portfolio-card {
        margin-bottom: var(--spacing-sm);
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: var(--spacing-md);
    }
    
    /* About */
    .about-paragraph {
        font-size: 1rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Contact */
    .contact-info {
        gap: var(--spacing-md);
    }
    
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    .form-group {
        margin-bottom: var(--spacing-sm);
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-md);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Client Logos */
    .client-logos-slider-wrapper {
        gap: var(--spacing-sm);
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .slider-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .client-logo-img {
        max-width: 400px;
    }
}

/* Mobile Portrait (480px - 639px) */
@media (max-width: 639px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
        line-height: 1.15;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .hero-cta {
        gap: 0.75rem;
    }
    
    .hero-cta .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Section spacing */
    section {
        padding: var(--spacing-xl) 1rem;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-title {
        font-size: 1.75rem;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    .section-subtitle {
        line-height: 1.6;
    }
    
    /* Services */
    .service-card {
        padding: var(--spacing-md);
    }
    
    .service-icon {
        margin-bottom: var(--spacing-sm);
    }
    
    .service-title {
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .service-description {
        line-height: 1.7;
    }
    
    /* Portfolio */
    .portfolio-image {
        height: 180px;
    }
    
    .portfolio-title {
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .portfolio-description {
        line-height: 1.6;
    }
    
    /* Contact Details */
    .contact-details {
        gap: var(--spacing-sm);
    }
    
    .contact-item {
        flex-direction: row-reverse;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
        background: var(--bg-secondary);
        border-radius: var(--radius-md);
    }
    
    /* html[dir="rtl"] .contact-item {
        flex-direction: row;
    }
     */
    /* Client Logos */
    .client-logo-slide {
        gap: var(--spacing-lg);
    }
    
    .client-logo-img {
        max-width: 320px;
        width: 100%;
        height: auto;
    }
    
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .slider-dot.active {
        width: 24px;
    }
}

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.875rem;
    }
    
    /* Navigation */
    .nav-wrapper {
        height: 60px;
        padding: 0 0.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        top: 60px;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        padding: 0.5rem 0;
    }
    
    .theme-toggle {
        padding: 0.375rem;
    }
    
    /* Hero */
    .hero {
        padding: calc(60px + var(--spacing-xl)) 0.875rem var(--spacing-xl);
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: var(--spacing-md);
        line-height: 1.6;
    }
    
    .hero-cta {
        gap: 0.625rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        border-radius: 0.5rem;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-lg) 0.875rem;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    /* Services */
    .services-grid {
        gap: var(--spacing-sm);
    }
    
    .service-card {
        padding: var(--spacing-md);
        border-radius: 0.75rem;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .service-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .service-description {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
    
    /* Benefits */
    .benefits-grid {
        gap: var(--spacing-md);
    }
    
    .benefit-card {
        padding: var(--spacing-md);
    }
    
    .benefit-icon {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .benefit-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .benefit-description {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
    
    /* Portfolio */
    .portfolio-grid {
        gap: var(--spacing-md);
    }
    
    .portfolio-image {
        height: 160px;
    }
    
    .portfolio-content {
        padding: var(--spacing-sm);
    }
    
    .portfolio-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .portfolio-description {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }
    
    .tag {
        font-size: 0.8125rem;
        padding: 0.25rem 0.625rem;
    }
    
    /* About */
    .about-visual {
        height: 250px;
    }
    
    .about-paragraph {
        font-size: 0.9375rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.7;
    }
    
    .about-stats {
        margin-top: var(--spacing-lg);
    }
    
    .stat {
        padding: var(--spacing-sm) 0;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8125rem;
    }
    
    /* Contact */
    .contact-description {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-group {
        margin-bottom: var(--spacing-sm);
    }
    
    .form-group label {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem;
        font-size: 0.9375rem;
        border-radius: 0.5rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0.875rem var(--spacing-sm);
    }
    
    .footer-content {
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        gap: var(--spacing-sm);
    }
    
    .footer-logo {
        font-size: 1.25rem;
    }
    
    .footer-tagline {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .footer-links {
        gap: var(--spacing-lg);
    }
    
    .footer-heading {
        font-size: 0.9375rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-list {
        font-size: 0.875rem;
        gap: 0.375rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    .footer-bottom {
        padding-top: var(--spacing-md);
        font-size: 0.875rem;
    }
    
    /* Client Logos */
    .client-logo-img {
        max-width: 280px;
    }
    
    .slider-btn {
        width: 32px;
        height: 32px;
    }
    
    .slider-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .slider-dots {
        margin-top: var(--spacing-md);
        gap: 0.375rem;
    }
}

/* Extra Small Devices (up to 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Hero */
    .hero {
        padding: calc(60px + 1rem) 0.75rem 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }
    
    .hero-cta .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Sections */
    section {
        padding: 1rem 0.75rem;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.375rem;
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 0.875rem;
    }
    
    /* Cards */
    .service-card,
    .benefit-card,
    .portfolio-card {
        padding: 0.75rem;
        border-radius: 0.625rem;
    }
    
    .service-icon,
    .benefit-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .service-title,
    .benefit-title,
    .portfolio-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-description,
    .benefit-description,
    .portfolio-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    /* Portfolio */
    .portfolio-image {
        height: 140px;
    }
    
    .portfolio-content {
        padding: 0.75rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Client Logos */
    .client-logo-img {
        max-width: 240px;
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
    }
    
    .slider-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        font-size: 0.875rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Footer */
    .footer {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-logo {
        font-size: 1.125rem;
    }
    
    .footer-tagline,
    .footer-list {
        font-size: 0.8125rem;
    }
    
    .footer-heading {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-bottom {
        font-size: 0.8125rem;
        padding-top: 0.75rem;
    }
    
    /* About Stats */
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Touch optimization for all mobile devices */
@media (max-width: 767px) {
    /* Larger touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better text selection */
    * {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus (iOS) */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Landscape orientation optimization for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(60px + 1rem) 1rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }
    
    section {
        padding: 1.5rem 1rem;
    }
    
    .nav-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}