/* Language switcher — opaque, high contrast over beige hero */

.nav_component,
.nav_padding,
.nav_wrapper,
.nav,
.jh-nav-actions {
  overflow: visible !important;
}

.nav_component {
  z-index: 120;
}

.jh-nav-actions {
  position: relative;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.jh-lang-switch {
  position: relative;
  flex-shrink: 0;
  z-index: 140;
  isolation: isolate;
}

.jh-lang-switch__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  min-width: 3.1rem;
  padding: 0.4rem 0.8rem 0.4rem 0.85rem;
  border: 1px solid #0c0c0c;
  border-radius: 999px;
  background: #0c0c0c;
  color: #fbf8f1;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 2px 12px rgba(12, 12, 12, 0.22);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jh-lang-switch__toggle:hover,
.jh-lang-switch.is-open .jh-lang-switch__toggle {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(12, 12, 12, 0.28);
}

.jh-lang-switch__toggle:focus-visible {
  outline: 2px solid #fbf8f1;
  outline-offset: 3px;
}

.jh-lang-switch__current {
  text-transform: uppercase;
  color: inherit;
}

.jh-lang-switch__caret {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.12rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.jh-lang-switch.is-open .jh-lang-switch__caret {
  margin-top: 0.12rem;
  transform: rotate(225deg);
}

.jh-lang-switch__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 9999;
  min-width: 12rem;
  padding: 0.4rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(12, 12, 12, 0.18);
  background: #ffffff;
  color: #0c0c0c;
  box-shadow:
    0 16px 40px rgba(12, 12, 12, 0.22),
    0 4px 12px rgba(12, 12, 12, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  pointer-events: auto;
}

.jh-lang-switch__menu[hidden] {
  display: none !important;
}

.jh-lang-switch.is-open .jh-lang-switch__menu {
  display: flex !important;
}

.jh-lang-switch__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.55rem;
  background: transparent;
  color: #0c0c0c;
  text-decoration: none;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.jh-lang-switch__option:hover,
.jh-lang-switch__option:focus-visible {
  background: #f0ebe3;
  outline: none;
  color: #0c0c0c;
}

.jh-lang-switch__option.is-active {
  background: #e8e1d6;
  color: #0c0c0c;
}

.jh-lang-switch__code {
  flex: 0 0 1.75rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0c0c0c;
}

.jh-lang-switch__name {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #0c0c0c;
}

@media (max-width: 991px) {
  .nav_component {
    z-index: 160;
  }

  .jh-nav-actions {
    display: inline-flex !important;
    visibility: visible !important;
    max-width: none;
    z-index: 170;
  }

  .jh-lang-switch {
    display: block !important;
    visibility: visible !important;
    z-index: 180;
  }

  .jh-lang-switch__toggle {
    min-height: 2.45rem;
    min-width: 3.2rem;
    padding: 0.45rem 0.85rem;
    background: #0c0c0c;
    border-color: #0c0c0c;
    color: #fbf8f1;
    box-shadow: 0 3px 14px rgba(12, 12, 12, 0.28);
  }

  .jh-lang-switch__menu {
    right: 0;
    left: auto;
    min-width: 12.5rem;
    z-index: 9999;
    background: #ffffff;
  }
}

@media (max-width: 767px) {
  .jh-lang-switch__toggle {
    font-size: 0.7rem;
    padding: 0.45rem 0.75rem;
  }
}
