/**
 * 🧭 إعادة الضبط والخطوط الأساسية - منصة أرشدني
 * Reset and RTL Base Rules (Google Fonts loaded via <link> in HTML <head> for optimal performance)
 */

/* Box sizing and border reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Document & Body */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  direction: rtl;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background atmospheric ambient gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 600px;
  background: radial-gradient(circle at 50% -10%, rgba(14, 165, 233, 0.15), rgba(11, 19, 43, 0) 70%),
              radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.08), rgba(11, 19, 43, 0) 50%),
              radial-gradient(circle at 90% 30%, rgba(16, 185, 129, 0.08), rgba(11, 19, 43, 0) 50%);
  pointer-events: none;
  z-index: 0;
}

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

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-hover);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-bg-deep);
}

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

/* Selection Color */
::selection {
  background: rgba(245, 158, 11, 0.3);
  color: var(--color-gold-light);
}

/* Media elements */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-main);
}

p {
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
}

a {
  color: var(--color-cyan-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Accessibility focus styles */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
