/* Seven-language layout additions; original photos, logo and animation remain. */
.brand { direction: ltr; }
.footer-bottom > span:last-child { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Custom language picker ─────────────────────────────────────────────── */
#lang-picker {
  position: relative;
  flex: 0 0 auto;
  direction: ltr;
}
#lang-picker > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 42px;
  font-family: inherit;
}
#lang-picker > button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.lang-flag {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
.lang-flag svg,
.lang-flag img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  display: block;
  /* feiner Rand, damit weiße Streifen (Polen, Russland, Iran) auf hellem Grund sichtbar bleiben */
  box-shadow: 0 0 0 1px rgba(79, 84, 139, .28);
}
.lang-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}
.lang-chevron svg {
  width: 10px;
  height: 6px;
  transition: transform .15s;
}
#lang-picker > button[aria-expanded="true"] .lang-chevron svg { transform: rotate(180deg); }

/* Popup listbox — fixed to clear header/hero stacking context */
#lang-picker-list {
  position: fixed;
  min-width: 150px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
}
#lang-picker-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}
#lang-picker-list li:hover,
#lang-picker-list li:focus { background: var(--tint); outline: none; }
#lang-picker-list li[aria-selected="true"] { font-weight: 600; }
#lang-picker-list li:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Hidden backing <select> — retained for test/programmatic access only */
#language {
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  padding: 0; border: 0; margin: 0;
  flex: none;
  min-height: 0;
}

/* RTL: popup position is set by JS; no static override needed */
/* ──────────────────────────────────────────────────────────────────────── */

select:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
input[type=email], input[type=tel], a[href^="mailto:"], a[href^="tel:"] { direction: ltr; unicode-bidi: isolate; }
h1, h2, h3, p, a, button, label, summary, .notice, .footer-bottom { overflow-wrap: anywhere; }
h1, h2, h3 { hyphens: auto; }
.hero-copy, .section-head > *, .card > *, .entry, .contact-panel > *, .form-row > * { min-width: 0; }
html[dir=rtl] h1, html[dir=rtl] h2, html[dir=rtl] h3, html[dir=rtl] .eyebrow { letter-spacing: normal; }
html[dir=rtl] .navlinks { margin-left: 0; margin-right: auto; }
html[dir=rtl] .menu-button { margin-left: 0; margin-right: auto; }
html[dir=rtl] .minor-fields .card + .card { border-left: 0; border-right: 1px solid var(--line); }
html[dir=rtl] .hero-copy { padding-inline: max(40px,calc((100vw - 1200px)/2)) 40px; }
@media(max-width:1050px) {
  .header-inner { gap: 12px; }
  html[dir=rtl] .hero-copy { padding-inline: 28px; }
}
@media(max-width:760px) {
  #lang-picker { order: 3; width: 100%; }
  #lang-picker > button { width: 100%; justify-content: space-between; }
  .audience { order: 4; }
  .navlinks { order: 5; }
  .audience a { white-space: normal; min-width: 0; }
  html[dir=rtl] .hero-copy { padding-inline: 24px; }
  html[dir=rtl] .minor-fields .card + .card { border-right: 0; }
}
@media(max-width:400px) {
  html[dir=rtl] .hero-copy { padding-inline: 22px; }
}

