/* DZ School – extras: language switcher, contact form, FAQ, level cards */
.dzs-topbar-side { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* Language switcher */
.dzs-lang { display: flex; gap: 6px; align-items: center; }
.dzs-lang a { color: #93c5fd; text-decoration: none; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.dzs-lang a:hover { color: #fff; }
.dzs-lang a.is-on { color: #fff; background: rgba(255, 255, 255, .15); text-decoration: underline; }

/* Level cards on the front page */
.dzs-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.dzs-level { background: var(--card); border-radius: var(--r); padding: 28px 22px; text-decoration: none; box-shadow: var(--shadow); border-top: 5px solid var(--lc, var(--blue)); transition: transform .2s; display: flex; flex-direction: column; gap: 8px; }
.dzs-level:hover { transform: translateY(-5px); }
.dzs-level-ico { font-size: 2.4rem; }
.dzs-level h3 { margin: 0; }
.dzs-level-go { color: var(--blue); font-weight: 700; font-size: .95rem; }

/* Contact form */
.dz-form p { margin: 0 0 14px; }
.dz-form label { font-weight: 700; }
.dz-form input[type=text], .dz-form input[type=email], .dz-form input[type=number], .dz-form textarea {
    width: 100%; max-width: 560px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
    font: inherit; background: #fff; color: var(--text); }
.dz-form input:focus, .dz-form textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.dzc-math { max-width: 120px !important; }
.dzc-hp { position: absolute !important; right: -9999px !important; left: auto; }
.dzs-en .dzc-hp { right: auto !important; left: -9999px !important; }
.dzc-err { color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; padding: 10px 14px; border-radius: 12px; }

/* FAQ accordion */
.dz-faq-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; background: #fff; }
.dz-faq-item summary { cursor: pointer; font-size: 1.05rem; }
.dz-faq-item summary::-webkit-details-marker { display: none; }
.dz-faq-item summary::before { content: '＋'; color: var(--blue); font-weight: 800; margin-inline-end: 8px; }
.dz-faq-item[open] summary::before { content: '－'; }
.dz-faq-item p { margin: 10px 0 4px; color: var(--muted); }
/* ========== منطقة المرح: ألعاب + عالم مفرفش ========== */
.dzs-fun-zone {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}
.dzs-fun-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, rgba(239, 68, 68, .18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 85% 70%, rgba(124, 58, 237, .22), transparent 55%);
  pointer-events: none;
}
.dzs-fun-zone .dzs-container { position: relative; z-index: 1; }

.dzs-fun-head { text-align: center; margin-bottom: 28px; }
.dzs-fun-badge {
  display: inline-block;
  background: rgba(239, 68, 68, .2);
  color: #fca5a5;
  font-weight: 800;
  font-size: .9rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, .35);
  margin-bottom: 12px;
}
.dzs-fun-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: center;
  align-items: center;
}
.dzs-fun-and { color: #94a3b8; font-weight: 600; }
.dzs-fun-sub {
  margin: 0 auto;
  max-width: 520px;
  color: #cbd5e1;
  font-size: 1.05rem;
}

/* وميض أحمر للعناوين */
.dzs-fun-pulse {
  color: #fecaca;
  animation: dzs-fun-blink 1.4s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(239, 68, 68, .55);
}
.dzs-fun-pulse--mw {
  color: #e9d5ff;
  animation-name: dzs-fun-blink-mw;
  text-shadow: 0 0 12px rgba(167, 139, 250, .55);
}
@keyframes dzs-fun-blink {
  0%, 100% { color: #fecaca; text-shadow: 0 0 8px rgba(239, 68, 68, .4); opacity: 1; }
  50% { color: #ef4444; text-shadow: 0 0 18px rgba(239, 68, 68, .85), 0 0 28px rgba(239, 68, 68, .4); opacity: .92; }
}
@keyframes dzs-fun-blink-mw {
  0%, 100% { color: #e9d5ff; text-shadow: 0 0 8px rgba(167, 139, 250, .4); opacity: 1; }
  50% { color: #a78bfa; text-shadow: 0 0 18px rgba(167, 139, 250, .9), 0 0 28px rgba(124, 58, 237, .45); opacity: .92; }
}

.dzs-fun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.dzs-fun-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, border-color .2s, background .2s;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}
.dzs-fun-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, .45);
  background: rgba(255, 255, 255, .1);
}
.dzs-fun-card--mw:hover { border-color: rgba(167, 139, 250, .5); }
.dzs-fun-card-ico { font-size: 2.4rem; line-height: 1; }
.dzs-fun-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}
.dzs-fun-card p {
  margin: 0;
  color: #94a3b8;
  font-size: .95rem;
  flex: 1;
}
.dzs-fun-cta {
  display: inline-block;
  margin-top: 6px;
  font-weight: 800;
  color: #fca5a5;
  font-size: .95rem;
}
.dzs-fun-card--mw .dzs-fun-cta { color: #c4b5fd; }

/* لمحة بصرية لعالم مفرفش (CSS art) */
.dzs-mw-preview {
  position: relative;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 2px solid rgba(167, 139, 250, .35);
  box-shadow: inset 0 -20px 30px rgba(0, 0, 0, .25);
}
.dzs-mw-sky {
  position: absolute;
  inset: 0 0 38% 0;
  background: linear-gradient(180deg, #38bdf8 0%, #7dd3fc 60%, #bae6fd 100%);
}
.dzs-mw-sky::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 18%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 16px #facc15;
}
.dzs-mw-ground {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48%;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 40%, #854d0e 40%, #a16207 100%);
}
.dzs-mw-block {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #78716c;
  border: 1px solid #57534e;
  bottom: 42%;
  box-shadow: 2px 2px 0 rgba(0,0,0,.2);
}
.dzs-mw-block.b1 { left: 12%; background: #a8a29e; }
.dzs-mw-block.b2 { left: 22%; height: 28px; bottom: 42%; background: #78716c; }
.dzs-mw-block.b3 { left: 32%; background: #57534e; }
.dzs-mw-block.b4 { right: 28%; width: 22px; height: 22px; background: #22c55e; border-color: #16a34a; }
.dzs-mw-tree {
  position: absolute;
  left: 55%;
  bottom: 40%;
  width: 10px;
  height: 28px;
  background: #854d0e;
}
.dzs-mw-tree::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #15803d;
  box-shadow: -10px 6px 0 #166534, 10px 8px 0 #14532d;
}
.dzs-mw-player {
  position: absolute;
  right: 14%;
  bottom: 44%;
  width: 14px;
  height: 22px;
  background: #f97316;
  border-radius: 3px 3px 0 0;
  animation: dzs-mw-bob 1.8s ease-in-out infinite;
}
.dzs-mw-player::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fdba74;
}
@keyframes dzs-mw-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.dzs-mw-label {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, .55);
  padding: 2px 8px;
  border-radius: 6px;
}

/* أزرار كبيرة */
.dzs-fun-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.dzs-btn-fun {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 800 !important;
  padding: 14px 26px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, .35);
  transition: transform .15s, box-shadow .15s;
}
.dzs-btn-fun:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, .5);
}
.dzs-btn-fun--mw {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, .35);
}
.dzs-btn-fun--mw:hover {
  box-shadow: 0 12px 28px rgba(124, 58, 237, .5);
}

