:root {
  --bg-main: #020617;
  --bg-alt: #030712;
  --accent: #a67c00;
  --accent-soft: rgba(166, 124, 0, 0.16);
  --accent-strong: #eab308;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --card-bg: #020617;
  --border-soft: rgba(148, 163, 184, 0.27);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 60px rgba(15, 23, 42, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #0f172a 0, #020617 45%, #000 100%);
  color: var(--text-main);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1.25rem;
}

/* ===== Header ===== */
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(16px);
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.brand-text-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.18rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.7);
}

.lang-switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}
.lang-switch a {
  padding: 0.25rem 0.7rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}
.lang-switch a.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #020617;
  font-weight: 600;
}

.btn-outline-small {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: var(--text-main);
  font-size: 0.75rem;
  padding: 0.32rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline-small:hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn-primary {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #020617;
  font-size: 0.8rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(250, 204, 21, 0.35);
  white-space: nowrap;
}

.btn-primary span:last-child {
  font-size: 0.9em;
}

/* =========================
   Header Mobile Fix (EN/AR)
   ========================= */

/* اسمح بالالتفاف ولا تخلي عناصر الهيدر تطلع خارج الحدود */
.landing-header { flex-wrap: wrap; }
.brand { min-width: 0; }
.brand > div { min-width: 0; }

/* العناوين لا تنكسر بشكل سيء */
.brand-text-title,
.brand-text-sub {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* موبايل */
@media (max-width: 640px) {
  /* بدل "كبسولة" طويلة -> كارد مرتب */
  .landing-header {
    border-radius: 18px;
    padding: 0.9rem 0.9rem;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: flex-start;
  }

  /* صف الشعار + النص */
  .brand {
    width: 100%;
    gap: 0.7rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  .brand-text-title {
    font-size: 0.95rem;
    line-height: 1.25;
  }
  .brand-text-sub {
    font-size: 0.75rem;
    line-height: 1.25;
  }

  /* صف العناصر يمين (chip + lang + button) يصير تحت بشكل مرتب */
  .header-right {
    width: 100%;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  /* chip طبيعي */
  .chip {
    font-size: 0.72rem;
    padding: 0.22rem 0.7rem;
  }

  /* زر اللغة ياخذ عرض كامل ومتساوي */
  .lang-switch {
    width: 100%;
    justify-content: center;
  }
  .lang-switch a {
    flex: 1 1 50%;
    text-align: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }

  /* زر فتح المنشئ يكون Full width */
  .btn-outline-small,
  .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }
}

/* أصغر جدًا */
@media (max-width: 420px) {
  .brand-text-title { font-size: 0.9rem; }
  .brand-text-sub { font-size: 0.72rem; }
}

/* ===== Main Layout ===== */
.landing-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: flex-start;
}

/* ===== Hero Left ===== */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.6rem;
  background:
    radial-gradient(circle at top right, rgba(166, 124, 0, 0.16), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
}

.hero-eyebrow {
  font-size: 0.75rem;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(166, 124, 0, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.5);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 1.6rem;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hero-title span.accent {
  background: linear-gradient(120deg, #facc15, #a67c00);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 1.1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.hero-actions .btn-outline-small {
  font-size: 0.78rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-meta span::before {
  content: "●";
  font-size: 0.48rem;
  color: var(--accent-strong);
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.feature-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  padding: 0.8rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(250, 204, 21, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.feature-title {
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #e5e7eb;
}

/* ===== Right panel – Preview / Mockup ===== */
.preview-card {
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.5rem;
  background:
    radial-gradient(circle at top center, rgba(148, 163, 184, 0.28), transparent 55%),
    linear-gradient(155deg, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.9);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  gap: 0.5rem;
}

.preview-title {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Tabs */
.preview-tabs {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  font-family: inherit;
}

.preview-tab {
  border: none;
  background: transparent;
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
}

.preview-tab.is-active {
  background: rgba(15, 23, 42, 0.9);
  color: var(--accent-strong);
  font-weight: 600;
}


/* ===== Preview Window & Mac Device ===== */
.preview-window {
  border-radius: 22px;
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 1.2rem 1rem;
  height: 430px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

/* MacBook-like mockup */
.device-mac {
  width: 100%;
  max-width: 480px;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  padding: 0.85rem 0.9rem 0.55rem;
  position: relative;
}

/* glow around laptop */
.device-mac::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(250, 204, 21, 0.18), transparent 70%);
  opacity: 0.75;
  z-index: -1;
}

.device-screen {
  background: #020617;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  padding: 0.5rem;
  overflow: hidden;
}

.device-base {
  margin: 0.5rem auto 0;
  width: 72%;
  height: 10px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #111827, #020617, #111827);
}

/* Image inside the screen */
.preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* slide + fade effect */
.preview-image.slide {
  opacity: 0;
  transform: translateX(28px);
}

/* ===== (اختياري) قواعد قديمة للـ slider النصي — لا تضر حتى لو لم تُستخدم ===== */
.preview-slider {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 210 / 297;
}

.preview-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.preview-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.preview-cv-page {
  width: 100%;
  height: 100%;
  background: #f9fafb;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
  padding: 0.6rem 0.7rem;
  color: #111827;
  font-size: 10px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.4rem;
  direction: ltr;
}

.preview-cv-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  padding-right: 0.4rem;
}

.preview-cv-name {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.preview-cv-title {
  font-size: 0.85em;
  color: #4b5563;
  margin-bottom: 0.35rem;
}
.preview-tag {
  display: inline-flex;
  padding: 0.1rem 0.32rem;
  border-radius: 999px;
  font-size: 0.68em;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.65);
  color: #854d0e;
  margin-bottom: 0.35rem;
}

.preview-section-title {
  font-size: 0.78em;
  font-weight: 600;
  margin-top: 0.3rem;
  margin-bottom: 0.1rem;
}

.preview-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  margin-top: 0.15rem;
}

.preview-badge {
  padding: 0.04rem 0.25rem;
  border-radius: 999px;
  font-size: 0.68em;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.preview-cv-photo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  margin-left: auto;
  background: radial-gradient(circle at 30% 0, #e5e7eb, #9ca3af);
}

.preview-checklist {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
  font-size: 0.75em;
  color: #4b5563;
}
.preview-check-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.preview-check-item span.icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: rgb(34, 197, 94);
}

/* ===== Sections under hero ===== */
.section {
  margin-top: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
  gap: 0.75rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.template-card {
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.08), #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.template-badge {
  display: inline-flex;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.65rem;
  color: var(--accent-strong);
}

.template-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.step-card {
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.8);
  padding: 0.9rem 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(234, 179, 8, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent-strong);
  margin-bottom: 0.35rem;
}

.step-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 0.2rem;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  font-size: 0.78rem;
}

.faq-item {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.8rem 0.9rem;
}

.faq-q {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.faq-a {
  color: var(--text-muted);
}

/* CTA Footer */
.landing-footer-cta {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  border-radius: 20px;
  padding: 1rem 1.2rem;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.12), transparent 60%),
    linear-gradient(135deg, #0f172a, #020617);
  border: 1px solid rgba(234, 179, 8, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.landing-footer-cta-text {
  font-size: 0.9rem;
}

.landing-footer-cta-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.footer-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ===== Smart Preview Scaling ===== */
.preview-slider {
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.35s ease;
}

/* شاشات كبيرة */
@media (min-width: 1400px) {
  .preview-slider {
    transform: scale(1.12);
  }
}

/* لابتوب */
@media (max-width: 1200px) {
  .preview-slider {
    transform: scale(1);
  }
}

/* تابلت */
@media (max-width: 900px) {
  .preview-slider {
    transform: scale(0.95);
  }
}

/* جوال */
@media (max-width: 600px) {
  .preview-slider {
    transform: scale(0.85);
  }
}

/* ===== Preview Dots ===== */
.preview-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0.75rem;
}

.preview-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
}

.preview-dots .dot.is-active {
  background: var(--accent-strong);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25);
}


/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .landing-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-window {
    height: 360px;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .landing-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-right {
    justify-content: flex-start;
  }
  .page-shell {
    padding: 1rem;
  }
  .template-grid,
  .steps-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-cv-page {
    max-width: 260px;
  }
}
