/* Header layout */
.site-header {
  position: relative;
  z-index: 1000;
  color: var(--wp--preset--color--navigation-fg);
  background: var(--wp--preset--color--navigation-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.site-header .header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--px-12) var(--px-40);

  @media (max-width: 47.998rem) {
    padding: var(--px-12) var(--px-20);
  }
}
.header__left,
.header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header__logo img {
  display: block;
  max-height: 48px;
  height: auto;
  width: auto;
}
.header__nav {
  display: block;
}
.header__nav .menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav .menu__item {
  position: relative;
  color: inherit;
  padding: var(--px-8) var(--px-16);
  display: block;
  white-space: nowrap;
  font-family: var(--wp--preset--font-family--tanovis-bold);
  font-weight: 700;
  font-size: var(--px-16);
  cursor: pointer;
}

.header__nav .menu__item.has-children {
  padding: var(--px-8) var(--px-16) var(--px-8) var(--px-40);
}

.header__nav .menu__item > a {
  text-decoration: none;
  color: inherit;
  font-family: var(--wp--preset--font-family--tanovis-bold);
  font-weight: 700;
}
.header__nav .menu__item > button.menu__parent {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font-family: var(--wp--preset--font-family--tanovis-bold);
  font-weight: 700;
  font-size: var(--px-16);
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.header__nav .menu__item.has-children::after {
  content: url("data:image/svg+xml,%3Csvg width='20' height='11' viewBox='0 0 20 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.225302 0.23013C0.525706 -0.0767101 1.01276 -0.0767101 1.31316 0.23013L10 9.10312L18.6868 0.23013C18.9872 -0.0767101 19.4743 -0.0767101 19.7747 0.23013C20.0751 0.536971 20.0751 1.03446 19.7747 1.3413L10.5439 10.7699C10.2435 11.0767 9.75648 11.0767 9.45607 10.7699L0.225302 1.3413C-0.0751008 1.03446 -0.0751008 0.536971 0.225302 0.23013Z' fill='%23141C20'/%3E%3C/svg%3E%0A");
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--px-20);
  height: var(--px-11);
  margin-left: var(--px-8);
  transition: transform 0.2s ease;
}
.header__nav .menu__item.has-children:hover::after {
  transform: translateY(-30%);
}

.header__cta {
  margin-left: 0.5rem;
}

.header__cta a {
  display: inline-block;
  text-decoration: none;
  padding: var(--px-10) var(--px-16) var(--px-8);
  border-radius: var(--px-32);
  background: transparent;
  border: 1px solid var(--wp--preset--color--navigation-fg);
  color: var(--wp--preset--color--navigation-fg);
  font-family: var(--wp--preset--font-family--tanovis-bold);
  font-weight: 700;
  font-size: var(--px-16);
}
.header__burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
}
.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + var(--px-14));
  transform: translateX(-50%);
  background: var(--wp--preset--color--mega-menu-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: none;
  min-width: var(--px-800);
  padding: var(--px-80) var(--px-40);
  z-index: 1000;
}

.dropdown-menu__inner {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.dropdown-menu__decor {
  width: 320px;
  max-width: 35%;
  display: none;
}

.dropdown-menu__decor img,
.dropdown-menu__decor svg {
  display: block;
  width: 100%;
  height: auto;
}

.dropdown-menu__groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 2rem;
}

.dropdown-group__title {
  font-family: var(--wp--preset--font-family--tanovis-bold);
  font-weight: 700;
  font-size: var(--px-16);
  display: inline-block;
  margin-bottom: var(--px-12);
  color: inherit;

  text-decoration: underline;
  text-underline-offset: var(--px-6);
  text-decoration-thickness: var(--px-1);
  text-decoration-color: var(--wp--preset--color--mega-menu-bg);
  transition: text-decoration 0.2s ease;
}

.dropdown-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-group__list li {
  margin-bottom: var(--px-12);
}

.dropdown-group__list a {
  font-family: var(--wp--preset--font-family--suisse-intl);
  font-weight: 400;
  font-size: var(--px-16);
  text-decoration: none;
  color: inherit;

  text-decoration: underline;
  text-underline-offset: var(--px-6);
  text-decoration-thickness: var(--px-1);
  text-decoration-color: var(--wp--preset--color--mega-menu-bg);
  transition: text-decoration 0.2s ease;
}

.dropdown-group__title:hover,
.dropdown-group__list a:hover {
  text-decoration-color: var(--wp--preset--color--navigation-fg);
}

/* States */
.header__nav .menu__item.has-children.dropdown-open::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + var(--px-12));
  transform: translateY(-50%);
  width: 100%;
  height: var(--px-24);
  background: var(--wp--preset--color--mega-menu-bg);
}

.header__nav .menu__item.has-children.dropdown-open .dropdown-menu {
  display: block;
}

