/* Подвал сайта: каталог ссылок (fdir), языки, логотип. Перенесено из header-variants.css (шапка C заменена «Капсулой», 10.11.2026). */
/* Footer directory (apple.com-style): headed columns, each link once. Shared by every page template. */
.fdir {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 32px;
  width: min(1080px, 100%);
  margin: 8px auto 4px;
  padding: 20px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
}
.foot .fdir { width: 100%; }
.fdir-col { min-width: 0; }
.fdir-h {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.fdir ul { margin: 0; padding: 0; list-style: none; }
.fdir li { margin: 0 0 8px; }
.fdir a {
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font-weight: 400;
  text-decoration: none;
}
.fdir a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 899px) {
  .fdir { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
  .fdir-col { padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
  .fdir-col:first-child { border-top: 0; }
  .fdir ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
  .fdir li { margin: 0; }
  .fdir a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
}

/* Footer language switcher: full names as quiet text links (apple.com footer), current one in ink. */
footer .footer-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  width: min(1080px, 100%);
  margin: 16px auto 4px;
  padding: 0;
  border-radius: 0;
  background: none;
}
footer .footer-langs a {
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: none;
}
footer .footer-langs a:hover { color: var(--ink); text-decoration: underline; }
/* Current language: plain ink text at 500 (a real Golos face). The dark-theme `.langs a[aria-current]` pill rules in
   home-v7.css are more specific than a plain footer selector, so the theme selectors are repeated here to win. */
footer .footer-langs a[aria-current="page"],
html[data-theme=dark] footer .footer-langs a[aria-current="page"],
html:not([data-theme=light]) footer .footer-langs a[aria-current="page"] { background: none; color: var(--ink); font-weight: 500; }
@media (max-width: 899px) {
  footer .footer-langs { gap: 0 20px; }
  footer .footer-langs a { min-height: 44px; font-size: 14px; }
}
/* Phones (320–479px): all five languages on one centred line, never 4+1 (owner 22.10.2026). The row borrows 12px of the
   footer's 24px side padding, and the font (12→14px) and gaps (9→20px) scale with the viewport so «Українська» fits at 320px. */
@media (max-width: 479px) {
  footer .footer-langs { flex-wrap: nowrap; width: auto; margin: 16px -12px 4px; gap: 0 clamp(9px, 5.5vw - 9px, 20px); }
  footer .footer-langs a { flex: none; white-space: nowrap; font-size: clamp(12px, 3.4vw, 14px); }
}

/* Footer logo: light/dark pair (only-light/only-dark). Block + centred so both variants sit where the single logo did. */
footer img.foot-logo{height:26px;width:auto;margin:0 auto 14px}
footer img.foot-logo.only-light{display:block}
footer img.foot-logo.only-dark{display:none}
html[data-theme=dark] footer img.foot-logo.only-light{display:none}
html[data-theme=dark] footer img.foot-logo.only-dark{display:block}
@media (prefers-color-scheme:dark){html:not([data-theme=light]) footer img.foot-logo.only-light{display:none}html:not([data-theme=light]) footer img.foot-logo.only-dark{display:block}}

/* Короткие строки подвала (возраст, Android, подпись) без одиночного слова в последней строке (QA 13.11.2026). */
footer p, #foot p { text-wrap: balance; }
