/* ═══════════════════════════════════════════════════════════════════════════════════════
   rv-header.css: the Risk Vizon website header, matched to the GRIP application header (v5.1)
   Markup: partials/custom_header.php. Loaded by partials/head.php after insur.css.

   row 1  white: the Risk Vizon logo at the far left, 52 px high; Zurich and e-mail next to it;
          LinkedIn at the right.
   row 2  house navy #1A2E4A, about 44 px high, white menu text, maroon #710202 bottom line;
          Login in white and Request Demo as the maroon button at the right.

   The header is full width (24-32 px side padding); page sections keep the 1200 px container.
   The header is sticky with a negative top: row 1 scrolls away and the navy band stays at
   the top. The theme's cloned sticky header (.stricky-header, insur.js) is therefore hidden,
   so that there is only one sticky bar on every page.
   Selectors start with .rv-header (two classes) and use !important where page-level styles
   (index.php, partials/custom_footer.php) set header rules with !important.

   Contrast (WCAG): white on #1A2E4A 13.7:1; white on #2C4A72 (hover / current) 9.0:1;
   white on #710202 (Request Demo) 12.3:1, on #8B0000 (its hover) 10.0:1;
   #44505E on white (contact line) 8.2:1; #710202 on #EEF2F7 (dropdown hover) 10.9:1.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.rv-header {
  --rv-h-navy: #1A2E4A;
  --rv-h-navy-2: #12223A;
  --rv-h-navy-hover: #2C4A72;
  --rv-h-maroon: #710202;
  --rv-h-maroon-hover: #8B0000;
  --rv-h-row1: 76px;
}

/* ── the header block: full width, sticky; row 1 scrolls away, row 2 stays ───────────── */
.main-header.rv-header {
  position: sticky !important;
  top: calc(-1 * var(--rv-h-row1)) !important;
  z-index: 99999 !important;
  width: 100%;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(16, 30, 54, .12);
}
.main-header.rv-header .main-menu.rv-nav { position: relative; display: block; background: transparent !important; }
.rv-header *, .rv-header *::before, .rv-header *::after { box-sizing: border-box; }

/* full-width inner wrapper (header only; page sections keep .container at 1200 px) */
.rv-header .rv-hdr__wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

