/*
 * Theme header submenus in the redesign style (WordPress, when the theme keeps its own header).
 * Wide dropdowns are rebuilt by theme-menu.js (.frl-mm); narrow ones (Insights) are restyled here.
 * Colours, type and spacing follow the localhost header's mega menu (.dropdown.mega in rd.css).
 */
.frl-theme-menu .qodef-main-menu {
  --mm-ink: #241a28;
  --mm-head: #26102f;
  --mm-muted: #5e5264;
  --mm-brand: #5b2a73;
  --mm-accent: #93307f;
  --mm-line: #c9a9d6;
  --mm-rail: #fbf8fc;
  --mm-tint: #f4ecf7;
  --mm-shadow: 0 18px 44px rgba(38, 16, 47, .18);
  --mm-sans: "RD Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mm-serif: "RD Newsreader", Georgia, "Times New Roman", serif;
}

/* ---------- wide dropdowns (What We Do, Sectors, Applications, Industry) ---------- */

/* the theme sizes the box from its own list: let it follow the new layout instead, and hide the old list */
.frl-theme-menu .qodef-main-menu li.frl-mm-on > .second { height: auto !important; background: transparent !important; }
.frl-theme-menu .qodef-main-menu li.frl-mm-on > .second > .inner > ul { display: none !important; }
.frl-theme-menu .qodef-main-menu li.frl-mm-on > .second > .inner { background: transparent !important; padding: 0 !important; }

.frl-theme-menu .qodef-main-menu .frl-mm {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  width: min(1240px, calc(100vw - 32px));
  margin: 0;
  background: #fff;
  border-bottom: 1px solid var(--mm-line);
  border-radius: 0 0 2px 2px;
  box-shadow: var(--mm-shadow);
  font-family: var(--mm-sans);
  color: var(--mm-ink);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.5;
}
.frl-theme-menu .qodef-main-menu .frl-mm.has-photo { grid-template-columns: 340px minmax(0, 1fr) 280px; }
.frl-theme-menu .qodef-main-menu .frl-mm *,
.frl-theme-menu .qodef-main-menu .frl-mm a {
  box-sizing: border-box;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  float: none;
  height: auto;
  min-height: 0;
  margin: 0;
  background-image: none;
}
.frl-theme-menu .qodef-main-menu .frl-mm svg { flex: none; width: 14px; height: 14px; }

/* rail */
.frl-theme-menu .qodef-main-menu .frl-mm-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  background: var(--mm-rail);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mm-ink);
  background: transparent;
  box-shadow: none;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-tab svg { color: var(--mm-muted); opacity: .55; }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-tab[aria-selected="true"] {
  background: #fff;
  color: var(--mm-brand);
  box-shadow: inset 3px 0 0 var(--mm-brand);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-tab[aria-selected="true"] svg { color: var(--mm-brand); opacity: 1; }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--mm-brand);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-tab + .frl-mm-all { margin-top: 10px; }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-all:hover { background: var(--mm-tint); color: var(--mm-brand); }

/* panel */
.frl-theme-menu .qodef-main-menu .frl-mm-panel[hidden] { display: none !important; }
.frl-theme-menu .qodef-main-menu .frl-mm-card { padding: 20px 24px 24px; }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-title {
  margin: 0 0 14px;
  font-family: var(--mm-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--mm-head);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-title a,
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-title span {
  display: inline;
  padding: 0;
  font: inherit;
  color: inherit;
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-title a:hover { color: var(--mm-brand); }
.frl-theme-menu .qodef-main-menu .frl-mm-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  border-top: 1px solid var(--mm-line);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 0;
  border-bottom: 1px solid var(--mm-line);
  font-size: 13.8px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--mm-ink);
  background: none;
  transition: color .15s;
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-link svg { width: 13px; height: 13px; color: var(--mm-accent); }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-link:hover { color: var(--mm-brand); }
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--mm-brand);
}
.frl-theme-menu .qodef-main-menu .frl-mm .frl-mm-more:hover { color: var(--mm-accent); }

/* picture (Industry) */
.frl-theme-menu .qodef-main-menu .frl-mm-photo { display: block; padding: 18px 18px 18px 0; }
.frl-theme-menu .qodef-main-menu .frl-mm-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
}

/* ---------- narrow dropdowns (Insights) ---------- */
/* the theme sets the box height from its old one-column list */
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second { height: auto !important; }
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  width: 280px !important;
  height: auto !important;
  padding: 8px 20px !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--mm-line) !important;
  border-radius: 0 0 2px 2px;
  box-shadow: var(--mm-shadow) !important;
  font-family: var(--mm-sans);
}
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li {
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--mm-line) !important;
  background: transparent !important;
}
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li:last-child { border-bottom: 0 !important; }
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a {
  display: flex !important;
  align-items: center;
  gap: 7px;
  padding: 7px 0 !important;
  font-family: var(--mm-sans) !important;
  font-size: 13.8px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--mm-ink) !important;
  background: transparent !important;
}
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a::before {
  content: "" !important;
  position: static !important;
  display: block !important;
  transform: none !important; /* the theme squashes this pseudo-element to scaleY(0) for its own hover line */
  flex: none;
  width: 13px;
  height: 13px;
  background: var(--mm-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a:hover { color: var(--mm-brand) !important; }
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a .item_outer,
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a .item_inner { display: inline !important; padding: 0 !important; }
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a .item_text {
  padding: 0 !important;
  font: inherit !important;
  color: inherit !important;
}
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a .menu_icon_wrapper,
.frl-theme-menu .qodef-main-menu > ul > li.narrow > .second > .inner > ul > li > a .plus { display: none !important; }
