.itm {
  --itm-grad-start: #430e01;
  /* menu panel, left  (footer maroon)   */
  --itm-grad-end: #440055;
  /* menu panel, right (footer purple)   */
  --itm-bar-bg: transparent;
  /* closed header bar: transparent like the old header; .header-area turns white
     on scroll (.header-position) and on Pricing/Contact/Tech Support (.header-bg-color) */
  --itm-bar-icon: #111111;
  /* search icon in the closed bar       */
  --itm-burger: #e86240;
  /* hamburger color (live site coral)   */
  --itm-ink: #440055;
  /* text on the white part of the menu  */
  --itm-line-dark: rgba(255, 255, 255, 0.18);
  /* dividers on the gradient    */
  --itm-line-light: #d5dbe8;
  /* dividers on white                   */
  --itm-label-on-dark: #f0c4ff;
  /* group labels on the gradient        */
  --itm-card-text: #f1e3f5;
  /* pricing card text                   */
  --itm-font: inherit;
  /* uses the theme font by default      */
  --itm-z: 99999;
  --itm-speed: 0.28s;
}

.itm {
  display: block;
}

/* ---- 3. Local reset (protects against theme styles) ----------------------- */
.itm,
.itm *,
.itm *::before,
.itm *::after {
  box-sizing: border-box;
}

.itm {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
}

.itm a,
.itm button,
.itm input {
  -webkit-tap-highlight-color: transparent;
}

.itm button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  border-radius: 0;
}

.itm ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.itm li {
  margin: 0;
  padding: 0;
}

/* Raw nested WordPress lists are turned into panels by the script;
   this keeps them hidden until then. */
.itm__rows .sub-menu {
  display: none;
}

.itm h2,
.itm p {
  margin: 0;
}

.itm svg {
  display: block;
  flex-shrink: 0;
}

.itm__sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: -1px;
  padding: 0;
  border: 0;
}

/* ---- 4. Header bar (menu closed) ------------------------------------------ */
.itm__bar {
  position: sticky;
  top: 0;
  z-index: calc(var(--itm-z) - 1);
  height: 72px;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--itm-bar-bg);
}

.itm__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1;
}

.itm__logo img {
  display: block;
  height: 42px;
  width: auto;
}

.itm__bar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.itm__icon-btn {
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #fff !important;
}

.itm__bar .itm__icon-btn {
  color: var(--itm-bar-icon) !important;
}

.itm__bar .itm__icon-btn--burger {
  color: var(--itm-burger) !important;
}

/* ---- 5. Full-screen panel -------------------------------------------------- */
.itm__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--itm-z);
  overflow: hidden;
  background: #fff;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.itm__panel.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0s;
}

html.itm-lock,
html.itm-lock body {
  overflow: hidden;
}

/* Each menu level fills the panel and scrolls on its own */
.itm__level {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.itm__level--sub {
  background: linear-gradient(90deg, var(--itm-grad-start), var(--itm-grad-end));
  color: #fff;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--itm-speed) ease, visibility 0s linear var(--itm-speed);
}

.itm__level--sub.is-active {
  transform: none;
  visibility: visible;
  transition: transform var(--itm-speed) ease, visibility 0s;
}

/* ---- 6. Top level: gradient block ------------------------------------------ */
.itm__dark {
  flex-shrink: 0;
  padding-bottom: 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--itm-grad-start), var(--itm-grad-end));
}

.itm__head {
  height: 72px;
  flex-shrink: 0;
  padding: 0 8px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.itm__rows {
  border-top: 1px solid var(--itm-line-dark);
}

.itm .itm__row {
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--itm-line-dark) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3;
}

.itm .itm__row--sub {
  font-size: 15px !important;
  padding-top: 12px;
  padding-bottom: 12px;
}

.itm__cta-wrap {
  padding: 20px 20px 0;
}

.itm__cta {
  min-height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 700;
  transition: background-color 0.15s ease;
}

.itm__cta:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ---- 7. Top level: white block --------------------------------------------- */
.itm__light {
  flex-grow: 1;
  background: #fff;
  color: var(--itm-ink);
  display: flex;
  flex-direction: column;
}

.itm__search {
  height: 54px;
  flex-shrink: 0;
  margin: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--itm-line-light);
}

.itm__search input {
  flex-grow: 1;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 20px;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  outline: none;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--itm-ink);
}

.itm__search input::placeholder {
  color: var(--itm-ink);
  opacity: 1;
}

.itm__search input:focus::placeholder {
  color: #8a7a92;
}

.itm__search button {
  width: 56px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--itm-ink);
}

.itm .itm__row--light {
  min-height: 52px;
  border-bottom: 1px solid var(--itm-line-light) !important;
  color: var(--itm-ink) !important;
  font-weight: 700 !important;
}

/* ---- 8. Submenus ----------------------------------------------------------- */
.itm__level--sub .itm__head {
  padding-left: 8px;
}

.itm__back {
  min-height: 44px;
  padding: 0 12px 0 6px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

.itm__title {
  padding: 4px 20px 16px;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.2px;
}

.itm__group-label {
  padding: 18px 20px 8px;
  color: var(--itm-label-on-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.4;
}

.itm__level--sub .itm__list {
  border-bottom: 0;
}

.itm__level--sub .itm__cta-wrap {
  margin-top: auto;
  padding: 20px 20px 28px;
}

/* Pricing card inside a submenu (menu item with CSS class itm-card) */
.itm__card {
  margin: 20px 20px 0;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.itm .itm__card-title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.itm .itm__card-text {
  margin: 0;
  color: var(--itm-card-text);
  font-size: 15px;
  line-height: 1.5;
}

.itm__card-btn {
  margin-top: 14px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  color: var(--itm-ink) !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.itm__card-btn:hover {
  background: #f6eef8;
}

/* ---- 9. Keyboard focus ----------------------------------------------------- */
.itm a:focus-visible,
.itm button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
  border-radius: 6px;
}

.itm__bar a:focus-visible,
.itm__bar button:focus-visible,
.itm__light a:focus-visible,
.itm__light button:focus-visible,
.itm__search:focus-within {
  outline: 2px solid var(--itm-grad-end);
  outline-offset: -2px;
}

.itm__cta:focus-visible {
  outline-offset: 3px;
  border-radius: 999px;
}

@media (min-width: 1281px) {
  .itm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .itm__panel,
  .itm__panel.is-open,
  .itm__level--sub,
  .itm__level--sub.is-active { transition: none; }
}
