/* ===============================
   1️⃣ CSS VARIABLES
================================ */
:root {
  /* Light Mode - Default */
  --bg-main: #ffffff;
  --bg-secondary: #f8fafc;

  --primary: #6c4dff;
  --primary-hover: #5a3ee6;
  --primary-soft: #ede9fe;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --nav-bg: #ffffff;
  --nav-text: #0f172a;

  --sidebar-bg: #f1f5f9;
  --sidebar-active: #6c4dff;
  --sidebar-text: #334155;

  --card-bg: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

  --btn-bg: linear-gradient(135deg, #6c4dff, #00e5ff);
  --btn-hover: linear-gradient(135deg, #5a3ee6, #00c4dd);
}

body.dark {
  /* ========== BACKGROUNDS ========== */
  --bg-main: #0b0f1a;
  --bg-secondary: #0f172a;

  /* ========== PRIMARY BRAND COLORS ========== */
  --primary: #6c4dff; /* AI purple */
  --primary-hover: #5740d4;
  --primary-soft: #312e81;

  /* ========== TEXT COLORS ========== */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  /* ========== NAVBAR ========== */
  --nav-bg: linear-gradient(135deg, #0f172a, #1e1b4b);
  --nav-text: #ffffff;

  /* ========== SIDEBAR ========== */
  --sidebar-bg: #111827;
  --sidebar-active: #6c4dff;
  --sidebar-text: #e2e8f0;

  /* ========== CARDS ========== */
  --card-bg: rgba(17, 24, 39, 0.8); /* glass feel */
  --border: #1f2937;

  /* ========== SHADOWS (AI Glow Effect) ========== */
  --shadow: 0 15px 50px rgba(108, 77, 255, 0.35);

  /* ========== BUTTON GRADIENT ========== */
  --btn-bg: linear-gradient(135deg, #6c4dff, #00e5ff);
  --btn-hover: linear-gradient(135deg, #5740d4, #00c8e6);
}

/* ===============================
   2️⃣ GLOBAL RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: system-ui, sans-serif;
  transition:
    background 0.4s,
    color 0.4s;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.no-transition * {
  transition: none !important;
}

/* ===============================
   3️⃣ LAYOUT
================================ */
.layout {
  display: flex;
  width: 100%;
}

main {
  transition: transform 0.3s ease;
  padding-top: 70px;
  width: 100%;
}

.section {
  padding: 80px 60px;
}

.section h1,
.section h2 {
  margin-bottom: 20px;
}

.section p {
  color: var(--text-muted);
  max-width: 600px;
}

/* ===============================
   4️⃣ COMPONENTS
================================ */
/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--btn-bg);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
  box-shadow: var(--shadow);
  font-family: inherit;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 70px;
  width: 260px;
  height: calc(100vh - 70px);
  padding: 30px 20px;
  transition: transform 0.3s ease;
  z-index: 1100;
  flex-shrink: 0;
  background: var(--nav-bg);
  color: var(--nav-text);
}

body[dir="ltr"] .sidebar {
  left: 0;
  transform: translateX(-100%);
}

body[dir="ltr"] .sidebar.open {
  transform: translateX(0);
}

body[dir="rtl"] .sidebar {
  right: 0;
  transform: translateX(100%);
}

body[dir="rtl"] .sidebar.open {
  transform: translateX(0);
}

.sidebar .logo {
  font-size: 40px;
  margin-bottom: 40px;
  color: var(--text-main);
}

.sidebar nav a {
  display: block;
  margin-bottom: 25px;
  opacity: 0.9;
  font-size: 20px;
  color: var(--text-main);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--primary);
  color: #fff;
  opacity: 1;
  font-weight: 600;
}

/* Navbar */
.navbar {
  background: var(--nav-bg);
  color: var(--nav-text);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.navbar .logo {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1px;
}

.navbar .logo span {
  background: linear-gradient(135deg, #6c4dff, #00e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .links a {
  color: var(--text-main);
  font-size: 20px;
  text-decoration: none;
  transition: color 0.3s ease;
}
.navbar .links a:hover {
  opacity: 0.8;
}

.navbar .links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-buttons button {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: 0.3s;
}

.navbar-buttons button:hover {
  opacity: 0.85;
}

.navbar .side-btn {
  padding: 6px 14px;
  font-size: 20px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.navbar .side-btn:hover {
  opacity: 0.85;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.sidebar.open ~ .overlay {
  opacity: 1;
  pointer-events: all;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  color: var(--text-main);
  padding: 60px 20px 30px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.footer-logo h3 {
  font-size: 28px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-main);
  font-size: 16px;
  transition: 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.footer-socials a {
  color: var(--text-main);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}

.footer-socials a:hover {
  color: var(--primary);
}

.footer-copy {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  opacity: 0.7;
  color: var(--text-muted);
}

body.dark .footer {
  background: var(--bg-secondary);
  color: var(--text-main);
}

body.dark .footer-links a,
body.dark .footer-socials a {
  color: var(--text-main);
}

body.dark .footer-links a:hover,
body.dark .footer-socials a:hover {
  color: var(--primary);
}

body.dark .footer-copy {
  color: var(--text-muted);
}

/* ===============================
   5️⃣ SECTIONS
================================ */
/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg-main);
  color: var(--text-main);
}

.hero-section h1 {
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 900;
  margin-bottom: 25px;
  color: var(--text-main);
}

.hero-section p {
  font-size: clamp(18px, 2.5vw, 22px);
  max-width: 800px;
  color: var(--text-main);
  margin-bottom: 70px;
  line-height: 1.6;
}

.btn-cta {
  padding: 16px 45px;
  margin: 10px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}
.btn-secondary {
  padding: 16px 45px;
  margin: 10px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  position: relative;
  z-index: 2;
}

.btn-cta:hover {
  transform: translateY(-5px) scale(1.05);
}

/* Features Section */
.features-section {
  text-align: center;
}

.features-section h2 {
  font-size: 56px;
  margin-bottom: 120px;
  color: var(--text-main);
}

.features-section .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 50px;
  width: 100%;
  max-width: 1200px;
  margin: 70px auto 0;
}

.feature-card {
  padding: 50px 40px;
  border-radius: 20px;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  min-height: 240px;
}

.feature-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
}

.feature-card p {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.9;
}

/* How It Works Section */
.how-section {
  text-align: center;
  padding: 100px 20px;
}

.how-section h2 {
  font-size: 48px;
  margin-bottom: 60px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
}

.how-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 30px 25px;
  border-radius: 20px;
  text-align: left;
  transition: 0.35s ease;
  position: relative;
  overflow: hidden;
}

.how-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.how-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.how-top .icon {
  font-size: 28px;
  background: rgba(108, 77, 255, 0.1);
  padding: 12px;
  border-radius: 12px;
}

.how-top .num {
  font-size: 28px;
  font-weight: 700;
  opacity: 0.2;
}

.how-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.how-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.how-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(108,77,255,0.15), transparent);
  opacity: 0;
  transition: 0.4s;
}

