﻿/* =========================
   المتغيرات و الثيمات
   ========================= */

:root {
  --primary: #5e17eb;
  --primary-soft: #7f4fff;

  --bg: #f5f5f9;
  --dark: #101117;
  --light: #ffffff;

  --card-bg: #ffffff;
  --card-border: #e1e1ea;

  --muted: #70737d;
}

/* الوضع الليلي - نغير القيم فقط */
:root.dark-mode {
  --bg: #0f0f12;
  --dark: #f8f8ff;      /* لون النص الأساسي */
  --light: #e8e8ff;     /* للخلفيات الفاتحة */

  --card-bg: #181820;
  --card-border: #2b2b35;

  --muted: #b5b5c8;
}

/* =========================
   الأساسيات العامة
   ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--dark);
  line-height: 1.7;
  font-family: "Cairo", "Tahoma", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* خلفية حريرية لكل الصفحات */
body.silk-bg {
  background: #0b0b14;
}

body.silk-bg::before {
  content: "";
  position: fixed;
  inset: -25% -10% -10% -10%;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(55, 25, 82, 0.8), rgba(55, 25, 82, 0) 60%),
    radial-gradient(50% 45% at 70% 35%, rgba(94, 23, 235, 0.5), rgba(94, 23, 235, 0) 65%),
    radial-gradient(60% 60% at 20% 70%, rgba(30, 17, 64, 0.7), rgba(30, 17, 64, 0) 60%),
    linear-gradient(180deg, rgba(10, 10, 18, 0.9) 0%, rgba(9, 10, 20, 0.98) 100%);
  z-index: -1;
  pointer-events: none;
}

/* الحاوية العامة */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
}

/* =========================
   الشريط العلوي (اختياري لبعض الصفحات)
   ========================= */

.top-bar {
  background: #05060a;
  color: #f5f5ff;
  font-size: 0.85rem;
}

.top-bar-content {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-block: 0.35rem;
}

/* =========================
   الهيدر / النافبار
   ========================= */

/* بعض الصفحات تستخدم <header> وبعضها .main-header */
header,
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 15, 0.75);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid rgba(94, 23, 235, 0.1);
  color: var(--light);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar,
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
}

/* الشعار (صورة + نص) */
.logo {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.logo img {
  width: 60px;
  height: 60px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover img {
  transform: scale(1.05);
}

/* لو تستخدم نص إضافي للشعار (EN) */
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-title {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.logo-subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* قائمة الروابط */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links li {
  white-space: nowrap;
}

.nav-links a {
  color: var(--dark);
  text-decoration: none;
  opacity: 1;
  position: relative;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.75rem 1.6rem;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
  font-weight: 600;
  box-shadow: none;
}

.nav-links a:hover {
  transform: translateY(-3px);
  background: rgba(127, 79, 255, 0.12);
  color: var(--light);
  box-shadow: 0 10px 30px rgba(94, 23, 235, 0.18);
}

.nav-links a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: var(--light);
  font-weight: 700;
  box-shadow: 0 14px 40px rgba(94, 23, 235, 0.36);
}

/* زر تغيير اللغة - تصميم Pill Navigation */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  background: rgba(17, 18, 28, 0.92);
  color: #ffffff;
  text-decoration: none;
  border-radius: 9999px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 14px;
  line-height: 0;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}

.lang-switch:hover {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(94, 23, 235, 0.3);
  transform: translateY(-2px);
}

/* مجموعة الأزرار في الصفحة الإنجليزية */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* زر القائمة للجوال (الهامبرقر) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  margin-inline-start: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 4px 0;
  background: #ffffff;
  border-radius: 999px;
}

/* =========================
   الهيرو
   ========================= */

