/* ==========================================================
   RQ LAW v34 — Final mobile header, Bootstrap-style drawer,
   desktop nav underline, and seamless clients marquee fixes
   ========================================================== */

/* Desktop menu: underline must match the text width only */
@media (min-width: 881px){
  html body .main-nav{
    gap: 26px !important;
  }

  html body .main-nav .nav-link:not(.nav-link--cta){
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    height: 76px !important;
    min-height: 76px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    color: rgba(19,43,43,.62) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html body .main-nav .nav-link:not(.nav-link--cta)::after{
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 18px !important;
    width: 100% !important;
    height: 2px !important;
    border-radius: 2px !important;
    background: #b8923e !important;
    opacity: 0 !important;
    transform: scaleX(0) !important;
    transform-origin: center !important;
    transition: opacity .22s ease, transform .22s ease !important;
  }

  html body .main-nav .nav-link:not(.nav-link--cta):hover,
  html body .main-nav .nav-link:not(.nav-link--cta).active{
    color: #0f5c5c !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html body .main-nav .nav-link:not(.nav-link--cta):hover::after,
  html body .main-nav .nav-link:not(.nav-link--cta).active::after{
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }
}

/* Mobile header: Arabic = logo right edge + toggle left edge. English = reverse. */
@media (max-width: 880px){
  html body{ padding-top: 64px !important; }
  html body .header,
  html body #mainHeader{
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(255,255,255,.98) !important;
    border-bottom: 1px solid rgba(19,43,43,.10) !important;
    box-shadow: 0 2px 12px rgba(19,43,43,.06) !important;
    z-index: 99990 !important;
  }

  html body .header .container{
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html body .header-content{
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html[dir="rtl"] body .header-content{ flex-direction: row !important; }
  html[dir="ltr"] body .header-content{ flex-direction: row !important; }

  html body .header .main-nav,
  html body .header .header-lang{
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 0 !important;
  }

  html body .header .logo{
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    order: 1 !important;
  }

  html body .header .mobile-menu-toggle{
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    order: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 5px !important;
    border-radius: 0 !important;
    border: 1px solid rgba(15,92,92,.16) !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: none !important;
  }

  /* in RTL flex row, first item is visually on the right and last item on the left */
  html[dir="rtl"] body .header .logo{ order: 1 !important; }
  html[dir="rtl"] body .header .mobile-menu-toggle{ order: 2 !important; }

  /* in LTR, first item left and last item right */
  html[dir="ltr"] body .header .logo{ order: 1 !important; }
  html[dir="ltr"] body .header .mobile-menu-toggle{ order: 2 !important; }

  html body .header .logo-frame{
    width: 46px !important;
    height: 46px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: 1px solid rgba(184,146,62,.35) !important;
    box-shadow: none !important;
    padding: 4px !important;
  }

  html body .header .logo-img{
    height: 36px !important;
    width: auto !important;
    filter: none !important;
  }

  html body .header .mobile-menu-toggle span{
    display: block !important;
    width: 21px !important;
    height: 2px !important;
    background: #0f5c5c !important;
    border-radius: 99px !important;
  }

  /* Bootstrap-like mobile drawer: simple, professional, links navigate normally */
  html body .mobile-menu{
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(86vw, 360px) !important;
    height: 100vh !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg,#082626 0%,#071d1d 100%) !important;
    border: 0 !important;
    box-shadow: 0 25px 80px rgba(0,0,0,.38) !important;
    opacity: 1 !important;
    visibility: hidden !important;
    transition: transform .28s ease, visibility .28s ease !important;
  }

  html[dir="rtl"] body .mobile-menu{
    right: 0 !important;
    left: auto !important;
    transform: translateX(100%) !important;
  }

  html[dir="ltr"] body .mobile-menu{
    left: 0 !important;
    right: auto !important;
    transform: translateX(-100%) !important;
  }

  html body .mobile-menu.open,
  html body .mobile-menu.active{
    visibility: visible !important;
    transform: translateX(0) !important;
  }

  html body.menu-open::after{
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: rgba(0,0,0,.52) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    pointer-events: auto !important;
  }

  html body .mobile-menu-header{
    min-height: 76px !important;
    padding: 14px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(255,255,255,.04) !important;
    border-bottom: 1px solid rgba(255,255,255,.09) !important;
  }

  html body .mobile-logo span{ color: rgba(255,255,255,.78) !important; }
  html body .mobile-logo img{ background:#fff !important; border-radius: 10px !important; }

  html body .mobile-menu-close{
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 10px !important;
  }

  html body .mobile-menu-lang{
    padding: 16px 18px !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
  }
  html body .mobile-menu-lang-label{ color: rgba(255,255,255,.78) !important; }
  html body .mobile-menu-lang-btns{ background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.12) !important; }
  html body .mobile-menu-lang-btns .lang-btn{ color: rgba(255,255,255,.75) !important; }
  html body .mobile-menu-lang-btns .lang-btn.active{ background: #c9a84c !important; color: #102626 !important; }

  html body .mobile-nav{
    padding: 0 !important;
    gap: 0 !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
  }

  html body .mobile-nav-link,
  html body .mobile-nav-cta{
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 58px !important;
    width: 100% !important;
    padding: 0 22px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    background: transparent !important;
    color: rgba(255,255,255,.88) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-size: .96rem !important;
    font-weight: 800 !important;
    pointer-events: auto !important;
  }

  html[dir="rtl"] body .mobile-nav-link,
  html[dir="rtl"] body .mobile-nav-cta{ flex-direction: row-reverse !important; text-align: right !important; }
  html[dir="ltr"] body .mobile-nav-link,
  html[dir="ltr"] body .mobile-nav-cta{ flex-direction: row !important; text-align: left !important; }

  html body .mobile-nav-link i,
  html body .mobile-nav-cta i{
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important;
    border-radius: 50% !important;
    background: rgba(201,168,76,.12) !important;
    color: #c9a84c !important;
    margin-inline-end: 12px !important;
  }
  html[dir="rtl"] body .mobile-nav-link i,
  html[dir="rtl"] body .mobile-nav-cta i{ margin-inline-end: 0 !important; margin-inline-start: 12px !important; }

  html body .mobile-nav-link:hover,
  html body .mobile-nav-link.active{
    background: rgba(201,168,76,.12) !important;
    color: #ffffff !important;
    border-bottom-color: rgba(201,168,76,.22) !important;
  }

  html[dir="rtl"] body .mobile-nav-link.active{ border-right: 3px solid #c9a84c !important; }
  html[dir="ltr"] body .mobile-nav-link.active{ border-left: 3px solid #c9a84c !important; }

  html body .mobile-nav-cta{
    margin: 14px 18px !important;
    width: calc(100% - 36px) !important;
    min-height: 54px !important;
    border-radius: 12px !important;
    border-bottom: 0 !important;
    justify-content: center !important;
    background: linear-gradient(135deg,#c9a84c,#9e7520) !important;
    color: #fff !important;
  }

  html body .mobile-contact{
    padding: 12px 18px 18px !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(0,0,0,.10) !important;
  }
  html body .mobile-contact-item{
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    color: rgba(255,255,255,.78) !important;
    box-shadow: none !important;
  }
}

/* Clients marquee: no ending gap, continuous loop with 3 equal sets */
.rq-marquee-outer{
  overflow: hidden !important;
  width: 100% !important;
}
.rq-marquee-track{
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 20px !important;
  width: max-content !important;
  min-width: max-content !important;
  animation: rqMarqueeV34 34s linear infinite !important;
  will-change: transform !important;
  transform: translate3d(0,0,0) !important;
}
.rq-marquee-track:hover{ animation-play-state: running !important; }
.rq-cli-card{
  flex: 0 0 180px !important;
}
@keyframes rqMarqueeV34{
  0%{ transform: translate3d(0,0,0); }
  100%{ transform: translate3d(-33.333333%,0,0); }
}
html[dir="rtl"] .rq-marquee-track{
  animation-name: rqMarqueeV34RTL !important;
}
@keyframes rqMarqueeV34RTL{
  0%{ transform: translate3d(-33.333333%,0,0); }
  100%{ transform: translate3d(0,0,0); }
}