.how-card:hover::before {
  opacity: 1;
}

/* Pricing Section */
.pricing-section {
  text-align: center;
}

.pricing-section h2 {
  font-size: 56px;
  margin-bottom: 100px;
}

.pricing-section .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  position: relative; 
  overflow: hidden;
  padding: 50px 40px;
  border-radius: 24px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 300px;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}


.pricing-card.highlight {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
  transform: scale(1.03);
}

.pricing-card .price {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  
  flex-grow: 1;
}

.pricing-card ul li {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.6;
  
}

.pricing-card button.btn-primary {
  margin-top: auto;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: #fff;
  transition: 0.3s ease;
}

.pricing-card button.btn-primary:hover {
  background: var(--btn-hover);
}
.Most-popular {
  position: absolute;
  top: 18px;            /* التحكم في بُعدها عن الحافة العلوية */
  right: -32px;         /* سحبها لليمين لتختفي الأطراف */
  background: var(--primary); /* أو اللون البنفسجي اللي في الصورة */
  color: #fff;
  padding: 8px 35px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  transform: rotate(45deg); /* سر الزاوية */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  white-space: nowrap;
}

/* تعديل بسيط لضمان توافقها مع الـ Dark Mode */
[data-theme="dark"] .Most-popular {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
/* لو الموقع عربي (RTL) */
[lang="ar"] .Most-popular {
  right: auto;
  left: -32px;
  transform: rotate(-45deg);
}

/* Testimonials Section */
.testimonials-section {
  text-align: center;
  padding: 100px 20px;
}
.testimonials-section h2 {
  font-size: 52px;
  margin-bottom: 50px;
}

.testimonials-wrapper {
  position: relative;
  max-width: 700px;
  margin: 0 auto 40px;
  min-height: 260px;
}

.testimonial-card {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(40px);
  transition: 0.6s ease;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.testimonial-card p {
  font-size: 20px;
  line-height: 1.6;
  opacity: 0.9;
}

.testimonial-card p::before {
  content: "“";
  font-size: 50px;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}

.user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.user img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.user h4 {
  font-size: 18px;
  margin-bottom: 2px;
}

.user span {
  font-size: 14px;
  opacity: 0.7;
}

.user::after {
  content: "";
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 10px;
  margin-top: 12px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  background: var(--primary);
  transform: scale(1.4);
}

/* Pain Section */
.pain-box {
  max-width: 800px;
  margin: auto;
  padding: 60px 40px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow);
}

.pain-box h2 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.pain-box p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.6;
}