.hero {
  padding: 3.5rem 0 3rem;
  background: radial-gradient(circle at top left, #2b1758 0, #101117 40%, #101117 100%);
  color: var(--light);
}

.hero-inner {
  display: flex;
  gap: 3rem;
  align-items: stretch;
}

.hero-main {
  flex: 1.6;
}

.hero-side {
  flex: 1;
}

.hero-tag {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #d2c5ff;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 2.4rem;
  margin-bottom: 0.9rem;
}

.hero-text {
  font-size: 1rem;
  color: #e0def5;
  margin-bottom: 0.8rem;
}

.hero-slogan {
  font-weight: 700;
  margin-bottom: 1.4rem;
}

/* أزرار الهيرو */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: var(--light);
  box-shadow: 0 12px 30px rgba(94, 23, 235, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(94, 23, 235, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--primary-soft);
  border: 1px solid var(--primary-soft);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* =========================
   Stepper (Booking)
   ========================= */

.stepper-wrapper {
  padding: 0.5rem 0;
}

.step-circle-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 23, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding-bottom: 0.5rem;
}

.step-indicator-row {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 1.4rem 1.6rem 1rem;
}

.step-content-default {
  position: relative;
  overflow: hidden;
  padding: 0 1.6rem 0.4rem;
}

.step-default h4 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.step-default p {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-container {
  padding: 0 1.6rem 1.4rem;
}

.footer-nav {
  margin-top: 1.1rem;
  display: flex;
}

.footer-nav.spread {
  justify-content: space-between;
}

.back-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #c7c7d6;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.back-button:hover {
  border-color: rgba(94, 23, 235, 0.6);
  color: #ffffff;
}

.next-button {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(94, 23, 235, 0.4);
}

.step-indicator {
  position: relative;
  cursor: pointer;
}

.step-indicator-inner {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  background: #22242c;
  color: #a3a3a3;
  transition: all 0.25s ease;
}

.step-indicator.active .step-indicator-inner {
  background: rgba(94, 23, 235, 0.35);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(94, 23, 235, 0.15);
}

.step-indicator.complete .step-indicator-inner {
  background: var(--primary);
  color: #ffffff;
}

.step-connector {
  position: relative;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  height: 0.15rem;
  flex: 1;
  overflow: hidden;
  border-radius: 0.25rem;
  background-color: #3b3f4e;
}

.step-connector-inner {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* =========================
   Magic Bento Cards
   ========================= */

:root {
  --hue: 27;
  --sat: 69%;
  --white: hsl(0, 0%, 100%);
  --purple-primary: rgba(132, 0, 255, 1);
  --purple-glow: rgba(132, 0, 255, 0.2);
  --purple-border: rgba(132, 0, 255, 0.8);
  --border-color: #392e4e;
  --background-dark: #060010;
  color-scheme: light dark;
}

.card-grid {
  display: grid;
  gap: 0.5em;
  padding: 0.75em;
  max-width: 54em;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
}

.magic-bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  aspect-ratio: 4/3;
  min-height: 200px;
  width: 100%;
  max-width: 100%;
  padding: 1.25em;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--background-dark);
  font-weight: 300;
  overflow: hidden;
  transition: all 0.3s ease;

  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 200px;
}

.magic-bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.magic-bento-card__header,
.magic-bento-card__content {
  display: flex;
  position: relative;
  color: var(--white);
}

.magic-bento-card__header {
  gap: 0.75em;
  justify-content: space-between;
}

.magic-bento-card__content {
  flex-direction: column;
}

.magic-bento-card__label {
  font-size: 16px;
}

.magic-bento-card__title,
.magic-bento-card__description {
  --clamp-title: 1;
  --clamp-desc: 2;
}

.magic-bento-card__title {
  font-weight: 400;
  font-size: 16px;
  margin: 0 0 0.25em;
}

.magic-bento-card__description {
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.9;
}

.magic-bento-card--text-autohide .magic-bento-card__title,
.magic-bento-card--text-autohide .magic-bento-card__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.magic-bento-card--text-autohide .magic-bento-card__title {
  -webkit-line-clamp: var(--clamp-title);
  line-clamp: var(--clamp-title);
}

.magic-bento-card--text-autohide .magic-bento-card__description {
  -webkit-line-clamp: var(--clamp-desc);
  line-clamp: var(--clamp-desc);
}

@media (max-width: 599px) {
  .card-grid {
    grid-template-columns: 1fr;
    width: 90%;
    margin: 0 auto;
    padding: 0.5em;
  }

  .magic-bento-card {
    width: 100%;
    min-height: 180px;
  }
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .magic-bento-card:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .magic-bento-card:nth-child(4) {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
  }

  .magic-bento-card:nth-child(6) {
    grid-column: 4;
    grid-row: 3;
  }
}

