/* ============================================
   Base - إعادة الضبط والأساسيات
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-arabic);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* رابط التخطي للوصول السريع */
.skip-link {
  position: absolute;
  top: -100%;
  right: 16px;
  background: var(--color-primary);
  color: var(--text-on-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* حاوية */
.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

/* عناوين */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* نصوص مساعدة */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
