/* ==========================================================================
   IRCHAD FOR YOU — BASE STYLES
   الأنماط الأساسية: Reset + Typography + RTL Layout
   يُستورد بعد tokens.css في كل صفحة
   ========================================================================== */

/* ── Reset عام ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* ── جذر الصفحة ─────────────────────────────────────────────────────────── */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  direction: rtl;
  text-align: right;
  background-color: var(--bg-color);
  color: var(--ink-color);
  font-family: var(--font-serif);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100svh;
}

/* ── الطباعة (Typography) ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-color);
  font-feature-settings: "ss01", "cv11";
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  color: var(--ink-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

/* ── أدوات Layout ───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

section {
  padding-top: clamp(5rem, 8vw, 9rem);
  padding-bottom: clamp(5rem, 8vw, 9rem);
  position: relative;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.highlight-italic {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 300;
  opacity: 0.9;
  font-feature-settings: "ss01", "cv11";
}

/* ── Toast إشعارات عائمة (مشترك بين كل الصفحات) ─────────────────────── */
#toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: var(--ink-color);
  color: var(--bg-color);
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.96); }
}