/* Border glow effect */
.magic-bento-card--border-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 6px;
  background: radial-gradient(
    var(--glow-radius) circle at var(--glow-x) var(--glow-y),
    rgba(132, 0, 255, calc(var(--glow-intensity) * 0.8)) 0%,
    rgba(132, 0, 255, calc(var(--glow-intensity) * 0.4)) 30%,
    transparent 60%
  );
  border-radius: inherit;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.magic-bento-card--border-glow:hover::after {
  opacity: 1;
}

.magic-bento-card--border-glow:hover {
  box-shadow:
    0 4px 20px rgba(46, 24, 78, 0.4),
    0 0 30px var(--purple-glow);
}

.particle-container {
  position: relative;
  overflow: hidden;
}

.particle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(132, 0, 255, 0.2);
  border-radius: 50%;
  z-index: -1;
}

.particle-container:hover {
  box-shadow:
    0 4px 20px rgba(46, 24, 78, 0.2),
    0 0 30px var(--purple-glow);
}

/* Global spotlight styles */
.global-spotlight {
  mix-blend-mode: screen;
  will-change: transform, opacity;
  z-index: 200 !important;
  pointer-events: none;
}

.bento-section {
  position: relative;
  user-select: none;
}

/* شريط الثقة */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.trust-chip {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(226, 225, 255, 0.35);
}

