/*
 * WebPlus — Base Styles
 * إعادة التعيين (Reset) والأساسيات.
 * يعمل فوق Astra وتحت ملفات المكونات.
 */

/* ── إعادة تعيين أساسية ────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--wp-font-arabic);
  font-size: var(--wp-text-base);
  line-height: 1.9;
  color: var(--wp-navy);
  background-color: var(--wp-snow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── RTL Foundation ─────────────────────────────────────────── */
[dir="rtl"] {
  text-align: right;
}
[dir="ltr"] {
  text-align: left;
  font-family: var(--wp-font-latin);
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wp-font-arabic);
  font-weight: 800;
  line-height: 1.25;
  color: inherit;
}

/* العناوين اللاتينية */
.lang-en h1, .lang-en h2, .lang-en h3,
.lang-en h4, .lang-en h5, .lang-en h6 {
  font-family: var(--wp-font-latin);
}

/* الأرقام دائماً Montserrat */
.wp-number, [class*="wp-score"], [class*="wp-counter"] {
  font-family: var(--wp-font-latin);
  font-variant-numeric: tabular-nums;
}

p {
  max-width: 68ch;
  color: var(--wp-slate-600);
}

a {
  color: var(--wp-blue);
  text-decoration: none;
  transition: color var(--wp-dur-sm) var(--wp-ease);
}
a:hover {
  color: var(--wp-blue-700);
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── تعطيل letter-spacing على العربي بشكل صريح ────────────── */
:lang(ar), [dir="rtl"] * {
  letter-spacing: 0 !important;
  word-spacing: normal;
}

/* Eyebrows اللاتينية: تباعد مسموح ────────────────────────── */
.wp-eyebrow {
  font-family: var(--wp-font-latin);
  font-size: var(--wp-text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wp-sky);
}

/* ── Container ──────────────────────────────────────────────── */
.wp-container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--wp-margin-x);
}

.wp-container--narrow {
  max-width: 800px;
}

.wp-container--wide {
  max-width: 1600px;
}

/* ── Grid ────────────────────────────────────────────────────── */
.wp-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--wp-space-6);
}

/* ── Sections ────────────────────────────────────────────────── */
.wp-section {
  padding-block: var(--wp-section-gap);
  position: relative;
  overflow: hidden;
}

.wp-section--dark {
  background-color: var(--wp-navy);
  color: var(--wp-snow);
}

.wp-section--darker {
  background-color: var(--wp-navy-950);
  color: var(--wp-snow);
}

.wp-section--light {
  background-color: var(--wp-snow);
  color: var(--wp-navy);
}

/* ── Accessibility ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--wp-blue);
  outline-offset: 3px;
  border-radius: var(--wp-radius-sm);
}

/* ── prefers-reduced-motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── تجاوز Astra الزائد ─────────────────────────────────────── */
.ast-container { max-width: none !important; }
#page { margin-top: 0 !important; }
.site-content { padding: 0 !important; }
