.site-header-inner {
  position: relative;
}

.site-header-brand-row {
  display: contents;
}

.language-menu {
  position: relative;
  z-index: 60;
  flex: 0 0 auto;
  margin-left: auto;
}

.language-toggle {
  display: inline-flex;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.language-toggle:hover,
.language-toggle[aria-expanded="true"] {
  color: var(--ink);
}

.language-toggle-arrow {
  font-size: 0.7rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.language-menu.is-open .language-toggle-arrow {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 136px;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(10, 25, 48, 0.12);
}

.language-options[hidden] {
  display: none;
}

.language-option {
  display: flex;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 6px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.language-option:hover,
.language-option:focus-visible,
.language-option[aria-current="page"] {
  background: var(--warm-gray);
  color: var(--ink);
}

.language-option[aria-current="page"] {
  font-weight: 800;
}

.language-notice {
  display: flex;
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-width));
  margin: 0 auto;
  padding: 13px 16px;
  border: 1px solid rgba(0, 127, 152, 0.2);
  border-left: 3px solid var(--cyan);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--cyan-soft);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.5;
}

.language-notice-fixed-header {
  margin-top: var(--header-height);
}

.language-notice-copy {
  margin: 0;
}

.language-notice-copy strong {
  font-weight: 800;
}

.language-notice-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.language-notice-link {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--cyan);
  border-radius: 7px;
  align-items: center;
  background: var(--surface);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.language-notice-link:hover {
  border-color: var(--coral-dark);
  color: var(--coral-dark);
}

.language-notice-dismiss {
  min-width: 32px;
  min-height: 32px;
  padding: 2px 7px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
}

.language-notice-dismiss:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .language-notice {
    width: calc(100% - (var(--page-gutter) * 2));
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .language-notice-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 108px;
  }

  .site-header-inner {
    height: 100%;
    padding: 8px 0;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
  }

  .site-header-brand-row {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
  }

  .site-header-brand-row .brand-link {
    min-height: 44px;
  }

  .language-menu {
    margin-left: 0;
  }

  .site-nav {
    width: 100%;
    height: 48px;
    border-top: 1px solid var(--line);
    justify-content: space-between;
    gap: 10px;
  }

  .site-nav a {
    min-height: 48px;
    font-size: 0.72rem;
  }

  .language-toggle {
    min-height: 44px;
    font-size: 0.74rem;
  }

  .language-options {
    top: calc(100% + 4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-toggle-arrow {
    transition: none;
  }
}
