/* ============================================
   مستودع الموارد البرمجية - جامعة بابل
   Premium CDN Portal Design
   ============================================ */

/* --- Fonts & Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ══════════════════════════════════════
     🏛️ ألوان شعار جامعة بابل
     ══════════════════════════════════════ */

  /* 🔵 أزرق بوابة عشتار */
  --ishtar-blue:       #2e6ab4;
  --ishtar-blue-light: #5b9ee8;
  --ishtar-blue-deep:  #1a3d7a;
  --ishtar-glow:       rgba(46, 106, 180, 0.35);

  /* 🔷 الأزرق النيلي الرسمي (بديل الذهبي) */
  --gold:              #3b4cb8;
  --gold-light:        #4f63e6;
  --gold-pale:         #dce2fb;
  --gold-glow:         rgba(59, 76, 184, 0.22);

  /* 🟤 رمال بابل (الخلفية البيجية) */
  --sand:              #c8a87a;
  --sand-muted:        rgba(200, 168, 122, 0.55);

  /* 🩵 مياه الفرات */
  --euphrates:         #5ab0cc;
  --euphrates-light:   #7fcbe0;
  --euphrates-glow:    rgba(90, 176, 204, 0.25);

  /* 🟦 الكحلي الملكي (شرائط الشعار) */
  --ribbon-navy:       #1a3580;
  --ribbon-dark:       #0d2260;

  /* ══════════════════════════════════════
     🎨 الخلفيات الأكاديمية الرسمية (مشرقة وأنيقة)
     ══════════════════════════════════════ */
  --bg-deep:        #f2f6fb;          /* لؤلؤي مزرق أكاديمي رسمي */
  --bg-surface:     #ffffff;          /* أبيض ناصع */
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fbff;

  /* ══════════════════════════════════════
     🔲 الحدود
     ══════════════════════════════════════ */
  --border:         rgba(46, 106, 180, 0.18);
  --border-gold:    rgba(59, 76, 184, 0.40);
  --border-hover:   #3b4cb8;
  --border-ishtar:  rgba(46, 106, 180, 0.28);

  /* ══════════════════════════════════════
     ✏️ النصوص الرسمية عالية الوضوح
     ══════════════════════════════════════ */
  --text-primary:   #0e1f3b;          /* كحلي ملكي داكن جداً */
  --text-secondary: #425672;          /* كحلي متوسط */
  --text-muted:     #697a96;

  /* ══════════════════════════════════════
     ✨ الأكسنت المتعددة
     ══════════════════════════════════════ */
  --primary:        var(--ishtar-blue);
  --primary-glow:   var(--ishtar-glow);
  --accent-cyan:    var(--euphrates);
  --accent-green:   #169c46;          /* أخضر رسمي ناصع */
  --accent-gold:    var(--gold);
  --accent-purple:  #6355b8;

  /* ══════════════════════════════════════
     📐 قيم ثابتة وظلال مؤسسية ناعمة
     ══════════════════════════════════════ */
  --radius-card:    20px;
  --radius-sm:      10px;
  --shadow-card:    0 6px 28px rgba(14, 31, 59, 0.06), 0 1px 3px rgba(14, 31, 59, 0.04);
  --shadow-glow:    0 10px 36px rgba(46, 106, 180, 0.10);
  --font-ar:        'Cairo', 'Segoe UI', sans-serif;
  --font-code:      'Roboto Mono', monospace;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ar);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  position: relative;
}

/* --- Animated Background --- */
.bg-animation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 65% 45% at 15% 5%,  rgba(46, 106, 180, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 85%, rgba(201, 162, 39, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 55% 45%, rgba(90, 176, 204, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse 30% 25% at 70% 15%, rgba(26, 53, 128, 0.18) 0%, transparent 45%),
    var(--bg-deep);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 106, 180, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 106, 180, 0.07) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
}

.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.35;
  animation: float var(--d) ease-in-out infinite alternate;
  box-shadow: 0 0 10px var(--gold);
}

@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 0.25; }
  100% { transform: translateY(-28px) scale(1.4); opacity: 0.65; }
}

