/* Hero source convention: subject on the RIGHT in the original image. */
.hero{isolation:isolate}
html[dir] .hero .hero-background{position:absolute;inset:0;z-index:0;background:none!important;transform:none!important;pointer-events:none}
.hero .hero-background::before,.hero .hero-background::after{content:"";position:absolute;inset:0}
.hero .hero-background::before{background:url('/images/home/hero-background.jpg') right center/cover no-repeat;transform:none}
html[lang="en"] .hero .hero-background::before{transform:none}
html[lang="ar"] .hero .hero-background::before{transform:scaleX(-1)}
.hero .hero-background::after{background:linear-gradient(to right,rgba(5,18,30,.35),rgba(5,18,30,.21) 55%,rgba(5,18,30,.03) 78%,transparent)}
html[lang="ar"] .hero .hero-background::after{background:linear-gradient(to left,rgba(5,18,30,.35),rgba(5,18,30,.21) 55%,rgba(5,18,30,.03) 78%,transparent)}
.hero .container{position:relative;z-index:1}
.hero h1,.hero p{text-shadow:0 2px 12px rgba(0,0,0,.35)}
@media(min-width:901px){
  html[lang="ar"] .hero h1,html[lang="en"] .hero h1{max-width:65%;font-size:clamp(34px,3.35vw,55px)}
  html[lang="ar"] .hero h1 .hero-ar-line{white-space:normal}
  .hero p,.hero-tags{max-width:65%}
}
@media(max-width:900px){
  .hero .hero-background::before{background-position:75% center}
  .hero .hero-background::after,html[lang="ar"] .hero .hero-background::after{background:linear-gradient(180deg,rgba(5,18,30,.69),rgba(5,18,30,.57) 55%,rgba(5,18,30,.72))}
}
@media(max-width:650px){
  .hero .hero-background::before{background-position:76% center}
  .hero .hero-background::after,html[lang="ar"] .hero .hero-background::after{background:linear-gradient(180deg,rgba(5,18,30,.75),rgba(5,18,30,.59) 55%,rgba(5,18,30,.77))}
}
/* Photo cards crop proportionally. Logos, equipment detail and galleries preserve the complete image. */
main img{object-position:center}
main .tile img,main .product-image img,main .factory-industry img,main .work-slide img,main .automation-item-photo img{object-fit:cover}
main .product-detail-photo img,main .industrial-slide img,#app .examples-section .example-photo img{object-fit:contain;background:#f4f6f7}
main .brand-full-logo,.brand-full-logo,.footer-symbol-logo{object-fit:contain}
/* Only caption areas receive a gradient; actual project and equipment photos are not mirrored. */
.factory-industry::after{background:linear-gradient(to top,rgba(4,20,33,.88),rgba(4,20,33,.26) 42%,transparent 82%)}
.work-overlay{background:linear-gradient(transparent,rgba(5,17,28,.80))}

/* Explicit bilingual orientation; do not mirror text or the parent layer. */
html[dir="ltr"] .hero .hero-background::before{transform:none!important}
html[dir="rtl"] .hero .hero-background::before{transform:scaleX(-1)!important}
@media(min-width:901px){
html[dir="ltr"] .hero .hero-background::after{background:linear-gradient(to right,rgba(5,18,30,.12),rgba(5,18,30,.06) 55%,transparent 78%)}
html[dir="rtl"] .hero .hero-background::after{background:linear-gradient(to left,rgba(5,18,30,.12),rgba(5,18,30,.06) 55%,transparent 78%)}
}
