/* ===== File: /css/i18n-lang-fixes.css ===== */
/**
 * Language-specific typography tweaks.
 * Uses html.lang-<code> set by /js/i18n.js
 */

/* Script-safe font fallbacks */
html.lang-ar body {
  font-family: "Inter", "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html.lang-zh body {
  font-family: "Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

html.lang-zh-tw body {
  font-family: "Inter", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

html.lang-ja body {
  font-family: "Inter", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

html.lang-ko body {
  font-family: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

html.lang-th body {
  font-family: "Inter", "Noto Sans Thai", Tahoma, sans-serif;
}

/* Slight header tightening for longer labels */
html.lang-ar .sectionHead h2.h2-md,
html.lang-id .sectionHead h2.h2-md,
html.lang-es .sectionHead h2.h2-md,
html.lang-ja .sectionHead h2.h2-md,
html.lang-ko .sectionHead h2.h2-md,
html.lang-ru .sectionHead h2.h2-md,
html.lang-th .sectionHead h2.h2-md,
html.lang-vi .sectionHead h2.h2-md,
html.lang-zh .sectionHead h2.h2-md,
html.lang-zh-tw .sectionHead h2.h2-md {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  line-height: 1.15;
}

html.lang-ar .sectionHead .hint.p-lg,
html.lang-id .sectionHead .hint.p-lg,
html.lang-es .sectionHead .hint.p-lg,
html.lang-ja .sectionHead .hint.p-lg,
html.lang-ko .sectionHead .hint.p-lg,
html.lang-ru .sectionHead .hint.p-lg,
html.lang-th .sectionHead .hint.p-lg,
html.lang-vi .sectionHead .hint.p-lg,
html.lang-zh .sectionHead .hint.p-lg,
html.lang-zh-tw .sectionHead .hint.p-lg {
  font-size: 0.95rem;
}

/* Arabic layout */
html.lang-ar {
  direction: rtl;
}

html.lang-ar .sectionHead,
html.lang-ar .directory-body,
html.lang-ar .directory-title,
html.lang-ar .directory-meta,
html.lang-ar .directory-actions {
  text-align: right;
}

html.lang-ar .directory-url {
  direction: ltr;
  text-align: right;
}

@media (max-width: 991px) {
  html.lang-ar .sectionHead h2.h2-md,
  html.lang-id .sectionHead h2.h2-md,
  html.lang-es .sectionHead h2.h2-md,
  html.lang-ja .sectionHead h2.h2-md,
  html.lang-ko .sectionHead h2.h2-md,
  html.lang-ru .sectionHead h2.h2-md,
  html.lang-th .sectionHead h2.h2-md,
  html.lang-vi .sectionHead h2.h2-md,
  html.lang-zh .sectionHead h2.h2-md,
  html.lang-zh-tw .sectionHead h2.h2-md {
    font-size: clamp(1.6rem, 6vw, 2.05rem);
  }
}