/* --- Site Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 3px solid;
  border-image: linear-gradient(90deg,
    transparent     0%,
    #1e3a8a         10%,
    #3b4cb8         35%,
    #5c6bc0         55%,
    #2e6ab4         80%,
    transparent     100%) 1;
  border-bottom: 2px solid rgba(79, 99, 230, 0.35);
  background: linear-gradient(135deg, #111a36 0%, #182852 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 0 2rem;
  box-shadow: 0 6px 30px rgba(17, 26, 54, 0.22);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(92, 107, 192, 0.55);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.logo-ring:hover {
  border-color: #7986cb;
  box-shadow: 0 0 24px rgba(121, 134, 203, 0.45);
}

.university-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: filter var(--transition), transform var(--transition);
}

.logo-ring:hover .university-logo {
  filter: drop-shadow(0 0 14px rgba(121, 134, 203, 0.9));
  transform: scale(1.05);
}

.logo-text-fallback {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.site-title-group {
  display: flex;
  flex-direction: column;
}

.site-title-ar {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.site-subtitle {
  font-size: 0.72rem;
  color: #b0c0e8;
  font-family: var(--font-code);
  letter-spacing: 0.08em;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  font-size: 0.78rem;
  color: #6ee7b7;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(5, 150, 105, 0); }
}

/* --- Main Content --- */
.main-content {
  position: relative;
  z-index: 5;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(46, 106, 180, 0.08);
  border: 1px solid rgba(46, 106, 180, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  color: #1a3d7a;
  font-family: var(--font-code);
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  animation: fade-in-down 0.6s both;
}

.hero-chip svg { width: 14px; height: 14px; }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  animation: fade-in-down 0.7s 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg,
    #0e1f3b           0%,
    #1a3580          45%,
    var(--ishtar-blue) 78%,
    #4f63e6          100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.9;
  animation: fade-in-down 0.8s 0.2s both;
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem 2rem;
  margin-bottom: 4rem;
  backdrop-filter: blur(20px);
  animation: fade-in-up 0.8s 0.3s both;
  box-shadow: var(--shadow-glow);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, #1a3580 0%, #2e6ab4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-code);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* --- Modules Section --- */
.modules-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* --- Module Cards --- */
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
  backdrop-filter: blur(20px);
  animation: card-enter 0.6s both;
  box-shadow: var(--shadow-card);
}

.module-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 24px 64px rgba(0,0,0,0.5), 0 0 40px var(--gold-glow);
  background: var(--bg-card-hover);
  transform: translateY(-5px);
}

.card-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.12) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

.module-card:hover .card-glow { opacity: 1; }

/* Card Icon */
.card-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon-wrapper svg { width: 26px; height: 26px; }

.libs-icon {
  background: rgba(46, 106, 180, 0.20);
  border: 1px solid rgba(46, 106, 180, 0.42);
  color: var(--ishtar-blue-light);
}

.css-icon {
  background: rgba(90, 176, 204, 0.18);
  border: 1px solid rgba(90, 176, 204, 0.38);
  color: var(--euphrates-light);
}

.js-icon {
  background: rgba(201, 162, 39, 0.18);
  border: 1px solid rgba(201, 162, 39, 0.38);
  color: var(--gold-light);
}

/* Card Content */
.card-content { flex: 1; }

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ishtar-blue-light);
  background: rgba(46, 106, 180, 0.16);
  border: 1px solid rgba(46, 106, 180, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.css-tag { color: var(--euphrates-light); background: rgba(90,176,204,0.12); border-color: rgba(90,176,204,0.30); }
.js-tag  { color: #3b4cb8; background: rgba(59, 76, 184, 0.12); border-color: rgba(59, 76, 184, 0.30); }

.card-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-code);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: var(--font-code);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.card-libs-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lib-tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(46, 106, 180, 0.10);
  border: 1px solid rgba(46, 106, 180, 0.20);
  color: var(--text-secondary);
  font-family: var(--font-code);
}

