/* ==========================================================
   Simple Navbar v2  (self-contained, "rr-nav" prefix)
   Breakpoint: 1200px  (keep in sync with module.js)
   ========================================================== */

.rr-header,
.rr-header-spacer {
  --rr-navy: #142343;
  --rr-navy-2: #1c2f57;
  --rr-white: #ffffff;
  --rr-line: rgba(255, 255, 255, 0.14);
  --rr-accent: #9db4e8;
  --rr-tint: #eef2f8;
  --rr-h: 72px;
}

.rr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--rr-navy);
  font-family: Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.rr-header *,
.rr-header *::before,
.rr-header *::after { box-sizing: border-box; }

/* Reserves room for the fixed header so page content isn't hidden */
.rr-header-spacer { height: var(--rr-h); }

.rr-header ul { list-style: none; margin: 0; padding: 0; }
.rr-header li { margin: 0; }

.rr-nav__inner {
  max-width: 1240px;
  height: var(--rr-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ---------- Logo ---------- */
.rr-nav__logo { display: inline-flex; flex-shrink: 0; }
.rr-nav__logo-img { display: block; width: 160px; max-width: 100%; height: auto; }

/* Theme underlines links on hover; the header uses backgrounds instead */
.rr-header a,
.rr-header a:hover,
.rr-header a:focus { text-decoration: none !important; }

/* ---------- Focus styles ---------- */
.rr-header a:focus-visible,
.rr-header button:focus-visible {
  outline: 2px solid var(--rr-white);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Hamburger ---------- */
.rr-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rr-white);
  cursor: pointer;
}
.rr-nav__toggle-bars,
.rr-nav__toggle-bars::before,
.rr-nav__toggle-bars::after {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.rr-nav__toggle-bars { position: relative; }
.rr-nav__toggle-bars::before,
.rr-nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.rr-nav__toggle-bars::before { top: -7px; }
.rr-nav__toggle-bars::after { top: 7px; }
.rr-nav__toggle[aria-expanded="true"] .rr-nav__toggle-bars { background: transparent; }
.rr-nav__toggle[aria-expanded="true"] .rr-nav__toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.rr-nav__toggle[aria-expanded="true"] .rr-nav__toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Shared link / trigger ---------- */
.rr-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  background: none;
  color: var(--rr-white);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.rr-nav__link:hover,
.rr-nav__link:focus-visible { color: #f3f4f5; }

.rr-nav__chevron { flex-shrink: 0; transition: transform 0.2s ease; }
[aria-expanded="true"] > .rr-nav__chevron { transform: rotate(180deg); }

.rr-nav__sublink,
.rr-nav__cta-link {
  display: block;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
}

/* ==========================================================
   MOBILE / TABLET  (< 1200px)
   ========================================================== */
@media (max-width: 1199.98px) {

  .rr-nav__panel {
    position: fixed;
    top: var(--rr-h);
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 20px 40px;
    background: var(--rr-navy);
    border-top: 1px solid var(--rr-line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .rr-header.is-open .rr-nav__panel {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .rr-nav__item { border-bottom: 1px solid var(--rr-line); }

  .rr-nav__sub { display: none; padding: 0 0 12px 12px; }
  .rr-nav__item.is-open > .rr-nav__sub { display: block; }

  .rr-nav__sublink {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
  }
  .rr-nav__sublink:hover,
  .rr-nav__sublink[aria-current="page"] { color: var(--rr-white); }

  /* CTAs stack full-width under the menu */
  .rr-nav__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }
  .rr-nav__actions .button,
  .rr-nav__actions .kl-navbar__button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    font-size: 15px !important;
    white-space: nowrap;
  }
  .rr-nav__cta-trigger { gap: 8px; cursor: pointer; }
  .rr-nav__actions .button:hover,
  .rr-nav__actions .button:active,
  .rr-nav__cta.is-open > .rr-nav__cta-trigger {
    background: var(--rr-tint) !important;
    border-color: var(--rr-white) !important;
    color: var(--rr-navy) !important;
  }
  .rr-nav__actions .button:hover span,
  .rr-nav__cta.is-open > .rr-nav__cta-trigger span { color: var(--rr-navy) !important; }

  .rr-nav__cta-menu {
    display: none;
    margin-top: 8px !important;
    border: 1px solid var(--rr-line);
    border-radius: 6px;
    overflow: hidden;
  }
  .rr-nav__cta.is-open > .rr-nav__cta-menu { display: block; }
  .rr-nav__cta-link {
    padding: 14px 16px;
    color: var(--rr-white);
    font-size: 15px;
    text-align: center;
  }
  .rr-nav__cta-menu li + li .rr-nav__cta-link { border-top: 1px solid var(--rr-line); }
  .rr-nav__cta-link:hover { background: var(--rr-navy-2); }
}

/* Prevent the page behind the open mobile menu from scrolling */
html.rr-nav-locked,
html.rr-nav-locked body { overflow: hidden; }

/* ==========================================================
   DESKTOP  (>= 1200px)
   ========================================================== */
@media (min-width: 1200px) {

  .rr-header,
  .rr-header-spacer { --rr-h: 82px; }

  .rr-nav__toggle { display: none; }
  .rr-nav__inner { gap: 16px; }
  .rr-nav__logo-img { width: 170px; }

  .rr-nav__panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
  }

  .rr-nav__menu { display: flex; align-items: center; gap: 4px; }
  .rr-nav__item { position: relative; }

  .rr-nav__link {
    width: auto;
    padding: 10px 8px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .rr-nav__link:hover,
  .rr-nav__item.is-open > .rr-nav__link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--rr-white);
  }
  /* Current section gets a small accent underline */
  .rr-nav__item.is-current > .rr-nav__link { box-shadow: inset 0 -2px 0 var(--rr-accent); }

  /* Dropdown panels */
  .rr-nav__sub,
  .rr-nav__cta-menu {
    position: absolute;
    top: 100%;
    z-index: 30;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  }
  .is-open > .rr-nav__sub,
  .is-open > .rr-nav__cta-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .rr-nav__sub {
    left: 0;
    top: calc(100% + 8px);
    padding: 8px !important;
    background: var(--rr-navy);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(5, 12, 28, 0.35);
  }
  .rr-nav__sublink {
    position: relative;
    padding: 11px 16px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
  }
  /* Accent bar slides in on hover */
  .rr-nav__sublink::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 2px;
    background: var(--rr-accent);
    transform: translateY(-50%);
    transition: height 0.15s ease;
  }
  .rr-nav__sublink:hover,
  .rr-nav__sublink:focus-visible,
  .rr-nav__sublink[aria-current="page"] {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rr-white);
    padding-left: 22px;
  }
  .rr-nav__sublink:hover::before,
  .rr-nav__sublink:focus-visible::before,
  .rr-nav__sublink[aria-current="page"]::before { height: 18px; }

  /* CTA buttons */
  .rr-nav__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .rr-nav__actions .button,
  .rr-nav__actions .kl-navbar__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
  }
  .rr-nav__actions .button:hover,
  .rr-nav__actions .button:focus-visible,
  .rr-nav__cta.is-open > .rr-nav__cta-trigger {
    background: var(--rr-tint) !important;
    border-color: var(--rr-white) !important;
    color: var(--rr-navy) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
  }
  .rr-nav__actions .button:hover span,
  .rr-nav__cta.is-open > .rr-nav__cta-trigger span { color: var(--rr-navy) !important; }

  .rr-nav__cta { position: relative; }
  .rr-nav__cta-trigger { gap: 6px; cursor: pointer; }

  .rr-nav__cta-menu {
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    padding: 6px !important;
    background: var(--rr-white);
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(5, 12, 28, 0.3);
  }
  /* Invisible bridge so the menu doesn't close while the pointer crosses the gap */
  .rr-nav__sub::after,
  .rr-nav__cta-menu::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
  }
  .rr-nav__cta-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 6px;
    color: var(--rr-navy);
    font-size: 14px;
    transition: background-color 0.15s ease;
  }
  /* Arrow fades in on hover */
  .rr-nav__cta-link::after {
    content: "\2192";
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .rr-nav__cta-link:hover,
  .rr-nav__cta-link:focus-visible { background: var(--rr-tint); }
  .rr-nav__cta-link:hover::after,
  .rr-nav__cta-link:focus-visible::after { opacity: 1; transform: none; }
  .rr-nav__cta-link:focus-visible { outline-color: var(--rr-navy); }
}

/* dia (prefers-reduced-motion: reduce) {
  .rr-header *,
  .rr-header *::before,
  .rr-header *::after { transition: none !important; }
}
