/* 
  Abnaa Al-Neffati - Premium Minimalist White (Apple-style)
  Theme: High-Contrast Light Mode
*/

:root {
  /* Color Palette - Premium White Theme */
  --bg-color: #FFFFFF;
  --bg-alt: #F5F5F7;
  --bg-card: #FFFFFF;
  
  --safety-blue: #0066CC;
  --safety-blue-hover: #004C99;
  --safety-blue-glow: rgba(0, 102, 204, 0.2);
  
  --text-main: #1D1D1F;
  --text-muted: #86868B;
  --text-light: #FFFFFF; /* Purely for text on dark primary buttons */
  
  --border-light: #D2D2D7;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Transitions */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.2s var(--ease);
  --transition-normal: 0.4s var(--ease);
  --transition-slow: 0.8s var(--ease);
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background-color: var(--bg-color); /* To prevent flashes */
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body {
  font-family: 'Tajawal', var(--font-family);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Increased White Space (Padding/Margins) */
.section {
  padding: 140px 0;
}

.section-title {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
}

.section-title h2 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-main);
}

.section-title p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.bg-alt {
  background-color: var(--bg-alt);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em; /* Sophisticated Look */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 999px;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--safety-blue);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--safety-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--safety-blue-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--safety-blue);
  border: 1.5px solid var(--safety-blue);
}

.btn-secondary:hover {
  background-color: rgba(0, 102, 204, 0.05);
  transform: translateY(-2px);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  /* Logo retains its dark version natively */
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.1;
}

[dir="rtl"] .logo-text {
  letter-spacing: 0; /* Remove letter-spacing for Arabic typography */
}

.logo-subtext {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0em;
  white-space: nowrap;
  margin-top: 2px;
}

.nav-list {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--safety-blue);
}

.lang-switch {
  color: var(--safety-blue);
  font-weight: 600;
  border: 1px solid rgba(0, 102, 204, 0.4);
  padding: 4px 12px;
  border-radius: 99px;
  transition: all var(--transition-fast);
}

.lang-switch:hover {
  background-color: var(--safety-blue);
  color: var(--text-light);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  width: 30px;
  height: 20px;
  position: relative;
}

.mobile-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  position: absolute;
  transition: transform 0.3s ease, opacity 0.2s ease;
  left: 0;
}

.mobile-toggle .bar:nth-child(1) { top: 0; }
.mobile-toggle .bar:nth-child(2) { top: 9px; }
.mobile-toggle .bar:nth-child(3) { top: 18px; }

.mobile-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

[dir="rtl"] .mobile-toggle .bar {
  left: auto;
  right: 0;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background-color: #1a1a1a; /* Dark fallback */
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Changed from -1 to 0 */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
  color: var(--text-main);
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.1;
  color: var(--text-light);
}

.hero-content p {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: rgba(255, 255, 255, 0.85); /* Lightened for dark mode */
  margin-bottom: 48px;
  max-width: 650px;
  font-weight: 400;
}

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

/* About Section */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text h2 {
  font-size: 2.8rem;
  color: var(--text-main);
  margin-bottom: 32px;
}

[dir="rtl"] .about-text h2, [dir="rtl"] .section-title h2 {
  letter-spacing: 0;
}

.about-text .lead-text {
  font-size: 1.4rem;
  color: var(--safety-blue);
  margin-bottom: 24px;
  font-weight: 500;
  line-height: 1.5;
}

.about-text p {
  font-size: 1.15rem;
  color: #424245;
  margin-bottom: 24px;
}

.about-text strong {
  color: var(--text-main);
  font-weight: 600;
}

.about-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); /* Soft Elevation Shadow */
  position: relative;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--border-radius-lg);
  pointer-events: none;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

/* Services Section (Pillars) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.service-card {
  background-color: var(--bg-card);
  padding: 48px 32px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Soft Elevation Shadow */
  border: 1px solid transparent;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
}

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

/* Elite After-Sales Ecosystem Highlight */
.service-card.highlight {
  background: linear-gradient(145deg, #f0f7ff, #ffffff);
  border-color: rgba(0, 102, 204, 0.15);
  position: relative;
  overflow: hidden;
}

.service-card.highlight::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--safety-blue);
}

.service-card.highlight:hover {
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.1);
  border-color: rgba(0, 102, 204, 0.3);
}

.icon-wrapper {
  width: 64px;
  height: 64px;
  background-color: rgba(0, 102, 204, 0.08); /* Accent Blue tinted */
  color: var(--safety-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.service-card:hover .icon-wrapper {
  background-color: var(--safety-blue);
  color: var(--text-light);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  color: var(--text-main);
  line-height: 1.3;
}

.service-card p {
  color: var(--text-muted);
  font-size: 1rem;
  flex-grow: 1;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  height: 300px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Soft Elevation Shadow */
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.offset-1 { transition-delay: 0.1s; animation-delay: 0.1s; }
.offset-2 { transition-delay: 0.2s; animation-delay: 0.2s; }
.offset-3 { transition-delay: 0.3s; animation-delay: 0.3s; }
.offset-4 { transition-delay: 0.4s; animation-delay: 0.4s; }

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0;
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); /* Clean Shadow */
  border: 1px solid var(--border-light);
}

.contact-info {
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  background-color: #FAFAFC;
}

.info-block {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.icon-small {
  width: 52px;
  height: 52px;
  background-color: rgba(0, 102, 204, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--safety-blue);
  flex-shrink: 0;
}

.info-block h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.info-block p, 
.info-block a {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-link {
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--safety-blue);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.map-container {
  width: 100%;
  height: 100%;
}

/* Footer Section */
.footer {
  background-color: var(--bg-alt);
  color: var(--text-main);
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-light);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.footer-brand .footer-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 24px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 1.1rem;
}

.footer-copyright {
  border-top: 1px solid var(--border-light);
  width: 100%;
  padding-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpAnim 0.8s var(--ease) forwards;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; transition-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; transition-delay: 0.4s; }

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

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-item {
    height: 250px;
  }
  
  .about-container {
    gap: 40px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .section {
    padding: 80px 0;
  }

  .mobile-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: calc(100vh - var(--header-height));
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 40px;
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
    margin-bottom: 24px;
    height: 300px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  /* 1-column mobile grid explicitly set */
  .services-grid {
    grid-template-columns: 1fr;
    width: 100%; 
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item {
    height: 300px;
  }
  
  .contact-info {
    padding: 40px 24px;
  }
}
