/* 1. Общие ссылки: в покое — слабая линия 1px (25% синего),
   при наведении сверху анимируется сплошная 2px.
   :not([class]) исключает кнопки и меню; :not([aria-label]) и
   :not(:has(img, svg)) — логотипы и иконки-обёртки. */
#allrecords a:not([class]):not([aria-label]):not(:has(img, svg)) {
  color: #0f52b3 !important;
  background-image:
    linear-gradient(#1668d8, #1668d8),
    linear-gradient(rgba(22, 104, 216, 0.25), rgba(22, 104, 216, 0.25)) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 0 100%, 0 100% !important;
  background-size: 0% 1px, 100% 1px !important;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease !important;
  padding-bottom: 1px;
}
#allrecords a:not([class]):not([aria-label]):not(:has(img, svg)):hover {
  color: #1668d8 !important;
  background-size: 100% 2px, 100% 1px !important;
}

/* 2. Телефон и почта: та же схема, но ловим по href^ без привязки
   к блоку или странице. Селектор строже правила 1 (есть href^),
   поэтому побеждает его независимо от порядка. */
#allrecords a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)),
#allrecords a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)) {
  color: #0f52b3 !important;
  background-image:
    linear-gradient(#1668d8, #1668d8),
    linear-gradient(rgba(22, 104, 216, 0.25), rgba(22, 104, 216, 0.25)) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 0 100%, 0 100% !important;
  background-size: 0% 1px, 100% 1px !important;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease !important;
  padding-bottom: 1px;
}
#allrecords a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)):hover,
#allrecords a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)):hover {
  color: #1668d8 !important;
  background-size: 100% 2px, 100% 1px !important;
}

/* 3. Тёмный блок .uc-darkhero: светлая схема вместо синей.
   Селектор строже правил 1–2 (класс + отсутствие href^),
   поэтому перебивает их в любом порядке. */
#allrecords .uc-darkhero a:not([class]):not([aria-label]):not(:has(img, svg)) {
  color: #a8d0ff !important;
  background-image:
    linear-gradient(#a8d0ff, #a8d0ff),
    linear-gradient(rgba(168, 208, 255, 0.3), rgba(168, 208, 255, 0.3)) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 0 100%, 0 100% !important;
  background-size: 0% 2px, 100% 1px !important;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease !important;
  padding-bottom: 1px;
}
#allrecords .uc-darkhero a:not([class]):not([aria-label]):not(:has(img, svg)):hover {
  background-size: 100% 2px, 100% 1px !important;
}

/* 4. Тел./почта в тёмном блоке: класс делает селектор строже
   правила 2, поэтому действует светлая схема, а не синяя. */
#allrecords .uc-darkhero a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)),
#allrecords .uc-darkhero a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)) {
  color: #a8d0ff !important;
  background-image:
    linear-gradient(#a8d0ff, #a8d0ff),
    linear-gradient(rgba(168, 208, 255, 0.3), rgba(168, 208, 255, 0.3)) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: 0 100%, 0 100% !important;
  background-size: 0% 2px, 100% 2px !important;
  transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease !important;
  padding-bottom: 1px;
}
#allrecords .uc-darkhero a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)):hover,
#allrecords .uc-darkhero a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)):hover {
  background-size: 100% 2px, 100% 2px !important;
}

/* 5. prefers-reduced-motion: отключаем анимацию подчёркивания */
@media (prefers-reduced-motion: reduce) {
  #allrecords a:not([class]):not([aria-label]):not(:has(img, svg)),
  #allrecords a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)),
  #allrecords a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)),
  #allrecords .uc-darkhero a:not([class]):not([aria-label]):not(:has(img, svg)),
  #allrecords .uc-darkhero a[href^="tel:"]:not([class]):not([aria-label]):not(:has(img, svg)),
  #allrecords .uc-darkhero a[href^="mailto:"]:not([class]):not([aria-label]):not(:has(img, svg)) {
    transition: none !important;
  }
}