.lang-switcher [hidden] {
  display: none !important;
}

.page-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-inline: clamp(18px, 5vw, 64px);
}

.page-logo {
  display: inline-flex;
  align-items: center;
}

.page-logo img {
  display: block;
  width: clamp(150px, 30vw, 210px);
  height: auto;
}

.lang-switcher {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: flex-end;
}

.lang-toggle {
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #fff;
  border-radius: 12px;
  width: 98px;
  padding: 9px 10px;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.1;
  color: #0f172a;
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle:hover {
  border-color: #2563eb;
}

.lang-toggle:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 98px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
  user-select: none;
}

.lang-option {
  border: none;
  background: transparent;
  border-radius: 8px;
  width: 100%;
  padding: 7px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.1;
  color: #0f172a;
  cursor: pointer;
}

.lang-option:hover {
  background: #eff6ff;
}

.lang-option.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.lang-flag {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  clip-path: circle(50% at 50% 50%);
  object-fit: cover;
  flex: 0 0 20px;
}

.lang-code {
  font-weight: 600;
}

.lang-caret {
  color: #64748b;
  font-size: 0.8rem;
}

@media (max-width: 520px) {
  .page-header {
    width: min(680px, 100% - 24px);
    margin-inline: auto;
    align-items: center;
    padding-inline: 0;
  }

  .lang-toggle {
    width: 92px;
    padding: 8px 9px;
  }

  .lang-menu {
    width: 92px;
  }
}
