/* ============================================
   Layout - تخطيط الصفحات (هوية #E32027)
   ============================================ */

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-color);
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(227,32,39,0.09), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(245,158,11,0.08), transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(227,32,39,0.16), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(245,158,11,0.07), transparent 60%);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 36px;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.hero__badge-dot {
  width: 8px; height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.15); } 50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.08); } }
.hero__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.hero__title span {
  background: linear-gradient(135deg, var(--color-primary) 0%, #A31C20 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .hero__title span {
  background: linear-gradient(135deg, #FF4452 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 20px;
}
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.hero__trust {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 4px;
}
.hero__trust-item { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.hero__trust-item svg { color: var(--color-success); }

.hero__visual {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero__visual-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.hero__visual-dots { display: flex; gap: 6px; }
.hero__visual-dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.hero__visual-dots span:nth-child(1){ background:#E32027; } span:nth-child(2){ background:#F59E0B; } span:nth-child(3){ background:#22C55E; }
.hero__visual-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-right: auto; }
.hero__preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero__preview-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero__preview-card--wide { grid-column: 1 / -1; min-height: 90px; }
.hero__skeleton { background: var(--border-color); border-radius: 6px; }
.hero__skeleton--title { height: 12px; width: 70%; }
.hero__skeleton--line { height: 8px; width: 100%; opacity: 0.7; }
.hero__skeleton--line-short { height: 8px; width: 60%; opacity: 0.5; }
.hero__skeleton--badge { height: 20px; width: 60px; border-radius: 999px; }

/* ---------- Sections ---------- */
.section { padding: 36px 0; }
.section--muted { background: var(--bg-surface); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
[data-theme="dark"] .section--muted { background: #181818; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: -20px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}
.stats-bar__item {
  background: var(--bg-surface);
  padding: 18px;
  text-align: center;
}
.stats-bar__number { font-size: 22px; font-weight: 800; color: var(--color-primary); line-height: 1; }
.stats-bar__label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 4px; }

/* ---------- Page Header ---------- */
.page-header {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-color);
  padding: 32px 0 28px;
}
.page-header__title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.page-header__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.page-header__desc { font-size: 14.5px; color: var(--text-secondary); max-width: 680px; line-height: 1.7; }
.page-header__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ---------- Roadmap Placeholder ---------- */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-right: 24px;
}
.roadmap::before {
  content: "";
  position: absolute;
  right: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border-color);
  border-radius: 2px;
}
.roadmap__step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  position: relative;
}
.roadmap__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
}
.roadmap__content {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}
.roadmap__step-title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.roadmap__step-desc { font-size: 13px; color: var(--text-secondary); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__visual { max-width: 520px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 28px 0 32px; }
  .page-header { padding: 24px 0 20px; }
}

/* P1-03: navbar — إخفاء الروابط والبحث عند ≤1024 (6 روابط لا تناسب) */
@media (max-width: 1024px) {
  .navbar__links { display: none; }
  .navbar__search { display: none; }
  .navbar__toggle { display: grid; }
}

/* P1-03: navbar — ضغط البحث والفجوات عند 1025-1100 */
@media (min-width: 1025px) and (max-width: 1100px) {
  .navbar__search { min-width: 0; }
  .navbar__inner { gap: 10px; }
}

@media (max-width: 480px) {
  .container { width: min(100% - 20px, var(--container-max)); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .stats-bar__item { padding: 14px 10px; }
  .stats-bar__number { font-size: 18px; }
}

/* P1-02a: إصلاح التفاف نص الأزرار داخل بطاقات المسارات (مشكلة nowrap spécifique) */
@media (max-width: 860px) {
  #careerGrid .btn { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
}