.css-lib-tag { background: rgba(90,176,204,0.10); border-color: rgba(90,176,204,0.22); color: var(--euphrates-light); }
.js-lib-tag  { background: rgba(59, 76, 184, 0.10); border-color: rgba(59, 76, 184, 0.22); color: #3b4cb8; }

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.card-arrow svg { width: 18px; height: 18px; }
.module-card:hover .card-arrow { color: var(--gold-light); transform: translateX(-4px); }

/* --- Info Banner --- */
.info-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(46, 106, 180, 0.08);
  border: 1px solid rgba(46, 106, 180, 0.25);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  animation: fade-in-up 0.8s 0.5s both;
}

.info-icon { color: var(--euphrates); flex-shrink: 0; }
.info-icon svg { width: 20px; height: 20px; }

.info-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  background: rgba(7, 12, 26, 0.90);
  backdrop-filter: blur(20px);
  padding: 1.25rem 2rem;
  box-shadow: 0 -1px 0 rgba(201, 162, 39, 0.10);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-url {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-code);
  letter-spacing: 0.08em;
}

/* ============================================
   DIRECTORY PAGE STYLES
   ============================================ */

.dir-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(201, 162, 39, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  transition: all var(--transition);
}

.back-btn:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: var(--gold);
  color: var(--gold-light);
}

.back-btn svg { width: 15px; height: 15px; }

.dir-title-group { flex: 1; }

.dir-path {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: var(--font-code);
}

.dir-path .path-root { color: var(--text-muted); }
.dir-path .path-current { color: var(--gold-light); }

.dir-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-icon svg { width: 18px; height: 18px; }

.dir-search {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-ar);
  font-size: 0.9rem;
  direction: rtl;
  transition: all var(--transition);
  outline: none;
}

.dir-search:focus {
  border-color: var(--ishtar-blue);
  box-shadow: 0 0 0 3px var(--ishtar-glow);
  background: var(--bg-card-hover);
}

.dir-search::placeholder { color: var(--text-muted); }

/* Directory Grid */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.dir-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  overflow: hidden;
}

.dir-item:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 18px var(--gold-glow);
}

.dir-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.dir-item-icon.folder {
  background: rgba(46, 106, 180, 0.16);
  border: 1px solid rgba(46, 106, 180, 0.32);
  color: var(--ishtar-blue-light);
}

.dir-item-icon.file {
  background: rgba(90, 176, 204, 0.14);
  border: 1px solid rgba(90, 176, 204, 0.28);
  color: var(--euphrates-light);
}

.dir-item-icon svg { width: 18px; height: 18px; }

.dir-item-info { flex: 1; overflow: hidden; }

.dir-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-code);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-item-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  font-family: var(--font-code);
}

.dir-item-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(4px);
  transition: all var(--transition);
}

.dir-item:hover .dir-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

.dir-item-arrow svg { width: 14px; height: 14px; }

/* --- Copy Button --- */
.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: rgba(30, 58, 138, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.copy-btn svg {
  width: 15px;
  height: 15px;
  transition: all var(--transition);
  pointer-events: none;
}

.copy-btn:hover {
  background: rgba(90, 176, 204, 0.15);
  border-color: var(--euphrates);
  color: var(--euphrates-light);
  transform: scale(1.1);
  box-shadow: 0 0 14px var(--euphrates-glow);
}

.copy-btn.copied {
  background: rgba(5, 150, 105, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(5, 150, 105, 0.3);
  animation: copy-pulse 0.4s ease;
}

@keyframes copy-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  100% { transform: scale(1.08); }
}

/* Toast notification */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-family: var(--font-ar);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* No results */
.no-results {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
  display: none;
}

.no-results svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.4; }

/* --- Animations --- */
@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .main-content { padding: 2.5rem 1rem 4rem; }
  .header-inner { padding: 0.75rem 0; }
  .site-title-ar { font-size: 0.9rem; }
  .modules-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; gap: 1rem; }
  .stat-divider { width: 50px; height: 1px; }
  .hero-title { font-size: 2rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .dir-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .header-badge { align-self: flex-end; }
}
