/* ============================================================================
   Hayaanshufiya — מעטפת העמוד
   ============================================================================

   כותרת, ניווט, פוטר, ורוחב העמוד. הקובץ הזה נולד מכך שכתבתי את אותם מאה
   שורות פעמיים — פעם ב‑pricing-page.php ופעם ב‑guide-page.php — ואז גיליתי
   שהם כבר לא זהים. מעטפת שמועתקת מתפצלת; מעטפת אחת לא יכולה.

   תלוי ב‑tokens.css ו‑components.css. תחום ל‑.hay כמוהם.
   נטען דרך wp_enqueue_style( 'hayaan-page' ) או דרך hayaan_page_head().
   ========================================================================= */

/* ── המסמך ─────────────────────────────────────────────────────────────
   ‎.hay מאפס את השוליים של עצמו, אבל ‎body שמעליו נשאר עם 8px של ברירת
   המחדל של הדפדפן. בבהיר זה נראה כמו ריווח מכוון; בכהה זו מסגרת לבנה
   בעובי 8px מסביב לעמוד ‎#17120E, כי גם ‎html וגם ‎body שקופים ולכן הקנבס
   נצבע בלבן של ה‑UA. הלוח מגדיר ‎body { margin: 0 } ומצייר עליו את הרקע;
   שתי השורות האלה פשוט לא עברו איתו.

   ‎body ולא ‎.hay body — הגיליון הזה נטען אך ורק מ‑hayaan_page_head(),
   כלומר רק על המסמכים שהמעטפת עצמה מרכיבה. ההיקף כאן הוא הטעינה, לא
   הסלקטור. הטוקן הוא הסמנטי ולא הכינוי: ‎--bg תחום ל‑.hay ולא נפתר על
   ‎body. */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

/* עמוד עריכותי מחויב לאור — אין בקנבס וריאנט כהה לאף אחד מהלוחות
   האלה. ‎.hay-ed כבר ממפה את כל אוצר המילים הסמנטי אל הנייר, אבל ‎body
   נמצא מעליו ולכן ממשיך לקרוא את ‎--color-bg מ‑:root. פרימיטיב ולא
   טוקן סמנטי, בדיוק כדי שלא יתהפך. */
body.hay-paper {
  background: var(--sand-50);
  color: var(--sand-950);
}

/* ── כותרת ─────────────────────────────────────────────────────────────── */
.hay .page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
/* min-height 44: זהו קישור, ובגובה הטבעי שלו (28px) הוא נופל מתחת לרצפת
   מטרת המגע. inline-flex ממרכז את הכיתוב בתוך הגובה הגדול יותר. */
.hay .brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-size: 1.125rem; font-weight: 800; color: var(--text);
}
.hay .brand:hover { text-decoration: none; }
.hay .brand > span { color: var(--primary-deep); display: inline-flex; }
.hay .page-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hay .head-ctas { display: flex; align-items: center; gap: 10px; }

/* ── גוף ───────────────────────────────────────────────────────────────── */
.hay { min-height: 100vh; display: flex; flex-direction: column; }
.hay .wrap  { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hay .stack { display: flex; flex-direction: column; gap: 28px; padding-block: 44px; }

.hay .lead { display: flex; flex-direction: column; align-items: center;
             gap: 12px; text-align: center; }
.hay .lead h1 { font-size: 2.625rem; font-weight: 800; line-height: 1.18; margin: 0; }
.hay .lead p  { font-size: 1rem; color: var(--muted); line-height: 1.7;
                max-width: 560px; margin: 0; }

.hay .sec-head { text-align: center; }
.hay .sec-head h2 { font-size: 1.625rem; font-weight: 700; margin: 0; }
.hay .sec-head p  { font-size: 0.875rem; color: var(--muted); margin: 6px 0 0; }

/* ── פוטר ──────────────────────────────────────────────────────────────── */
.hay .page-foot {
  margin-top: auto; border-top: 1px solid var(--line-soft);
  background: var(--surface); padding: 40px 0 28px;
}
.hay .foot-grid { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.hay .foot-brand { max-width: 300px; }
.hay .foot-brand p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; margin: 12px 0 0; }
.hay .foot-col h4 { font-size: 0.875rem; font-weight: 700; margin: 0 0 10px; }
/* gap 0 ולא 10: הגובה של 44px כבר מפריד בין השורות, ו‑gap נוסף היה מותח
   את הטור לאורך שלא לצורך. */
.hay .foot-col ul { list-style: none; margin: 0; padding: 0;
                    display: flex; flex-direction: column; gap: 0; }
.hay .foot-col a  { display: flex; align-items: center; min-height: 44px;
                    font-size: 0.875rem; color: var(--muted); }
.hay .foot-col a:hover { color: var(--primary-deep); }
/* --muted ולא --faint: ‎--faint הוא 4.42:1, שעובר את רצפת הרכיב אבל לא את
   זו של טקסט, ושורת הקרדיט היא טקסט. */
.hay .foot-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem; color: var(--muted);
}

