/* ==========================================================================
   منصة ناشر Nashir.ai - المرحلة الخامسة (Design System, Services, Features, Steps & FAQ CSS)
   ========================================================================== */

:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #e0e7ff;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;

  --whatsapp-green: #10b981;
  --whatsapp-hover: #059669;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;

  --border-color: #e2e8f0;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #3b82f6 100%);
  --grad-whatsapp: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-text: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #2563eb 100%);
  --grad-cta: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);

  /* Font */
  --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 30px -10px rgba(99, 102, 241, 0.12);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cairo);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.w-full {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(99, 102, 241, 0.45);
}

.btn-whatsapp {
  background: var(--grad-whatsapp);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.35);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.45);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* Sticky Navbar & Logo */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo-img {
  height: 48px;
  max-height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hamburger Icon */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
}

.hamburger .bar {
  width: 24px;
  height: 3px;
  background: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer.active {
  display: flex;
}

.mobile-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
}

.mobile-link:hover {
  color: var(--primary);
}

/* Hero Section */
.hero-section {
  padding: 72px 0 96px 0;
  background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Dashboard Mockup Visual */
.hero-visual {
  width: 100%;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dashboard-header {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ef4444;
}

.dot.yellow {
  background: #f59e0b;
}

.dot.green {
  background: #10b981;
}

.dashboard-title {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 320px;
}

.dashboard-sidebar {
  background: #f8fafc;
  border-left: 1px solid var(--border-color);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sidebar-item.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.dashboard-main {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.chat-preview {
  background: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.chip {
  font-size: 0.7rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.chat-bubble {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 85%;
}

.chat-bubble.incoming {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.chat-bubble.outgoing {
  align-self: flex-end;
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Services Section Styles */
.services-section {
  padding: 88px 0;
  background: var(--bg-page);
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px auto;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.service-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
}

.service-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.btn-details {
  align-self: flex-start;
  padding: 8px 18px;
  font-size: 0.9rem;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 0.2s ease;
}

.service-card:hover .btn-details {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Features Section Styles */
.features-section {
  padding: 88px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}

.feature-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Sectors Chips Sub-section */
.sectors-wrapper {
  text-align: center;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
}

.sectors-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
}

.sectors-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.sector-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.sector-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Timeline Section Styles */
.steps-section {
  padding: 88px 0;
  background: var(--bg-page);
}

.timeline-container {
  position: relative;
  margin-bottom: 72px;
}

.timeline-line {
  position: absolute;
  top: 24px;
  right: 40px;
  left: 40px;
  height: 3px;
  background: var(--primary-light);
  z-index: 1;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px var(--bg-page), 0 4px 12px rgba(99, 102, 241, 0.25);
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.timeline-step:hover .step-badge {
  transform: scale(1.1);
  background: var(--accent-purple);
}

.step-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.timeline-step:hover .step-content {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.step-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

/* CTA Box Styling */
.cta-box {
  background: var(--grad-cta);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 56px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 32px auto;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* FAQ Section Styles (المرحلة الخامسة - الأسئلة الشائعة) */
.faq-section {
  padding: 88px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.accordion-container {
  max-width: 820px;
  margin: 0 auto 56px auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  gap: 16px;
}

.accordion-header:hover {
  color: var(--primary);
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}

.accordion-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #ffffff;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.35s ease;
  padding: 0 24px;
}

.accordion-item.active .accordion-body {
  max-height: 300px;
  padding: 0 24px 20px 24px;
  transition: max-height 0.35s cubic-bezier(1, 0, 1, 0), padding 0.35s ease;
}

.faq-answer {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* FAQ CTA Sub-section */
.faq-cta {
  text-align: center;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.faq-cta-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Modal Component Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.94);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--bg-subtle);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-number {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-features-box {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.modal-features-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.modal-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-features-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-features-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 900;
}

/* Media Queries */
@media (max-width: 1024px) {
  .timeline-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .timeline-line {
    display: none;
  }
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge {
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .services-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .nav-menu,
  .nav-btn {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    display: none;
  }

  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Vertical Timeline for Mobile */
  .timeline-line {
    display: block;
    top: 0;
    bottom: 0;
    right: 24px;
    left: auto;
    width: 3px;
    height: 100%;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .timeline-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: right;
    gap: 16px;
    padding-right: 12px;
  }

  .step-badge {
    margin-bottom: 0;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px var(--bg-page);
  }

  .cta-box {
    padding: 36px 20px;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  .accordion-header {
    font-size: 1rem;
    padding: 16px 20px;
  }
}