/* Proposed mega menu (change c40). Desktop navigation only (theme shows #main-nav from 1030px);
   the theme's own mobile menu is untouched. Colours, font and type match the live nav:
   bar #2B374F, panels #3C4860, hover red #BD2427, BenchNine uppercase. */

.rpm-wrapper { position: relative; }
html.rpc-on [data-change="c40"] { position: relative; }
html.rpc-on [data-change="c40"] > .rpc-badge { top: 6px; left: 8px; }

.rpm-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rpm-item { position: static; display: flex; align-items: stretch; margin: 0; }
.rpm-item--drop { position: relative; }
.rpm-top {
  display: block;
  padding: 0.75em 0.45em 0.75em 2em;
  color: #fff !important;
  font-weight: bold;
  text-decoration: none !important;
  text-transform: uppercase;
}
.rpm-item:not(.rpm-item--mega):not(.rpm-item--drop) > .rpm-top { padding-right: 2em; }
.rpm-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  margin: 0;
  padding: 0 1.2em 0 0.2em;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.rpm-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.rpm-open > .rpm-toggle::after { margin-top: 3px; transform: rotate(-135deg); }
.rpm-item:hover, .rpm-item.rpm-open, .rpm-item.rpm-current { background-color: #3C4860; }
.rpm-top:focus-visible, .rpm-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.rpm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- full-width panels ---------- */
.rpm-panel, .rpm-drop { display: none; }
.rpm-open > .rpm-panel, .rpm-open > .rpm-drop { display: block; }
.rpm-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #3C4860;
  border-top: 3px solid #BD2427;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}
.rpm-inner { width: 96%; max-width: 1140px; margin: 0 auto; padding: 18px 0 26px; }
.rpm-panel-head { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.rpm-all {
  color: #fff !important;
  font-family: "BenchNine", "Benchnine", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: bold;
  text-decoration: none !important;
  text-transform: uppercase;
}
.rpm-all:hover, .rpm-all:focus-visible { color: #fff !important; text-decoration: underline !important; }
.rpm-body { display: flex; gap: 28px; align-items: flex-start; }
.rpm-cols {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
}
.rpm-col { min-width: 0; }
.rpm-col-title {
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: "BenchNine", "Benchnine", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: bold;
  line-height: 1.2;
  text-transform: uppercase;
}
.rpm-col-title a { color: #fff !important; text-decoration: none !important; }
.rpm-col-title a:hover, .rpm-col-title a:focus-visible { color: #fff !important; text-decoration: underline !important; }
.rpm-col-title--plain { color: rgba(255, 255, 255, 0.75); }

.rpm-list, .rpm-sublist, .rpm-grid { margin: 0; padding: 0; list-style: none; }
.rpm-list li, .rpm-grid li { display: block; margin: 0; padding: 0; text-align: left; }
.rpm-list a, .rpm-grid a {
  display: block;
  padding: 5px 8px;
  margin: 0 -8px;
  border-radius: 2px;
  color: #fff !important;
  font-weight: normal;
  text-decoration: none !important;
  text-transform: none;
}
.rpm-list a:hover, .rpm-list a:focus-visible, .rpm-grid a:hover, .rpm-grid a:focus-visible { background-color: #BD2427; color: #fff !important; outline: none; }
.rpm-list--strong > li > a { font-weight: bold; }
.rpm-sublist { margin: 2px 0 4px 10px; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, 0.18); }
.rpm-sublist a { font-size: 14px; color: rgba(255, 255, 255, 0.88) !important; }
.rpm-list > li:has(> .rpm-sublist) > a { font-weight: bold; }

.rpm-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rpm-grid a {
  margin: 0;
  padding: 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  font-weight: bold;
  min-height: 100%;
  box-sizing: border-box;
}

/* ---------- feature box ---------- */
.rpm-feature {
  flex: 0 0 250px;
  padding: 16px 18px 14px;
  background: #2B374F;
  border-left: 4px solid #BD2427;
  color: #fff;
}
.rpm-feature p { margin: 0 0 10px; color: #fff; font-size: 14px; line-height: 1.45; }
.rpm-feature .rpm-feature-title {
  margin-bottom: 6px;
  font-family: "BenchNine", "Benchnine", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: bold;
  line-height: 1.15;
  text-transform: uppercase;
}
.rpm-btn {
  display: block;
  margin: 0 0 8px;
  padding: 9px 10px;
  border: 2px solid #BD2427;
  font-family: "BenchNine", "Benchnine", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
}
.rpm-btn--primary { background: #BD2427; color: #fff !important; }
.rpm-btn--secondary { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.7); }
.rpm-btn:hover, .rpm-btn:focus-visible { background: #fff; color: #BD2427 !important; border-color: #fff; outline: none; }
.rpm-feature .rpm-trust { margin: 6px 0 0; color: rgba(255, 255, 255, 0.8); font-size: 12px; }

/* ---------- simple dropdowns (short menus) ---------- */
.rpm-drop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9000;
  min-width: 300px;
  background: #3C4860;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  text-align: left;
}
.rpm-drop .rpm-list a {
  margin: 0;
  padding: 0.75em;
  border-radius: 0;
  font-family: "BenchNine", "Benchnine", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Below 1030px the theme hides the desktop bar and uses its own mobile menu, which this change
   leaves alone, so there is nothing to highlight. */
@media (max-width: 1029px) {
  html.rpc-on [data-change="c40"] { outline: none; background: none; }
  [data-change="c40"] > .rpc-badge { display: none !important; }
}

@media (max-width: 1239px) {
  .rpm-top { padding-left: 1.2em; }
  .rpm-item:not(.rpm-item--mega):not(.rpm-item--drop) > .rpm-top { padding-right: 1.2em; }
  .rpm-toggle { padding-right: 0.8em; }
  .rpm-feature { flex-basis: 220px; }
  .rpm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
