html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Keeps phone numbers, emails, and codes (FCL/LCL) readable in RTL */
.ltr-inline {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Route visual: the curve + dots use physical left/right internally,
   then the whole group flips so Cairo stays anchored to the origin
   side and the destination dot to the opposite side in both directions */
html[dir="rtl"] .route-geometry {
  transform: scaleX(-1);
}

.route-path {
  stroke-dasharray: 4 7;
  animation: route-flow 1.6s linear infinite;
}

@keyframes route-flow {
  to {
    stroke-dashoffset: -22;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-path {
    animation: none;
  }
}

/* Process step cards */
.step-card {
  position: relative;
  background: #fff;
  border: 1px solid #dce5f4;
  border-radius: 20px;
  padding: 28px 24px 26px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 87, 230, 0.05), rgba(20, 87, 230, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.step-card:hover {
  transform: translateY(-6px);
  border-color: #b4c6ea;
  box-shadow: 0 18px 40px rgba(15, 48, 102, 0.12);
}

.step-card:hover::before {
  opacity: 1;
}

.step-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.step-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eaf2ff;
  color: #1457e6;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.step-icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.step-card:hover .step-icon {
  background: #1457e6;
  color: #fff;
  transform: scale(1.06);
}

.step-card:hover .step-icon svg {
  transform: scale(1.1);
}

.step-number {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #9fb4de;
  transition: color 0.25s ease;
}

.step-card:hover .step-number {
  color: #1457e6;
}

.step-card h4 {
  position: relative;
  z-index: 1;
}

.step-card p {
  position: relative;
  z-index: 1;
}

/* Connector track between step cards (desktop only) */
.step-track {
  display: none;
}

@media (min-width: 1024px) {
  .step-track {
    display: block;
    position: absolute;
    top: 54px;
    inset-inline: 72px;
    height: 2px;
    z-index: 0;
  }

  .step-track-line {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      to right,
      #c7d6f3 0,
      #c7d6f3 6px,
      transparent 6px,
      transparent 12px
    );
  }

  html[dir="rtl"] .step-track-line {
    background: repeating-linear-gradient(
      to left,
      #c7d6f3 0,
      #c7d6f3 6px,
      transparent 6px,
      transparent 12px
    );
  }

  .step-track-fill {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1457e6, #2f73ff);
    animation: step-fill 3.2s ease-in-out infinite;
  }

  @keyframes step-fill {
    0% { width: 0%; }
    45% { width: 100%; }
    55% { width: 100%; }
    100% { width: 100%; opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-track-fill {
    animation: none;
    width: 100%;
    opacity: 1;
  }

  .step-card:hover {
    transform: none;
  }
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
}

.mobile-nav.open {
  display: grid;
}

/* Global focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1457e6;
  outline-offset: 2px;
}

/* Service/route index numbers are always Latin digits — never mirror in RTL */
.code-index {
  direction: ltr;
  unicode-bidi: isolate;
}
