/* 3D-style header main menu (desktop) */

/* Header breathing room */
.it-header-style-4.it-header-area {
  padding: 18px 0;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .it-header-style-4.it-header-area {
    padding: 14px 0;
  }
}

/* Top-level menu: pill row */
.it-header-style-4 .it-main-menu > nav > ul {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.it-header-style-4 .it-main-menu > nav > ul > li {
  margin: 0;
  list-style: none;
}

/* Pill style — scoped strictly to TOP-LEVEL items only */
.it-header-style-4 .it-main-menu > nav > ul > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--it-common-black);
  background: linear-gradient(180deg, #ffffff 0%, #eef1f6 100%);
  border: 1px solid rgba(15, 32, 60, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(15, 32, 60, 0.05),
    0 1px 2px rgba(15, 32, 60, 0.06),
    0 6px 14px rgba(15, 32, 60, 0.07);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  -webkit-tap-highlight-color: transparent;
}

.it-header-style-4 .it-main-menu > nav > ul > li:hover > a,
.it-header-style-4 .it-main-menu > nav > ul > li.active > a {
  transform: translateY(-2px);
  color: var(--it-common-red);
  background: linear-gradient(180deg, #ffffff 0%, #ffe5e8 100%);
  border-color: rgba(238, 52, 78, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 2px 4px rgba(238, 52, 78, 0.10),
    0 12px 24px rgba(238, 52, 78, 0.20);
}

.it-header-style-4 .it-main-menu > nav > ul > li > a:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(15, 32, 60, 0.14),
    0 1px 2px rgba(15, 32, 60, 0.06);
}

/* Dropdown caret — placed inside the pill on the right */
.it-header-style-4 .it-main-menu > nav > ul > li.has-dropdown::after {
  position: absolute;
  left: auto;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-size: 12px;
  color: inherit;
  pointer-events: none;
  transition: transform .25s ease;
}

.it-header-style-4 .it-main-menu > nav > ul > li.has-dropdown > a {
  padding-right: 38px;
}

.it-header-style-4 .it-main-menu > nav > ul > li:hover.has-dropdown::after {
  transform: translateY(-50%) rotate(-180deg);
}

/* Submenu — elevated 3D card with clean list items */
.it-header-style-4 .it-main-menu > nav > ul > li > .submenu {
  width: 280px;
  border-radius: 16px;
  border-top: 4px solid var(--it-common-red);
  padding: 18px 22px;
  margin-top: 12px;
  box-shadow:
    0 22px 44px rgba(15, 32, 60, 0.18),
    0 8px 14px rgba(15, 32, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background-color: var(--it-common-white);
}

/* Submenu items: clean text, no pill, restore the original slide-right underline hover */
.it-header-style-4 .it-main-menu > nav > ul > li > .submenu li {
  margin: 0 0 12px 0;
}

.it-header-style-4 .it-main-menu > nav > ul > li > .submenu li:last-child {
  margin-bottom: 0;
}

.it-header-style-4 .it-main-menu > nav > ul > li > .submenu li a {
  display: inline-block;
  position: relative;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--it-common-black);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: color .25s ease, padding-left .25s ease;
}

.it-header-style-4 .it-main-menu > nav > ul > li > .submenu li a:hover {
  background: none;
  color: var(--it-common-red);
  padding-left: 25px;
  transform: none;
  box-shadow: none;
}

/* Tighter sizing on narrow desktop widths */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .it-header-style-4 .it-main-menu > nav > ul {
    gap: 5px;
  }
  .it-header-style-4 .it-main-menu > nav > ul > li > a {
    padding: 9px 16px;
    font-size: 14px;
  }
  .it-header-style-4 .it-main-menu > nav > ul > li.has-dropdown > a {
    padding-right: 30px;
  }
  .it-header-style-4 .it-main-menu > nav > ul > li.has-dropdown::after {
    right: 10px;
  }
}
