* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: #333;
  overflow-x: hidden !important;
}

[dir="rtl"] body {
  font-family: "Cairo", sans-serif;
}

[dir="ltr"] body {
  font-family: "Open Sans", sans-serif;
}

/* ==========================================
     MULTILINGUAL SUPPORT CSS - STEP 1
     Arabic (RTL) and English (LTR) Support
     ========================================== */

/* Language Toggle Button Styles */
.language-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002;
  background: rgba(0, 212, 255, 0.9);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(10px);
  width: fit-content;
}

.language-toggle:hover {
  background: rgba(0, 153, 204, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

/* RTL Layout Adjustments */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

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

[dir="rtl"] .about-content {
  direction: rtl;
}

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

[dir="rtl"] .contact-content {
  direction: rtl;
}

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

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

[dir="rtl"] .contact-item div:last-child {
  text-align: right;
  margin-right: 1rem;
  margin-left: 0;
}

/* RTL Statistics Grid */
[dir="rtl"] .stats {
  direction: rtl;
}

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

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

[dir="rtl"] .service-icon {
  margin-left: auto;
  margin-right: 0;
}

/* RTL Projects Grid */
[dir="rtl"] .project-card {
  direction: rtl;
}

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

[dir="rtl"] .tech-stack {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

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

/* RTL Form Styles */
[dir="rtl"] .contact-form {
  direction: rtl;
}

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

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea {
  text-align: right;
  direction: rtl;
}

[lang="ar"] .hero h1 {
  font-size: 3rem; /* Slightly smaller for Arabic */
  line-height: 1.3;
}

[lang="ar"] .section-title {
  line-height: 1.4;
}

[lang="ar"] .service-card h3,
[lang="ar"] .project-card h3 {
  line-height: 1.5;
}

[lang="ar"] .nav-links a {
  font-size: 0.95rem; /* Slightly smaller Arabic nav text */
}

[lang="ar"] .logo {
  font-size: 1.6rem; /* Adjusted logo size for Arabic */
}

/* Language-specific Typography Adjustments */
[lang="ar"] p,
[lang="ar"] .section-subtitle {
  line-height: 2; /* Better readability for Arabic */
}

[lang="ar"] .about-text p {
  line-height: 1.9;
}

/* RTL Navigation Adjustments */
[dir="rtl"] .nav-links a::after {
  right: 0;
  left: auto;
}

[dir="rtl"] .language-toggle {
  left: 20px;
  right: auto;
}

/* RTL Responsive Adjustments */
@media (max-width: 768px) {
  [dir="rtl"] .language-toggle {
    left: 15px;
    right: 0;
    top: 15px;
  }

  [lang="ar"] .hero h1 {
    font-size: 2.2rem;
  }

  [lang="ar"] .section-title {
    font-size: 1.8rem;
  }
}

/* RTL Grid Adjustments */
[dir="rtl"] .services-grid,
[dir="rtl"] .projects-grid {
  direction: rtl;
}

/* Ensure proper spacing for RTL contact items */
[dir="rtl"] .contact-item {
  gap: 1rem;
}

[dir="rtl"] .contact-icon {
  order: 2;
}

[dir="rtl"] .contact-item > div:last-child {
  order: 1;
  margin-right: 0;
}

/* RTL Tech Stack Tags */
[dir="rtl"] .tech-tag {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .tech-stack .tech-tag:last-child {
  margin-left: 0;
}

[dir="rtl"] .tech-stack .tech-tag:first-child {
  margin-right: 0;
}

/* Smooth transitions for language switching */
.language-transition {
  transition: all 0.3s ease-in-out;
}

/* Loading state for language switch */
.language-switching {
  opacity: 0.7;
  pointer-events: none;
}

/* Enhanced Arabic typography */
[lang="ar"] .hero p {
  font-size: 1.2rem;
  line-height: 1.8;
}

[lang="ar"] .cta-button {
  font-size: 1rem;
  padding: 1rem 2.5rem;
}

/* Ensure proper text alignment for mixed content */
[dir="rtl"] .section-title,
[dir="rtl"] .section-subtitle {
  text-align: center; /* Keep titles centered regardless of direction */
}

/* Fix for footer in RTL */
[dir="rtl"] footer {
  text-align: center;
}

/* Ensure images remain properly positioned */
[dir="rtl"] .about-text img {
  display: block;
  margin: 0 auto;
}

/* Project image positioning for RTL */
[dir="rtl"] .project-image {
  direction: ltr; /* Keep images in normal orientation */
}

/* Form button RTL adjustment */
[dir="rtl"] .submit-btn {
  width: 100%;
}

/* Stats layout for RTL */
[dir="rtl"] .stat-number {
  display: block;
  text-align: center;
}

[dir="rtl"] .stat-label {
  text-align: center;
}

/* Navigation logo positioning for RTL */
[dir="rtl"] .logo {
  order: -1;
}

/* Improved Arabic readability */
[lang="ar"] {
  word-spacing: 0.1em;
  letter-spacing: 0.02em;
}

/* Cursor effect adjustments for RTL */
[dir="rtl"] .cursor {
  transform-origin: center;
}

/* Progress bar for RTL */
[dir="rtl"] .progress-bar {
  right: 0;
  left: auto;
  transform-origin: right;
}

/* Animation adjustments for RTL */
[dir="rtl"] .fade-in {
  transform: translateX(-30px);
}

[dir="rtl"] .fade-in.visible {
  transform: translateX(0);
}

/* Service icon positioning for RTL */
[dir="rtl"] .service-icon {
  align-self: flex-end;
}

/* Mobile menu adjustments for RTL (when implemented) */
@media (max-width: 768px) {
  [dir="rtl"] .nav-container {
    flex-direction: row-reverse;
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00d4ff;
  text-decoration: none;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #00d4ff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #0099cc);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(0, 212, 255, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 153, 204, 0.3) 0%,
      transparent 50%
    );
  animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 5rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #1e293b;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #64748b;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* About Section */
.about {
  background: #f8fafc;
  position: relative;
  z-index: 2;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.about-text img {
  width: 100%;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: #64748b;
  font-size: 1.1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #00d4ff;
  display: block;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

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

.service-card {
  background: white;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.service-card p {
  color: #64748b;
  line-height: 1.6;
}

/* Projects Section */
.projects {
  background: #f8fafc;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 700;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 2rem;
}

.project-content a {
  text-decoration: none;
  font-size: 1.4rem;
  color: #1e293b;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.project-card p {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: #e2e8f0;
  color: #475569;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-link {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #0099cc;
}

/* Marketing Section Specific Styles */
.marketing {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.marketing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 70%,
    rgba(0, 212, 255, 0.1) 0%,
    transparent 50%
  );
  z-index: 1;
}

.container {
  position: relative;
  z-index: 2;
}

.marketing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.marketing-card {
  background: white;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.marketing-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.marketing-card:hover::before {
  transform: scaleX(1);
}

.marketing-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.marketing-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: white;
  position: relative;
}

.marketing-icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.marketing-card:hover .marketing-icon::after {
  opacity: 0.2;
}

.marketing-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: #1e293b;
  font-weight: 600;
}

.marketing-card p {
  color: #64748b;
  line-height: 1.7;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.marketing-features {
  list-style: none;
  padding: 0;
}

.marketing-features li {
  color: #475569;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.marketing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00d4ff;
  font-weight: bold;
}

/* CTA Section */
.marketing-cta {
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  color: white;
  margin-top: 4rem;
}

.marketing-cta h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.marketing-cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

/* Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .marketing-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .marketing-card {
    padding: 2rem 1.5rem;
  }

  .marketing-cta {
    padding: 2rem;
  }

  .marketing-cta h3 {
    font-size: 1.5rem;
  }
}

/* Contact Section */
.contact {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #00d4ff;
}

.contact-info p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.contact-item a {
  color: white;
  text-decoration: none;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00d4ff;
}

.contact-form {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #00d4ff;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

/* Footer */
footer {
  background: #0f172a;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
