/* ═══════════════════════════════════════════════════════════════
   التنسيقات الأساسية
   ═══════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  transition: background .4s ease, color .4s ease;
}

::selection {
  background: rgba(212, 168, 16, .3);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes goldPulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}

.anim-up {
  animation: fadeUp .7s ease forwards;
  opacity: 0;
}

.anim-up:nth-child(1) { animation-delay: .05s; }
.anim-up:nth-child(2) { animation-delay: .1s; }
.anim-up:nth-child(3) { animation-delay: .15s; }
.anim-up:nth-child(4) { animation-delay: .2s; }
.anim-up:nth-child(5) { animation-delay: .25s; }
.anim-up:nth-child(6) { animation-delay: .3s; }

/* ─── Noise ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
}

[data-theme="light"] body::before { opacity: .01; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .section-title { font-size: 32px; }
  .admin-sidebar { display: none; }
  .admin-main { margin-right: 0; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-balance { display: none; }
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  .page { padding: 0 16px; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
}
