.hgw-main-menu,
.hgw-main-menu * {
  box-sizing: border-box;
}

.hgw-main-menu {
  --menu-gold: #c18a18;
  --menu-black: #111;
  position: relative;
  width: max-content;
  max-width: calc(100vw - 24px);
  color: var(--menu-black);
  direction: rtl;
  font-family: Polin, Arial, sans-serif;
  letter-spacing: 0;
  z-index: 1000;
}

button.hgw-main-menu__toggle {
  display: none !important;
}

.hgw-main-menu__list,
.hgw-main-menu__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hgw-main-menu__list {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
}

.hgw-main-menu__item {
  position: relative;
  margin: 0;
  padding: 0;
}

.hgw-main-menu__link,
.hgw-main-menu button.hgw-main-menu__summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 0;
  color: var(--menu-black) !important;
  background: transparent !important;
  cursor: pointer;
  font-family: Futurism, Polin, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease;
}

.hgw-main-menu__link:hover,
.hgw-main-menu__link:focus-visible,
.hgw-main-menu button.hgw-main-menu__summary:hover,
.hgw-main-menu button.hgw-main-menu__summary:focus-visible,
.hgw-main-menu__section.is-open > button.hgw-main-menu__summary {
  color: var(--menu-gold) !important;
  background: #fff !important;
  outline: 0;
}

.hgw-main-menu__item--accent .hgw-main-menu__link {
  color: var(--menu-gold);
}

.hgw-main-menu__chevron {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg) translateY(-1px);
  transition: transform 180ms ease;
}

.hgw-main-menu__section.is-open > .hgw-main-menu__summary .hgw-main-menu__chevron {
  transform: rotate(135deg) translate(-1px, -1px);
}

.hgw-main-menu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  min-width: 290px;
  max-width: min(680px, 90vw);
  display: block;
  padding: 16px;
  border: 1px solid rgba(193, 138, 24, .42);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.hgw-main-menu__item:nth-last-child(-n + 3) .hgw-main-menu__dropdown {
  right: auto;
  left: 0;
}

.hgw-main-menu__section.is-open > .hgw-main-menu__dropdown,
.hgw-main-menu__section:hover > .hgw-main-menu__dropdown,
.hgw-main-menu__section:focus-within > .hgw-main-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.hgw-main-menu__submenu {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 6px;
}

.hgw-main-menu__submenu a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 5px;
  color: #252525;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.hgw-main-menu__submenu a:hover,
.hgw-main-menu__submenu a:focus-visible {
  color: #fff;
  background: var(--menu-black);
  outline: 0;
}

.hgw-main-menu__all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 5px;
  color: #fff;
  background: var(--menu-gold);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.hgw-main-menu__all:hover,
.hgw-main-menu__all:focus-visible {
  color: #fff;
  background: var(--menu-black);
  outline: 0;
}

@media (max-width: 1023px) {
  .hgw-main-menu {
    width: 100%;
    max-width: none;
  }

  .hgw-main-menu__root {
    position: relative;
    width: 100%;
  }

  button.hgw-main-menu__toggle {
    width: max-content;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid rgba(193, 138, 24, .46);
    border-radius: 6px;
    color: var(--menu-black);
    background: #fff;
    cursor: pointer;
    font-family: Futurism, Polin, Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .hgw-main-menu__toggle:hover,
  .hgw-main-menu__toggle:focus-visible,
  .hgw-main-menu__root.is-open > button.hgw-main-menu__toggle {
    color: #fff;
    background: var(--menu-black);
    border-color: var(--menu-black);
    outline: 0;
  }

  .hgw-main-menu__hamburger {
    width: 22px;
    height: 18px;
    display: grid;
    align-content: space-between;
  }

  .hgw-main-menu__hamburger i {
    width: 100%;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .hgw-main-menu__root.is-open .hgw-main-menu__hamburger i:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  .hgw-main-menu__root.is-open .hgw-main-menu__hamburger i:nth-child(2) {
    opacity: 0;
  }

  .hgw-main-menu__root.is-open .hgw-main-menu__hamburger i:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hgw-main-menu__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(390px, calc(100vw - 24px));
    max-height: min(72vh, 620px);
    display: none !important;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(193, 138, 24, .72);
    border-radius: 8px;
    background: var(--menu-black);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .3);
    overscroll-behavior: contain;
  }

  .hgw-main-menu__root.is-open > .hgw-main-menu__list {
    display: block !important;
  }

  .hgw-main-menu__item + .hgw-main-menu__item {
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .hgw-main-menu__link,
  .hgw-main-menu button.hgw-main-menu__summary {
    width: 100%;
    min-height: 50px;
    justify-content: space-between;
    padding: 12px !important;
    color: #fff !important;
    background: transparent !important;
    font-size: 16px;
    text-align: right;
  }

  .hgw-main-menu__link:hover,
  .hgw-main-menu__link:focus-visible,
  .hgw-main-menu button.hgw-main-menu__summary:hover,
  .hgw-main-menu button.hgw-main-menu__summary:focus-visible,
  .hgw-main-menu__section.is-open > button.hgw-main-menu__summary {
    color: var(--menu-gold) !important;
    background: rgba(255, 255, 255, .05) !important;
  }

  .hgw-main-menu__dropdown {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    display: none;
    padding: 4px 8px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .hgw-main-menu__section.is-open > .hgw-main-menu__dropdown {
    display: block;
  }

  .hgw-main-menu__submenu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hgw-main-menu__submenu a {
    min-height: 42px;
    color: #f8f8f8;
    background: rgba(255, 255, 255, .08);
  }

  .hgw-main-menu__submenu a:hover,
  .hgw-main-menu__submenu a:focus-visible {
    color: var(--menu-black);
    background: var(--menu-gold);
  }

  .hgw-main-menu__all {
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .hgw-main-menu__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .hgw-main-menu__submenu {
    grid-template-columns: 1fr;
  }
}