/* كرت جانبي في الهيرو */
.hero-card {
  background: rgba(16, 17, 23, 0.9);
  border-radius: 1.4rem;
  padding: 1.6rem 1.7rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(226, 225, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.hero-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.hero-card ul {
  list-style: none;
  font-size: 0.9rem;
}

.hero-card li {
  margin-bottom: 0.45rem;
}

/* صورة السيارة في الهيرو */
.hero-car {
  margin-top: 1.2rem;
  width: 100%;
  max-width: 360px;
  align-self: center;
  filter: drop-shadow(0 14px 25px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.hero-car:hover {
  transform: none;
}

/* في النسخة الإنجليزية نعكس اتجاه السيارة */
html[lang="en"] .hero-car {
  transform: scaleX(-1);
}

html[lang="en"] .hero-car:hover {
  transform: scaleX(-1);
}

/* =========================
   الأقسام العامة
   ========================= */

.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 1.8rem;
}

.section-title {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.section-sub,
.section-subtitle {
  color: var(--muted);
  max-width: 650px;
}

/* شبكة بطاقات عامة */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}

.card {
  background: var(--card-bg);
  border-radius: 1.1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* خطوات */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.step {
  position: relative;
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.4rem 1.5rem 1.2rem;
  border: 1px solid var(--card-border);
}

.step-number {
  position: absolute;
  top: -12px;
  inset-inline-start: 1.5rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* =========================
   النماذج (Forms)
   ========================= */

.form {
  max-width: 650px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 1.1rem;
  padding: 1.7rem 1.8rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid #c9c9d4;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(94, 23, 235, 0.12);
}

/* فورم "شكلي" داخل كرت (contact) */
.card .form {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

/* =========================
   الفوتر
   ========================= */

footer,
.main-footer {
  margin-top: auto;
  background: #0b0c11;
  color: #f1f1ff;
}

.footer-top,
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.8rem 0 1.2rem;
}

.footer-col-title,
.footer-col h3,
.footer-col h4 {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.footer-links,
.footer-col ul {
  list-style: none;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
}

.footer-links li + li,
.footer-col li + li {
  margin-top: 0.25rem;
}

.footer-links a,
.footer-col a {
  color: #d1d5ff;
  text-decoration: none;
}

.footer-links a:hover,
.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  padding: 0.7rem 0;
  border-top: 1px solid #2a2b35;
}

/* =========================
   RTL / LTR
   ========================= */

/* عربي (RTL) */
html[lang="ar"] body {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .navbar,
html[lang="ar"] .nav-container {
  flex-direction: row-reverse;
  justify-content: space-between;
}

html[lang="ar"] .nav-links {
  flex-direction: row;
}

html[lang="ar"] .hero-inner {
  flex-direction: row-reverse;
}

html[lang="ar"] .section-header {
  text-align: right;
}

/* إنجليزي (LTR) */
html[lang="en"] body {
  direction: ltr;
  text-align: left;
}

html[lang="en"] .navbar,
html[lang="en"] .nav-container {
  flex-direction: row;
  justify-content: space-between;
}

html[lang="en"] .nav-links {
  flex-direction: row;
}

html[lang="en"] .hero-inner {
  flex-direction: row;
}

html[lang="en"] .section-header {
  text-align: left;
}

/* =========================
   زر الوضع الليلي/النهاري
   ========================= */

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* حجم الأيقونات */
.theme-toggle img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* افتراضياً: نعرض القمر ونخفي الشمس */
.theme-toggle .icon-moon {
  display: inline-block;
}

.theme-toggle .icon-sun {
  display: none;
}

/* في الوضع الداكن: عكس العرض */
.dark-mode .theme-toggle .icon-moon {
  display: none;
}

.dark-mode .theme-toggle .icon-sun {
  display: inline-block;
}

/* أنيميشن بونس على الزر */
.theme-toggle.bounce {
  animation: bounce-pop 0.35s ease-out;
}

@keyframes bounce-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* =========================
   Responsive
   ========================= */

/* تابلت */
@media (max-width: 1024px) {
  .container {
    padding-inline: 1.1rem;
  }

  .hero-inner {
    gap: 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  /* إخفاء القائمة الأفقية الأساسية */
  .nav-links {
    position: static;
    transform: none;
    left: auto;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    padding: 0;
    gap: 0;
    flex-direction: row;
  }

  /* إظهار الهامبرقر */
  .nav-toggle {
    display: block;
    margin-inline-start: 0.5rem;
  }
}

/* جوال */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }

  header,
  .main-header {
    position: sticky;
    top: 0;
  }

  /* الهيدر في الجوال */
  .navbar,
  .nav-container {
    flex-direction: row;
    align-items: center;
    position: relative;
  }

  /* زر الهامبرقر يظهر */
  .nav-toggle {
    display: block;
    margin-inline-start: 0.5rem;
  }

  /* قائمة الجوال  */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 450px;
    margin-top: 1rem;

    background: rgba(16, 17, 23, 0.98);
    border-radius: 20px;
    padding: 1rem;

    border: 1px solid rgba(94, 23, 235, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    flex-direction: column;
    gap: 0.8rem;
    z-index: 999;
    
    /* الإخفاء والإظهار بدون display */
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /*  nav-open  .navbar */
  .navbar.nav-open .nav-links,
  .nav-container.nav-open .nav-links {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    flex-direction: column;
    gap: 0.8rem;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links > * {
    width: 100%;
    display: block;
  }

  .nav-links .lang-switch {
    width: 100%;
    text-align: center;
    margin-bottom: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1.5px solid rgba(94, 23, 235, 0.4);
    background: rgba(94, 23, 235, 0.12);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .nav-links .lang-switch:hover {
    background: rgba(94, 23, 235, 0.25);
    border-color: rgba(94, 23, 235, 0.8);
    box-shadow: 0 8px 24px rgba(94, 23, 235, 0.3);
    transform: translateY(-2px);
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(94, 23, 235, 0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .nav-links a:hover,
  .nav-links a:focus {
    background: rgba(94, 23, 235, 0.25);
    border-color: rgba(127, 79, 255, 0.8);
    box-shadow: 0 10px 28px rgba(94, 23, 235, 0.4);
    transform: translateY(-2px);
  }

  .nav-links a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(94, 23, 235, 0.5);
    font-weight: 600;
  }

  /* الهيرو عمودي في الجوال */
  .hero-inner {
    flex-direction: column;
  }

  .hero-side {
    order: 2;
  }

  .hero-main {
    order: 1;
  }

  .footer-top,
  .footer-grid {
    flex-direction: column;
  }
}

/* أنيميشن نزول القائمة في الجوال */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* زر صغير للخدمات */
.btn-primary.btn-sm {
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(94, 23, 235, 0.35);
}

.btn-primary.btn-sm:hover {
  box-shadow: 0 0 26px rgba(94, 23, 235, 0.55);
  transform: translateY(-2px);
}

/* =========================
   Stepper (Contact)
   ========================= */

.stepper-wrapper {
  padding: 0.5rem 0;
}

.step-circle-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 23, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding-bottom: 0.5rem;
}

.step-indicator-row {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 1.4rem 1.6rem 1rem;
}

.step-content-default {
  position: relative;
  overflow: hidden;
  padding: 0 1.6rem 0.4rem;
}

.step-default h4 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.step-default p {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-container {
  padding: 0 1.6rem 1.4rem;
}

.footer-nav {
  margin-top: 1.1rem;
  display: flex;
}

.footer-nav.spread {
  justify-content: space-between;
}

.back-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #c7c7d6;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.back-button:hover {
  border-color: rgba(94, 23, 235, 0.6);
  color: #ffffff;
}

.next-button {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(94, 23, 235, 0.4);
}

.step-indicator {
  position: relative;
  cursor: pointer;
}

.step-indicator-inner {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  background: #22242c;
  color: #a3a3a3;
  transition: all 0.25s ease;
}

.step-indicator.active .step-indicator-inner {
  background: rgba(94, 23, 235, 0.35);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(94, 23, 235, 0.15);
}

.step-indicator.complete .step-indicator-inner {
  background: var(--primary);
  color: #ffffff;
}

.step-connector {
  position: relative;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  height: 0.15rem;
  flex: 1;
  overflow: hidden;
  border-radius: 0.25rem;
  background-color: #3b3f4e;
}

.step-connector-inner {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}
/* =========================
   Pill Navigation Styles
   ========================= */

.pill-nav-container {
  position: absolute;
  top: 1em;
  z-index: 99;
}

@media (max-width: 768px) {
  .pill-nav-container {
    width: 100%;
    left: 0;
  }
}

.pill-nav {
  --nav-h: 42px;
  --logo: 36px;
  --pill-pad-x: 18px;
  --pill-gap: 3px;
  width: max-content;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .pill-nav {
    width: 100%;
    justify-content: space-between;
    padding: 0 1rem;
    background: transparent;
  }
}

.pill-nav-items {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  background: var(--dark);
  border-radius: 9999px;
}

.pill-logo {
  width: var(--nav-h);
  height: var(--nav-h);
  border-radius: 50%;
  background: var(--dark);
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pill-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pill-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: var(--pill-gap);
  margin: 0;
  padding: 3px;
  height: 100%;
}

.pill-list > li {
  display: flex;
  height: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--pill-pad-x);
  background: var(--light);
  color: var(--dark);
  text-decoration: none;
  border-radius: 9999px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 16px;
  line-height: 0;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  transition: all 0.3s ease;
}

.pill:hover {
  background: var(--primary);
  color: var(--light);
  box-shadow: 0 4px 15px rgba(94, 23, 235, 0.3);
}

.pill .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  border-radius: 50%;
  background: var(--dark);
  z-index: 1;
  display: block;
  pointer-events: none;
  will-change: transform;
}

.pill .label-stack {
  position: relative;
  display: inline-block;
  line-height: 1;
  z-index: 2;
}

.pill .pill-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
  will-change: transform;
}

.pill .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--light);
  z-index: 3;
  display: inline-block;
  will-change: transform, opacity;
}

.pill.is-active {
  background: var(--primary);
  color: var(--light);
}

.pill.is-active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50px;
  z-index: 4;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

.mobile-menu-button {
  width: var(--nav-h);
  height: var(--nav-h);
  border-radius: 50%;
  background: var(--dark);
  border: none;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  position: relative;
}

@media (max-width: 768px) {
  .mobile-menu-button {
    display: flex;
  }
}

.hamburger-line {
  width: 16px;
  height: 2px;
  background: var(--light);
  border-radius: 1px;
  transition: all 0.01s ease;
  transform-origin: center;
}

.mobile-menu-popover {
  position: absolute;
  top: 3em;
  left: 1rem;
  right: 1rem;
  background: var(--card-bg);
  border-radius: 27px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 998;
  opacity: 0;
  transform-origin: top center;
  visibility: hidden;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-menu-popover .mobile-menu-link {
  display: block;
  padding: 12px 16px;
  color: var(--dark);
  background-color: var(--light);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.2s ease;
}

.mobile-menu-popover .mobile-menu-link:hover {
  cursor: pointer;
  background-color: var(--primary);
  color: var(--light);
}
