/* INTELEOX final fixes, v44.5.5 */
html,body{
  max-width:100% !important;
  overflow-x:hidden !important;
}
html{
  -webkit-text-size-adjust:100%;
}
body{
  min-width:0;
}
img,svg,video,iframe{
  max-width:100%;
}

/* Cleaner Arabic/Hebrew micro-headings */
html[lang="ar"] .kicker,
html[lang="ar"] .eyebrow,
html[lang="he"] .kicker,
html[lang="he"] .eyebrow{
  letter-spacing:0 !important;
  text-transform:none !important;
  line-height:1.55 !important;
}
html[lang="ar"] .kicker,
html[lang="ar"] .eyebrow{
  font-family:Cairo, Arial, sans-serif !important;
  font-weight:700 !important;
}

/* Home header on mobile: logo left, language + menu on right */
@media (max-width:700px){
  .topbar .nav{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:10px 10px !important;
    min-height:72px !important;
    height:auto !important;
    padding:12px 0 !important;
    direction:ltr !important;
  }
  .topbar .logoImageLink{
    justify-self:start !important;
    align-self:center !important;
  }
  .topbar .logoImageLink img{
    width:150px !important;
    max-width:46vw !important;
    height:auto !important;
  }
  .topbar .navright{
    justify-self:end !important;
    align-self:center !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    min-width:0 !important;
    direction:ltr !important;
  }
  .topbar .navright .languagePicker,
  .topbar .navright #langToggle,
  .topbar .navright .lang{
    flex:none !important;
    min-width:0 !important;
  }
  .topbar .navright .languageButton,
  .topbar .navright .lang{
    height:44px !important;
    min-width:108px !important;
    max-width:116px !important;
    padding:0 14px !important;
    border-radius:999px !important;
    font-size:13px !important;
    font-weight:700 !important;
  }
  .topbar .navright .languageButton{
    width:auto !important;
    white-space:nowrap !important;
  }
  .topbar .navright .menuBtn{
    width:44px !important;
    height:44px !important;
    flex:none !important;
  }
}

/* Home projects grid on mobile: exactly two cards per row, CTA full width */
@media (max-width:700px){
  .portfolioGrid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    align-items:stretch !important;
  }
  .portfolioCard,
  .portfolioCta{
    min-width:0 !important;
  }
  .portfolioBrowser{
    height:128px !important;
  }
  .portfolioCardBody{
    padding:10px !important;
    gap:8px !important;
  }
  .portfolioCopy h3{
    font-size:13px !important;
    line-height:1.25 !important;
  }
  .portfolioCopy p{
    font-size:10px !important;
    line-height:1.45 !important;
    margin-bottom:8px !important;
  }
  .projectTags{
    display:none !important;
  }
  .viewProject{
    width:100% !important;
    min-width:0 !important;
    font-size:10px !important;
    min-height:36px !important;
    padding:8px 6px !important;
  }
  .portfolioCta{
    grid-column:1 / -1 !important;
    padding:18px 14px !important;
  }
  .portfolioCta h3{
    font-size:22px !important;
  }
  .portfolioCta p{
    font-size:11px !important;
    line-height:1.55 !important;
  }
}

/* Project pages mobile header: logo left, language right, buttons stacked */
@media (max-width:700px){
  .top{
    position:relative !important;
    height:auto !important;
    min-height:0 !important;
  }
  .top > .shell{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:
      "logo lang"
      "back back"
      "cta cta" !important;
    align-items:center !important;
    gap:10px 10px !important;
    padding:14px 0 16px !important;
    direction:ltr !important;
  }
  .top > .shell > .brandImgLink{
    grid-area:logo !important;
    justify-self:start !important;
    align-self:center !important;
    margin:0 !important;
  }
  .top > .shell > .brandImgLink img{
    width:150px !important;
    max-width:46vw !important;
    max-height:30px !important;
    height:auto !important;
  }
  .top > .shell > .topActions{
    display:contents !important;
  }
  .top > .shell > .topActions > a:first-child{
    grid-area:back !important;
  }
  .top > .shell > .topActions > .cta{
    grid-area:cta !important;
  }
  .top > .shell > .topActions > .languagePicker,
  .top > .shell > .topActions > #langToggle,
  .top > .shell > .topActions > .lang{
    grid-area:lang !important;
    justify-self:end !important;
    align-self:center !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
  }
  .top > .shell > .topActions > .miniBtn,
  .top > .shell > .topActions > .languagePicker .languageButton,
  .top > .shell > .topActions > #langToggle,
  .top > .shell > .topActions > .lang{
    min-height:44px !important;
    height:44px !important;
    box-sizing:border-box !important;
  }
  .top > .shell > .topActions > a:first-child,
  .top > .shell > .topActions > .cta{
    width:100% !important;
    justify-self:stretch !important;
    justify-content:center !important;
    padding:0 14px !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  .top > .shell > .topActions > .languagePicker .languageButton,
  .top > .shell > .topActions > #langToggle,
  .top > .shell > .topActions > .lang{
    min-width:112px !important;
    max-width:124px !important;
    width:124px !important;
    padding:0 14px !important;
    border-radius:999px !important;
    font-size:13px !important;
    font-weight:700 !important;
    white-space:nowrap !important;
  }
}

/* Project page footer + legal footer consistency */
@media (max-width:700px){
  .footer .shell,
  footer .shell,
  .inteleoxLegalFooter{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:16px !important;
    text-align:center !important;
    direction:ltr !important;
  }
  .footerBrand,
  .brandImgLink,
  .footerBrand img,
  .brandImgLink img{
    align-self:center !important;
    justify-self:center !important;
    margin-inline:auto !important;
  }
  .footerBrand img,
  .brandImgLink img{
    width:155px !important;
    max-width:62vw !important;
    height:auto !important;
  }
  .instagramLink{
    align-self:center !important;
    justify-self:center !important;
    margin:0 !important;
  }
  .legalFooter,
  .footerLinks,
  .legalLinks{
    width:100% !important;
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    gap:10px !important;
    margin:0 !important;
  }
  .legalFooter{
    flex-direction:column !important;
  }
  .legalFooter .copyright,
  .legalFooter .footerCopy,
  .inteleoxCopyright{
    margin:0 !important;
    text-align:center !important;
    line-height:1.5 !important;
    white-space:normal !important;
  }
}

/* Safe dropdown sizing */
.viewportLanguageMenu{
  max-width:calc(100vw - 24px) !important;
}