/* ── row 1: white, logo at the far left ─────────────────────────────────────────────── */
.rv-header .rv-hdr__row1 {
  background: #fff !important;
  height: var(--rv-h-row1);
  border-bottom: 1px solid #e8e8e8;
}
.rv-header .rv-hdr__row1 .rv-hdr__wrap { height: 100%; gap: 22px; }
.rv-header .rv-hdr__logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 0; }
.rv-header .rv-hdr__logo img {
  display: block;
  height: 52px !important;
  width: auto !important;
  max-width: none !important;
}
.rv-header .rv-hdr__contact {
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 1px solid #dfe3e8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.rv-header .rv-hdr__contact li {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.45;
  color: #44505E;
  white-space: nowrap;
}
.rv-header .rv-hdr__contact li i { width: 18px; color: var(--rv-h-maroon); font-size: 12px; }
.rv-header .rv-hdr__contact a { color: #44505E !important; text-decoration: none; }
.rv-header .rv-hdr__contact a:hover, .rv-header .rv-hdr__contact a:focus-visible { color: var(--rv-h-maroon) !important; text-decoration: underline; }
.rv-header .rv-hdr__social { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.rv-header .rv-hdr__social a { color: var(--rv-h-navy) !important; font-size: 22px; line-height: 1; }
.rv-header .rv-hdr__social a:hover, .rv-header .rv-hdr__social a:focus-visible { color: var(--rv-h-maroon) !important; }

/* ── row 2: the house-navy band ──────────────────────────────────────────────────────── */
.rv-header .rv-hdr__row2 {
  background: linear-gradient(135deg, var(--rv-h-navy), var(--rv-h-navy-2)) !important;
  border-bottom: 3px solid var(--rv-h-maroon);
  min-height: 47px;
}
.rv-header .rv-hdr__row2 .rv-hdr__wrap { min-height: 44px; }

.rv-header .main-menu__list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}
.rv-header .main-menu__list > li {
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  display: flex;
  align-items: stretch;
}
.rv-header .main-menu__list > li + li { margin-left: 2px !important; }
.rv-header .main-menu__list > li > a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: .01em;
  color: #fff !important;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.rv-header .main-menu__list > li > a::before { display: none !important; }   /* the theme's little triangle */
.rv-header .main-menu__list > li > a i { margin-right: 6px; font-size: 13px; }
.rv-header .main-menu__list .rv-grip,
.rv-header .main-menu__list > li > a strong {
  color: #fff !important;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: .03em;
}

/* hover and current page: a lighter navy with a light underline (white text stays >= 4.5:1) */
.rv-header .main-menu__list > li:hover > a,
.rv-header .main-menu__list > li > a:focus-visible,
.rv-header .main-menu__list > li.current > a {
  background: var(--rv-h-navy-hover);
  color: #fff !important;
  box-shadow: inset 0 -3px 0 #E8B9B9;
}
.rv-header .main-menu__list > li > a:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

/* Login at the right, in white; Request Demo as the maroon button */
.rv-header .main-menu__list > li.rv-nav-login { margin-left: auto !important; }
.rv-header .main-menu__list > li.rv-nav-demo { margin-left: 10px !important; align-items: center; }
.rv-header .main-menu__list > li.rv-nav-demo > a,
.rv-header .main-menu__list > li.rv-nav-demo.current > a {
  height: 34px;
  padding: 0 18px !important;
  background: var(--rv-h-maroon);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 4px;
  font-weight: 600 !important;
  box-shadow: none;
}
.rv-header .main-menu__list > li.rv-nav-demo:hover > a,
.rv-header .main-menu__list > li.rv-nav-demo > a:focus-visible {
  background: var(--rv-h-maroon-hover);
  border-color: #fff;
  box-shadow: none;
}

/* dropdown (The Company): white panel under the band, maroon top line */
.rv-header .main-menu__list > li > ul {
  top: 100% !important;
  min-width: 210px;
  padding: 10px 8px !important;
  border-radius: 0 0 6px 6px;
  border-top: 3px solid var(--rv-h-maroon);
  box-shadow: 0 12px 30px rgba(16, 30, 54, .18);
}
.rv-header .main-menu__list > li > ul > li + li { margin-top: 2px !important; }
.rv-header .main-menu__list > li > ul > li > a {
  font-size: 14.5px !important;
  line-height: 1.4 !important;
  padding: 8px 14px !important;
  color: #1A2E4A !important;
}
.rv-header .main-menu__list > li > ul > li:hover > a { background: #EEF2F7 !important; color: var(--rv-h-maroon) !important; }

/* hamburger (below 1200 px, the theme's breakpoint) */
.rv-header .mobile-nav__toggler {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-size: 20px;
  height: 44px;
  text-decoration: none;
}
.rv-header .mobile-nav__toggler .rv-hdr__menu-word { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.rv-header .mobile-nav__toggler:hover, .rv-header .mobile-nav__toggler:focus-visible { color: #fff !important; opacity: .85; }
@media (min-width: 1200px) {
  .rv-header .mobile-nav__toggler { display: none !important; }
}
@media (max-width: 1199px) {
  .rv-header .main-menu__list { display: none !important; }
}

/* sticky needs an ancestor that is not a scroll container: the theme's .page-wrapper has overflow:hidden,
   which turns it into one. overflow:clip clips the same way without that (browsers without clip keep hidden). */
.page-wrapper { overflow: hidden; overflow: clip !important; }

/* the theme's cloned sticky header: not needed, the header above is sticky itself */
.stricky-header { display: none !important; }

/* anchors land below the navy band */
html { scroll-padding-top: 60px !important; }

/* ── 1200-1365 px: a little tighter so the band never wraps ─────────────────────────── */
@media (min-width: 1200px) and (max-width: 1365px) {
  .rv-header .rv-hdr__wrap { padding: 0 24px; }
  .rv-header .main-menu__list > li > a { padding: 0 11px !important; }
}

/* ── tablets and phones ─────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .rv-header { --rv-h-row1: 60px; }
  .rv-header .rv-hdr__wrap { padding: 0 16px; }
  .rv-header .rv-hdr__row1 .rv-hdr__wrap { gap: 12px; }
  .rv-header .rv-hdr__logo img { height: 40px !important; }
  .rv-header .rv-hdr__contact { padding-left: 12px; }
  .rv-header .rv-hdr__contact li { font-size: 12px; }
}
@media (max-width: 479px) {
  .rv-header .rv-hdr__contact li:first-child { display: none; }  /* keep the e-mail; Zurich is in the footer */
  .rv-header .rv-hdr__social a { font-size: 20px; }
}

/* ── mobile nav panel: navy, white text (insur.js copies the menu into it) ──────────── */
.mobile-nav__wrapper { z-index: 100000 !important; }
.mobile-nav__wrapper .mobile-nav__content {
  background: linear-gradient(180deg, #1A2E4A, #12223A) !important;
  border-top: 3px solid #710202;
}
.mobile-nav__wrapper .mobile-nav__content .logo-box {
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  margin-right: 36px;
  display: inline-flex;
}
.mobile-nav__wrapper .mobile-nav__content .logo-box img { height: 36px; width: auto; }
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > a,
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > ul > li > a {
  color: #fff !important;
  font-size: 15px;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  height: 46px;
}
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > a { justify-content: flex-start !important; }
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > a > button { margin-left: auto; }
.mobile-nav__wrapper .mobile-nav__content .main-menu__list strong { color: #fff !important; font-family: Georgia, 'Times New Roman', serif; }
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > a i { margin-right: 8px; }
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li.rv-nav-demo > a {
  display: inline-flex !important;
  height: 38px;
  margin: 10px 0;
  padding: 0 18px !important;
  background: #710202 !important;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  border-radius: 4px;
  font-weight: 600;
}
.mobile-nav__wrapper .mobile-nav__content .main-menu__list > li > a > button { background: rgba(255, 255, 255, .12); color: #fff; }
.mobile-nav__wrapper .mobile-nav__contact li > i { background: #710202; }
.mobile-nav__wrapper .mobile-nav__social a:hover,
.mobile-nav__wrapper .mobile-nav__contact li a:hover { color: #E8B9B9; }
