/* =========================================================
   1. פריסת עמוד וטבלאות (ההגדרות הקיימות שלך)
   ========================================================= */

/* הרחבת העמוד כך שינצל כמעט את כל רוחב המסך */
.md-grid {
  max-width: 85%;
}

/* ביטול תוכן העניינים בצד שמאל (אם תרצה להשאיר אותו אחרי ההרחבה, פשוט מחק את 3 השורות האלו) */
.md-sidebar--secondary {
  display: none;
}

/* יישור לימין ו-RTL לכל התאים והכותרות בטבלאות */
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  direction: rtl !important;
  text-align: right !important;
}

/* =========================================================
   2. הגנת LTR לנוסחאות מתמטיות (MathJax) ולקוד/נוסחאות אקסל
   ========================================================= */

/* מונע היפוך כיוון של נוסחאות מתמטיות בתוך טקסט וטבלאות RTL */
.arithmatex,
mjx-container {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ממרכז נוסחאות בלוק ($$...$$) ומונע גלישה אופקית */
mjx-container[display="true"] {
  display: block !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.4em 0;
}

/* מונע היפוך של נוסחאות אקסל, מספרים וקוד בגרש בודד (`=IF(...)`, `A3 < 30`) */
.md-typeset code {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

.md-typeset pre {
  direction: ltr !important;
  text-align: left !important;
}

.md-typeset blockquote code {
  display: inline-block;
  text-align: left;
}