/* ==========================================================================
   single-blog.css - Mashkanta Guru single-post rebuild (no Tailwind, no CDN).
   Plain CSS custom properties + self-hosted fonts. RTL. Scoped under .mg-blog.
   NOTE: named single-blog.css (not blog.css) because css/blog.css already styles
   the blog listing page (page-templates/blog.php) and must not be clobbered.
   ========================================================================== */

/* ---- Self-hosted fonts (Heebo + Satisfy), replaces Google Fonts ---- */
@font-face{font-family:'Heebo';font-style:normal;font-weight:300;font-display:swap;src:url('../fonts/heebo/heebo-hebrew-300-normal.woff2') format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:300;font-display:swap;src:url('../fonts/heebo/heebo-latin-300-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/heebo/heebo-hebrew-400-normal.woff2') format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/heebo/heebo-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/heebo/heebo-hebrew-500-normal.woff2') format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/heebo/heebo-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/heebo/heebo-hebrew-700-normal.woff2') format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/heebo/heebo-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:900;font-display:swap;src:url('../fonts/heebo/heebo-hebrew-900-normal.woff2') format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;}
@font-face{font-family:'Heebo';font-style:normal;font-weight:900;font-display:swap;src:url('../fonts/heebo/heebo-latin-900-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;}
@font-face{font-family:'Satisfy';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/satisfy/satisfy-latin-400-normal.woff2') format('woff2');}

/* ---- Design tokens ---- */
.mg-blog{
    --brand-dark:#1e3a8a;
    --brand-primary:#1e40af;
    --brand-light:#3b82f6;
    --brand-gold:#b45309;
    --brand-gold-light:#fef3c7;
    --bg-main:#f8fafc;
    --text-dark:#1f2937;
    --text-muted:#4b5563;
    --text-light:#9ca3af;
    --white:#ffffff;
    --radius-sm:4px; --radius-md:8px; --radius-xl:12px; --radius-2xl:16px; --radius-3xl:24px; --radius-full:9999px;
    --shadow-sm:0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-2xl:0 25px 50px -12px rgba(0,0,0,0.25);
    font-family:'Heebo', system-ui, sans-serif;
    direction:rtl;
    color:var(--text-dark);
    line-height:1.625;
    font-size:16px;
    background:var(--bg-main);
}
.mg-blog *{box-sizing:border-box;}
.mg-blog img{max-width:100%; height:auto; display:block;}
.mg-blog a{color:inherit; text-decoration:none;}
.mg-blog :focus-visible{outline:3px solid rgba(59,130,246,.5); outline-offset:2px;}
.mg-blog h1,.mg-blog h2,.mg-blog h3,.mg-blog h4{line-height:1.2; margin:0 0 .5em;}
.mg-container{max-width:1200px; margin:0 auto; padding:0 16px;}

/* ==== SECTION 1 - scroll progress ==== */
.mg-progress{position:fixed; top:0; left:0; right:0; height:6px; background:rgba(0,0,0,0.05); z-index:100;}
.mg-progress__bar{height:100%; width:0; background:var(--brand-light); margin-left:auto; transition:width .1s linear;}

/* ==== SECTION 2 - header ==== */
.mg-header{position:sticky; top:0; z-index:50; background:rgba(255,255,255,.95); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); border-bottom:1px solid #e5e7eb; box-shadow:0 2px 15px -3px rgba(0,0,0,0.07);}
/* Beat injected inline `.mg-header{overflow:hidden!important}` on specificity
   with `header.mg-header` (0,1,1) - see mg-header.css. */
header.mg-header,
header.mg-header .mg-header__inner,
header.mg-header .mg-header-nav,
header.mg-header .mega-menu-wrap,
header.mg-header .mega-menu{overflow:visible !important;}
.mg-header__inner{max-width:1600px; margin:0 auto; padding:0 20px; height:96px; display:flex; align-items:center; justify-content:space-between; gap:16px;}
.mg-brand{display:flex; align-items:center; gap:10px;}
.mg-brand__logo{height:64px; width:auto;}
.mg-brand__name{font-size:18px; font-weight:700; color:var(--brand-dark); line-height:1.2;}
.mg-brand__sub{font-size:10px; color:#6b7280; text-transform:uppercase; letter-spacing:.05em;}
.mg-nav{display:flex; align-items:center; gap:24px;}
.mg-nav a,.mg-nav__item{display:inline-flex; align-items:center; gap:4px; font-size:15px; font-weight:500; color:#374151; background:none; border:none; cursor:pointer; font-family:inherit;}
.mg-nav a:hover,.mg-nav__item:hover{color:var(--brand-primary);}
.mg-nav__sep{border-right:1px solid #e5e7eb; height:24px;}
.mg-nav svg{width:18px; height:18px;}
.mg-actions{display:flex; align-items:center; gap:10px;}
.mg-btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:inherit; font-size:14px; font-weight:700; border-radius:var(--radius-full); height:40px; padding:0 18px; cursor:pointer; transition:all .15s ease; border:1.5px solid transparent; text-align:center;}
.mg-btn svg{width:16px; height:16px; flex:0 0 auto;}
.mg-btn--outline{border-color:var(--brand-light); color:var(--brand-primary); background:var(--white);}
.mg-btn--outline:hover{background:var(--brand-primary); color:var(--white); border-color:var(--brand-primary);}
.mg-btn--primary{background:var(--brand-primary); color:var(--white); box-shadow:var(--shadow-md);}
.mg-btn--primary:hover{background:var(--brand-dark); transform:translateY(-2px);}
.mg-iconbtn{display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:var(--radius-full); border:none; background:none; cursor:pointer; color:#374151;}
.mg-iconbtn:hover{background:#f1f5f9;}
.mg-iconbtn svg{width:20px; height:20px;}


/* ==== SECTION 4 - floating contact buttons (desktop) ==== */
.mg-floating{position:fixed; left:16px; top:50%; transform:translateY(-50%); z-index:50; display:flex; flex-direction:column; gap:12px;}
.mg-floating a{display:flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:var(--radius-full); color:var(--white); box-shadow:var(--shadow-lg); transition:transform .15s ease;}
.mg-floating a:hover{transform:scale(1.1);}
.mg-floating svg{width:24px; height:24px;}
.mg-floating .is-wa{background:#25D366;}
.mg-floating .is-phone{background:var(--brand-dark);}
.mg-floating .is-fb{background:#1877F2;}
/* Floating contact stack (WhatsApp / phone / Facebook) hidden for now.
   Reversible: delete this single rule to restore the stack. */
.mg-floating{display:none !important;}

/* ==== SECTION 5 - main layout ==== */
.mg-main{max-width:1200px; margin:0 auto; padding:14px 16px 40px;}
/* FIX1: category tag + breadcrumbs share one row, pushed to opposite ends */
.mg-article__topbar{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 14px;}
/* Breadcrumbs - compact inline, inside the article card */
.mg-breadcrumbs{display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:12.5px; color:var(--text-muted); margin:0; line-height:1.4;}
.mg-breadcrumbs a{color:var(--text-muted); text-decoration:none;}
.mg-breadcrumbs a:hover{color:var(--brand-primary);}
.mg-breadcrumbs__sep{color:#cbd5e1;}
.mg-breadcrumbs__current{color:var(--brand-dark); font-weight:600;}
.mg-grid{display:grid; grid-template-columns:repeat(12,1fr); gap:2rem; align-items:start;}
.mg-col-main{grid-column:span 8;}
/* FIX3: sidebar made static (was position:sticky; sticky form got cut off mid-scroll) */
.mg-col-side{grid-column:span 4; position:static; display:flex; flex-direction:column; gap:24px;}

.mg-card{background:var(--white); border:1px solid #f3f4f6; border-radius:var(--radius-3xl); box-shadow:var(--shadow-sm);}
.mg-article{padding:40px;}
.mg-article__badge{display:inline-block; background:var(--brand-gold-light); color:var(--brand-gold); font-size:11px; font-weight:700; line-height:1.4; border-radius:var(--radius-full); padding:3px 11px; white-space:nowrap;}
/* H1 (post title) - ~32px desktop, ~28px mobile (Google: H1 largest) */
.mg-article h1{font-size:clamp(1.75rem, 2.5vw, 2rem); font-weight:900; line-height:1.2; color:var(--brand-dark); margin:0; word-break:keep-all; overflow-wrap:break-word;}
/* Meta row - one aligned baseline: avatar + linked name + modified date + inline TOC */
.mg-article__meta{display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:12px 0 0; font-size:14px; color:var(--text-muted); border-bottom:1px solid #f3f4f6; padding-bottom:16px;}
.mg-meta-date{color:var(--text-muted); line-height:1;}
/* Author name → avatar + link to About page */
.mg-author-link{display:inline-flex; align-items:center; gap:8px; color:#1e3a8a; font-weight:600; text-decoration:none;}
.mg-author-link:hover{color:#1e40af;}
.mg-author-mini{width:32px; height:32px; border-radius:50%; object-fit:cover; flex:0 0 auto;}
/* Restored ACF fields (mobile_excerpt / full_width_container / top_banner) */
.mg-top-banner{margin:16px 0;}
.mg-top-banner img{max-width:100%; height:auto; display:block; border-radius:12px;}
.mg-full-width-container,.mg-mobile-excerpt{margin:16px 0; font-size:16px; line-height:1.8; color:var(--text-dark);}
.mg-full-width-container table,.mg-mobile-excerpt table{max-width:100%;}
.mg-mobile-excerpt :is(h2,h3){color:var(--brand-dark);}
/* Article body typography - full vertical-rhythm system (USWDS + long-form).
   Scoped to .mg-content ONLY (the_content wrapper); does NOT touch the global/theme
   body font, Elementor, or the form. rem-based (respects zoom); clamp() for fluid
   scaling 390->1280. Heading rule: more space ABOVE than BELOW (>=1.5:1); h1 leads
   the content so its top margin is 0 by design. */
.mg-content{
    font-size:clamp(1.0625rem, 1rem + 0.35vw, 1.125rem); /* 17px -> 18px */
    line-height:1.65; color:#1f2937; margin-top:24px; margin-inline:auto;
}
.mg-content h1{font-size:clamp(1.9rem, 1.4rem + 1.8vw, 2.25rem); font-weight:900; line-height:1.15; color:var(--brand-dark); margin:0 0 .7em;}
.mg-content h2{font-size:clamp(1.45rem, 1.1rem + 1.2vw, 1.6rem); font-weight:800; line-height:1.25; color:var(--brand-dark); margin:2em 0 .6em;}
.mg-content h3{font-size:clamp(1.2rem, 1rem + .5vw, 1.3rem); font-weight:700; line-height:1.3; color:var(--brand-dark); margin:1.6em 0 .5em;}
.mg-content h4{font-size:1.0625rem; font-weight:700; line-height:1.4; color:var(--brand-dark); margin:1.3em 0 .4em;}
.mg-content p{margin:0 0 1.15em; max-width:68ch;}
.mg-content :is(ul,ol){margin:0 0 1.15em; max-width:68ch; padding-inline-start:1.4em; line-height:1.65;}
.mg-content li{margin:0 0 .5em; line-height:1.65;}
@media(max-width:600px){
    .mg-content{font-size:1.125rem;}
    .mg-content h2{margin-top:1.5em;}
    .mg-content h3{margin-top:1.2em;}
    .mg-content h4{margin-top:1em;}
}
.mg-content a{color:var(--brand-primary); text-decoration:underline;}
.mg-content img{border-radius:var(--radius-xl); margin:1em 0;}

/* FIX7: nothing may exceed the article width - contain all embeds/media/tables */
.mg-article, .mg-article *{max-width:100%;}
.mg-article iframe, .mg-article video, .mg-article embed{max-width:100%; width:100%; height:auto; aspect-ratio:16/9; border-radius:var(--radius-xl); margin:1em 0;}
.mg-article img{max-width:100%; height:auto;}
.mg-article table{display:block; overflow-x:auto; max-width:100%; -webkit-overflow-scrolling:touch;}
/* the compact TOC dropdown is intentionally a fixed-width panel, not content-width */
.mg-article .mg-toc--inline .mg-toc__list{max-width:82vw;}

/* related posts */
.mg-related{margin-top:40px; border-top:1px solid #f3f4f6; padding-top:28px;}
.mg-related h2{font-size:1.5rem; font-weight:900; color:var(--brand-dark); margin-bottom:18px;}
.mg-related__grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}
.mg-related__item{display:block; border:1px solid #f3f4f6; border-radius:var(--radius-xl); overflow:hidden; background:var(--white); transition:box-shadow .15s ease;}
.mg-related__item:hover{box-shadow:var(--shadow-md);}
.mg-related__item img{width:100%; height:130px; object-fit:cover;}
.mg-related__item span{display:block; padding:12px; font-size:14px; font-weight:600; color:var(--brand-dark);}

/* author box */
.mg-author{padding:40px; margin-top:48px; position:relative;}
.mg-author__head{display:flex; align-items:center; gap:16px; margin-bottom:16px;}
.mg-author__photo{width:80px; height:80px; border-radius:var(--radius-full); object-fit:cover;}
.mg-author__name{font-size:20px; font-weight:900; color:var(--brand-dark);}
.mg-author__pills{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px;}
.mg-author__pill{background:#eff6ff; color:var(--brand-primary); font-size:12px; font-weight:600; border-radius:var(--radius-full); padding:3px 10px;}
.mg-author__bio{color:var(--text-muted); font-size:15px; line-height:1.7;}
.mg-author__sign{font-family:'Satisfy', cursive; font-size:2.5rem; color:var(--brand-dark); opacity:.35; margin-top:10px; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}

/* sidebar widgets */
.mg-widget{background:var(--white); border:1px solid #f3f4f6; border-radius:var(--radius-2xl);}
.mg-toc{padding:20px;}
.mg-toc__head{display:flex; align-items:center; justify-content:space-between; cursor:pointer; font-weight:700; color:var(--brand-dark); width:100%; background:none; border:none; font-family:inherit; font-size:16px;}
.mg-toc__head svg{width:18px; height:18px; transition:transform .2s ease;}
.mg-toc[aria-expanded="false"] .mg-toc__list{display:none;}
.mg-toc[aria-expanded="true"] .mg-toc__head svg{transform:rotate(180deg);} /* closed=chevron down (default), open=up */
.mg-toc__list{list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:8px;}
.mg-toc__list a{font-size:14px; color:var(--text-muted); padding-right:10px; border-right:2px solid #e5e7eb;}
.mg-toc__list a:hover{color:var(--brand-primary); border-color:var(--brand-light);}

/* FIX2: compact inline TOC - a small chip on the meta row that opens a dropdown panel */
.mg-toc--inline{position:relative; padding:0; margin-inline-start:auto;} /* pushed to the far (left in RTL) end of the meta row */
.mg-toc--inline .mg-toc__head{width:auto; gap:6px; font-size:13px; font-weight:600; color:var(--brand-dark); padding:5px 12px; border:1px solid #e5e7eb; border-radius:999px; background:#f9fafb; transition:background .15s ease;}
.mg-toc--inline .mg-toc__head:hover{background:#eff6ff; border-color:var(--brand-light);}
.mg-toc--inline .mg-toc__head svg{width:15px; height:15px;}
.mg-toc--inline .mg-toc__list{position:absolute; top:calc(100% + 8px); inset-inline-end:0; z-index:30; width:300px; max-width:82vw; margin:0; padding:14px 16px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; box-shadow:var(--shadow-lg);}
@media (max-width:767px){ .mg-toc--inline{margin-inline-start:0;} }

.mg-quick{background:var(--brand-dark); color:var(--white); border-radius:var(--radius-2xl); padding:24px;}
.mg-quick h3{color:var(--white); font-size:18px; font-weight:800; margin-bottom:14px;}
.mg-quick ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px;}
.mg-quick li{display:flex; align-items:flex-start; gap:8px; font-size:14px; line-height:1.5;}
.mg-quick li svg{width:18px; height:18px; flex:0 0 auto; color:#34d399; margin-top:2px;}

/* ==== SECTION 12 - mobile sticky CTA (slim; styled in the mobile media query) ==== */
.mg-mobcta{display:none;}

/* ---- responsive ---- */
@media (max-width:1279px){ .mg-actions .mg-btn{display:none;} }
@media (max-width:1023px){
    .mg-nav{display:none;}
    .mg-floating{display:none;}
    .mg-grid{grid-template-columns:1fr;}
    .mg-col-main,.mg-col-side{grid-column:auto;}
    .mg-col-side{position:static;}
    .mg-mobcta{display:flex; align-items:center; gap:8px; position:fixed; left:0; right:0; bottom:0; z-index:40;
        min-height:52px; padding:4px 12px; padding-bottom:calc(4px + env(safe-area-inset-bottom)); background:var(--white);
        border-top:1px solid #e5e7eb; box-shadow:0 -2px 10px rgba(0,0,0,.06); transform:translateY(120%); transition:transform .25s ease;}
    .mg-mobcta.is-visible{transform:translateY(0);}
    .mg-mobcta.is-dismissed{display:none;}
    /* Keep the CTA ABOVE the cookie-consent banner (#icc-banner, z 999999) while it's shown,
       so both stay tappable (stacked, no overlap). When consent is dismissed the banner is
       display:none and this un-matches, returning the CTA to the bottom. Blog-only + scoped. */
    body:has(#icc-banner[style*="display:block"]) .mg-mobcta,
    body:has(#icc-banner[style*="display: block"]) .mg-mobcta { bottom: calc(150px + env(safe-area-inset-bottom)); }
    /* Single filled PRIMARY CTA (white forced in all states; never lightens) */
    .mg-mobcta__btn{flex:1 1 auto; align-self:stretch; min-height:44px; display:inline-flex; align-items:center; justify-content:center;
        background:#1e40af; color:#ffffff; font-weight:600; font-size:16px; padding:0 20px; border:none; border-radius:12px;
        cursor:pointer; font-family:inherit; white-space:nowrap; -webkit-tap-highlight-color:transparent;}
    .mg-mobcta__btn:link,.mg-mobcta__btn:visited,.mg-mobcta__btn:hover,.mg-mobcta__btn:focus,.mg-mobcta__btn:active{color:#ffffff;}
    .mg-mobcta__btn:hover,.mg-mobcta__btn:active{background:#1e3a8a;}
    .mg-mobcta__close{flex:0 0 auto; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; background:none; border:none; color:var(--text-muted); font-size:24px; line-height:1; cursor:pointer;}
    .mg-related__grid{grid-template-columns:1fr;}
}
@media (max-width:767px){
    .mg-brand__text{display:none;}
    .mg-article{padding:24px;}
}
@media (min-width:1024px){
    /* .mg-article h1 sizing handled by clamp() - see visual audit fixes */
}

/* Wide desktop only: give the ARTICLE column exactly 100px more width, without the
   sidebar shrinking or moving. At >=1232px the old 12-col grid already resolves the
   sidebar to a fixed 368px (1200 - 32 padding - 352 gaps = 816; span4 = 368). Here the
   container grows 1200 -> 1300 and the grid is pinned to "1fr 368px", so all 100px go
   to the article and the sidebar stays 368px on both sides of the breakpoint.
   Gated at 1332px (1300 + padding) so nothing reflows before there is room for it.
   Below this width - tablet and mobile included - the layout is untouched. */
@media (min-width:1332px){
    .mg-main{max-width:1300px;}                       /* was 1200px */
    .mg-grid{grid-template-columns:1fr 368px;}        /* sidebar pinned at its current width */
    .mg-col-main{grid-column:1;}
    .mg-col-side{grid-column:2;}
    /* The visible text was capped at 68ch, narrower than the column, so the extra
       width would not show without raising the cap by the same 100px. */
    .mg-content p,
    .mg-content :is(ul,ol){max-width:calc(68ch + 100px);}
}

/* ==== SECTION 6/7 shared - section + slider ==== */
.mg-section{padding:80px 0;}
.mg-section__title{font-size:3rem; font-weight:900; color:var(--brand-dark); text-align:center;}
.mg-section__title span{color:var(--brand-primary);}
.mg-section__title--center{text-align:center;}
.mg-underline{width:96px; height:5px; background:#facc15; border-radius:var(--radius-full); margin:12px auto 40px;}
.mg-slider{position:relative;}
.mg-slider__viewport{overflow:hidden;}
.mg-slider__track{display:flex; gap:0; transition:transform .35s ease;}
.mg-slide{flex:0 0 33.333%; max-width:33.333%; padding:0 10px; box-sizing:border-box;}
/* FIX6: prominent, clearly-visible arrows (44px circle, blue border, chevron) */
.mg-slider__arrow{position:absolute; top:calc(50% - 22px); z-index:6; width:44px; height:44px; border-radius:var(--radius-full); background:var(--white); border:2px solid var(--brand-primary); box-shadow:var(--shadow-lg); cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--brand-primary); transition:background .15s ease, color .15s ease;}
.mg-slider__arrow:hover{background:var(--brand-primary); color:var(--white);}
/* Same fix as the services arrows: the flex button (display:flex) shrinks a
   width-less SVG to 0px wide, hiding the chevron. flex:0 0 auto + explicit
   width keep the chevron visible (stroke:currentColor = the button's blue). */
.mg-slider__arrow svg,
.mg-stories .mg-slider__arrow svg,
.mg-testimonials .mg-slider__arrow svg{width:20px !important; height:20px; flex:0 0 auto; display:block; stroke:currentColor;}
.mg-slider__arrow.is-prev{right:-4px;}
.mg-slider__arrow.is-next{left:-4px;}
/* Only the full-width stories slider has room to push arrows fully outside the track. */
@media (min-width:1280px){ .mg-stories .mg-slider__arrow.is-prev{right:-22px;} .mg-stories .mg-slider__arrow.is-next{left:-22px;} }
/* Testimonials slider lives in a narrow grid cell next to the summary card - keep its
   arrows just inside the viewport so they never clip or overlap the neighbouring card. */
.mg-testimonials .mg-slider__arrow.is-prev{right:6px;}
.mg-testimonials .mg-slider__arrow.is-next{left:6px;}
.mg-slider__dots{display:flex; justify-content:center; gap:8px; margin-top:24px;}
.mg-dot{width:10px; height:10px; border-radius:var(--radius-full); border:none; background:#cbd5e1; cursor:pointer; padding:0;}
.mg-dot[aria-current="true"],.mg-dot.is-active{background:var(--brand-primary); transform:scale(1.25);}
.mg-stars{display:inline-flex; gap:2px; color:#facc15;}
.mg-stars svg{width:16px; height:16px;}

/* ==== SECTION 6 - success stories ==== */
.mg-stories{background:rgba(249,250,251,.5);}
.mg-story{background:var(--white); border:1px solid #f3f4f6; border-radius:20px; padding:24px; box-shadow:var(--shadow-sm); height:100%; transition:box-shadow .15s ease;}
.mg-story:hover{box-shadow:var(--shadow-md);}
.mg-story__top{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.mg-story__photo{position:relative; width:96px; height:96px; border-radius:var(--radius-2xl); border:3px solid #facc15; background:#eff6ff; color:var(--brand-light); display:flex; align-items:center; justify-content:center; overflow:hidden;}
.mg-story__photo>svg{width:56px; height:56px;}
.mg-story__photo img{width:100%; height:100%; object-fit:cover;}
.mg-story__quote{position:absolute; bottom:-8px; left:-8px; width:28px; height:28px; border-radius:var(--radius-full); background:#facc15; color:var(--white); display:flex; align-items:center; justify-content:center;}
.mg-story__quote svg{width:16px; height:16px;}
.mg-story h3{font-size:1.15rem; font-weight:900; color:var(--brand-dark); margin:0 0 8px;}
.mg-story p{font-size:14px; color:#4b5563; margin:0 0 16px; line-height:1.6;}
.mg-story__foot{display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; color:var(--text-light); letter-spacing:.03em;}
.mg-story__bar{width:24px; height:4px; background:#facc15; border-radius:var(--radius-full);}

/* ==== SECTION 7 - testimonials ==== */
.mg-testimonials{background:rgba(249,250,251,.5); padding:64px 0;}
.mg-tgrid{display:grid; grid-template-columns:9fr 3fr; gap:24px; align-items:start; margin-top:40px;}
.mg-testi{background:var(--white); border:1px solid #f3f4f6; border-radius:var(--radius-xl); padding:20px; box-shadow:var(--shadow-sm); height:100%;}
.mg-testi__head{display:flex; align-items:center; gap:12px; margin-bottom:10px;}
.mg-testi__avatar{width:40px; height:40px; border-radius:var(--radius-full); background:#16a34a; color:var(--white); font-weight:700; display:flex; align-items:center; justify-content:center; flex:0 0 auto;}
.mg-testi__meta{display:flex; flex-direction:column;}
.mg-testi__name{font-weight:700; color:var(--text-dark); font-size:14px;}
.mg-testi__time{font-size:12px; color:var(--text-light);}
.mg-testi p{font-size:14px; color:#4b5563; line-height:1.6; margin:8px 0 0;}
.mg-summary{background:var(--white); border-radius:var(--radius-xl); box-shadow:var(--shadow-md); padding:24px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:8px;}
.mg-summary__photo{width:64px; height:64px; border-radius:var(--radius-full); object-fit:cover;}
.mg-summary__name{font-size:14px; font-weight:700; color:var(--text-dark); line-height:1.4;}
.mg-stars--orange{color:#f97316;}
.mg-summary__score{font-size:28px; font-weight:900; color:var(--text-dark); line-height:1;}
.mg-summary__count{font-size:13px; color:var(--text-muted);}
.mg-summary__glogo{height:28px; width:auto; margin-top:4px;}
.mg-gbtn{display:inline-flex; align-items:center; gap:8px; background:#4285F4; color:var(--white); border-radius:var(--radius-full); padding:9px 18px; font-weight:600; font-size:14px; margin-top:6px;}
.mg-gbtn img{width:20px; height:20px;}

@media (max-width:1023px){
    .mg-section__title{font-size:2rem;}
    .mg-slide{flex-basis:100%; max-width:100%;}
    .mg-tgrid{grid-template-columns:1fr;}
}

/* ==== SECTION 8 - bottom CTA ==== */
.mg-ctasec{padding:32px 16px;}
/* Bottom CTA - approved Claude Design (two columns, 1200x480, no scroll) */
.mg-botcta{max-width:1200px; margin:0 auto; height:480px; display:flex; flex-direction:row-reverse; border-radius:24px; overflow:hidden; box-shadow:0 24px 60px -30px rgba(30,58,138,.45), 0 2px 8px -4px rgba(30,58,138,.15); font-family:'Heebo', system-ui, sans-serif;}
/* FIX8: Richard's real photo (sitting with clients over coffee) as a subtle
   background on the blue side. Blue gradient overlay keeps pill/headline/name
   fully readable; fixed 480px height preserved so there is no scroll. */
.mg-botcta__intro{flex:0 0 505px; width:505px; height:480px; background:linear-gradient(180deg, rgba(30,58,138,.92) 0%, rgba(30,58,138,.80) 45%, rgba(23,37,84,.70) 100%), url('/wp-content/uploads/2024/12/%D7%A8%D7%99%D7%A9%D7%A8%D7%93-%D7%94%D7%A0%D7%A0%D7%A4%D7%9C%D7%93-%D7%99%D7%95%D7%A9%D7%91-%D7%91%D7%9E%D7%A1%D7%A2%D7%93%D7%94-%D7%A2%D7%9D-%D7%94%D7%A6%D7%95%D7%95%D7%AA-%D7%A9%D7%9C-%D7%94%D7%9E%D7%A9%D7%A8%D7%93-%D7%A9%D7%9C%D7%95-_%D7%9E%D7%99%D7%A7%D7%95%D7%93-%D7%9E%D7%A9%D7%9B%D7%A0%D7%AA%D7%90%D7%95%D7%AA_-%D7%9C%D7%90%D7%A8%D7%95%D7%97%D7%AA-%D7%A6%D7%94%D7%A8%D7%99%D7%99%D7%9D.jpeg') center/cover no-repeat; color:#fff; padding:44px 44px 40px; display:flex; flex-direction:column; justify-content:space-between; position:relative; box-sizing:border-box;}
.mg-botcta__title, .mg-botcta__sub, .mg-botcta__author{text-shadow:0 1px 10px rgba(15,23,42,.45);}
.mg-botcta__pill{align-self:flex-start; display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.28); border-radius:999px; color:#fff; font-size:13px; font-weight:500; padding:7px 14px; line-height:1;}
.mg-botcta__dot{width:7px; height:7px; border-radius:50%; background:#93C5FD; flex:0 0 auto;}
.mg-botcta__title{font-size:38px; font-weight:800; color:#fff; line-height:1.12; margin:0 0 12px;}
.mg-botcta__sub{font-size:18px; color:#DCE6FB; line-height:1.5; margin:0;}
.mg-botcta__author{font-size:14px; color:#C7D6F7; text-align:right;}
.mg-botcta__formwrap{flex:1 1 auto; height:480px; background:#fff; padding:44px 52px; display:flex; align-items:center; justify-content:center; box-sizing:border-box;}
.mg-botform{width:100%; display:flex; flex-direction:column; gap:16px;}
.mg-botform__intro{font-size:15px; font-weight:600; color:#1e3a8a;}
.mg-botform__row{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.mg-botform__field{display:flex; flex-direction:column; gap:6px; min-width:0;}
.mg-botform__field label{font-size:13.5px; font-weight:600; color:#1e3a8a;}
.mg-botform input[type=text], .mg-botform input[type=tel], .mg-botform select{height:52px; border:1.5px solid #D5DBE8; border-radius:12px; background:#fff; font-size:16px; color:#1F2540; text-align:right; padding:0 14px; font-family:inherit; width:100%; box-sizing:border-box; appearance:none; -webkit-appearance:none;}
.mg-botform input::placeholder{color:#98A2B8;}
.mg-botform input:focus, .mg-botform select:focus{outline:none; border-color:#1e40af; box-shadow:0 0 0 4px rgba(30,64,175,.12);}
.mg-botform__select{position:relative;}
.mg-botform__select select{padding-left:42px;}
.mg-botform__chev{position:absolute; left:14px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:#66708A; pointer-events:none;}
.mg-botform select:invalid{color:#98A2B8;}
.mg-botform__consent{display:flex; flex-direction:row; align-items:flex-start; gap:10px; text-align:right; cursor:pointer;}
.mg-botform__consent input{width:18px; height:18px; margin-top:2px; accent-color:#1e40af; flex:0 0 auto;}
.mg-botform__consent span{font-size:13px; line-height:1.5; color:#66708A;}
.mg-botform__consent a{color:#1e40af; font-weight:600; text-decoration:underline;}
.mg-botform__submit{height:56px; border:none; border-radius:13px; background:#1e40af; color:#fff; font-size:17px; font-weight:700; font-family:inherit; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; transition:background .15s ease;}
.mg-botform__submit:hover,.mg-botform__submit:focus,.mg-botform__submit:active{background:#1e3a8a; color:#fff; opacity:1;}
.mg-botform__submit svg{width:20px; height:20px;}
.mg-botform.mg-validated input:invalid, .mg-botform.mg-validated select:invalid{border-color:#D64545;}
.mg-botform.mg-validated .mg-botform__consent input:invalid{outline:2px solid #D64545; outline-offset:2px;}
.mg-botform__loader{font-size:14px; font-weight:600; color:#1e40af; text-align:center;}
.mg-botform__success{display:flex; flex-direction:column; gap:4px; text-align:center; padding:12px; background:#F0F9F4; border:1px solid #BBE7CB; border-radius:12px;}
.mg-botform__success strong{font-size:18px; color:#166534;}
.mg-botform__success span{font-size:14px; color:#4B7A5A;}
@media (max-width:768px){
    .mg-botcta{flex-direction:column; height:auto; border-radius:18px;}
    .mg-botcta__intro{flex:none; width:100%; height:auto; padding:22px 20px; gap:8px;}
    .mg-botcta__title{font-size:25px; margin:0 0 4px;}
    .mg-botcta__sub{font-size:14px;}
    .mg-botcta__author{display:none;}
    .mgb-nomob{display:none;}
    .mg-botcta__formwrap{flex:none; width:100%; height:auto; padding:20px 18px;}
    .mg-botform{gap:12px;}
    .mg-botform__row{grid-template-columns:1fr;}
    .mg-botform input[type=text], .mg-botform input[type=tel], .mg-botform select{height:50px;}
}

/* ==== SECTION 9 - services ==== */
.mg-services{padding:64px 0; background:#f9fafb;}
.mg-services__grid{display:grid; grid-template-columns:repeat(3,1fr); gap:32px;}
.mg-svc{background:var(--white); border:1px solid #f3f4f6; border-radius:var(--radius-2xl); padding:32px; box-shadow:var(--shadow-sm); transition:box-shadow .15s ease;}
.mg-svc:hover{box-shadow:var(--shadow-2xl);}
.mg-svc__ic{display:inline-flex; align-items:center; justify-content:center; width:64px; height:64px; border-radius:var(--radius-full); background:var(--white); border:2px solid var(--brand-dark); color:var(--brand-dark); margin-bottom:16px; transition:background .2s ease, color .2s ease;}
.mg-svc__ic svg{width:32px; height:32px;}
.mg-svc:hover .mg-svc__ic{background:var(--brand-dark); color:var(--white);}
.mg-svc h3{font-size:1.25rem; font-weight:700; color:var(--brand-primary); margin:0 0 8px;}
.mg-svc p{font-size:14px; color:#4b5563; line-height:1.7; margin:0;}

@media (max-width:1023px){
    .mg-cta{grid-template-columns:1fr;}
    .mg-services__grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:767px){
    .mg-services__grid{grid-template-columns:1fr;}
    .mg-cta__body{padding:28px;}
}

/* ==== SECTION 10 - certificates + contact ==== */
.mg-certs{padding:64px 0; background:var(--white);}
.mg-certs__grid{display:grid; grid-template-columns:repeat(3,1fr); gap:24px;}
.mg-cert h3{font-size:1.125rem; font-weight:700; color:#1f2937; min-height:48px; display:flex; align-items:center; justify-content:center; text-align:center; margin:0 0 12px;}
.mg-cert__card{background:var(--white); border:1px solid #f3f4f6; border-radius:var(--radius-xl); padding:12px; box-shadow:var(--shadow-sm); transition:transform .15s ease, box-shadow .15s ease;}
.mg-cert__card:hover{box-shadow:var(--shadow-lg); transform:translateY(-4px);}
.mg-cert__card img{width:100%; height:auto; border-radius:var(--radius-md);}
.mg-contact{display:grid; grid-template-columns:repeat(3,1fr); gap:24px; border-top:1px solid #e5e7eb; padding-top:48px; margin-top:48px;}
.mg-contact__item{display:flex; align-items:center; gap:12px; justify-content:center; text-align:right;}
.mg-contact__ic{display:inline-flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:var(--radius-full); background:var(--white); border:1px solid #f3f4f6; box-shadow:var(--shadow-sm); color:var(--brand-primary); transition:transform .15s ease; flex:0 0 auto;}
.mg-contact__item:hover .mg-contact__ic{transform:scale(1.1);}
.mg-contact__ic svg{width:24px; height:24px;}
.mg-contact a:hover{color:var(--brand-primary);}

/* ==== SECTION 11 - footer ==== */
.mg-footer{background:#f3f4f6; border-top:1px solid #e5e7eb; padding:48px 16px 24px; font-size:14px; color:var(--text-muted);}
.mg-footer__grid{max-width:1280px; margin:0 auto; display:grid; grid-template-columns:repeat(5,1fr); gap:24px;}
.mg-fcol__title{font-size:15px; font-weight:700; color:var(--brand-dark); position:relative; padding-bottom:8px; margin:0 0 14px;}
.mg-fcol__title::after{content:""; position:absolute; bottom:0; right:0; width:36px; height:3px; background:#facc15; border-radius:var(--radius-full);}
.mg-fcol ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;}
.mg-fcol a:hover{color:var(--brand-primary);}
.mg-fcol__addr{display:flex; gap:8px; align-items:flex-start; line-height:1.5; margin:0;}
.mg-fcol__addr svg{width:18px; height:18px; flex:0 0 auto; color:var(--brand-primary); margin-top:2px;}
.mg-fcol__maplink{display:inline-block; margin-top:10px; color:var(--brand-primary); font-weight:600;}
/* EXTERNAL - Google Maps iframe, accepted exception (functional necessity: directions) */
.mg-fcol__map{margin-top:12px; border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-sm);}
.mg-fcol__map iframe{display:block; width:100%; height:200px; border:0;}
.mg-footer__disclaimer{max-width:1280px; margin:32px auto 0; border-top:1px solid #e5e7eb; padding-top:20px; text-align:center; font-size:12px; color:#6b7280;}
.mg-footer__disclaimer p{margin:0 0 8px;}
.mg-footer__bar{max-width:1280px; margin:20px auto 0; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; border-top:1px solid #e5e7eb; padding-top:20px;}
.mg-social{display:flex; gap:10px;}
.mg-social a{display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:var(--radius-full); background:var(--brand-dark); color:var(--white);}
.mg-social svg{width:18px; height:18px;}
.mg-copy{font-size:13px; color:#6b7280;}

@media (max-width:1023px){
    .mg-certs__grid{grid-template-columns:1fr;}
    .mg-contact{grid-template-columns:1fr;}
    .mg-footer__grid{grid-template-columns:repeat(2,1fr);}
    .mg-blog{padding-bottom:88px;} /* room for fixed mobile CTA */
}
@media (max-width:767px){
    .mg-footer__grid{grid-template-columns:1fr;}
}

/* ============================================================
   VISUAL AUDIT FIXES (groups A2, B1, B2, C2, D1)
   ============================================================ */

/* A2 - mid-article CTA boxes (theme exit_buttons injected via the_content) */
.exit_buttons_wrapper{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:36px 0; align-items:start;}
.exit-button{background:#ffffff; border:2px solid #1e40af; border-radius:12px; padding:18px 16px; text-align:center; display:flex; flex-direction:column; gap:10px; transition:all .15s; min-height:120px; justify-content:space-between;}
.exit-button:hover{background:#1e40af;}
.exit-button .titleBtNs a{color:#1e3a8a; font-weight:700; font-size:14px; text-decoration:none; line-height:1.4; display:block;}
.exit-button:hover .titleBtNs a{color:#ffffff;}
.exit-button .textBtn a{display:inline-block; background:#1e40af; color:#ffffff; font-size:12px; font-weight:600; padding:6px 14px; border-radius:999px; text-decoration:none;}
.exit-button:hover .textBtn a{background:#ffffff; color:#1e40af;}
@media (max-width:640px){ .exit_buttons_wrapper{grid-template-columns:1fr;} }

/* B1 - RTL for Hebrew labels / signature (testimonial name uses dir="auto" in markup) */
.mg-story__foot, .mg-author__sign{direction:rtl; text-align:right; unicode-bidi:embed;}
.mg-testi__name{text-align:right;}

/* B2 - terms checkbox RTL (checkbox to the right of the label). Scoped to .mg-blog
   so it fixes the [form_sider_bar] shortcode markup (.checkTerm) only on this template. */
.mg-blog .checkTerm{display:flex; flex-direction:row-reverse; align-items:flex-start; gap:8px; text-align:right;}
.mg-blog .checkTerm input[type="checkbox"]{flex-shrink:0; margin-top:3px;}

/* C2 - service cards fully centered */
.mg-svc{text-align:center; align-items:center;}
.mg-svc h3, .mg-svc p{text-align:center;}

/* D1 - article body right-aligned (never justify in RTL) */
.mg-article{text-align:right;}
.mg-content, .mg-content p{text-align:right;}

/* Fix - component images must beat the global ".mg-blog img{height:auto;max-width:100%}"
   rule (0,1,1). Class-only selectors (0,1,0) were losing, so the Google wordmark
   stretched full-width on mobile. Scope to raise specificity to (0,2,0). */
.mg-summary .mg-summary__glogo{height:28px; width:90px; max-width:90px;}
.mg-summary .mg-summary__photo{width:64px; height:64px;}
.mg-header .mg-brand__logo{height:64px; width:auto;}
/* header icon button: raise tap target to 44px (min touch size) */
.mg-header .mg-iconbtn{width:44px; height:44px;}

/* ============================================================
   SERVICES SCROLL-SNAP SLIDER (Part 1 - CSS only, no library)
   ============================================================ */
.mg-services-slider-wrap { position: relative; overflow: hidden; }
.mg-services-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 20px;
    padding: 8px 20px 16px;
    cursor: grab;
    scrollbar-width: none;
}
.mg-services-track::-webkit-scrollbar { display: none; }
.mg-services-track:active { cursor: grabbing; }
.mg-service-card {
    flex: 0 0 calc(33.333% - 14px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.15s;
    min-height: 240px;
}
.mg-service-card:hover { box-shadow: 0 8px 24px rgba(30,58,138,0.12); }
.mg-service-card:hover .mg-svc__ic { background: var(--brand-dark); color: #fff; }
.mg-service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--brand-primary); margin: 4px 0; }
.mg-service-card p { font-size: 14px; color: #4b5563; line-height: 1.65; margin: 0; }
.mg-services-nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.mg-srv-prev, .mg-srv-next {
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid #1e40af; background: #fff; color: #1e40af;
    display: flex !important; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.mg-srv-prev:hover, .mg-srv-next:hover { background: #1e40af; color: #fff; }
.mg-srv-prev svg, .mg-srv-next svg { width: 24px !important; height: 24px !important; flex: 0 0 auto; }
.mg-services-hint { display: none; text-align: center; font-size: 13px; color: #9ca3af; margin-top: 8px; }
@media (max-width: 1024px) {
    .mg-service-card { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 640px) {
    .mg-service-card { flex: 0 0 calc(85% - 10px); }
    .mg-services-hint { display: block; }
    .mg-services-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .mg-services-track { scroll-behavior: auto; }
}

/* ============================================================
   MOBILE QA FIX - horizontal overflow (Part 2)
   Slider/grid children had min-width:auto (min-content), forcing the page
   to ~956px on mobile. min-width:0 lets them shrink to their column.
   overflow-x:clip on the root is a guard that (unlike hidden) does NOT
   create a scroll container, so the sticky sidebar keeps working.
   ============================================================ */
.mg-blog { overflow-x: clip; }
.mg-col-main, .mg-col-side,
.mg-slider, .mg-tslider, .mg-summary,
.mg-slider__viewport, .mg-tgrid > * { min-width: 0; }

/* Wide content tables: scroll within the article instead of being clipped */
.mg-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================
   PART 3 - text-only related posts + hide featured/related images
   ============================================================ */
.mg-related-link {
    display: block;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
    background: #fff;
}
.mg-related-link:hover { background: #eff6ff; border-color: #1e40af; }
.mg-related-date { display: block; font-size: 11px; color: #9ca3af; font-weight: 400; margin-top: 4px; }
/* Safety nets - hide any featured/related image that WP hooks may inject */
.mg-article .wp-post-image,
.mg-article .post-thumbnail,
.mg-article img.attachment-post-thumbnail { display: none !important; }
.mg-related-posts img { display: none !important; }

/* ============================================================
   HEADER (real production structure) + search overlay + author box + FB
   ============================================================ */
.mg-logo-link { display: inline-flex; align-items: center; }
header.mg-header a.mg-logo-link img.mg-logo-img { height: 48px !important; width: auto !important; max-height: 48px !important; display: block; }
.mg-header-nav { display: flex; align-items: center; gap: 20px; flex: 1; justify-content: center; }
.mg-header-nav a { color: #374151; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.mg-header-nav a:hover { color: #1e40af; }
@media (max-width: 1023px) { .mg-header-nav { display: none; } }
.mg-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mg-search-btn { background: none; border: none; cursor: pointer; padding: 10px; min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
.mg-search-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding-top: 80px; }
.mg-search-overlay[hidden] { display: none; }
.mg-search-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.mg-search-panel { position: relative; z-index: 1; background: #fff; border-radius: 16px; padding: 32px; width: 560px; max-width: 90vw; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.mg-search-logo img { height: 56px; width: auto; margin: 0 auto; }
.mg-search-input { width: 100%; height: 48px; font-size: 16px; border: 1.5px solid #D5DCEF; border-radius: 10px; padding: 0 16px; direction: rtl; box-sizing: border-box; }
.mg-search-input:focus { outline: none; border-color: #1e40af; box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }
.mg-search-select { width: 100%; height: 48px; font-size: 15px; border: 1.5px solid #D5DCEF; border-radius: 10px; padding: 0 16px; direction: rtl; background: #fff; box-sizing: border-box; appearance: none; }
.mg-search-submit { height: 48px; background: #1e40af; color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; }
.mg-search-submit:hover { background: #1e3a8a; }
.mg-header-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; min-height: 40px; transition: all 0.15s; }
.mg-header-btn--primary { background: #1e40af; color: #ffffff !important; border: none; }
.mg-header-btn--primary:hover { background: #1e3a8a; color: #ffffff !important; }
.mg-header-btn--outline { background: transparent; color: #1e40af; border: 1.5px solid #1e40af; }
.mg-header-btn--outline:hover { background: #1e40af; color: #fff; }
@media (max-width: 1023px) { .mg-header-btn { display: none; } }

/* Hamburger (mobile nav trigger) */
.mg-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 10px; cursor: pointer; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
.mg-hamburger span { display: block; width: 24px; height: 2px; background: #1e3a8a; border-radius: 2px; transition: all 0.2s; }
.mg-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mg-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mg-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1023px) {
    .mg-hamburger { display: flex; }
    .mg-header-nav { display: none; }
}

/* Mobile navigation drawer */
.mg-mobile-drawer { position: fixed; inset: 0; z-index: 9998; display: flex; }
.mg-mobile-drawer[hidden] { display: none; }
.mg-drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.mg-drawer-panel { position: relative; z-index: 1; background: #fff; width: 280px; height: 100%; padding: 24px 20px; display: flex; flex-direction: column; gap: 0; overflow-y: auto; margin-right: 0; margin-left: auto; }
.mg-drawer-panel a { color: #1e3a8a; font-size: 16px; font-weight: 600; text-decoration: none; padding: 14px 0; border-bottom: 1px solid #f1f5f9; display: block; }
.mg-drawer-panel a:hover { color: #1e40af; }
.mg-drawer-cta { margin-top: 20px; background: #1e40af; color: #fff; border: none; border-radius: 999px; padding: 14px 24px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; min-height: 48px; }

/* Author box (dynamic WP data) */
.mg-author-box-wrap { padding: 32px; margin-top: 48px; }
.mg-author-box { display: flex; gap: 20px; align-items: flex-start; }
.mg-author-photo { width: 140px; height: 140px; border-radius: 16px; object-fit: cover; flex: 0 0 auto; }
.mg-author-content { min-width: 0; }
.mg-author-role { font-size: 12px; font-weight: 600; color: var(--brand-light); margin-bottom: 2px; }
.mg-author-name { font-size: 22px; font-weight: 900; color: var(--brand-dark); margin: 0 0 8px; }
.mg-author-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mg-badge { background: #eff6ff; color: var(--brand-primary); font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.mg-badge a { color: inherit; text-decoration: none; }
.mg-badge a:hover { text-decoration: underline; }
.mg-author-bio { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin: 0; }
.mg-author-signature { font-family: 'Satisfy', cursive; font-size: 2.2rem; color: var(--brand-dark); opacity: 0.35; margin-top: 8px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 640px) { .mg-author-box { flex-direction: column; align-items: center; text-align: center; } .mg-author-badges { justify-content: center; } }

/* Facebook page plugin (EXTERNAL, sidebar) */
.iframe-fb-container { width: 100%; max-width: 340px; overflow: hidden; border-radius: 12px; margin-top: 16px; }
.iframe-fb-container iframe { width: 340px; height: 500px; border: none; }

/* ==== FAQ accordion (restored from ACF posts_questions) ==== */
.mg-faq{margin-top:32px; padding-top:28px; border-top:1px solid #f3f4f6;}
.mg-faq__title{font-size:clamp(1.375rem,1.9vw,1.5rem); font-weight:900; color:var(--brand-dark); margin:0 0 18px;}
.mg-faq__list{display:flex; flex-direction:column; gap:12px;}
.mg-faq__item{border:1px solid #e5e7eb; border-radius:var(--radius-2xl); background:var(--white); overflow:hidden;}
.mg-faq__q{margin:0;}
.mg-faq__toggle{width:100%; display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:52px; padding:14px 18px; background:none; border:none; cursor:pointer; text-align:right; font-family:inherit; font-size:16px; font-weight:700; color:var(--brand-dark); line-height:1.5;}
.mg-faq__toggle:hover{background:#f8fafc;}
.mg-faq__toggle:focus-visible{outline:2px solid var(--brand-primary); outline-offset:-2px;}
.mg-faq__qtext{flex:1 1 auto;}
.mg-faq__cue{display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; color:var(--brand-primary); font-size:13.5px; font-weight:600;}
.mg-faq__chev{width:20px; height:20px; transition:transform .2s ease;}
.mg-faq__toggle[aria-expanded="true"] .mg-faq__chev{transform:rotate(180deg);}
.mg-faq__a{border-top:1px solid #f3f4f6;}
.mg-faq__a-inner{padding:16px 18px; font-size:1.0625rem; line-height:1.6; color:var(--text-dark);}
.mg-faq__a-inner :is(p,ul,ol){margin:0 0 .8em;}
.mg-faq__a-inner :is(p,ul,ol):last-child{margin-bottom:0;}
.mg-faq__a-inner a{color:var(--brand-primary); text-decoration:underline;}
@media(max-width:600px){ .mg-faq__toggle{padding:13px 14px; font-size:15px;} .mg-faq__a-inner{padding:14px;} }
