/* i18n additions: language switcher and Cyrillic glyphs for the display font. */

/* "DM Serif Display" has no Cyrillic glyphs. Merge a close high-contrast serif
   (Playfair Display Bold, self-hosted cyrillic subset) into the same family name.
   The 700 files are declared as weight 400 so they match the weight the headings use;
   Bold Cyrillic matches the stroke weight of DM Serif Display Latin letters. */
@font-face {
  font-family: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/playfair-display-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "DM Serif Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/playfair-display-cyrillic-700-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Language switcher (flag icons: lipis/flag-icons, MIT) inside .lang-block */
.lang-block {
  display: flex;
  align-items: center;
}

.lang-link {
  color: #0a2046;
  font-family: Nunito, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 7px;
  border-bottom: 2px solid transparent;
  transition: color .3s cubic-bezier(.215, .61, .355, 1), border-color .3s cubic-bezier(.215, .61, .355, 1);
}

.lang-link:hover,
.lang-link:focus-visible {
  color: #15be7d;
}

.lang-link.is-current {
  color: #0a2046;
  font-weight: 700;
  border-bottom-color: #15be7d;
  cursor: default;
}

@media screen and (max-width: 991px) {
  .lang-block {
    margin-left: 0;
    padding: 8px 0 8px 10px;
  }

  .lang-link {
    font-size: 15px;
    padding: 8px 10px;
  }
}

/* Russian: long Cyrillic words must not set the minimum width of the hero column */
html[lang="ru"] .hero-title {
  font-size: 56px;
  hyphens: manual;
  overflow-wrap: break-word;
}

@media screen and (max-width: 991px) {
  html[lang="ru"] .hero-title {
    font-size: 48px;
  }
}

@media screen and (max-width: 479px) {
  html[lang="ru"] .hero-title {
    font-size: 34px;
  }
}

/* Flag icons */
.lang-link {
  display: inline-flex;
  align-items: center;
  border-bottom: 0;
}

.lang-flag {
  display: block;
  width: 28px;
  height: 21px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(10, 32, 70, .15);
  opacity: .55;
  transition: opacity .3s cubic-bezier(.215, .61, .355, 1), box-shadow .3s cubic-bezier(.215, .61, .355, 1);
}

.lang-link:hover .lang-flag,
.lang-link:focus-visible .lang-flag {
  opacity: 1;
}

.lang-link.is-current .lang-flag {
  opacity: 1;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #15be7d;
}

/* Service cards: style.css limits .heading-3 to 130px, which long Russian/English words overflow
   (text spills out of the centered box). Let the title use the card width instead. */
html[lang="ru"] .heading-3,
html[lang="en"] .heading-3 {
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: manual;
}
