/* ===== LEADS MASTER - SHARED STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Almarai:wght@300;400;700;800&display=swap');

:root {
  --blue-dark: #1a2a5e;
  --blue-mid: #2563b8;
  --blue-light: #3b82f6;
  --green-main: #4ade80;
  --green-dark: #16a34a;
  --purple-main: #7c3aed;
  --purple-light: #a855f7;
  --cyan-acc: #06b6d4;
  --white: #ffffff;
  --off-white: #f0f4ff;
  --gray-light: #e8eef8;
  --gray-text: #64748b;
  --dark-bg: #0a0f2e;
  --card-bg: rgba(255,255,255,0.04);
  --border-glow: rgba(59,130,246,0.3);
  --shadow-blue: 0 0 40px rgba(37,99,184,0.25);
  --shadow-green: 0 0 30px rgba(74,222,128,0.2);
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Almarai', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--dark-bg);
  color: var(--white);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===== BACKGROUND MESH ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(37,99,184,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(6,182,212,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== GRID PATTERN ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  background: rgba(10,15,46,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59,130,246,0.2);
  padding: 0 2rem;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
}

.navbar.scrolled {
  background: rgba(10,15,46,0.98);
  box-shadow: var(--shadow-blue);
}

.nav-logo img { height: 80px; object-fit: contain; }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: all 0.25s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(59,130,246,0.15);
}

.nav-cta {
  background: linear-gradient(135deg, var(--blue-mid), var(--purple-main)) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 50px !important;
  box-shadow: 0 0 20px rgba(37,99,184,0.4);
  animation: pulse-cta 3s ease-in-out infinite;
}

@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 20px rgba(37,99,184,0.4); }
  50% { box-shadow: 0 0 35px rgba(124,58,237,0.6); }
}

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== PAGE WRAPPER ===== */
.page-wrap {
  position: relative;
  z-index: 1;
  padding-top: 95px;
}

/* ===== HERO ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,184,0.2) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: hero-pulse 5s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 50px;
  padding: 0.4rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-main);
  margin-bottom: 1.5rem;
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(74,222,128,0.2); }
  50% { box-shadow: 0 0 25px rgba(74,222,128,0.5); }
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--green-main);
  border-radius: 50%;
  animation: dot-blink 1.5s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--white) 30%, var(--blue-light) 60%, var(--cyan-acc) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.7);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--blue-mid) 0%, var(--purple-main) 100%);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(37,99,184,0.45);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover::before { transform: rotate(45deg) translateX(100%); }

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(124,58,237,0.55);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid rgba(59,130,246,0.5);
  color: var(--blue-light);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-outline:hover {
  border-color: var(--blue-light);
  background: rgba(59,130,246,0.1);
  transform: translateY(-2px);
}

/* ===== SECTION ===== */
.section {
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan-acc);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-title span {
  background: linear-gradient(135deg, var(--blue-light), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
  transition: all 0.35s;
}

.card:hover {
  border-color: rgba(59,130,246,0.45);
  background: rgba(255,255,255,0.07);
  transform: translateY(-6px);
  box-shadow: var(--shadow-blue);
}

.card:hover::before {
  background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 12px currentColor);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.65rem;
}

.card p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
  margin: 0;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(59,130,246,0.15);
  padding: 3rem 2rem 1.5rem;
  text-align: center;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: right;
}

.footer-brand img { height: 50px; margin-bottom: 1rem; }

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(59,130,246,0.2);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--blue-light); }

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--green-main); }

.footer-bottom {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 20px;
  overflow: hidden;
  margin: 4rem 0;
}

.stat-item {
  padding: 2rem 1.5rem;
  text-align: center;
  border-left: 1px solid rgba(59,130,246,0.1);
  transition: background 0.3s;
}
.stat-item:last-child { border-left: none; }
.stat-item:hover { background: rgba(59,130,246,0.07); }

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-light), var(--cyan-acc));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}

/* ===== SCROLL 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-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== FAQ ACCORDION ===== */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item.open { border-color: rgba(59,130,246,0.4); }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--white);
  gap: 1rem;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--blue-light); }

.faq-icon {
  width: 28px; height: 28px;
  background: rgba(59,130,246,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  transition: all 0.3s;
  color: var(--blue-light);
}
.faq-item.open .faq-icon {
  background: rgba(59,130,246,0.3);
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 1.5rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 1.5rem 1.2rem; }

/* ===== GLOW LINE ===== */
.glow-line {
  display: inline-block;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--blue-light), var(--purple-light));
  border-radius: 3px;
  margin-bottom: 1rem;
  box-shadow: 0 0 15px rgba(59,130,246,0.5);
}

/* ===== TAG CHIPS ===== */
.tag {
  display: inline-block;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--blue-light);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
}

