/* MP Tech 4.0 — final site-wide fixes. Loaded last on every MP Tech view. */

/* Spam trap of the contact form stays invisible. */
.screen-trap{position:absolute!important;inset:auto!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}

/* Current page in the main navigation. */
.header nav a[aria-current="page"]{color:var(--gold)!important;-webkit-text-fill-color:var(--gold)}
body.light .header nav a[aria-current="page"]{color:#7a5f1f!important;-webkit-text-fill-color:#7a5f1f}

/* Contact block grows with its content (status messages, translations). */
.contact{height:auto!important;padding-bottom:130px}
.contact form{min-height:0!important}
.contact .form-status{margin:-6px 0 22px;padding:14px 18px;border-radius:12px;border:1px solid #3d3d3d;font-size:15px;line-height:1.7}
.contact .form-status--ok{border-color:#3e5b3a;background:#0f1a0e;color:#cfe8c9!important}
.contact .form-status--error,.contact .form-status--invalid{border-color:#6b4a2a;background:#1c140b;color:#f1d7b5!important}
.contact .send[disabled]{opacity:.6;cursor:progress}
.contact-card a{color:inherit}
.contact-card a:hover{color:var(--gold)}
body.light .contact .form-status--ok{background:#eef7ec;color:#24461f!important}
body.light .contact .form-status--error,body.light .contact .form-status--invalid{background:#fbf2e6;color:#5c3d14!important}

/* ---------- Homepage ---------- */
/* About banner: full width of the page without 100vw overflow (body is zoomed). */
body.mptech-home #about.mptech-about-full-banner>.mptech-about-banner{inline-size:100%!important;min-inline-size:0!important;margin-inline:0!important;background-position:center 46%!important}
html:has(body.mptech-custom-page){overflow-x:clip}

/* Selected work: a calm 3-column grid (6 projects). */
body.mptech-home .projects{padding-top:110px;padding-bottom:40px}
body.mptech-home .project-track{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:32px!important;width:calc(100% - 424px)!important;max-width:1496px;margin:52px auto 0!important;padding:0!important;overflow:visible!important}
body.mptech-home .project{width:auto!important}
body.mptech-home .project-art{aspect-ratio:4/3!important;min-height:0!important;border-radius:24px!important;background-color:#111;transition:transform .5s ease,filter .3s ease}
body.mptech-home .project:hover .project-art{transform:translateY(-6px)}
body.mptech-home .project-art>div{left:28px;right:28px;bottom:26px}
body.mptech-home .project-art h3{font-size:24px!important}
body.mptech-home .project-art small{font-size:14px!important}
body.mptech-home .project-external{font-size:16px;padding-top:16px}
body.mptech-home .all-services{font-family:inherit;font-size:16px;margin-top:32px}

/* ---------- About page ---------- */
/* The background picture behind "من الرؤية إلى الواقع" is removed (it did not fit wide screens). */
body.mptech-about .intro{background:none!important;background-image:none!important}

/* Keep headline colours stable after switching theme. */
body.mptech-custom-page:not(.light) .hero-content h1,body.mptech-custom-page:not(.light) .page-title{color:#f5f5f5!important;-webkit-text-fill-color:#f5f5f5}
body.mptech-custom-page.light .page-title{color:#171717!important;-webkit-text-fill-color:#171717}

@media(max-width:999px){
 body.mptech-home .project-track{width:calc(100% - 48px)!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important;margin-top:30px!important}
 body.mptech-home .project-art h3{font-size:17px!important}
 body.mptech-home .project-art small{font-size:12px!important}
 body.mptech-home .project-art>div{left:16px;right:16px;bottom:14px}
 body.mptech-home .project-external{font-size:13px}
 .contact{padding-bottom:70px}
}
@media(max-width:580px){
 body.mptech-home .project-track{grid-template-columns:1fr!important}
 body.mptech-home .project-art h3{font-size:19px!important}
}

/* ---------- Homepage "من نحن": text over the office photo ---------- */
body.mptech-home #about.mptech-about-full-banner{position:relative!important;display:grid!important;grid-template:1fr/1fr!important;align-items:center!important;height:auto!important;min-height:820px!important;padding:0!important;margin-top:60px;gap:0!important;overflow:hidden;isolation:isolate}
body.mptech-home #about.mptech-about-full-banner>.mptech-about-banner{grid-area:1/1!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;z-index:-2;background-size:cover!important;background-position:center 46%!important;border-radius:0!important}
body.mptech-home #about.mptech-about-full-banner:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(270deg,rgba(0,0,0,.9) 0%,rgba(0,0,0,.72) 45%,rgba(0,0,0,.3) 100%),linear-gradient(0deg,rgba(0,0,0,.55),rgba(0,0,0,0) 40%)}
body.mptech-home #about.mptech-about-full-banner>.about-copy{grid-area:1/1!important;position:relative;z-index:1;width:calc(100% - 424px)!important;max-width:1496px;margin:0 auto!important;padding:120px 0!important}
body.mptech-home #about.mptech-about-full-banner>.about-copy>*{max-width:860px}
body.mptech-home #about.mptech-about-full-banner .about-copy h2{margin-top:24px!important}
body.mptech-home #about.mptech-about-full-banner .about-copy p,body.mptech-home #about.mptech-about-full-banner .about-copy h2{color:#f5f5f5!important;-webkit-text-fill-color:#f5f5f5;text-shadow:0 2px 18px rgba(0,0,0,.45)}
body.mptech-home #about.mptech-about-full-banner .about-copy>p:not(.section-label){color:#e2e2e2!important;-webkit-text-fill-color:#e2e2e2}
body.mptech-home #about.mptech-about-full-banner .about-copy .more{color:var(--gold)!important;-webkit-text-fill-color:var(--gold)}
html[dir="ltr"] body.mptech-home #about.mptech-about-full-banner:before{background:linear-gradient(90deg,rgba(0,0,0,.9) 0%,rgba(0,0,0,.72) 45%,rgba(0,0,0,.3) 100%),linear-gradient(0deg,rgba(0,0,0,.55),rgba(0,0,0,0) 40%)}
@media(max-width:999px){
 body.mptech-home #about.mptech-about-full-banner{min-height:0!important;margin-top:30px}
 body.mptech-home #about.mptech-about-full-banner:before{background:rgba(0,0,0,.72)}
 body.mptech-home #about.mptech-about-full-banner>.about-copy{width:calc(100% - 48px)!important;padding:64px 0!important}
}
