:root {
  /* Light Theme - Premium Modern Palette */
  --bg-main: #F4F4F2;        /* Warm Light Gray */
  --bg-card: #FFFFFF;        /* Pure White */
  --text-main: #111111;      /* Deep Charcoal */
  --text-muted: #555555;     /* Muted Gray text */
  --primary: #2A5C43;        /* Container Green */
  --primary-dark: #1e4531;   /* Darker Green for hover */
  --secondary: #191919;      /* Secondary Dark */
  --accent: #333333;         /* Card Gray */
  --border-color: #E5E5E5;   /* Border Gray */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(229, 229, 229, 0.5); /* using #E5E5E5 */
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.02);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme - Premium Modern Palette */
  --bg-main: #111111;        /* Deep Charcoal */
  --bg-card: #191919;        /* Slightly lighter Charcoal */
  --text-main: #F4F4F2;      /* Warm Light Gray */
  --text-muted: #999999;     /* Lighter Muted text for readability */
  --primary: #2A5C43;        /* Container Green */
  --primary-dark: #377858;   /* Lighter Green for dark mode hover */
  --secondary: #333333;      /* Card Gray */
  --accent: #E5E5E5;         /* Accent light */
  --border-color: #333333;   /* Card Gray for borders */
  --glass-bg: rgba(25, 25, 25, 0.85);
  --glass-border: rgba(51, 51, 51, 0.5); /* using #333333 */
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-card);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.3);
  background: var(--primary);
  color: #ffffff;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 2rem;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
}

.hero-text {
  flex: 1;
  text-align: right;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img.car-animate {
  max-width: 100%;
  height: auto;
  animation: floatCar 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
}

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

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-weight: 600;
  margin-bottom: 2rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444; /* closed by default */
}
.status-dot.open {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Infinite Slider */
.brands-slider {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  background: var(--bg-card);
  position: relative;
  box-shadow: var(--shadow);
}

.brands-slider::before,
.brands-slider::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
}

.brands-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-card) 0%, transparent 100%);
}

.brands-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-card) 0%, transparent 100%);
}

.brands-track {
  display: flex;
  width: calc(250px * 12);
  animation: scroll 30s linear infinite;
}

.brand-item {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-250px * 6)); }
}

/* ========================
   Brands Arc Fan Section
   ======================== */
.brands-arc-section {
  position: relative;
  height: 800px;
  background: var(--bg-card);
  overflow: hidden;
}

/* Caption strip below the arc */
.brands-arc-caption {
  background: var(--bg-card);
  text-align: center;
  padding: 2.5rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  border-top: 1px solid var(--border-color);
}

.brands-arc-caption h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0;
}

.brands-arc-caption p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0;
}


/* The pivot sits 110px above bottom-center; cards fan upward from it */
.brands-arc-pivot {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.arc-card {
  position: absolute;
  bottom: 0;
  left: -60px;
  width: 120px;
  transform-origin: center bottom;
  transform: rotate(var(--r)) translateY(-560px);
  pointer-events: all;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), z-index 0s;
  z-index: 5;
}

.arc-card:hover {
  transform: rotate(var(--r)) translateY(-592px) scale(1.1);
  z-index: 30;
}

.arc-card-face {
  width: 120px;
  min-height: 155px;
  border-radius: 18px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.2rem 0.7rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
}

.arc-wordmark {
  font-size: 0.85rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.arc-name-ar {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.arc-card-face img {
  width: 64px;
  height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* make logo white */
}

@media (max-width: 768px) {
  .brands-arc-section {
    height: 500px;
    padding-top: 1rem;
  }
  .brands-arc-pivot {
    bottom: 60px;
  }
  .arc-card {
    width: 80px;
    left: -40px;
    transform: rotate(var(--r)) translateY(-340px);
  }
  .arc-card:hover {
    transform: rotate(var(--r)) translateY(-360px) scale(1.08);
  }
  .arc-card-face {
    width: 80px;
    min-height: 100px;
    border-radius: 12px;
    padding: 0.7rem 0.4rem;
  }
  .arc-wordmark { font-size: 0.6rem; }
  .arc-name-ar  { font-size: 0.52rem; }
  .brands-arc-caption h2 { font-size: 1.4rem; }
}

/* Services Grid */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.section-title span {
  color: var(--primary);
}

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

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

.service-card {
  padding: 2rem;
  transition: transform var(--transition);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Why Us */
.why-us {
  padding: 5rem 2rem;
  background: var(--bg-card);
}

.why-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  align-items: center;
}

.why-text, .why-image {
  flex: 1;
}

.why-list {
  list-style: none;
  margin-top: 2rem;
}

.why-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.why-list li .icon {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Silo / Articles preview */
.silo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.silo-card {
  padding: 2rem;
  border-radius: var(--border-radius);
  background: var(--accent); /* Dark Gray */
  color: #FFFFFF;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
}

.silo-card h3 {
  margin-bottom: 1rem;
  color: #FFFFFF;
}

.silo-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--primary);
  transition: opacity 0.3s;
}

.silo-card a:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  background: var(--bg-card);
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.floating-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: transform var(--transition);
  text-decoration: none;
}

.floating-wa:hover {
  transform: scale(1.1);
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding-top: 2rem;
  }
  .hero-text {
    text-align: center;
  }
  .hero-image {
    width: 100%;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .why-container {
    flex-direction: column;
  }
  .nav-links {
    display: none;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* LTR Styles for English */
html[dir="ltr"] body {
  text-align: left;
}
html[dir="ltr"] .hero-text {
  text-align: left;
}
html[dir="ltr"] .why-list li {
  padding-left: 2.5rem;
  padding-right: 0;
}
html[dir="ltr"] .why-list .icon {
  left: 0;
  right: auto;
}
html[dir="ltr"] .section-title[style*="right"] {
  text-align: left !important;
}
html[dir="ltr"] .nav-container {
  flex-direction: row;
}
