/* ============================================================
   DSY Landing Page — Stylesheet
   ============================================================ */

/* ---- Variables ---- */
:root {
  --primary:       #0E4C8F;
  --primary-light: #1B6FC4;
  --accent:        #17B3A6;
  --accent-dark:   #0f8a80;
  --bg-light:      #F6FAFE;
  --bg-soft:       #EAF2FB;
  --text-dark:     #16263A;
  --text-muted:    #5B7186;
  --white:         #FFFFFF;
  --shadow-sm:     0 2px 8px rgba(14,76,143,0.08);
  --shadow-md:     0 8px 32px rgba(14,76,143,0.12);
  --shadow-lg:     0 20px 60px rgba(14,76,143,0.16);
  --radius:        12px;
  --radius-lg:     20px;
  --transition:    0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
[lang="en"] body, [lang="en"] .btn, [lang="en"] .nav__link {
  font-family: 'Inter', 'Cairo', sans-serif;
}
body {
  font-family: 'Cairo', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn--lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn--primary {
  background: var(--primary-light);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(27,111,196,0.3);
}
.btn--primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27,111,196,0.4);
}
.btn--outline {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary-light);
}
.btn--outline:hover {
  background: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
}
.btn--white {
  background: var(--white);
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn--outline-white:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

/* ---- Section base ---- */
.section { padding: 6rem 0; }
.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section__label {
  display: inline-block;
  background: rgba(23,179,166,0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.section__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Text accent ---- */
.text-accent { color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14,76,143,0.06);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}
.nav__logo-img { height: 40px; width: auto; }
.nav__menu {
  display: flex;
  gap: 0.25rem;
  margin-right: auto;
}
[dir="rtl"] .nav__menu { margin-right: auto; margin-left: 0; }
.nav__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover,
.nav__link.active { color: var(--primary-light); background: var(--bg-soft); }
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav__cta { flex-shrink: 0; }
.nav__menu-cta-item { display: none; }

/* ---- Language toggle ---- */
.btn--lang {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(14,76,143,0.3);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}
.btn--lang:hover {
  background: var(--primary-light);
  color: var(--white);
  border-color: var(--primary-light);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #1a5fa8 50%, #1d7bc5 100%);
  padding-top: 5rem;
  padding-bottom: 2rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(23,179,166,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}

.hero__container {
  display: flex;
  align-items: center;
  gap: 3rem;
  min-height: 520px;
  position: relative;
  z-index: 1;
}
.hero__content { flex: 1; color: var(--white); }
.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.9);
}
.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.hero__desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 500px;
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero__btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero__stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__stat { text-align: center; }
.hero__stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
}
.hero__stat span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.hero__stat-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.2);
}

.hero__visual {
  flex: 0 0 auto;
  width: 420px;
  display: flex;
  justify-content: center;
}
.hero__card-wrap { position: relative; }
.hero__card {
  width: 360px;
  max-width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.3));
  animation: float 4s ease-in-out infinite;
  transform: rotate(-8deg);
}
.hero__glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  background: rgba(23,179,166,0.4);
  filter: blur(30px);
  border-radius: 50%;
}
@keyframes float {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-12px); }
}

.hero__wave {
  position: relative;
  margin-top: 3rem;
  line-height: 0;
}
.hero__wave svg { width: 100%; height: 60px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how { background: var(--bg-light); }

.how__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.how__step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,76,143,0.06);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.how__step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.how__num {
  position: absolute;
  top: -1px;
  right: 1rem;
  font-size: 4rem;
  font-weight: 900;
  color: var(--bg-soft);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
[dir="rtl"] .how__num { right: auto; left: 1rem; }
.how__icon-wrap {
  width: 70px;
  height: 70px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}
.how__icon { font-size: 1.8rem; }
.how__step-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}
.how__step-desc { font-size: 0.9rem; color: var(--text-muted); position: relative; z-index: 1; }

