
/* === RTL mega-dropdown anchor fix === */
/* In LTR the trigger sits at the left of the viewport so left:0 works.
   In RTL the trigger is on the right — anchor to right instead. */
[dir="rtl"] .nav__dropdown--mega,
:root[lang="ar"] .nav__dropdown--mega {
  left: auto !important;
  right: 0 !important;
}
[dir="rtl"] .nav__dropdown:not(.nav__dropdown--mega),
:root[lang="ar"] .nav__dropdown:not(.nav__dropdown--mega) {
  /* Non-mega dropdowns are centered with translateX(-50%); that already
     works in both directions, but make sure RTL hover state matches. */
  left: 50%;
  right: auto;
}

/* === Solutions mega-4 dropdown (added) ========================================
   4-column variant of the existing nav mega menu, plus optional 'sub-title as
   link' styling for clickable category headings.                              */
.nav__dropdown--mega-4 .nav__dropdown-mega-grid{
  grid-template-columns:repeat(4,1fr);
  gap:28px;
}
.nav__dropdown--mega-4{
  /* Center the 4-column dropdown under the Solutions nav item (LTR).
     Override the parent .nav__dropdown--mega left:0 anchoring. */
  left:50%;
  right:auto;
  transform:translate(-50%, -8px);
  min-width:1080px;
  max-width:calc(100vw - 64px);
}
.nav__item-wrap:hover .nav__dropdown--mega-4,
.nav__item-wrap:focus-within .nav__dropdown--mega-4{
  transform:translate(-50%, 0);
}
/* RTL: there's a higher-specificity rule [dir="rtl"] .nav__dropdown--mega
   {right:0 !important} that wins, so use a stronger selector to anchor
   the centered version under the Solutions item in RTL too. */
[dir="rtl"] .nav__dropdown--mega.nav__dropdown--mega-4,
:root[lang="ar"] .nav__dropdown--mega.nav__dropdown--mega-4{
  right:50% !important;
  left:auto !important;
  transform:translate(50%, -8px);
}
[dir="rtl"] .nav__item-wrap:hover .nav__dropdown--mega.nav__dropdown--mega-4,
[dir="rtl"] .nav__item-wrap:focus-within .nav__dropdown--mega.nav__dropdown--mega-4,
:root[lang="ar"] .nav__item-wrap:hover .nav__dropdown--mega.nav__dropdown--mega-4,
:root[lang="ar"] .nav__item-wrap:focus-within .nav__dropdown--mega.nav__dropdown--mega-4{
  transform:translate(50%, 0);
}
.nav__dropdown-title--link{
  color:var(--text);
  text-decoration:none;
  transition:color 0.25s ease;
}
.nav__dropdown-title--link:hover{
  color:var(--red);
}
.m-drawer__sub-title--link{
  /* Inherit base sub-title styling (drawer is dark-themed) but make it a link. */
  font-family:var(--font-mono);
  font-size:10px;
  font-weight:500;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(245,242,234,0.55);
  padding:14px 0 8px;
  border-top:1px solid rgba(245,242,234,0.05);
  margin-top:6px;
  display:block;
  text-decoration:none;
  transition:color 0.25s ease;
}
.m-drawer__sub:first-child .m-drawer__sub-title--link:first-child,
.m-drawer__sub-title--link:first-child{
  border-top:0;
  margin-top:0;
  padding-top:6px;
}
.m-drawer__sub-title--link:hover{color:#F5F2EA;}
/* Tablet/mobile fallback for the desktop mega-4 when viewport is narrow but
   the desktop nav is still visible (e.g. ~960–1180px). Drop to 2 columns. */
@media (max-width:1180px){
  .nav__dropdown--mega-4{min-width:0;width:calc(100vw - 64px);}
  .nav__dropdown--mega-4 .nav__dropdown-mega-grid{grid-template-columns:repeat(2,1fr);}
}
/* ============================================================================ */

