:root {
  --bg: #06060f;
  --bg-elevated: #0d0d22;
  --card-border: rgba(255, 255, 255, 0.08);
  --green: #2ee6a8;
  --blue: #3b82f6;
  --purple: #a239f5;
  --text: #eef0fb;
  --text-dim: #9a9cba;
  --gradient: linear-gradient(90deg, var(--green), var(--blue), var(--purple));
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3 {
  font-weight: 900;
}

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

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* شريط التنقل */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 10px 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 46px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--gradient);
  color: #05050d !important;
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 700 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* القسم الترحيبي */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}

.glow-1 {
  width: 420px;
  height: 420px;
  background: var(--green);
  top: -100px;
  right: -80px;
}

.glow-2 {
  width: 380px;
  height: 380px;
  background: var(--purple);
  bottom: -120px;
  left: -100px;
  animation-delay: -3s;
}

.glow-3 {
  width: 320px;
  height: 320px;
  background: var(--blue);
  bottom: -80px;
  right: 30%;
  opacity: 0.22;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.08); }
}

.hero-circuit {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 55%;
  pointer-events: none;
  opacity: 0.35;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 42%, rgba(6, 6, 15, 0.85) 0%, rgba(6, 6, 15, 0.55) 40%, transparent 72%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 12px;
}

.hero-logo {
  width: 140px;
  margin: 0 auto 28px;
  animation: floatLogo 5s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.35));
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0 auto 28px;
  padding: 0 8px;
  line-height: 1.45;
  max-width: 600px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--gradient);
  color: #05050d;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--card-border);
}

.btn-outline:hover {
  border-color: var(--blue);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.btn-whatsapp {
  background: #25d366;
  color: #05150d;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

/* الأقسام العامة */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

/* صفحة سياسة الخصوصية */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-dim);
}

.legal-content h2 {
  color: var(--text);
  font-size: 1.15rem;
  margin: 32px 0 12px;
}

.legal-content p {
  margin-bottom: 12px;
  line-height: 1.9;
}

.legal-content ul {
  padding-inline-start: 22px;
  margin-bottom: 12px;
}

.legal-content li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.legal-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-updated {
  margin-top: 32px;
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.7;
}

.contact-lead {
  color: var(--text-dim);
  margin-top: 16px;
}

/* بطاقات المميزات */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.4);
}

.icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(46, 230, 168, 0.15), rgba(59, 130, 246, 0.15), rgba(162, 57, 245, 0.15));
  color: var(--green);
}

.icon-badge svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* بطاقات الباقات */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.package-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 36px 28px;
  position: relative;
  transition: transform 0.25s ease;
}

.package-card:hover {
  transform: translateY(-6px);
}

.package-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.package-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.package-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.package-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
}

.package-features svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--green);
}

.package-featured {
  background: linear-gradient(180deg, rgba(46, 230, 168, 0.08), rgba(162, 57, 245, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
}

.package-badge {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--gradient);
  color: #05050d;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
}

/* من أعمالنا */
.work-card,
.work-card:link,
.work-card:visited,
.work-card:hover,
.work-card:active,
.work-card:focus {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 48px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.work-icon {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(46, 230, 168, 0.15), rgba(162, 57, 245, 0.15));
  color: var(--blue);
}

.work-icon svg {
  width: 40px;
  height: 40px;
}

.work-tag {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.work-text h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.work-text p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.work-disclaimer {
  margin-top: 12px;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* تواصل معنا */
.contact-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* تذييل */
.footer {
  text-align: center;
  padding: 48px 20px 32px;
  border-top: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-logo {
  height: 28px;
  margin: 0 auto 16px;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--text);
}

/* تنبيه ملفات الارتباط */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 500;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner p {
  flex: 1 1 260px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0;
}

.cookie-banner p a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-accept {
  padding: 10px 26px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .cookie-banner {
    right: 12px;
    left: 12px;
    bottom: 12px;
    padding: 16px;
  }
}

/* حركة الظهور عند التمرير */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }

.packages-grid .package-card:nth-child(2) { transition-delay: 0.15s; }
.packages-grid .package-card:nth-child(3) { transition-delay: 0.3s; }

/* المساعد الذكي */
.ai-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
}

.ai-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--gradient);
  color: #05050d;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
  position: relative;
  transition: transform 0.2s ease;
}

.ai-toggle::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.5);
  animation: aiPulse 2.4s ease-out infinite;
}

@keyframes aiPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.ai-toggle:hover {
  transform: scale(1.06);
}

.ai-toggle svg {
  width: 26px;
  height: 26px;
}

.ai-icon-close {
  display: none;
}

.ai-widget.open .ai-icon-chat {
  display: none;
}

.ai-widget.open .ai-icon-close {
  display: block;
}

.ai-widget.open .ai-toggle::before {
  display: none;
}

.ai-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 350px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: 70vh;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ai-widget.open .ai-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(46, 230, 168, 0.12), rgba(162, 57, 245, 0.12));
  border-bottom: 1px solid var(--card-border);
}

.ai-header-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: #05050d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ai-header-text {
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.ai-header-text strong {
  font-size: 0.95rem;
}

.ai-header-text span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.ai-msg.bot {
  background: var(--bg-elevated);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-msg.user {
  background: var(--gradient);
  color: #05050d;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 700;
}

.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: aiTypingBounce 1.2s infinite ease-in-out;
}

.ai-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aiTypingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.ai-quick-actions button {
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ai-quick-actions button:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.5);
}

.ai-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--card-border);
}

.ai-input-row input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 10px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.ai-input-row input:focus {
  border-color: rgba(59, 130, 246, 0.5);
}

.ai-input-row button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #05050d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ai-input-row button svg {
  width: 18px;
  height: 18px;
}

.ai-whatsapp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 16px 16px;
  padding: 10px;
  background: #25d366;
  color: #05150d;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.ai-whatsapp-cta svg {
  width: 18px;
  height: 18px;
}

/* تجاوب مع الجوال */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: rgba(6, 6, 15, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--card-border);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .work-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .section {
    padding: 70px 20px;
  }

  .ai-widget {
    bottom: 16px;
    right: 16px;
  }

  .ai-panel {
    width: calc(100vw - 32px);
  }
}

/* ============ الروبوت المتحرك (Robot Mascot) ============ */
.robot-mascot {
  position: absolute;      /* إحداثيات على مستوى الصفحة كاملة، حتى يستقر مع القسم عند نهاية الرحلة */
  top: 0;
  left: 0;
  width: 90px;             /* حجم الروبوت على الشاشات الكبيرة */
  z-index: 400;            /* فوق كل الأقسام، وتحت أيقونة المساعد الذكي (500) */
  pointer-events: none;    /* لا يعترض النقر على أي عنصر تحته */
  opacity: 0;              /* يظهر فقط بعد أن يضعه robot.js في مكانه الصحيح */
  will-change: transform;
}
.robot-mascot img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}
@media (max-width: 767px) {
  .robot-mascot { width: 56px; }  /* حجم أصغر على الجوال */
}
