:root {
  --navy: #1B3A6B;
  --navy-light: #2C5AA0;
  --gold: #C8A415;
  --gold-light: #F5E6A3;
  --green: #1B7340;
  --green-light: #2A9D5C;
  --maroon: #6B1B1B;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-500: #7A7A7A;
  --gray-700: #495057;
  --gray-900: #212529;
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1100px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

/* ========== NAV ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 24px;
  transition: transform 0.3s ease;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 36px;
  width: auto;
}

.nav-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: var(--navy);
  transform: scale(1.4);
}

/* ========== SECTIONS ========== */
section {
  padding: 96px 24px;
  position: relative;
}

section:first-child {
  padding-top: 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: var(--gray-50);
}

.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, #0F2447 100%);
  color: var(--white);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, #0F2447 60%, #1B3A6B 100%);
  color: var(--white);
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(200,164,21,0.08) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.5; transform: translate(0, 0); }
  100% { opacity: 1; transform: translate(-5%, 3%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin-bottom: 32px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--white) 30%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 550px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== TYPOGRAPHY ========== */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-500);
  margin-bottom: 48px;
  max-width: 600px;
}

/* ========== PAIN CARDS ========== */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.pain-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pain-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pain-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--navy);
  stroke-width: 1.5;
  fill: none;
}

.pain-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: 8px;
}

.pain-card p {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.pain-card .solution {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
  color: var(--green);
  font-weight: 500;
  font-size: 0.85rem;
}

/* ========== FEATURE SECTION ========== */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-section.reverse {
  direction: ltr;
}

.feature-section.reverse > * {
  direction: rtl;
}

.feature-text h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

.feature-pain {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFFDE7 100%);
  border-right: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 8px 0;
  padding-right: 28px;
  position: relative;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.feature-list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 14px;
  width: 16px;
  height: 16px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.2;
}

.feature-list li::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
}

/* ========== SCREENSHOTS ========== */
.screenshot-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.screenshot-container img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 12px;
}

/* ========== MERMAID DIAGRAMS ========== */
.diagram-container {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
  overflow-x: auto;
}

.diagram-container .mermaid {
  display: flex;
  justify-content: center;
}

.diagram-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 16px;
}

/* ========== GANTT TIMELINE ========== */
.gantt-timeline {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow-x: auto;
}

.gantt-header {
  display: grid;
  grid-template-columns: 160px repeat(7, 1fr);
  gap: 0;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.gantt-header span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
}

.gantt-header span:first-child {
  text-align: right;
}

.gantt-phase {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  margin-bottom: 16px;
}

.gantt-phase-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  padding-left: 16px;
}

.gantt-phase-label small {
  font-weight: 400;
  color: var(--gray-500);
  font-size: 0.75rem;
}

.gantt-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  align-items: center;
}

.gantt-bar {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-milestone {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
}

@media (max-width: 768px) {
  .gantt-header { grid-template-columns: 100px repeat(7, 1fr); }
  .gantt-phase { grid-template-columns: 100px 1fr; }
  .gantt-phase-label { font-size: 0.75rem; }
  .gantt-bar { font-size: 0.65rem; padding: 8px 6px; }
  .gantt-header span { font-size: 0.65rem; }
}

/* ========== STAT CARDS ========== */
.stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.stat-card .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ========== MODULE GRID ========== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.module-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.module-card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.module-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

/* ========== TABLES ========== */
.clean-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.clean-table th {
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  text-align: right;
  font-weight: 600;
}

.clean-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.clean-table tr:hover td {
  background: var(--gray-50);
}

.clean-table .total-row td {
  background: var(--gold-light);
  font-weight: 700;
}

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  padding-right: 32px;
  margin: 32px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  right: -28px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--navy);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy);
}

.timeline-item.active::before {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green);
}

.timeline-title {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ========== COMPARISON BARS ========== */
.comparison-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.comparison-label {
  min-width: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
}

.comparison-bar {
  flex: 1;
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 32px;
}

.comparison-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0 8px;
  white-space: nowrap;
}

.comparison-value {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 60px;
  text-align: center;
}

/* ========== PRICING ========== */
.price-total {
  background: var(--navy);
  color: var(--white);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0;
}

.price-total .amount {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
}

/* ========== ANIMATIONS ========== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }
.stagger-5 { transition-delay: 500ms; }
.stagger-6 { transition-delay: 600ms; }

.slide-from-right {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-from-left {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-from-right.is-visible,
.slide-from-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ========== SLA TABLE ========== */
.sla-critical { color: var(--maroon); font-weight: 700; }
.sla-high { color: #E65100; font-weight: 700; }
.sla-medium { color: var(--gold); font-weight: 700; }
.sla-low { color: var(--navy); font-weight: 700; }

/* ========== CLOSING ========== */
.closing-section {
  text-align: center;
  padding: 96px 24px;
  background: var(--gray-50);
}

.closing-section h2 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.closing-section p {
  color: var(--gray-500);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  section { padding: 64px 16px; }

  .feature-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-section.reverse {
    direction: rtl;
  }

  .pain-grid {
    grid-template-columns: 1fr;
  }

  .stat-row {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .nav-dots { display: none; }

  .comparison-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-total {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .slide-from-right,
  .slide-from-left {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero::before { animation: none; }
  .scroll-indicator { animation: none; }
}
