/* ============================================
   Base Styles - Reset & Global
   ============================================ */

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Headings ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

/* ===== Links ===== */
a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-700);
}

/* ===== Images ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Lists ===== */
ul, ol {
  list-style: none;
}

/* ===== Buttons Base ===== */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Inputs ===== */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ===== Section ===== */
.section {
  padding: var(--space-20) 0;
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--space-4);
  color: var(--color-gray-900);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  text-align: center;
  color: var(--color-gray-500);
  margin-bottom: var(--space-12);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary-600); }
.font-bold { font-weight: var(--font-weight-bold); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-600);
}

/* ===== Selection ===== */
::selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

/* ===== Focus Visible (Accessibility) ===== */
*:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}