/**
 * 🎯 Base CSS - التنسيقات الأساسية
 * التاج بلس للديكور
 * 
 * هذا الملف يحتوي على:
 * - Reset CSS
 * - Typography الأساسية
 * - العناصر العامة
 */

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

/* ========================================
   HTML & Body
   ======================================== */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

html,
body {
  background: var(--surface);
  color: var(--text);
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  line-height: 1.75;
  overflow-x: hidden;
}

/* ========================================
   Typography - الطباعة
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-black);
  line-height: 1.3;
  color: var(--primary-dark);
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
}

h2 {
  font-size: clamp(28px, 4vw, 36px);
}

h3 {
  font-size: clamp(24px, 3.5vw, 30px);
}

h4 {
  font-size: clamp(20px, 3vw, 24px);
}

h5 {
  font-size: clamp(18px, 2.5vw, 20px);
}

h6 {
  font-size: clamp(16px, 2vw, 18px);
}

p {
  margin-bottom: 1em;
}

strong, b {
  font-weight: var(--font-weight-bold);
}

em, i {
  font-style: italic;
}

/* ========================================
   Links - الروابط
   ======================================== */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

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

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========================================
   Lists - القوائم
   ======================================== */
ul,
ol {
  list-style: none;
}

/* ========================================
   Images - الصور
   ======================================== */
img,
picture,
video,
canvas,
svg {
  /* display: block; */
  max-width: 100%;
  height: auto;
}

img {
  border-radius: var(--radius-lg);
}

/* ========================================
   Buttons - الأزرار
   ======================================== */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

/* ========================================
   Forms - النماذج
   ======================================== */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* ========================================
   Tables - الجداول
   ======================================== */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ========================================
   Utility Classes - فئات مساعدة
   ======================================== */

/* Container */
.container {
  width: min(var(--container-max), 92%);
  margin: 0 auto;
  padding-inline: var(--container-padding);
}

/* Screen Reader Only */
.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;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Visually Hidden */
.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

/* Text Alignment */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

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

/* ========================================
   Accessibility
   ======================================== */

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

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

/* ========================================
   Print Styles
   ======================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