.tag.green {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.3);
  color: var(--green-main);
}

.tag.purple {
  background: rgba(168,85,247,0.12);
  border-color: rgba(168,85,247,0.3);
  color: var(--purple-light);
}

/* ===== TESTIMONIAL ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 20px;
  padding: 1.75rem;
  position: relative;
  transition: all 0.35s;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 5rem;
  font-family: serif;
  color: rgba(59,130,246,0.12);
  line-height: 1;
}
.testimonial-card:hover {
  border-color: rgba(59,130,246,0.35);
  transform: translateY(-5px);
  box-shadow: var(--shadow-blue);
}

.testimonial-stars { color: #fbbf24; font-size: 0.9rem; margin-bottom: 0.75rem; letter-spacing: 2px; }

.testimonial-text {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--purple-main));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
}

.author-info strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
}

.author-info span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Navbar */
  .navbar { height: 72px; padding: 0 1rem; }
  .nav-logo img { height: 52px; }
  .page-wrap { padding-top: 72px; }
  .nav-links {
    position: fixed;
    top: 72px; right: 0; left: 0;
    background: rgba(10,15,46,0.98);
    flex-direction: column;
    padding: 1.25rem 1rem;
    gap: 0.4rem;
    transform: translateY(-120%);
    transition: transform 0.3s;
    border-bottom: 1px solid rgba(59,130,246,0.2);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 0.97rem; padding: 0.65rem 1rem; width: 100%; display: block; }
  .nav-cta { text-align: center !important; margin-top: 0.5rem; }
  .hamburger { display: flex; }

  /* Stats */
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-left: none; }
  .stat-num { font-size: 1.6rem; }

  /* Sections */
  .section { padding: 2.5rem 1rem; }

  /* Two-column grids → single column */
  .two-col-flip { grid-template-columns: 1fr !important; gap: 2rem !important; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr !important; }
  .testimonials-grid { grid-template-columns: 1fr !important; }

  /* Hero */
  .hero { padding: 3rem 1rem; min-height: 75vh; }
  .hero h1 { font-size: 1.7rem; }

  /* Section title */
  .section-title { font-size: 1.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  /* Tables */
  table { font-size: 0.78rem; }
  table td, table th { padding: 0.6rem 0.75rem; }

  /* Countdown boxes */
  #countdown { gap: 0.5rem; }
  #cd-days, #cd-hours, #cd-mins, #cd-secs { font-size: 2.2rem !important; min-width: 55px !important; }

  /* Phase boxes in countdown */
  .countdown-phases { grid-template-columns: 1fr !important; }

  /* Share buttons */
  .share-btn-group { flex-direction: column; align-items: center; }

  /* Steps section connector line */
  #how-it-works .step-line { display: none; }

  /* Benefits contract sections */
  .contract-grid { grid-template-columns: 1fr !important; }

  /* KPI bars label */
  .kpi-label { flex-direction: column; gap: 0.25rem; }
}

@media (max-width: 480px) {
  .nav-logo img { height: 44px; }
  .hero h1 { font-size: 1.4rem; }
  .section-title { font-size: 1.25rem; }
  #cd-days, #cd-hours, #cd-mins, #cd-secs { font-size: 1.7rem !important; min-width: 44px !important; }
  .btn-primary { font-size: 0.9rem; padding: 0.75rem 1.5rem; }
}

/* ===== GO UP BUTTON ===== */
.go-up-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.5);
  animation: go-up-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
.go-up-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(59,130,246,0.25);
  animation: go-up-pulse 2s ease-in-out infinite 0.5s;
}
@keyframes go-up-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 0.2; }
}
#go-up-btn:hover .go-up-ring {
  border-color: rgba(74,222,128,0.7);
  animation-duration: 1s;
}

@keyframes go-up-glow {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(124,58,237,0.5), 0 4px 20px rgba(37,99,184,0.4); }
  50%       { box-shadow: 0 0 28px 8px rgba(124,58,237,0.8), 0 4px 30px rgba(37,99,184,0.6); }
}

/* ===== REFUND GRID ===== */
.refund-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ===== CONTRACT SECTIONS MOBILE FIX ===== */
@media (max-width: 768px) {

  /* الهيكل الرئيسي */
  #employee > div,
  #agent > div,
  #leader > div {
    grid-template-columns: 1fr !important; /* بدل auto 1fr */
  }

  /* البوكسات الداخلية (4 أعمدة → عمود واحد) */
  #employee div[style*="grid-template-columns"],
  #agent div[style*="grid-template-columns"],
  #leader div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* تحسين المسافات */
  #employee,
  #agent,
  #leader {
    padding: 1.5rem !important;
  }
}