/* === ENT Mobile RTL Pack – Front === */

/* قاعدة عامة تمنع التمرير الأفقي وتضمن احتواء العناصر */
html, body { max-width: 100vw; overflow-x: hidden; }
* { box-sizing: border-box; }

/* الصور والجداول */
img, video, iframe { max-width: 100%; height: auto; }
table { width: 100%; border-collapse: collapse; }
.table-wrap, .wp-block-table { overflow-x:auto; -webkit-overflow-scrolling: touch; }

/* النصوص الطويلة وروابط */
a, .tile a, .chapter-card a { text-decoration: none !important; }
.title, .subtitle, .subtitle-en, .tile .title, .tile .subtitle, .chapter-card .subtitle {
  overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
  text-decoration: none !important;
}
/* منع هوامش سالبة قد تسبب تمدد العرض على موبايل */
.subtitle-en, .tile .subtitle, .chapter-card .subtitle {
  margin-inline: 0 !important;
  padding-inline: clamp(8px, 3vw, 18px) !important;
}

/* حشوات وبوردارات البلاطات */
.tile, .chapter-card {
  border-radius: 20px;
  padding: clamp(14px, 2.5vw, 22px) !important;
  background: linear-gradient(180deg, #0b001e, #005256);
  color: #d5daed;
}

/* عنوان البلاطة */
.title-wrap { padding-inline: clamp(10px, 4vw, 24px) !important; text-align: center; }
.tile .title { font-weight: 700; font-size: clamp(18px, 4vw, 24px); }
.tile .subtitle { font-weight: 600; font-size: clamp(14px, 3.2vw, 18px); color: var(--neon, #21c8ff); }

/* شبكة البطاقات على موبايل */
@media (max-width: 480px) {
  .main.container, .main-container, .site-content, .content, .container { width: 100%; padding-inline: 12px; }
  .div.grid, .grid, .cards, .chapters-grid {
    display: grid; grid-template-columns: 1fr !important; gap: 14px !important;
  }
  .tile, .chapter-card { margin: 0 !important; }
}

/* تابات/أزرار/مدخلات قابلة للمس (44px) */
button, .button, input[type=submit], .mcq-option, .tile .btn, .pill {
  min-height: 44px; line-height: 1.2;
}

/* تحسينات شاشة الأسئلة (تقدير أسماء محتملة للكلاسات) */
.mcq, .mcq-wrapper, .quiz, .quiz-wrapper { width: 100%; }
.mcq .question, .quiz .question { font-size: clamp(16px, 3.8vw, 20px); }
.mcq .options li, .quiz .options li { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; }
.mcq .options li input { transform: scale(1.15); }
.progress, .quiz-progress { position: sticky; top: 0; z-index: 5; }

/* ألوان الروابط ضمن البلاطات */
.tile .subtitle a, .chapter-card .subtitle a, .subtitle-en a { color: inherit !important; text-decoration: none !important; }
