/* =========================================================================
   Ukrainian version only (/ua/). Loaded after style.css, never on the English page.
   Cyrillic in Montserrat is wider and has taller descenders (р, у, д, ц, щ),
   so headings get more line-height and texts are a bit shorter (see tools/build-ua.js).
   ========================================================================= */

html[lang="uk"] {
  /* darker grey for small text on light backgrounds: ≥ 4.5:1 on #fff and on the light texture */
  --gray-ua: #5e5e5e;
}

/* ---------- 1. Line height ---------- */
/* hero title: see css/hero-title.css */
html[lang="uk"] .about__title,
html[lang="uk"] .services__title,
html[lang="uk"] .doctors__title,
html[lang="uk"] .compare__title,
html[lang="uk"] .reviews__title,
html[lang="uk"] .faq__title,
html[lang="uk"] .cta__title { line-height: 1; }

html[lang="uk"] .service__title,
html[lang="uk"] .faq-item__q,
html[lang="uk"] .footer__heading { line-height: 1.05; }

html[lang="uk"] .hero__lead,
html[lang="uk"] .hero__text { line-height: 1.15; }

/* ---------- 2. Font sizes (desktop: 1rem = 1/192 of the screen width) ---------- */
@media (min-width: 1024px) {
  html[lang="uk"] .hero__lead { font-size: 4.2rem; }

  /* same size as EN (8rem) */
  html[lang="uk"] .about__title,
  html[lang="uk"] .services__title,
  html[lang="uk"] .doctors__title,
  html[lang="uk"] .compare__title,
  html[lang="uk"] .reviews__title,
  html[lang="uk"] .faq__title,
  html[lang="uk"] .cta__title { font-size: 8rem; }

  html[lang="uk"] .about__title { max-width: 86rem; }
  html[lang="uk"] .reviews__title { max-width: 80rem; }
  html[lang="uk"] .faq__title { max-width: 76rem; }
  html[lang="uk"] .cta__title { max-width: 90rem; }

  html[lang="uk"] .service__title { font-size: 4.2rem; }
  html[lang="uk"] .reviews__sort select { width: auto; min-width: 30.5rem; }
  html[lang="uk"] .footer__col ul { font-size: 2.9rem; }
  html[lang="uk"] .footer__heading { font-size: 5.4rem; }
}

@media (max-width: 1023px) {
  html[lang="uk"] .hero__lead { font-size: calc((100vw - 3.2rem) / 15.4); }
  html[lang="uk"] .hero__text { font-size: max(14px, calc((100vw - 3.2rem) / 26.5)); }

  html[lang="uk"] .about__title,
  html[lang="uk"] .services__title,
  html[lang="uk"] .doctors__title,
  html[lang="uk"] .compare__title,
  html[lang="uk"] .reviews__title,
  html[lang="uk"] .faq__title,
  html[lang="uk"] .cta__title { font-size: calc((100vw - 3.2rem) / 11.7); }

  /* 7. nothing readable below 14px on phones */
  html[lang="uk"] .stat__label { font-size: max(14px, 1.3rem); line-height: 1; }
  html[lang="uk"] .section-label__sep { font-size: 1em; }
  html[lang="uk"] .vplayer__time { font-size: 14px; }
}

/* ---------- 4. Service cards: titles, texts and tags line up across cards ----------
   The track becomes a grid with 4 shared rows; every card is a subgrid of those rows,
   so a 2-line title in one card moves the text row of all cards. */
html[lang="uk"] .services__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  grid-template-rows: auto auto auto auto;
  row-gap: 0;
}
html[lang="uk"] .service {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  justify-items: center;
  align-items: start; /* .service was a centred flex column */
  align-content: start;
  min-height: 0;
}
html[lang="uk"] .service__title { align-self: start; }
html[lang="uk"] .service__tags { margin-top: 0; align-self: end; }

/* ---------- 5. Contrast for small grey text ---------- */
html[lang="uk"] .stat__label,
html[lang="uk"] .service__text,
html[lang="uk"] .compare__text,
html[lang="uk"] .reviews__text,
html[lang="uk"] .faq__text,
html[lang="uk"] .faq-item__a p,
html[lang="uk"] .cta__text,
html[lang="uk"] .review__date,
html[lang="uk"] .review__score span,
html[lang="uk"] .pager__pages button { color: var(--gray-ua); }
html[lang="uk"] .pager__pages button[aria-current="page"] { color: var(--ink); }
html[lang="uk"] .faq-item__q svg { color: #5e5e5e; }
@media (max-width: 1023px) {
  html[lang="uk"] .map__route { font-size: 14px; }
}

/* ---------- 1b. Paragraph line height (EN keeps .85–.95) ---------- */
html[lang="uk"] .stat__label { line-height: 1.1; }
html[lang="uk"] .doctors__text,
html[lang="uk"] .compare__text,
html[lang="uk"] .reviews__text,
html[lang="uk"] .faq__text,
html[lang="uk"] .faq-item__a p,
html[lang="uk"] .cta__text { line-height: 1.15; }

/* longest badge («Головний ендодонтист») keeps a clear gap to the phone button */
@media (min-width: 1024px) {
  html[lang="uk"] .doctor__badge { padding: 0 2.4rem; font-size: 2.8rem; }
}
