/* ROCNMADAC approved prototype. Native Elementor controls own page layouts.
   This file contains image overlays, semantic states and third-party widget compatibility. */
.rm-ref-hero {position:relative;isolation:isolate;overflow:hidden;}
.rm-ref-hero::before {content:"";position:absolute;inset:0;z-index:0;opacity:1;background:linear-gradient(90deg,rgba(4,31,51,.96),rgba(4,31,51,.70) 43%,rgba(4,31,51,.07) 95%);pointer-events:none;}
html[lang^="ar"] .rm-ref-hero::before {background:linear-gradient(270deg,rgba(4,31,51,.98),rgba(4,31,51,.70) 45%,rgba(4,31,51,.08));}
.rm-ref-hero-content {position:relative;z-index:1;}
.rm-ref-h1 strong {color:#46d9d1;font-weight:800;}
.rm-ref-hero p,.rm-ref-section p,.rm-ref-stats-ribbon p,.rm-global-footer p {margin-top:0;}
.rm-ref-eyebrow p {margin:0;display:inline-flex;align-items:center;gap:8px;}
.rm-ref-eyebrow p::before {content:"";display:block;width:22px;height:2px;background:currentColor;flex-shrink:0;}
.rm-ref-stat + .rm-ref-stat {border-inline-start:1px solid #e0e9ef;}
.rm-ref-stat strong {font-family:Manrope,Tajawal,sans-serif;}
.rm-ref-stats-grid {box-shadow:0 16px 48px rgba(9,38,60,.08);}
.rm-ref-service-card {overflow:hidden;box-shadow:0 8px 25px rgba(9,50,76,.035);}
.rm-ref-service-card img {display:block;}
.rm-photo-sector-card {position:relative;isolation:isolate;overflow:hidden;}
.rm-photo-sector-card > .elementor-widget-image {position:absolute;inset:0;width:100%;height:100%;z-index:-2;margin:0;}
.rm-photo-sector-card > .elementor-widget-image .elementor-widget-container,.rm-photo-sector-card > .elementor-widget-image img {width:100%;height:100%;object-fit:cover;display:block;}
.rm-photo-sector-card::after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,rgba(4,30,47,.91),rgba(4,30,47,.02) 75%);pointer-events:none;}
.rm-photo-sector-card .elementor-widget-heading {position:static;}
.rm-photo-sector-card .elementor-heading-title a::after {content:"";position:absolute;inset:0;}
.rm-ref-tile {position:relative;isolation:isolate;}
.rm-ref-tile-image {position:absolute;inset:0;width:100%;height:100%;z-index:-2;}
.rm-ref-tile-image .elementor-widget-container,.rm-ref-tile-image img {width:100%;height:100%;object-fit:cover;display:block;}
.rm-ref-tile::after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,rgba(4,24,40,.95),rgba(4,24,40,0) 70%);pointer-events:none;}
.rm-ref-tile-info {position:relative;z-index:1;}
.rm-ref-tile-info p {margin:0;}
.rm-ref-showcase {grid-template-columns:1.3fr 1fr 1fr;}
.rm-ref-tile-large {grid-row:span 2;}
.rm-ref-gallery [hidden] {display:none;}
.rm-ref-filter .elementor-button[aria-pressed="true"] {background:#0eb5ad;border-color:#0eb5ad;color:#082943;}
.rm-ref-partners img {width:100%;height:76px;object-fit:contain;}
.rm-ref-image-label {position:absolute;inset-inline-start:17px;bottom:17px;z-index:2;width:auto;max-width:90%;background:rgba(7,39,59,.83);padding:8px 12px;border-radius:6px;}
.rm-ref-image-label p {margin:0;color:white;}
.rm-global-header {box-shadow:0 6px 30px rgba(15,41,59,.025);border-bottom:1px solid rgba(8,41,67,.07);}
.rm-global-header .elementor-widget-image img {display:block;}
.rm-language-switcher .lsep-language-list {display:flex;flex-direction:row;flex-wrap:nowrap;direction:ltr;align-items:center;justify-content:center;gap:6px;margin:0;padding:0;list-style:none;}
.rm-language-switcher .lsep-lang-item {display:inline-flex;align-items:center;}
.rm-language-switcher a {display:inline-flex;min-height:44px;min-width:24px;align-items:center;justify-content:center;text-transform:uppercase;}
.rm-language-switcher .lsep-lang-code {font:700 12px/1.2 Manrope,sans-serif;}
.rm-global-header .rm-menu-quote {display:none;}
.rm-global-footer .rm-footer-copy p {margin-bottom:5px;}
.rm-ref-form-card .ff-el-form-control {font-family:inherit;font-size:13px;border:1px solid #cbdce5;border-radius:8px;background:#fbfdfe;padding:12px 14px;color:#234559;}
.rm-ref-form-card .ff-el-input--label {font-size:12px;font-weight:700;}
.rm-ref-form-card .ff-btn-submit {background:#0eb5ad;border:1px solid #0eb5ad;color:#082943;border-radius:8px;padding:12px 22px;font-weight:700;font-family:inherit;}
html[lang^="ar"] .rm-ref-form-card {font-family:Tajawal,sans-serif;}
html[lang^="en"] .rm-ref-form-card {font-family:Manrope,sans-serif;}
.rm-global-header a:focus-visible,.rm-global-header button:focus-visible,.rm-global-footer a:focus-visible,.rm-ref-section a:focus-visible,.rm-photo-sector-card:focus-within {outline:3px solid #0eb5ad;outline-offset:3px;}
.rm-global-header .elementor-menu-toggle {min-width:44px;min-height:44px;}
@media(max-width:800px){.rm-ref-showcase{grid-template-columns:repeat(2,minmax(0,1fr));}.rm-ref-tile-large{grid-column:span 2;grid-row:span 1;min-height:300px;}.rm-ref-stat:nth-child(3){border-inline-start:0;}.rm-ref-stat:nth-child(n+3){border-top:1px solid #e0e9ef;}.rm-global-header .rm-menu-quote{display:block;}}
@media(max-width:540px){.rm-ref-showcase{grid-template-columns:minmax(0,1fr);}.rm-ref-tile-large{grid-column:span 1;min-height:265px;}html[lang^="ar"] .rm-ref-hero::before{background:linear-gradient(to top,rgba(4,31,51,.93),rgba(4,31,51,.56) 75%,rgba(4,31,51,.32));}.rm-ref-section-header>.e-con{width:100%;}.rm-ref-section-header .elementor-widget-button{align-self:flex-start;}}
@media(prefers-reduced-motion:reduce){.rm-ref-section *{scroll-behavior:auto;transition:none;}}


/* Language-specific content in shared native dynamic templates. */
html:lang(ar) :is(.rm-service-single-lang-en,.rm-sector-single-lang-en),html:lang(en) :is(.rm-service-single-lang-ar,.rm-sector-single-lang-ar){display:none!important;}
.rm-ref-button .elementor-button{white-space:nowrap;}
.rm-ref-list a{color:inherit;}
.rm-global-footer a{color:inherit;}
.rm-global-footer a:hover{text-decoration:underline;}

/* The shared ACF single templates resolve content by request language. */
html:lang(en) :is(.elementor-716,.elementor-702) :is(.elementor-heading-title,.elementor-widget-text-editor,.elementor-button){font-family:Manrope,sans-serif!important;}

/* Fluent Forms stays native; align its existing fieldset to the approved form rows. */
.rm-ref-form-card form fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:15px;}
.rm-ref-form-card form fieldset>.ff-el-group{min-width:0;}
.rm-ref-form-card :is(#fluentform_3,#fluentform_4) fieldset>div:nth-of-type(n+5),.rm-ref-form-card :is(#fluentform_5,#fluentform_6) fieldset>div:nth-of-type(n+7){grid-column:1/-1;}
.rm-ref-form-card .ff_submit_btn_wrapper .ff-btn-submit{width:100%;}
@media(max-width:540px){.rm-ref-form-card form fieldset{grid-template-columns:minmax(0,1fr);}}

/* Match the prototype’s intrinsic hero column while preserving RTL text alignment. */
html:lang(ar) .rm-ref-dynamic-hero-inner{--width:621px;}
@media(max-width:800px){html:lang(ar) .rm-ref-dynamic-hero-inner{--width:100%;}}
.rm-ref-eyebrow::before{content:"";display:inline-block;width:22px;height:2px;margin-inline-end:8px;background:currentColor;vertical-align:middle;}
.rm-ref-eyebrow p::before{content:none;}

/* Preserve the approved photographs’ intrinsic proportions with the source minimums. */
.rm-ref-image-frame img{display:block;width:100%;height:auto;min-height:360px;object-fit:cover;}
@media(max-width:800px){.rm-ref-image-frame img{min-height:270px;}}
@media(max-width:540px){.rm-ref-image-frame img{min-height:235px;}}

/* Original EN | AR switcher presentation; URLs remain managed by Polylang. */
.rm-language-switcher .lsep-language-list{flex-direction:row-reverse;}
.rm-language-switcher .lsep-lang-item:first-child::before{content:"|";margin-inline-end:6px;color:#627a8d;font:400 12px Manrope,sans-serif;}

/* Override the language widget’s narrower horizontal wrapper, which otherwise wraps. */
.rm-global-header .rm-language-switcher .lsep-wrapper.horizontal{padding:0;}
.rm-global-header .rm-language-switcher .lsep-wrapper.horizontal .lsep-language-list{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:6px;width:100%;}

/* Published portfolio: native Loop Grid and bilingual project details. */
.rm-ref-gallery .e-loop-item[hidden]{display:none!important;}
.rm-project-card a{color:inherit;}
.rm-ref-gallery .elementor-widget-loop-grid{width:100%;}
.single-rm_project .elementor-widget-text-editor ul{padding-inline-start:1.3em;}
.single-rm_project .elementor-widget-text-editor li{margin-block:.5em;}

.rm-project-card .rm-ref-tile-image a{display:block;width:100%;height:100%;}