.pain-box .btn-cta {
  display: inline-block;
  padding: 14px 35px;
  font-size: 16px;
  border-radius: 40px;
}

/* Contact Section */
.contact-section {
  padding: 100px 20px;
  color: var(--text-main);
}

.contact-section .section-inner {
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.contact-section h2 {
  font-size: 56px;
  margin-bottom: 10px;
  color: var(--text-main);
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 60px;
  font-size: 16px;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: stretch;
}

.contact-card {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-align: left;
  color: var(--text-main);
}

.contact-card h3 {
  margin-bottom: 25px;
  font-size: 28px;
  color: var(--text-main);
}

.contact-card p {
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  outline: none;
  background: var(--bg-main);
  color: var(--text-main);
}

.contact-form textarea {
  resize: none;
  height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-info-box {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-align: center;
  color: var(--text-main);
}

.contact-info-box h3 {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.contact-info-box p {
  font-size: 18px;
  margin-bottom: 8px;
  opacity: 0.9;
  color: var(--text-muted);
}

.contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.contact-socials a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-main);
  font-size: 18px;
  transition: 0.3s;
}

.contact-socials a:hover {
  background: var(--primary);
  color: #fff;
}

/* Final CTA */
.final-cta {
  padding: 100px 20px;
  background:var(--bg-main);
  display: flex;
  justify-content: center;
}

.cta-box {
  max-width: 700px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 50px;
  border-radius: 20px;
  text-align: center;
 box-shadow: var(--shadow);
}

.cta-box h2 {
  font-size: 36px;
  color: var(--text-main);
  margin-bottom: 15px;
}

.cta-subtitle {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 18px;
}

.cta-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 35px;
  color: #e2e8f0;
  font-size: 15px;
}

.btn-buy {
  display: inline-block;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  border-radius: 10px;
  text-decoration: none;
  transition: 0.3s;
}

.btn-buy:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

.cta-note {
  margin-top: 15px;
  color: #64748b;
  font-size: 14px;
}

/* ===============================
   6️⃣ RESPONSIVE
================================ */
@media (max-width: 1024px) {
  main {
    padding: 20px;
  }
  .navbar .links a {
    font-size: 16px;
  }
}

@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
    .navbar .links {
        display: none; 
    }
    .navbar-buttons {
        display: flex; 
        gap: 8px; 
        order: 2; 
    }
    .navbar-buttons button {
        padding: 5px 10px;
        font-size: 12px;
        min-width: auto;
    }
    .navbar .side-btn {
        padding: 6px 10px;
        font-size: 16px; 
        order: 1; 
    }
    .navbar .logo {
        font-size: 22px; 
        order: 0;
    }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 100px 20px 60px; 
    min-height: auto; 
  }
  .hero-section h1 {
    line-height: 1.2;
    margin-bottom: 20px;
  }
  .hero-section p {
    margin-bottom: 40px;
  }
  .hero-section .btns-group { 
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
    align-items: center;
  }
  .btn-cta, .btn-secondary {
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px; 
  }
}

@media (max-width: 768px) {
  .features-section .grid, 
  .pricing-section .grid {
    grid-template-columns: 1fr; 
    gap: 25px;
    padding: 0 10px;
  }
  .feature-card, .pricing-card {
    padding: 30px 20px; 
    min-height: auto;
  }
  .pricing-card.highlight {
    transform: scale(1); 
    border-width: 1.5px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    top: 0; 
    height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
  }
  .sidebar nav a {
    font-size: 24px;
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  body.dark .card-bg, 
  body.dark .sidebar {
    background: rgba(17, 24, 39, 0.95); 
    backdrop-filter: blur(5px);
  }
  html, body {
    overflow-x: hidden;
    position: relative;
  }
}

@media (max-width: 768px) {
  .pain-box {
    padding: 40px 20px;
    border-radius: 18px;
  }
  .pain-box h2 {
    font-size: 26px;
    line-height: 1.4;
  }
  .pain-box p {
    font-size: 15px;
    margin-bottom: 25px;
  }
  .pain-box .btn-cta {
    width: 100%;
    max-width: 260px;
    font-size: 15px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .pain-box {
    padding: 30px 15px;
  }
  .pain-box h2 {
    font-size: 22px;
  }
  .pain-box p {
    font-size: 14px;
  }
  .pain-box .btn-cta {
    width: 100%;
  }
}

/* ===============================
   7️⃣ EXTRAS
================================ */
/* Whatsapp */
.whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #25d366;
  color: #fff;
  font-size: 24px;
  padding: 14px;
  border-radius: 50%;
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}