/* Mr. Engineering Theme V7.4.2 — Services menu removal + tablet services layout cleanup. */

/* 1) Hard-disable any legacy services dropdown/mega menu that may remain cached from older markup. */
.mre-services-hub-v607,
.mre-nav__item--services-v607 .mre-services-hub-v607,
.mre-nav__item--services-v607.is-open .mre-services-hub-v607,
.mre-mega-menu,
.mre-mobile-services-v607{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.mre-nav__link .mre-chevron{display:none!important;}
.mre-nav__list--v742 .mre-nav__link{
  white-space:nowrap;
  align-items:center;
}

/* 2) Keep header stable on desktop and tablet: no dropdown overflow, no horizontal jump. */
.mre-header,
.mre-header__inner,
.mre-nav,
.mre-nav__list{
  min-width:0;
}
.mre-nav__list--v742{
  display:flex;
  align-items:center;
  gap:clamp(10px,1.1vw,20px);
  flex-wrap:nowrap;
}
@media (min-width:1025px) and (max-width:1250px){
  .mre-nav__list--v742{gap:9px;}
  .mre-nav__list--v742 .mre-nav__link{font-size:.86rem;padding-inline:4px;}
  .mre-header__quote{padding-inline:14px!important;}
  .mre-header-track span{display:none!important;}
}
@media (max-width:1024px){
  .mre-nav{display:none!important;}
}

/* 3) Mobile menu is now a clean list, not a services accordion. */
.mre-mobile-nav--v742 .mre-mobile-nav__list{
  gap:8px;
}
.mre-mobile-nav--v742 .mre-mobile-nav__list>a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  border-radius:12px;
}

/* 4) Services page tablet layout: two stable columns on tablets, one on small mobile. */
@media (min-width:768px) and (max-width:1180px){
  .mre-services-archive-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px!important;
    align-items:stretch!important;
  }
  .mre-service-card--archive{
    min-width:0!important;
    height:100%!important;
  }
  .mre-service-card--archive .mre-service-card__image{
    aspect-ratio:16/9!important;
  }
  .mre-service-card--archive .mre-service-card__content{
    padding:20px!important;
  }
  .mre-service-card--archive .mre-service-card__title,
  .mre-service-card--archive .mre-service-card__title a{
    font-size:1.05rem!important;
    line-height:1.55!important;
    overflow-wrap:anywhere!important;
  }
  .mre-service-card--archive .mre-service-card__desc{
    font-size:.88rem!important;
    line-height:1.7!important;
    display:-webkit-box!important;
    -webkit-line-clamp:3!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
}
@media (max-width:767px){
  .mre-services-archive-grid{
    grid-template-columns:1fr!important;
    gap:15px!important;
  }
}

/* 5) Homepage services block on tablet: stop card crushing and awkward text wrapping. */
@media (min-width:768px) and (max-width:1180px){
  .mre-home-services-v611__layout,
  [dir="rtl"] .mre-home-services-v611__layout{
    grid-template-columns:1fr!important;
    grid-template-areas:"intro" "slider"!important;
    gap:18px!important;
  }
  .mre-home-services-v611__intro{
    min-height:0!important;
    padding:30px 24px!important;
  }
  .mre-home-services-v611__intro p{
    max-width:760px!important;
  }
  .mre-home-services-v611__slider{
    padding:18px!important;
    overflow:hidden!important;
  }
  .mre-home-services-v611__slider [data-mobile-grid="true"] .mre-carousel__track-wrap{
    overflow:visible!important;
  }
  .mre-home-services-v611__slider [data-mobile-grid="true"] .mre-carousel__track{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
    transform:none!important;
    width:100%!important;
    min-height:0!important;
  }
  .mre-home-services-v611__slider [data-mobile-grid="true"] .mre-service-card--v611{
    width:auto!important;
    min-width:0!important;
    min-height:260px!important;
    height:auto!important;
    padding:22px 18px!important;
  }
  .mre-home-services-v611__slider [data-mobile-grid="true"] .mre-carousel__controls{
    display:none!important;
  }
}

/* 6) Prevent any accidental page-level horizontal overflow caused by older services dropdown rules. */
html,body{max-width:100%;overflow-x:clip;}
