/* Mobile overrides for Tilda layout */

/* Utility bar: transparent bar; buttons white fill, black text */
#prodefence-header-bar {
  background: transparent !important;
  box-shadow: none;
}
#prodefence-header-bar .prodefence-language-switcher,
#prodefence-header-bar .prodefence-blog-nav-link {
  background: #fff !important;
  color: #000 !important;
}

/* Fix thin dark line at white block boundary (subpixel/anti-aliasing) */
#allrecords .t396__artboard,
#allrecords .t396__filter,
#allrecords .t396__carrier {
  border: none !important;
  outline: none !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
#allrecords .t396__elem .tn-atom {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
#allrecords .t-cover .t-container,
#allrecords .t-cover .t581 {
  border: none !important;
  outline: none !important;
}

/*
 * RU hero text: reduce font sizes so longer Russian phrases
 * don't overlap with the paragraph below.
 * html[lang="ru"] is set by layout.tsx based on cookie.
 */
html[lang="ru"] #rec808301542 [field="tn_text_1697526098987"] {
  font-size: 80% !important;
}
html[lang="ru"] #rec808301542 [field="tn_text_1729457519042"] {
  font-size: 75% !important;
}
html[lang="ru"] #rec808301542 [field="tn_text_1697526098997"] {
  font-size: 90% !important;
  line-height: 1.4 !important;
}

/* Mobile: меню без скролла — все вкладки в одну линию, уменьшенный текст (для RU ещё меньше) */
@media (max-width: 768px) {
  #t-header,
  #rec809086508 .t396__artboard,
  #rec809086508 .t396__carrier {
    overflow: visible !important;
    max-width: 100vw !important;
  }
  /* Все пункты меню в шапке — компактно, без бокового скролла */
  #t-header a,
  #rec809086508 a {
    font-size: 11px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
  /* Русская версия: чуть меньше текст в меню, чтобы всё помещалось */
  html[lang="ru"] #t-header a,
  html[lang="ru"] #rec809086508 a {
    font-size: 10px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  #t-header a[href*="contact"],
  #rec809086508 a[href*="contact"] {
    min-width: 0 !important;
  }
}

/* Mobile: Russian text a bit smaller than English so it lays correctly */
@media (max-width: 768px) {
  html[lang="ru"] #rec808301542 [field="tn_text_1697526098987"] {
    font-size: 70% !important;
  }
  html[lang="ru"] #rec808301542 [field="tn_text_1729457519042"] {
    font-size: 65% !important;
  }
  html[lang="ru"] #rec808301542 [field="tn_text_1697526098997"] {
    font-size: 78% !important;
    line-height: 1.35 !important;
  }
}

/* Cards / sections: prevent title overlapping text below */
#allrecords .t490__wrapper .t-name,
#allrecords .t-card__title,
#allrecords .t-section__title,
#allrecords [class*="t490"] .t-name {
  margin-bottom: 12px;
  padding-bottom: 4px;
  line-height: 1.25;
}
#allrecords .t490__descr,
#allrecords .t-card__descr,
#allrecords .t-section__descr {
  margin-top: 8px;
  padding-top: 4px;
}