/* Mobile menu hidden by default (desktop and above) */
.mobile-menu {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .header__nav,
  .header__cta {
    display: none;
  }
  .header__burger {
    display: inline-block;
  }
  /* Hide dropdowns on mobile entirely */
  .dropdown-menu {
    display: none !important;
  }

  /* Mobile dropdown */
  .mobile-menu {
    display: none;
    padding: var(--px-32) var(--px-16);
    background: var(--wp--preset--color--mega-menu-bg);
    color: var(--wp--preset--color--navigation-fg);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .site-header.nav-open .mobile-menu {
    display: block;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .mobile-nav {
    margin-bottom: var(--px-32);
  }
  .mobile-menu__list,
  .mobile-submenu,
  .mobile-submenu__grand {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .mobile-menu__item + .mobile-menu__item {
    margin-top: var(--px-8);
  }

  .mobile-submenu .mobile-submenu__item {
    padding-top: var(--px-8);
  }

  .mobile-menu .mobile-submenu__grand-item a {
    color: inherit;
    text-decoration: none;
    display: block;
    font-family: var(--wp--preset--font-family--suisse-intl);
    font-weight: 400;
    font-size: var(--px-16);
    line-height: 1.5;
  }
  .mobile-menu .mobile-submenu__title {
    color: inherit;
    text-decoration: none;
    display: block;
    font-family: var(--wp--preset--font-family--tanovis-bold);
    font-weight: 700;
    font-size: var(--px-16);
    line-height: 1.5;
  }
  .mobile-menu .mobile-menu__parent {
    position: relative;
    font-family: var(--wp--preset--font-family--tanovis-bold);
    font-weight: 700;
    font-size: var(--px-18);
    line-height: 1;
    text-align: left;
    width: 100%;
    padding: var(--px-8) 0;
    color: inherit;
    text-decoration: none;
    display: block;
  }
  .mobile-menu .mobile-menu__parent[type="button"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
  }
  .mobile-menu .mobile-menu__item.has-children .mobile-menu__parent::after {
    content: url("data:image/svg+xml,%3Csvg width='17' height='9' viewBox='0 0 17 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.191507 0.188289C0.44685 -0.0627628 0.860842 -0.0627628 1.11619 0.188289L8.5 7.44801L15.8838 0.188289C16.1392 -0.0627628 16.5531 -0.0627628 16.8085 0.188289C17.0638 0.43934 17.0638 0.846374 16.8085 1.09743L8.96234 8.81171C8.707 9.06276 8.293 9.06276 8.03766 8.81171L0.191507 1.09743C-0.0638357 0.846374 -0.0638357 0.43934 0.191507 0.188289Z' fill='%23141C20'/%3E%3C/svg%3E%0A");
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
  }
  .mobile-menu
    .mobile-menu__item.has-children.mobile-menu__item--open
    .mobile-menu__parent::after {
    transform: translateY(-50%) rotate(180deg);
  }
  .mobile-menu
    .mobile-menu__item:not(.has-children)
    .mobile-menu__parent::after {
    content: url("data:image/svg+xml,%3Csvg width='17' height='9' viewBox='0 0 17 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.191507 0.188289C0.44685 -0.0627628 0.860842 -0.0627628 1.11619 0.188289L8.5 7.44801L15.8838 0.188289C16.1392 -0.0627628 16.5531 -0.0627628 16.8085 0.188289C17.0638 0.43934 17.0638 0.846374 16.8085 1.09743L8.96234 8.81171C8.707 9.06276 8.293 9.06276 8.03766 8.81171L0.191507 1.09743C-0.0638357 0.846374 -0.0638357 0.43934 0.191507 0.188289Z' fill='%23141C20'/%3E%3C/svg%3E%0A");
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
  }

  .mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
    margin: 0;
  }
  .mobile-menu .mobile-menu__item--open .mobile-submenu {
    max-height: 2000px;
    padding: var(--px-8) 0 var(--px-8);
  }
  .mobile-submenu__grand {
    padding: var(--px-8) 0 var(--px-8);
    margin: 0;
  }
  .mobile-submenu__grand-item {
    padding: var(--px-8) 0;
  }
  .mobile-cta {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
  }
}

@media (min-width: 1025px) {
  /* Show decorative image when wide enough */
  .dropdown-menu__decor {
    display: block;
  }
}

/* GTranslate */
.site-header {
  .gt_float_switcher {
    box-shadow: none;
    background: transparent;
  }

  .gt_float_switcher .gt-selected {
    background: transparent;
  }

  .gt_float_switcher .gt_options {
    position: absolute;
    top: 4rem;
    background: white;
    max-height: 1000px;
  }

  .gt_float_switcher .gt_options a {
    font-size: 1rem;
  }

  .gt_float_switcher .gt_options a:hover {
    background-color: var(--wp--preset--color--theme-accent-bg);
    color: var(--wp--preset--color--theme-accent-fg);
  }

  .gt_float_switcher
    .gt-selected
    .gt-current-lang
    span.gt_float_switcher-arrow {
    transform: rotate(0deg);
  }

  .gt_float_switcher
    .gt-selected
    .gt-current-lang
    span.gt_float_switcher-arrow.gt_arrow_rotate {
    transform: rotate(180deg);
  }

  .gt_float_switcher img {
    width: 24px;
  }

  @media (max-width: 47.998rem) {
    .gt_float_switcher img {
      display: none;
    }
  }
}
