/**
 * 🧭 أنماط الصفحات التفاعلية الخاصة والطباعة - منصة أرشدني
 * Hero Glow, Roadmap Stepper, Dimension Matrix, Builder Wizard, Radar, Print CSS
 */

/* ==========================================================================
   قسم البطل المتقدم (Hero Section)
   ========================================================================== */
.hero-wrapper {
  position: relative;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) 0;
}

.hero-emblem {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-6);
  filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.45));
  animation: floatEmblem 4s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: var(--weight-black);
  line-height: 1.15;
  margin-bottom: var(--space-6);
}

.hero-highlight {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-emerald-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-8);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  margin-top: var(--space-4);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-subtle);
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  color: var(--color-gold-light);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

/* ==========================================================================
   خريطة المراحل التنموية (Developmental Stages Stepper)
   ========================================================================== */
.stages-roadmap {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
  margin: var(--space-8) 0;
}

.stage-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  background: var(--color-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-normal);
}

.stage-card:hover {
  border-color: var(--border-cyan);
  background: var(--color-surface-hover);
  transform: translateX(-6px);
}

.stage-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.stage-num-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-gold);
  color: var(--color-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  box-shadow: 0 0 12px var(--color-gold-glow);
  margin-bottom: var(--space-2);
}

.stage-years-tag {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-cyan-light);
  white-space: nowrap;
}

.stage-details {
  flex: 1;
}

.stage-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-main);
  margin-bottom: var(--space-2);
}

.stage-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-3);
}

/* ==========================================================================
   المسارات العشرة (10 Tracks Grid)
   ========================================================================== */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.track-box {
  background: var(--color-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.track-box:hover {
  background: var(--color-surface-hover);
  border-color: var(--border-gold);
  transform: translateY(-3px);
}

.track-box-icon {
  font-size: 2rem;
  line-height: 1;
}

.track-box-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-main);
}

.track-box-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ==========================================================================
   شبكة الأبعاد الـ 11 (Dimensions Grid per Age)
   ========================================================================== */
.dimension-panel {
  background: var(--color-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-top: var(--space-6);
}

.dimension-items-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
}

.dimension-item-card {
  background: var(--color-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border-right: 4px solid var(--color-cyan);
}

.dimension-item-card.gold { border-right-color: var(--color-gold); }
.dimension-item-card.emerald { border-right-color: var(--color-emerald); }
.dimension-item-card.purple { border-right-color: var(--color-purple); }

.dimension-item-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-main);
  margin-bottom: var(--space-2);
}

.dimension-item-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
}

/* ==========================================================================
   معالج بناء المنهج المخصص (Builder Wizard)
   ========================================================================== */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-10);
  position: relative;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--border-subtle);
  z-index: 0;
}

.wizard-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.wizard-step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  transition: all var(--transition-normal);
}

.wizard-step.active .wizard-step-circle {
  background: var(--color-gold);
  border-color: var(--color-gold-light);
  color: #0F172A;
  box-shadow: 0 0 16px var(--color-gold-glow);
}

.wizard-step.completed .wizard-step-circle {
  background: var(--color-emerald);
  border-color: var(--color-emerald-light);
  color: #FFFFFF;
}

.wizard-step-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

/* ==========================================================================
   حاوية مخطط الرادار (Radar Canvas Container)
   ========================================================================== */
.radar-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-canvas {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   تنسيقات الطباعة والتصدير (Print Stylesheet)
   ========================================================================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  body::before, .topbar, .footer, .btn, .tab-list, .age-pills-wrapper {
    display: none !important;
  }

  .card, .dimension-item-card, .stage-card {
    background: #FFFFFF !important;
    border: 1px solid #CCCCCC !important;
    color: #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .hero-title, .section-title, .card-title {
    color: #000000 !important;
    -webkit-text-fill-color: initial !important;
  }

  p, span, .stat-label {
    color: #333333 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stage-card {
    flex-direction: column;
  }
}

/* ==========================================================================
   المرحلة 13: مظاهر الملف التعريفي الثلاثة (Portfolio Themes)
   ========================================================================== */

/* 1. المظهر التنفيذي الكلاسيكي (Executive Theme) */
body.theme-executive {
  background-color: #0A1128 !important;
  color: #E2E8F0 !important;
}

body.theme-executive .topbar {
  background: rgba(10, 17, 40, 0.92) !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
}

body.theme-executive .card {
  background: rgba(16, 26, 60, 0.85) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

body.theme-executive .section-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #FBBF24 !important;
  border-color: #F59E0B !important;
}

/* 2. المظهر التقني المينيمالي (Hacker / Terminal Theme) */
body.theme-hacker {
  background-color: #040810 !important;
  color: #D1FAE5 !important;
  font-family: 'JetBrains Mono', monospace, sans-serif !important;
}

body.theme-hacker .topbar {
  background: rgba(4, 8, 16, 0.95) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3) !important;
}

body.theme-hacker .card {
  background: rgba(6, 12, 22, 0.95) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-radius: 4px !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.08) !important;
}

body.theme-hacker .card h1, 
body.theme-hacker .card h2, 
body.theme-hacker .card h3 {
  font-family: 'JetBrains Mono', monospace !important;
  color: #34D399 !important;
}

body.theme-hacker .card h2::before,
body.theme-hacker .card h3::before {
  content: '> ';
  color: #10B981;
}

body.theme-hacker .badge {
  border-radius: 2px !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* 3. المظهر الزجاجي الإبداعي (Creative Glass Theme) */
body.theme-creative {
  background: radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
              #070B1E !important;
  color: #FFFFFF !important;
}

body.theme-creative .topbar {
  background: rgba(7, 11, 30, 0.75) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.theme-creative .card {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--radius-2xl) !important;
}

/* ==========================================================================
   المرحلة 13: نوافذ التنفيذ الإرشادي التفاعلية (Guided Execution Modals)
   ========================================================================== */
.execution-modal-card {
  max-width: 860px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.15);
}

.execution-phase-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
  transition: all var(--transition-fast);
}

.execution-phase-block:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(255, 255, 255, 0.035);
}

.execution-phase-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}

.phase-step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.phase-step-row:last-child {
  border-bottom: none;
}

.phase-step-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--color-emerald);
  cursor: pointer;
}

.phase-step-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-main);
  transition: color 0.2s ease;
}

.phase-step-text.step-completed {
  text-decoration: line-through;
  color: var(--color-text-dim);
}

.execution-progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: var(--space-3) 0 var(--space-4) 0;
}

.execution-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-emerald));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* ==========================================================================
   المقارنة الثنائية المتزامنة (Split-Pane Comparison View - المرحلة 14)
   ========================================================================== */
.split-compare-container {
  animation: fadeIn 0.3s ease;
}

.split-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-4);
}

@media (max-width: 900px) {
  .split-compare-grid {
    grid-template-columns: 1fr;
  }
}

.split-pane {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.split-pane:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.split-pane-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--space-4);
}

.split-dim-block {
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border-right: 3px solid var(--color-cyan);
}

.split-dim-block.gold {
  border-right-color: var(--color-gold);
}

.split-dim-block.purple {
  border-right-color: var(--color-purple);
}

.split-dim-block.emerald {
  border-right-color: var(--color-emerald);
}

.split-delta-summary {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