.how__connector {
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how__connector svg { width: 60px; height: 20px; }

/* ============================================================
   TRANSIT MODES
   ============================================================ */
.transit { background: var(--bg-soft); }

.transit__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.transit__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,76,143,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.transit__card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.transit__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.transit__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.transit__card:hover .transit__img { transform: scale(1.05); }
.transit__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,76,143,0.5) 0%, transparent 50%);
}
.transit__emoji {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
[dir="rtl"] .transit__emoji { right: auto; left: 0.75rem; }
.transit__body { padding: 1.5rem; }
.transit__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.transit__desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   DEVICES
   ============================================================ */
.devices { background: var(--white); }

.devices__list { display: flex; flex-direction: column; gap: 5rem; }

.device {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.device--alt .device__imgs { order: 2; }
.device--alt .device__info { order: 1; }

.device__imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.device__imgs--single { grid-template-columns: 1fr; }
.device__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.device__img--main { grid-column: 1; grid-row: 1 / 3; height: 100%; }
.device__img--sub { height: 103px; }
.device__imgs--single .device__img { height: 300px; }

.device__tag {
  display: inline-block;
  background: rgba(23,179,166,0.12);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 0.85rem;
}
.device__name {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.85rem;
}
.device__desc {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.device__feats { display: flex; flex-direction: column; gap: 0.5rem; }
.device__feats li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}
.device__feats li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { background: var(--bg-soft); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.feature {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,76,143,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature__icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}
.feature__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.feature__desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

.features__world { text-align: center; }
.features__world-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
}
.features__world-caption {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  background: var(--primary);
  padding: 4rem 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.stat__unit {
  font-size: 0.55em;
  color: var(--accent);
  font-weight: 700;
}
.stat__label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: linear-gradient(135deg, #0E4C8F 0%, #0d7a72 100%);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(23,179,166,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.cta__content { text-align: center; position: relative; z-index: 1; }
.cta__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
}
.cta__desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.cta__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer__logo {
  height: 38px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer__tagline {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.55);
}
.footer__contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer__link {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer__link:hover { color: var(--accent); }
.footer__heading {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.35); }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay { transition-delay: 0.2s; }
.reveal--left {
  transform: translateX(30px);
}
.reveal--left.visible {
  transform: translateX(0);
}

/* ============================================================
   LTR (English) OVERRIDES
   ============================================================ */

/* Desktop LTR nav: logo left, links left (after logo), actions pushed to right */
[dir="ltr"] .nav__menu   { margin-right: 0; margin-left: 0; }
[dir="ltr"] .nav__actions { margin-left: auto; margin-right: 0; }

/* Mobile LTR dropdown: left-align items */
@media (max-width: 1024px) {
  [dir="ltr"] .nav__menu { direction: ltr; text-align: left; }
  [dir="ltr"] .nav__link  { text-align: left; }
}

[dir="ltr"] .how__num  { right: auto; left: 1rem; }
[dir="ltr"] .transit__emoji { left: auto; right: 0.75rem; }

/* ============================================================
   RESPONSIVE — Tablet (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .nav__menu {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid rgba(14,76,143,0.08);
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    z-index: 999;
    overflow: hidden;
  }
  .nav__menu.open { transform: translateY(0); }
  .nav__link { padding: 0.75rem 1rem; border-radius: 8px; font-size: 1rem; }
  /* order:-1 moves toggle to the flex-start position:
     → RIGHT in RTL (Arabic) ✓   → LEFT in LTR (English) ✓ */
  .nav__toggle { display: flex; order: -1; }
  /* Logo takes remaining space and centers the image within it */
  .nav__logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav__actions .nav__cta { display: none; }
  .nav__menu-cta-item { display: block; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(14,76,143,0.08); }

  .hero__container { flex-direction: column; text-align: center; padding-top: 2rem; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__btns { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__visual { width: 100%; }
  .hero__card { width: 260px; }

  .how__steps { flex-direction: column; align-items: center; }
  .how__connector { transform: rotate(90deg); }
  .how__step { max-width: 400px; width: 100%; }

  .transit__grid { grid-template-columns: 1fr 1fr; }
  .transit__card:nth-child(3) { grid-column: 1 / -1; max-width: 400px; margin: 0 auto; }

  .device { grid-template-columns: 1fr; gap: 2rem; }
  .device--alt .device__imgs { order: 0; }
  .device--alt .device__info { order: 0; }

  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ============================================================
   RESPONSIVE — Mobile (≤640px)
   ============================================================ */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .hero { padding-top: 3rem; }
  .hero__title { font-size: 2rem; }
  .hero__card { width: 200px; }
  .hero__stats { gap: 0.75rem; }
  .hero__stat strong { font-size: 1.2rem; }

  .transit__grid { grid-template-columns: 1fr; }
  .transit__card:nth-child(3) { max-width: 100%; }

  .device__imgs { grid-template-columns: 1fr; }
  .device__img--main { height: 200px; grid-row: auto; }
  .device__img--sub { height: 140px; }

  .features__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .cta__btns { flex-direction: column; align-items: center; }
  .cta__btns .btn { width: 100%; max-width: 300px; }
}

/* ============================================================
   RESPONSIVE — Small Mobile (≤400px)
   ============================================================ */
@media (max-width: 400px) {
  .hero__title { font-size: 1.75rem; }
  .hero__badge { font-size: 0.75rem; }
  .hero__desc  { font-size: 1rem; }
  .hero__btns  { flex-direction: column; }
  .hero__btns .btn { width: 100%; text-align: center; }
  .hero__card  { width: 170px; }
  .btn--lg     { padding: 0.75rem 1.4rem; font-size: 0.95rem; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .how__step   { padding: 1.5rem 1rem; }
  .section__title { font-size: 1.5rem; }
  .cta__title     { font-size: 1.5rem; }
}