/* ── תוכן שנכתב בעורך ──────────────────────────────────────────────────
   עמודים כמו "תנאי שימוש" או "צור קשר" מגיעים מ‑the_content(), כלומר
   HTML שנכתב בעורך ואי אפשר לתת לו מחלקות. הסלקטורים כאן מעצבים אותו
   לפי תג, בתוך .entry בלבד. */
.hay .entry { max-width: 68ch; margin: 0 auto; }
.hay .entry > * + * { margin-top: 1.15em; }
.hay .entry h2 { font-size: 1.625rem; font-weight: 800; line-height: 1.3; margin-top: 1.8em; }
.hay .entry h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-top: 1.6em; }
.hay .entry h4 { font-size: 1.0625rem; font-weight: 700; margin-top: 1.4em; }
.hay .entry p, .hay .entry li { font-size: 1.0625rem; line-height: 1.8; color: var(--muted); }
.hay .entry strong { color: var(--text); font-weight: 700; }
.hay .entry ul, .hay .entry ol { padding-inline-start: 22px;
                                 display: flex; flex-direction: column; gap: 6px; }
.hay .entry a { color: var(--primary-deep); text-decoration: underline; }
.hay .entry hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2em 0; }
.hay .entry img { max-width: 100%; height: auto; border-radius: var(--radius-lg, 1rem); }
.hay .entry blockquote {
  margin: 0; padding: 4px 18px; border-inline-start: 3px solid var(--primary);
  color: var(--text);
}
/* טבלה שלא נכנסת גוללת בתוך עצמה, כדי שגוף העמוד לא יזוז לרוחב. */
.hay .entry table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.hay .entry th, .hay .entry td { padding: 10px 12px; text-align: start;
                                 border-bottom: 1px solid var(--line-soft); }
.hay .entry th { font-weight: 700; color: var(--text); }
.hay .entry .table-scroll,
.hay .entry figure.wp-block-table { overflow-x: auto; }

/* ── מובייל ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hay .page-head { padding: 14px 18px; }

  /* ‎flex-wrap על ‎.page-head נתן במובייל כותרת בת שלוש שורות ו‑255px גובה:
     ארבעה פריטי ניווט, מותג וכפתור, כולם עוטפים. ‎HomeMobile.dc.html פותר
     את זה בהשמטת הניווט — מותג מצד אחד, ‎CTA מצד שני, שורה אחת. כאן הניווט
     נשמר כרצועה גוללת בשורה שנייה במקום להיעלם: מסך האפליקציה אינו עמוד
     שיווק, ואין בו תפריט חלופי שהמבקר יכול לפתוח.
     ‎-webkit-overflow-scrolling וה‑scrollbar המוסתר כדי שזה ייראה כרצועה
     ולא כאזור גלילה. */
  /* ‎flex-wrap נשאר wrap: הרצועה זקוקה לשבירה כדי לקבל שורה משלה
     (flex-basis:100%). מה שאסור לעטוף אלה פריטי הניווט עצמם. */
  .hay .page-head { gap: 12px 16px; }
  .hay .brand { flex: 1; min-width: 0; }
  .hay .page-nav {
    order: 3; flex: 1 0 100%;
    flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .hay .page-nav::-webkit-scrollbar { display: none; }
  .hay .page-nav .nav-item { flex: none; white-space: nowrap; font-size: 0.875rem; padding: 6px 12px; }
  .hay .head-ctas { flex: none; display: inline-flex; align-items: center; gap: 6px; }
  .hay .head-ctas .btn { padding: 6px 10px; font-size: 0.8125rem; min-height: 36px; }
  .hay .lead h1   { font-size: 1.875rem; }
  .hay .stack     { padding: 30px 0; gap: 22px; }
  .hay .entry p, .hay .entry li { font-size: 1rem; }
}

/* ── header display controls ───────────────────────────────────────────── */
.header-display-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-subtle, rgba(0,0,0,0.03));
  border: 1px solid var(--color-border, rgba(0,0,0,0.08));
  padding: 4px 8px;
  border-radius: 999px;
  margin-inline-end: 8px;
}
.header-control-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 999px;
  padding: 2px 4px;
}
.header-ctrl-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted, #6B7280);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}
.header-ctrl-btn:hover {
  color: var(--color-text, #111827);
}
.header-ctrl-btn.active {
  background: var(--color-primary, #E07818);
  color: #ffffff !important;
}
.header-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.header-color-dot:hover {
  transform: scale(1.2);
}
.header-color-dot.active {
  border-color: var(--color-text, #111827);
  box-shadow: 0 0 0 1px #ffffff;
}
@media (max-width: 768px) {
  .header-display-controls {
    display: none;
  }
}

/* Combined layout utilities must retain horizontal reading space. */
.hay .wrap.stack { padding-inline: 24px; box-sizing: border-box; }
@media(max-width:600px) { .hay .wrap.stack { padding-inline: 20px; } }