/* بطاقات الصفحة الرئيسية القابلة للنقر */
a.dzs-fun-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.dzs-fun-card-link .dzs-level-go {
  display: inline-block;
  margin-top: 10px;
  color: #16a34a;
  font-weight: 800;
}
a.dzs-fun-card-link[style*="#7c3aed"] .dzs-level-go { color: #7c3aed; }

/* روابط القائمة الافتراضية */
.dzs-nav-fun {
  color: #ef4444 !important;
  font-weight: 800 !important;
}
.dzs-nav-fun--mw { color: #7c3aed !important; }

@media (max-width: 640px) {
  .dzs-fun-zone { padding: 36px 0 44px; }
  .dzs-mw-preview { height: 100px; }
  .dzs-fun-actions .dzs-btn { width: 100%; text-align: center; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .dzs-fun-pulse,
  .dzs-fun-pulse--mw,
  .dzs-mw-player { animation: none !important; }
}

/* لقطات حقيقية بدل الرسم CSS */
.dzs-fun-shot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 2px solid rgba(255, 255, 255, .15);
  background: #0f172a;
  aspect-ratio: 16 / 9;
}
.dzs-fun-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.dzs-fun-card:hover .dzs-fun-shot img {
  transform: scale(1.04);
}
.dzs-fun-card--mw .dzs-fun-shot {
  border-color: rgba(167, 139, 250, .4);
}
.dzs-fun-card--games .dzs-fun-shot {
  border-color: rgba(239, 68, 68, .35);
}

/* القائمة العلوية: سطر واحد + خط أصغر على سطح المكتب */
@media (min-width: 1001px) {
  .dzs-header-in {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 52px !important;
    padding-block: 4px !important;
  }
  .dzs-logo {
    flex: 0 0 auto !important;
    max-width: 160px;
    gap: 6px !important;
  }
  .dzs-logo-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.15rem !important;
  }
  .dzs-logo-text {
    font-size: .95rem !important;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dzs-nav,
  .dzs-header-in .dzs-nav {
    display: flex !important;
    position: static !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: flex-start !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    transform: none !important;
    height: auto !important;
  }
  .dzs-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* سطر واحد فقط */
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0 1px !important;
    width: 100% !important;
    max-width: none !important;
    overflow-x: auto !important; /* احتياطي نادر إن زاد العدد جداً */
    overflow-y: hidden !important;
    scrollbar-width: none;
  }
  .dzs-menu::-webkit-scrollbar { display: none; }
  .dzs-menu > li {
    flex: 0 0 auto !important;
    position: relative;
  }
  .dzs-menu > li > a {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    max-width: none !important;
    min-height: 30px !important;
    padding: .22rem .38rem !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .dzs-menu > li > a:hover,
  .dzs-menu .current-menu-item > a,
  .dzs-menu .current_page_item > a {
    background: var(--blue-l, #dbeafe) !important;
    color: var(--blue, #2563eb) !important;
  }
  .dzs-burger { display: none !important; }
}

/* أجهزة بين 701 و 1000: سطر واحد مضغوط أيضاً */
@media (min-width: 701px) and (max-width: 1000px) {
  .dzs-header-in {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    min-height: 48px !important;
    padding-block: 2px !important;
  }
  .dzs-logo-text {
    font-size: .88rem !important;
    max-width: 90px;
  }
  .dzs-logo-mark {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
  }
  .dzs-nav,
  .dzs-header-in .dzs-nav {
    display: flex !important;
    position: static !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    transform: none !important;
    height: auto !important;
    max-height: none !important;
  }
  .dzs-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }
  .dzs-menu::-webkit-scrollbar { display: none; }
  .dzs-menu > li > a {
    white-space: nowrap !important;
    max-width: none !important;
    min-height: 28px !important;
    padding: .18rem .28rem !important;
    font-size: .7rem !important;
    border: 0 !important;
    background: transparent !important;
  }
  .dzs-burger { display: none !important; }
}


/* الجوال فقط: قائمة منسدلة */
@media (max-width: 700px) {
  .dzs-burger { display: block !important; }
  .dzs-nav,
  .dzs-header-in .dzs-nav {
    display: none;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: min(88vw, 390px) !important;
    height: 100dvh !important;
    max-height: none !important;
    padding: 82px 18px 28px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--card, #fff) !important;
    box-shadow: -18px 0 55px rgba(2,6,23,.24) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    z-index: 160 !important;
  }
  .dzs-nav.is-open {
    display: block !important;
    transform: translateX(0) !important;
  }
  .dzs-menu {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .dzs-menu > li > a {
    width: 100% !important;
    max-width: none !important;
    min-height: 48px !important;
    justify-content: flex-start !important;
    white-space: normal !important;
    font-size: .98rem !important;
    padding: .65rem .85rem !important;
  }
}
/* تأكيد: الشريط يستخدم كامل العرض ولا يُقص أي رابط */
.dzs-header .dzs-container {
  max-width: 1400px;
  width: 100%;
}
@media (min-width: 1001px) {
  .dzs-header-in {
    min-height: 64px !important;
  }
  /* إن امتلأت الصف الأول تنتقل للثاني بدل الاختفاء */
  .dzs-menu > li > a {
    line-height: 1.25 !important;
  }
}

/* قائمة المزيد — الروابط الزائدة */
.dzs-nav-more {
  position: relative;
  flex: 0 0 auto !important;
}
.dzs-nav-more > a {
  font-weight: 800 !important;
  color: var(--blue, #2563eb) !important;
}
.dzs-nav-more .dzs-nav-more-list,
.dzs-nav-more > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  min-width: 200px;
  max-width: min(320px, 90vw);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 8px;
  margin: 4px 0 0;
  list-style: none;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  z-index: 200;
}
[dir="rtl"] .dzs-nav-more .dzs-nav-more-list,
[dir="rtl"] .dzs-nav-more > .sub-menu {
  left: auto;
  right: 0;
}
.dzs-nav-more.is-open > .sub-menu,
.dzs-nav-more.is-open .dzs-nav-more-list,
.dzs-nav-more:hover > .sub-menu {
  display: block;
}
.dzs-nav-more .sub-menu a {
  display: block !important;
  white-space: normal !important;
  padding: .55rem .75rem !important;
  font-size: .88rem !important;
  min-height: auto !important;
  border-radius: 8px;
}
.dzs-nav-more .sub-menu a:hover {
  background: var(--blue-l, #dbeafe) !important;
  color: var(--blue, #2563eb) !important;
}
@media (max-width: 700px) {
  .dzs-nav-more { display: none !important; }
}
