/*
Theme Name: M.H Handasa
Theme URI: https://example.com/mh-handasa
Description: תבנית וורדפרס עבור "מ.ח הנדסה", משאיות מנוף, פינוי פסולת, פסולת בניין, גזם וגרוטאות. תבנית מותאמת RTL, מהירה, עם נתונים מובנים (Schema) ותקני SEO/נגישות.
Author: DGI Labs
Author URI: https://dgi-labs.com
Version: 2.6.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mh-handasa
Tags: rtl-language-support, custom-logo, custom-menu, translation-ready, threaded-comments
*/

/*
 * קובץ זה נטען בכל עמוד ומכיל רק את בסיס העיצוב המשותף (reset + טיפוגרפיה).
 * העיצוב הייחודי של כל עמוד נטען מקובץ ה-CSS הייעודי שלו תחת assets/css/.
 */

:root {
  --red: #c50c21;
  --burgundy: #920a1b;
  --ink: #07121f;
  --muted: #66707b;
  --line: #f1d8d9;
  --cream: #fff9f8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; color: var(--ink); font-family: Heebo, Arial, sans-serif; background: #fff; overflow-x: clip; max-width: 100%; }
/* מניעת גלילה אופקית, על בלוקים רגילים (לא root), כי iOS Safari מתעלם מ-overflow על html/body.
   clip בלבד על ההדר כדי לא לחתוך את תפריט המובייל הנפתח (אנכי). */
#content, .mh-ftr { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
.header { overflow-x: clip; }
a { text-decoration: none; color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

/* קישור דילוג לתוכן, נגישות */
.skip-link {
  position: absolute; right: 0; top: 0; z-index: 1000;
  transform: translateY(-200%);
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

/* כפתור חיוג בכותרת, עיצוב בסיס אחיד לכל הדפים (מונע שבירה כשחסר כלל בדף מסוים) */
.phone-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(115deg, #e0001a, #870719);
  color: #fff;
  border-radius: 40px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(170, 8, 37, .16);
}
.phone-pill svg { width: 17px; height: 17px; fill: #fff; flex: 0 0 auto; }
.phone-pill b { font-weight: 900; }

/* ===== הדר, פריסה בסיסית גלובלית =====
   נדרשת בכל עמוד שלא טוען CSS ייעודי (נגישות, פרטיות, בלוג, פוסטים, 404),
   אחרת ההדר מתפרק: הניווט נדבק וה-phone-pill נמתח לרוחב מלא. */
.header { height: 82px; position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 2px 16px #1620310b; }
.header-inner { height: 100%; max-width: 1550px; margin: auto; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-size: 14px; font-weight: 800; position: relative; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--red); }
.nav a.active:after { content: ""; position: absolute; bottom: -12px; right: calc(50% - 3px); width: 7px; height: 7px; background: var(--red); border-radius: 50%; }
.header-contact { display: flex; align-items: center; gap: 14px; }
.header-contact > span { font-size: 12px; font-weight: 800; text-align: right; line-height: 1.35; }
.header-contact small { display: block; color: var(--red); font-size: 11px; }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 1px solid #f2d7d9; border-radius: 10px; background: #fff; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; }
.menu-toggle span { display: block; width: 21px; height: 2px; background: var(--red); border-radius: 2px; }
@media (max-width: 850px) {
  .header { height: 72px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .menu-toggle { display: flex; order: -1; }
  .header-contact { margin-right: auto; }
  /* תפריט מובייל נפתח - אחיד בכל הדפים (מנצח כללי עמוד). top:100% נצמד להדר בכל גובה. */
  .nav { display: none; position: absolute; top: 100% !important; left: 0 !important; right: 0 !important; background: #fff !important; padding: 12px 20px 16px !important; box-shadow: 0 15px 24px rgba(0,0,0,.13) !important; flex-direction: column !important; align-items: stretch !important; gap: 0 !important; z-index: 45 !important; }
  .nav.open { display: flex !important; }
  .nav a { padding: 14px 4px !important; border-bottom: 1px solid #f1eaea !important; font-size: 15px !important; font-weight: 800 !important; }
  .nav a:last-child { border-bottom: 0 !important; }
  .nav a.active:after { display: none !important; }
  .phone-pill { padding: 10px 14px; font-size: 13px; }
}
@media (max-width: 560px) {
  .header-contact > span { display: none; }
  .phone-pill { font-size: 12px; padding: 9px 12px; }
  .phone-pill svg { display: none; }
}

/* כפתורים צפים קבועים (חיוג + וואטסאפ), תחתית שמאל */
.mh-fab {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mh-fab-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mh-fab-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 15px 32px rgba(0, 0, 0, .34); }
.mh-fab-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mh-fab-call { background: linear-gradient(135deg, #e0001a, #920a1b); }
.mh-fab-wa { background: #25d366; }
.mh-fab-btn svg { width: 27px; height: 27px; }
.mh-fab-wa svg { width: 30px; height: 30px; }

/* תווית שמופיעה בריחוף, מימין לכפתור */
.mh-fab-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #11141b;
  color: #fff;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  transition: opacity .2s ease, transform .2s ease;
}
.mh-fab-btn:hover .mh-fab-label,
.mh-fab-btn:focus-visible .mh-fab-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
@media (max-width: 680px) {
  .mh-fab { left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .mh-fab-btn { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* קישורי פוטר (נגישות / פרטיות) */
.copyright{ display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; justify-content:space-between; }
.copyright-links{ display:flex; gap:16px; flex-wrap:wrap; }
.copyright-links a{ color:#cdd2da; }
.copyright-links a:hover{ color:#fff; text-decoration:underline; }

/* ===================== ווידג'ט נגישות ===================== */
.mh-a11y{ position:fixed; right:calc(18px + env(safe-area-inset-right, 0px)); bottom:calc(18px + env(safe-area-inset-bottom, 0px)); z-index:950; }
.mh-a11y-toggle{
  width:52px; height:52px; border-radius:50%;
  background:#1b56d6; color:#fff; border:2px solid #fff;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 10px 26px rgba(0,0,0,.3);
  transition:transform .2s ease, box-shadow .2s ease;
}
.mh-a11y-toggle svg{ width:30px; height:30px; display:block; }
.mh-a11y-toggle:hover{ transform:scale(1.07); }
.mh-a11y-toggle:focus-visible{ outline:3px solid #1b56d6; outline-offset:3px; }
.mh-a11y-panel{
  position:absolute; right:0; bottom:64px;
  width:min(270px, calc(100vw - 32px)); background:#fff; border-radius:16px;
  box-shadow:0 22px 54px rgba(0,0,0,.28);
  padding:14px; direction:rtl; text-align:right;
  border:1px solid #eee;
}
.mh-a11y-panel[hidden]{ display:none; }
.mh-a11y-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.mh-a11y-head strong{ font-size:16px; color:#0b1622; }
.mh-a11y-close{ border:none; background:#f3f4f6; width:30px; height:30px; border-radius:50%; font-size:20px; line-height:1; cursor:pointer; color:#333; }
.mh-a11y-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mh-a11y-grid button{
  display:flex; flex-direction:column; align-items:center; gap:5px;
  padding:11px 6px; border:1px solid #e6e8ec; border-radius:11px;
  background:#fafbfc; color:#0b1622; font-size:12px; font-weight:700; cursor:pointer;
  transition:background .15s ease, border-color .15s ease;
}
.mh-a11y-grid button span{ font-size:17px; font-weight:900; color:#1b56d6; }
.mh-a11y-grid button:hover{ background:#eef2ff; border-color:#1b56d6; }
.mh-a11y-grid button.is-on{ background:#1b56d6; color:#fff; border-color:#1b56d6; }
.mh-a11y-grid button.is-on span{ color:#fff; }
.mh-a11y-grid button:focus-visible,
.mh-a11y-reset:focus-visible,
.mh-a11y-close:focus-visible{ outline:3px solid #1b56d6; outline-offset:2px; }
.mh-a11y-reset{
  width:100%; margin-top:10px; padding:10px; border:none; border-radius:11px;
  background:#11141b; color:#fff; font-weight:800; font-size:13px; cursor:pointer;
}
.mh-a11y-statement{ display:block; text-align:center; margin-top:10px; font-size:12.5px; color:#1b56d6; font-weight:700; }

/* ---- מצבי נגישות המופעלים על <html> ---- */
html.a11y-contrast body,
html.a11y-contrast body *:not(.mh-a11y):not(.mh-a11y *):not(img):not(svg):not(svg *):not(video){
  background-color:#000 !important;
  color:#fff !important;
  border-color:#777 !important;
  box-shadow:none !important;
}
html.a11y-contrast a:not(.mh-a11y *){ color:#ff0 !important; text-decoration:underline !important; }
html.a11y-links a:not(.mh-a11y *){ text-decoration:underline !important; font-weight:800 !important; outline:1px dashed currentColor; outline-offset:2px; }
html.a11y-readable body,
html.a11y-readable body *:not(.mh-a11y):not(.mh-a11y *){
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif !important;
  letter-spacing:.3px !important;
}
html.a11y-grayscale{ filter:grayscale(100%); }

/* ===== בלוק "שירות נוסף על אותה נסיעה" (Upsell) ===== */
.mh-upsell{grid-column:1/-1;background:#fff6f6;border:1px solid #f1dede;border-radius:14px;padding:14px 16px;margin:4px 0}
.mh-upsell-title{display:block;font-weight:900;font-size:14px;color:#07121f}
.mh-upsell-note{display:block;color:#7d6a6a;font-size:12px;margin:3px 0 10px;line-height:1.5}
.mh-upsell-options{display:grid;gap:8px}
.mh-upsell-options label{display:flex;align-items:flex-start;gap:9px;font-size:13px;font-weight:600;cursor:pointer;background:#fff;border:1px solid #eedcdc;border-radius:10px;padding:9px 11px;transition:border-color .15s,background .15s;width:100%}
.mh-upsell-options label:hover{border-color:#c50c21}
.mh-upsell-options input{margin:2px 0 0;accent-color:#c50c21;width:16px;height:16px;flex:none}
.mh-upsell-options label:has(input:checked){background:#fff0f1;border-color:#c50c21}

/* שדה honeypot נסתר (הגנת ספאם) */
.mh-hp{position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;padding:0!important;margin:0!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important}

/* ===== סקשן וידאו - הצי בפעולה (בית + גלריה) ===== */
.mh-video{ padding:92px 28px; background:#fff; }
.mh-video-inner{ max-width:1100px; margin:0 auto; }
.mh-video-head{ text-align:center; margin-bottom:34px; }
.mh-video-kicker{ display:inline-flex; align-items:center; gap:7px; color:var(--red); font-size:13px; font-weight:900; letter-spacing:.4px; }
.mh-video-head h2{ font-size:clamp(32px,4vw,52px); line-height:1.14; letter-spacing:-1px; margin:12px 0 10px; font-weight:900; color:#0b1622; }
.mh-video-head h2 span{ color:var(--red); }
.mh-video-head p{ color:#67707b; font-size:16px; line-height:1.8; max-width:560px; margin:0 auto; }
.mh-video-frame{ position:relative; border-radius:20px; overflow:hidden; box-shadow:0 26px 60px rgba(43,23,32,.22); background:#000; aspect-ratio:16/9; }
.mh-video-frame video{ width:100%; height:100%; display:block; object-fit:cover; }
@media(max-width:560px){ .mh-video{ padding:60px 17px; } .mh-video-frame{ border-radius:14px; } .mh-video-head{ margin-bottom:24px; } }

/* כותרת קטנה מעל שורת היתרונות בהירו */
.hero .hero-copy .trust-title{ font-size:15px; font-weight:900; color:#c50c21 !important; letter-spacing:.3px; margin:22px 0 4px !important; display:block; }
.hero .hero-copy .trust-sub{ font-size:14px; color:#5c6570 !important; line-height:1.5; margin:0 0 9px !important; display:block; max-width:360px; }
.hero .hero-copy .trust-sub + .trust-row{ margin-top:0 !important; }

/* ===== רצועת CTA דביקה בתחתית (מובייל/טאבלט) ===== */
.mh-cta-bar{ display:none; }
@media (max-width: 900px){
  .mh-cta-bar{ display:flex; position:fixed; left:0; right:0; bottom:0; z-index:960; box-shadow:0 -5px 20px rgba(0,0,0,.2); padding-bottom:env(safe-area-inset-bottom,0px); }
  .mh-cta-bar-call{ flex:1; display:flex; align-items:center; justify-content:center; gap:10px; background:var(--red); color:#fff; padding:13px 10px; text-decoration:none; }
  .mh-cta-bar-call svg{ width:22px; height:22px; fill:#fff; flex:none; }
  .mh-cta-bar-rotate{ position:relative; display:inline-block; overflow:hidden; }
  .mh-cta-rot-sizer{ visibility:hidden; white-space:nowrap; font-size:clamp(13.5px,3.7vw,16px); font-weight:900; }
  .mh-cta-rot{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; white-space:nowrap; font-size:clamp(13.5px,3.7vw,16px); font-weight:900; opacity:0; animation:mh-cta-rotate 8s infinite; }
  .mh-cta-rot-2{ animation-delay:4s; }
  @keyframes mh-cta-rotate{ 0%{opacity:0;transform:translateY(6px)} 6%{opacity:1;transform:translateY(0)} 44%{opacity:1;transform:translateY(0)} 50%{opacity:0;transform:translateY(-6px)} 100%{opacity:0;transform:translateY(-6px)} }
  @media (prefers-reduced-motion:reduce){ .mh-cta-rot{ animation:none } .mh-cta-rot-1{ opacity:1 } }
  /* מרימים את ווידג'ט הנגישות ואת כפתורי הפינה מעל הרצועה */
  .mh-a11y{ bottom:calc(74px + env(safe-area-inset-bottom,0px)) !important; }
  .mh-fab{ bottom:calc(74px + env(safe-area-inset-bottom,0px)) !important; }
}

/* הגדלת פונט הכותרת, התיאור ו-4 הנקודות בהירו (נייח + מובייל) */
.hero .hero-copy .trust-row{ font-size:13px !important; }
.hero .hero-copy .trust-row i{ font-size:19px !important; }
@media (max-width: 680px){
  .hero .hero-copy .trust-title{ font-size:21px !important; }
  .hero .hero-copy .trust-sub{ font-size:15.5px !important; max-width:none; }
  .hero .hero-copy .trust-row{ font-size:14.5px !important; line-height:1.35; gap:14px 14px !important; }
  .hero .hero-copy .trust-row i{ font-size:22px !important; }
}

/* תת-כותרת מתחת ל-eyebrow בהירו */
.hero .hero-copy .eyebrow-sub{ display:block !important; width:100%; flex-basis:100%; margin:9px 0 0 !important; font-size:13.5px; font-weight:700; color:#5c6570; line-height:1.5; clear:both; }
@media (max-width: 680px){ .hero .hero-copy .eyebrow-sub{ font-size:14.5px; } }

/* המבורגר אחיד בכל הדפים - 3 פסים מופרדים (מנצח כללי עמוד שהדביקו אותם) */
@media (max-width: 900px){
  .header .menu-toggle{ display:flex !important; flex-direction:column !important; justify-content:center !important; align-items:center !important; gap:5px !important; width:42px !important; height:42px !important; min-width:42px !important; padding:0 !important; background:#fff !important; border:1px solid #f2d7d9 !important; border-radius:10px !important; font-size:0 !important; line-height:0 !important; order:-1 !important; cursor:pointer !important; }
  .header .menu-toggle span{ display:block !important; width:21px !important; height:2px !important; min-height:2px !important; background:var(--red) !important; border-radius:2px !important; margin:0 !important; }
}