.submenu-color {
  --submenu-radius: 8px;
  --submenu-padding: 10px;
  --color-background: rgba(255, 255, 255, 1);
  --color-foreground: rgba(32, 40, 45, 1);
  --color-foreground-heading: rgba(28, 37, 57, 1);
  --color-primary: rgba(32, 40, 45, 1);
  --color-primary-background: rgba(240, 237, 239, 0);
  --color-primary-hover: rgba(32, 40, 45, 1);
  --color-primary-background-hover: rgba(233, 233, 233, 1);
}

.menu-link {
  color: var(--color-foreground);
  padding: 0;
  font-size: var(--font-nav-main);
  font-weight: 500;
  border: none;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.3s;
}

.nav-item:focus > .menu-link,
.nav-item:hover > .menu-link {
  color: var(--color-primary-hover);
}

.menu-link-main > svg {
  position: relative;
  top: 1px;
}

.menu-link-main {
  padding: 37.5px 20px;
}

.nav-item {
  position: relative;
}

.header-submenu {
  background: var(--color-background);
  width: 100%;
}

.header-submenu > * {
  padding: var(--submenu-padding) 0;
}

.nav-item-static {
  position: static;
}

.header-submenu .nav-item {
  display: block;
  position: relative;
  padding: 0 var(--submenu-padding);
}

.header-submenu .menu-link {
  color: var(--color-primary);
  background: var(--color-primary-background);
  transition: 0.3s;
  padding: 7px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--submenu-radius);
  flex-wrap: wrap;
}

.header-megamenu .nav-item .menu-link {
  padding: 15px 17px;
}

.header-megamenu .nav-item .submenu-lists .menu-link {
  padding: 7px 17px;
}

.header-submenu .menu-link > svg {
  transform: rotate(-90deg);
}

.menu-link.megamenu-image-wrap,
.header-submenu .nav-item.megamenu-links .menu-link,
.header-submenu .nav-item:focus > .menu-link,
.header-submenu .nav-item:hover > .menu-link {
  color: var(--color-primary-hover);
  background: var(--color-primary-background-hover);
}

.reset-submenu {
  padding: 0;
  box-shadow: none;
  background: transparent;
  width: auto;
}

.header-megamenu > * > .nav-item {
  padding: 30px 20px 10px;
}

.megamenu-links .menu-link {
  display: inline-flex;
}

.menu-link .heading + .text {
  margin-block-start: 4px;
  opacity: 0.75;
}

.menu-link.heading {
  background: transparent !important;
  letter-spacing: 2.5px;
}

.header-submenu .nav-item.megamenu-links .menu-link {
  padding: 5px 15px 7px;
}

.header-submenu .nav-item.megamenu-links .menu-link > svg {
  transform: rotate(0deg);
  position: relative;
  top: 1px;
}

.header-megamenu .nav-item.megamenu-links > * {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.megamenu-image-wrap .content {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-end;
  margin-block-start: 15px;
}

.megamenu-image-wrap .content .button {
  --color-primary-button-icon: rgba(255, 255, 255, 1);
  --color-primary-button-icon-background: rgba(28, 37, 57, 1);
  --color-primary-button-hover-icon: rgba(28, 37, 57, 1);
  --color-primary-button-hover-icon-background: rgba(255, 255, 255, 1);
  padding: 0;
  min-height: 1px;
  transition: 0.3s;
}

.megamenu-image-wrap:focus .content .button .svg-wrapper,
.megamenu-image-wrap:hover .content .button .svg-wrapper {
  color: var(--color-primary-button-hover-icon);
  background: var(--color-primary-button-hover-icon-background);
}

.submenu-lists .menu-link {
  letter-spacing: normal;
}

.header-submenu.submenu-lists .nav-item .menu-link {
  padding: 7px 17px;
}

.megamenu-image-wrap img {
  border-radius: 6px;
}

@media (min-width: 992px) {
  .menu-absolute {
    position: absolute;
    top: 100%;
    left: 0;
  }

  .header-grandmenu {
    left: 100%;
    top: 0;
  }

  .header-submenu {
    width: max-content;
    border-radius: var(--submenu-radius);
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
  }

  .header-megamenu {
    width: 100%;
  }

  .nav-item:hover > .menu-absolute {
    opacity: 1;
    visibility: visible;
  }

  .reset-submenu > .nav-item {
    padding: 0;
  }

  .header-megamenu > * {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    justify-content: space-between;
  }

  .header-megamenu > * > .nav-item {
    width: calc(50% - var(--submenu-padding) / 2);
    max-width: calc(50% - var(--submenu-padding) / 2);
  }

  .header-megamenu .menu-link {
    display: inline-block;
  }

  .nav-item.megamenu-links {
    width: 100%;
    max-width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-block-start: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 24px;
    padding: 20px;
  }

  .header-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1600px) {
  .menu-link-main {
    padding: 28px 20px;
  }
}

@media (max-width: 1365px) {
  .menu-link-main {
    padding: 28px 12px;
  }
}

@media (max-width: 991px) {
  .header-nav {
    --color-background: rgba(242, 242, 242, 1);
    --color-foreground: rgba(32, 40, 45, 1);
    --color-foreground-heading: rgba(28, 37, 57, 1);
    --color-primary: rgba(32, 40, 45, 1);
    --color-primary-background: rgba(240, 237, 239, 0);
    --color-primary-hover: rgba(32, 40, 45, 1);
    --color-primary-background-hover: rgba(233, 233, 233, 1);
    position: fixed;
    right: 0;
    top: 0;
    background: var(--color-background);
    z-index: 10;
    width: 100%;
    height: 100%;
    transition: all 0.3s;
    transform: translateX(100%);
    overflow-y: auto;
  }

  .header-nav.show {
    transform: translateX(0);
  }

  .header-menu > * {
    width: 100%;
  }

  .menu-link-main {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-menu > .nav-item .menu-link-main {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
  }

  .menu-link {
    border-bottom: 1px solid rgba(0, 0, 0, 0);
  }

  .menu-link.active {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  }

  .menu-link > svg {
    transition: 0.3s;
  }

  .menu-link.active > svg {
    transform: rotate(180deg);
  }

  .header-megamenu > * > .nav-item {
    padding: 0 15px 20px;
  }

  .header-submenu .nav-item.megamenu-links {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-item > .header-submenu:not(.reset-submenu) {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .header-submenu {
    background: inherit;
  }

  .header-nav-headings {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
  }

  .header-nav-headings .svg-wrapper {
    color: #000;
    width: 44px;
    height: 44px;
    margin-right: -10px;
  }

  .menu-link * {
    pointer-events: none;
  }

  .header-megamenu .nav-item .menu-link > .heading {
    width: 100%;
  }
}
