:root{--mg-bg:#F4F8FC;--mg-surface:#fff;--mg-ink:#102A43;--mg-accent:#1769AA;--mg-support:#DCEAF7;--mg-border:#d7e3ee;--mg-radius:12px;--mg-font:"Cairo","Tajawal","Tahoma",Arial,sans-serif}
.mg-home,.mg-calculator,.mg-calc-index{font-family:var(--mg-font);color:var(--mg-ink)}
.mg-shell{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.mg-hero-wrap{background:var(--mg-bg);padding:44px 0 38px}
.mg-hero-wrap>.mg-shell{display:grid;grid-template-columns:.82fr 1.18fr;gap:36px;align-items:center}
.mg-hero-copy h1{font-size:clamp(34px,4.5vw,56px);line-height:1.12;margin:12px 0;color:var(--mg-ink);font-weight:800}
.mg-hero-copy p{font-size:18px;line-height:1.8;max-width:490px;color:#456078}
.mg-kicker{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--mg-accent)}
.mg-hero-actions,.mg-calc-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.mg-button{display:inline-flex;align-items:center;justify-content:center;padding:12px 20px;border-radius:8px;background:var(--mg-accent);color:#fff!important;text-decoration:none!important;font-weight:700;border:1px solid var(--mg-accent);cursor:pointer;font-family:inherit}
.mg-button:hover{filter:brightness(.94)}
.mg-button-light{background:#fff;color:var(--mg-ink)!important;border-color:var(--mg-border)}
.mg-slider{position:relative;min-width:0;border-radius:var(--mg-radius);overflow:hidden;background:#dceaf7;aspect-ratio:1.42}
.mg-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .35s ease}
.mg-slide.is-active{opacity:1;visibility:visible}
.mg-slide-image,.mg-slide-image img{display:block;width:100%;height:100%;object-fit:cover}
.mg-image-placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,#dceaf7,#a9c9e4)}
.mg-slide:after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(16,42,67,.88));pointer-events:none}
.mg-slide-caption{position:absolute;z-index:2;inset:auto 26px 24px;color:#fff}
.mg-slide-caption span{font-size:12px;opacity:.9}
.mg-slide-caption h2{font-size:clamp(19px,2.2vw,28px);line-height:1.25;margin:8px 0;color:#fff}
.mg-slide-caption h2 a{color:inherit;text-decoration:none}
.mg-slide-link{color:#fff;font-weight:700;font-size:13px}
.mg-slider-controls{position:absolute;z-index:5;top:18px;right:18px;left:auto;display:flex;align-items:center;gap:9px;direction:ltr}
.mg-slider-controls>button{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;padding:0;line-height:1;font-family:Arial,sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.22);backdrop-filter:blur(5px)}
.mg-slider-dots{align-items:center;padding:0 2px}
.mg-slider-dots button{flex:0 0 8px;height:8px}
.mg-slider-dots button.is-active{flex-basis:21px}
.mg-home-calc{gap:13px;min-height:82px;padding:15px 16px;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.mg-home-calc:hover{transform:translateY(-2px);border-color:#9bbbd6;box-shadow:0 7px 18px rgba(16,42,67,.08)}
.mg-home-calc-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:12px;background:#e8f2fb;color:var(--mg-accent);font-size:25px;line-height:1}
.mg-home-calc strong{line-height:1.45}
.mg-home-calc>b{flex:0 0 auto}
.mg-slider-controls>button{width:34px;height:34px;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:rgba(16,42,67,.35);color:#fff;font-size:22px;cursor:pointer}
.mg-slider-dots{display:flex;gap:5px}
.mg-slider-dots button{width:7px;height:7px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer}
.mg-slider-dots button.is-active{width:20px;border-radius:8px;background:#fff}
.mg-section{padding:52px 0}
.mg-section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}
.mg-section-head h2{font-size:30px;line-height:1.2;margin:7px 0;color:var(--mg-ink)}
.mg-section-head p{margin:8px 0 0;color:#526b80}
.mg-section-head>a,.mg-text-link{color:var(--mg-accent);font-weight:700;text-decoration:none}
.mg-post-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.mg-post-card{background:#fff;border:1px solid var(--mg-border);border-radius:var(--mg-radius);overflow:hidden;min-width:0}
.mg-post-thumb{display:block;aspect-ratio:1.55;background:var(--mg-support);overflow:hidden}
.mg-post-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease}
.mg-post-card:hover .mg-post-thumb img{transform:scale(1.035)}
.mg-post-body{padding:15px}
.mg-post-date{font-size:12px;color:#6b8194}
.mg-post-body h3{font-size:18px;line-height:1.45;margin:7px 0 8px}
.mg-post-body h3 a{color:var(--mg-ink);text-decoration:none}
.mg-post-body p{font-size:14px;line-height:1.65;color:#526b80;margin:0 0 12px}
.mg-text-link{font-size:13px}
.mg-calculator-band{background:var(--mg-bg);padding:48px 0}
.mg-home-calc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mg-home-calc{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--mg-border);border-radius:10px;padding:17px;color:var(--mg-ink);text-decoration:none;min-width:0}
.mg-home-calc>span{color:var(--mg-accent);font-size:12px;font-weight:800}
.mg-home-calc strong{font-size:16px;flex:1}
.mg-home-calc b{color:var(--mg-accent)}
.mg-exercise-callout{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid var(--mg-border);border-radius:var(--mg-radius);padding:28px 32px}
.mg-exercise-callout h2{font-size:26px;margin:8px 0}
.mg-exercise-callout p{margin:0;color:#526b80;line-height:1.7;max-width:700px}
.mg-workout-mark{width:84px;height:84px;border-radius:50%;background:var(--mg-support);display:grid;place-items:center;color:var(--mg-accent);font-size:28px;font-weight:900}
.mg-video-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.mg-video-card{color:var(--mg-ink);text-decoration:none;border:1px solid var(--mg-border);border-radius:10px;overflow:hidden;background:#fff}
.mg-video-card img{display:block;width:100%;aspect-ratio:1.6;object-fit:cover}
.mg-video-card strong{display:block;padding:12px}
.mg-calculator{max-width:860px;margin:30px auto;padding:28px;background:#fff;border:1px solid var(--mg-border);border-radius:var(--mg-radius)}
.mg-calculator h2{font-size:28px;margin:0 0 10px}
.mg-calc-intro,.mg-calc-disclaimer{color:#526b80;line-height:1.75}
.mg-calc-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px}
.mg-calc-field{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:14px}
.mg-calc-field input,.mg-calc-field select{width:100%;height:46px;border:1px solid #bdcddd;border-radius:8px;padding:8px 12px;background:#fff;color:var(--mg-ink);font:inherit}
.mg-calc-field input:focus,.mg-calc-field select:focus{outline:2px solid var(--mg-accent);outline-offset:2px}
.mg-calc-result{margin-top:22px;padding:20px;background:var(--mg-bg);border:1px solid var(--mg-border);border-radius:10px}
.mg-calc-result h3{margin:0 0 12px;font-size:18px}
.mg-calc-result strong{color:var(--mg-accent);font-size:26px}
.mg-calc-result ul{margin:10px 0 0;padding-inline-start:22px}
.mg-calc-disclaimer{font-size:12px;margin:18px 0 0}
.mg-calc-index{max-width:1120px;margin:30px auto}
.mg-calc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.mg-calc-card{display:flex;flex-direction:column;gap:10px;padding:20px;border:1px solid var(--mg-border);border-radius:10px;background:#fff;color:var(--mg-ink);text-decoration:none}
.mg-calc-card-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:var(--mg-support);color:var(--mg-accent);font-size:23px}
.mg-calc-card strong{font-size:17px}
.mg-calc-card>span:last-child{font-size:13px;color:var(--mg-accent);font-weight:700}
@media(max-width:900px){.mg-hero-wrap>.mg-shell{grid-template-columns:1fr}.mg-hero-copy{max-width:700px}.mg-slider{aspect-ratio:1.8}.mg-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-video-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.mg-shell{width:min(100% - 28px,1180px)}.mg-hero-wrap{padding:28px 0}.mg-hero-copy h1{font-size:34px}.mg-hero-copy p{font-size:16px}.mg-slider{aspect-ratio:1.08}.mg-slide-caption{inset:auto 16px 16px}.mg-section{padding:34px 0}.mg-section-head{align-items:start;flex-direction:column}.mg-section-head h2{font-size:25px}.mg-post-grid{gap:10px}.mg-post-body{padding:11px}.mg-post-body h3{font-size:15px}.mg-post-body p{font-size:12px}.mg-home-calc-grid{grid-template-columns:1fr}.mg-home-calc{padding:14px}.mg-exercise-callout{padding:20px;gap:14px}.mg-workout-mark{width:58px;height:58px;flex-shrink:0}.mg-calc-fields,.mg-calc-grid{grid-template-columns:1fr}.mg-calculator{margin:16px 12px;padding:18px}.mg-video-grid{gap:10px}}
/* Calculator directory cards */
.mg-calc-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mg-calc-card{position:relative;min-height:190px;padding:22px 20px 18px;gap:12px;border-radius:12px;border-color:#d6e3ef;box-shadow:0 2px 8px rgba(16,42,67,.035);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.mg-calc-card:hover{transform:translateY(-3px);border-color:#8fb6d7;box-shadow:0 9px 22px rgba(16,42,67,.09)}
.mg-calc-card-icon{width:50px;height:50px;border-radius:12px;font-size:25px;background:#e8f2fb}
.mg-calc-card strong{font-size:19px;line-height:1.45}
.mg-calc-card p{margin:0;color:#526b80;font-size:14px;line-height:1.75;flex:1}
.mg-calc-card .mg-calc-card-action{display:flex;align-items:center;justify-content:space-between;padding-top:10px;border-top:1px solid #e8eef4;font-size:13px}
.mg-calc-card:focus-visible{outline:3px solid #1769AA;outline-offset:3px}
/* Professional calculator pages */
.mg-calc-page{max-width:1180px;width:calc(100% - 40px);margin:30px auto 64px;color:#102a43;font-family:var(--mg-font)}
.mg-calc-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:#71869a;font-size:13px;margin:0 0 22px}
.mg-calc-breadcrumb a{color:#1769aa;text-decoration:none;font-weight:700}
.mg-calc-hero{display:flex;align-items:center;gap:24px;padding:30px 34px;margin-bottom:24px;border-radius:18px;background:linear-gradient(115deg,#edf5fc,#f8fbfe);border:1px solid #dce8f2}
.mg-calc-hero-icon{display:grid;place-items:center;flex:0 0 82px;width:82px;height:82px;border-radius:20px;background:#fff;color:#1769aa;font-size:42px;box-shadow:0 7px 22px rgba(16,42,67,.08)}
.mg-calc-hero-copy{min-width:0}
.mg-calc-hero-copy h1{font-size:clamp(27px,3.5vw,38px);line-height:1.3;margin:5px 0 8px;color:#102a43;font-weight:800}
.mg-calc-hero-copy p{font-size:16px;line-height:1.85;color:#526b80;margin:0;max-width:800px}
.mg-calc-trust{display:flex;flex-wrap:wrap;gap:16px;margin-top:13px;color:#28734d;font-size:12px;font-weight:700}
.mg-calc-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.mg-calc-main{min-width:0}
.mg-calc-panel{padding:28px;background:#fff;border:1px solid #dce6ef;border-radius:16px;box-shadow:0 8px 30px rgba(16,42,67,.055)}
.mg-calc-panel-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #edf1f5}
.mg-calc-panel-head h2{font-size:23px;margin:0 0 6px;color:#102a43}
.mg-calc-panel-head p{margin:0;color:#62788c;font-size:14px;line-height:1.7}
.mg-calc-step{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e8f2fb;color:#1769aa;font-weight:800}
.mg-calc-form-pro .mg-calc-group{border:0;padding:0;margin:0 0 23px;min-width:0}
.mg-calc-form-pro .mg-calc-group legend{display:block;width:100%;padding:0 0 11px;margin-bottom:15px;border-bottom:1px solid #edf1f5;font-size:16px;font-weight:800;color:#1769aa}
.mg-calc-form-pro .mg-calc-fields{margin:0;gap:16px}
.mg-calc-form-pro .mg-calc-field{gap:7px;font-size:14px;color:#263f55}
.mg-calc-form-pro .mg-field-label{font-weight:700}
.mg-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid #cbd9e5;border-radius:9px;background:#fff;padding-inline:12px;min-height:48px}
.mg-input-wrap:focus-within{border-color:#1769aa;box-shadow:0 0 0 3px rgba(23,105,170,.12)}
.mg-input-wrap input{border:0!important;outline:0!important;box-shadow:none!important;padding:8px 0!important;min-width:0;height:44px!important;flex:1;background:transparent!important}
.mg-input-wrap>span{color:#8193a3;font-size:12px;font-weight:700;white-space:nowrap}
.mg-calc-form-pro .mg-calc-field select{height:48px;border-radius:9px;border-color:#cbd9e5}
.mg-field-help{font-size:11px;line-height:1.5;color:#8494a3;font-weight:400}
.mg-calc-form-pro .mg-calc-actions{margin-top:8px;padding-top:18px;border-top:1px solid #edf1f5}
.mg-calc-form-pro .mg-button{min-width:145px;gap:8px}
.mg-calc-form-pro .mg-calc-result-pro{display:block;margin-top:22px;padding:24px;border:1px solid #b9d6ed;border-radius:14px;background:linear-gradient(145deg,#f0f7fd,#fff)}
.mg-calc-form-pro .mg-calc-result-pro[hidden]{display:none}
.mg-calc-result-pro h3{font-size:17px;margin:0 0 12px;color:#526b80}
.mg-calc-result-pro>strong{display:block;font-size:clamp(28px,4vw,38px);color:#1769aa;line-height:1.3;margin:5px 0}
.mg-calc-result-pro p{color:#526b80;line-height:1.8}
.mg-calc-result-pro ul{list-style:none;padding:0;margin:14px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mg-calc-result-pro li{padding:12px;background:#fff;border:1px solid #e0eaf2;border-radius:9px;color:#526b80}
.mg-calc-result-pro li strong{display:block;color:#1769aa;font-size:20px;margin-top:4px}
.mg-calc-info{padding:23px 25px;margin-top:18px;border:1px solid #e1e9f0;border-radius:14px;background:#fff}
.mg-calc-info h2{font-size:19px;margin:0 0 9px;color:#102a43}
.mg-calc-info p{font-size:14px;line-height:1.9;color:#526b80;margin:0}
.mg-calc-info-note{background:#f8fafc}
.mg-calc-aside{display:grid;gap:16px}
.mg-calc-aside-card{padding:22px;border:1px solid #e0e9f1;border-radius:14px;background:#fff}
.mg-calc-aside-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#e8f2fb;color:#1769aa;font-size:21px}
.mg-calc-aside-card h3{font-size:17px;margin:12px 0 8px;color:#102a43}
.mg-calc-aside-card p{font-size:13px;line-height:1.8;color:#62788c;margin:0}
.mg-calc-aside-blue{background:#102f4b;color:#fff;border-color:#102f4b}
.mg-calc-aside-blue h3{color:#fff;margin-top:0}
.mg-calc-aside-blue a{color:#b9dcf7;font-size:13px;font-weight:700;text-decoration:none}
body.rtl .mg-calc-page{line-height:1.85}
body.rtl .mg-calc-hero-copy h1,body.rtl .mg-calc-panel-head h2,body.rtl .mg-calc-info h2{font-weight:800}
@media(max-width:900px){.mg-calc-layout{grid-template-columns:minmax(0,1fr) 250px;gap:15px}.mg-calc-panel{padding:22px}}
@media(max-width:700px){.mg-calc-page{width:calc(100% - 24px);margin:18px auto 40px}.mg-calc-hero{padding:22px;gap:15px}.mg-calc-hero-icon{flex-basis:60px;width:60px;height:60px;font-size:30px;border-radius:15px}.mg-calc-layout{grid-template-columns:1fr}.mg-calc-aside{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-calc-panel{padding:18px}.mg-calc-form-pro .mg-calc-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.mg-calc-hero{align-items:flex-start;padding:18px}.mg-calc-hero-copy p{font-size:14px}.mg-calc-trust{gap:8px;flex-direction:column}.mg-calc-form-pro .mg-calc-fields{grid-template-columns:1fr}.mg-calc-aside{grid-template-columns:1fr}.mg-calc-result-pro ul{grid-template-columns:1fr}.mg-calc-panel-head h2{font-size:20px}}
/* Arabic reading comfort */
body.rtl .mg-home,body.rtl .mg-calculator,body.rtl .mg-calc-index{font-family:"Tajawal",Arial,sans-serif;line-height:1.85}
body.rtl .mg-calc-intro,body.rtl .mg-calc-card p,body.rtl .mg-calc-disclaimer{font-size:15px;line-height:1.9}
body.rtl .mg-calc-card strong,body.rtl .mg-section-head h2,body.rtl .mg-calculator h2{font-weight:700;letter-spacing:0}
@media(max-width:900px){.mg-calc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.mg-calc-grid{grid-template-columns:1fr;gap:12px}.mg-calc-card{min-height:0;padding:18px}.mg-calc-card p{font-size:14px}}
@media(prefers-reduced-motion:reduce){.mg-slide,.mg-post-thumb img,.mg-calc-card{transition:none}.mg-calc-card:hover{transform:none}}
