/* iKapitalist 2.0 — подменю пункта «Компаниям» в шапке русских страниц.
   Только классы adv-nav-*; остальная шапка и мобильное меню сайта не меняются. */
.adv-nav-dd { position: relative; display: inline-flex; align-items: center; }
.adv-nav-sub { position: absolute; left: -18px; top: 100%; z-index: 30; min-width: 300px; padding: 10px; margin-top: 10px; box-sizing: border-box;
  border-radius: 14px; background: #FFFFFF; border: 1px solid #E3E8EE; box-shadow: 0 18px 40px rgba(19,46,72,.14);
  display: flex; flex-direction: column; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
.adv-nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.adv-nav-dd:hover .adv-nav-sub, .adv-nav-dd:focus-within .adv-nav-sub { opacity: 1; visibility: visible; transform: none; }
header nav .adv-nav-sub a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: #132E48; font-size: 15px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
header nav .adv-nav-sub a small { font-size: 12px; font-weight: 400; color: #505965; }
header nav .adv-nav-sub a:hover, header nav .adv-nav-sub a:focus-visible { background: #EAF3FE; color: #132E48; opacity: 1; }
header nav .adv-nav-sub a[aria-current="page"] { background: #F4F7F9; color: #3097F4; }
.adv-nav-dd > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: translateY(-3px) rotate(45deg); opacity: .6; }
@media (max-width: 1024px) {
  .adv-nav-dd { display: block; }
  .adv-nav-dd > a::after { display: none; }
  .adv-nav-sub { position: static; min-width: 0; margin: 0 0 6px; padding: 0 0 0 14px; border: 0; border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none; transition: none; }
  .adv-nav-sub::before { display: none; }
  header nav .adv-nav-sub a { padding: 10px 0 !important; font-size: 15px !important; white-space: normal; border-top: 1px solid rgba(128,128,128,0.15) !important; border-radius: 0; }
  header nav .adv-nav-sub a small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .adv-nav-sub { transition: none; } }

/* плавная смена языка: страница появляется и затухает при переходе */
@keyframes ik-in { from { opacity: 0; } to { opacity: 1; } }
html { animation: ik-in .35s ease both; }
html.ik-leave body { opacity: 0; transition: opacity .2s ease; }
@media (prefers-reduced-motion: reduce) { html:not(.adv-motion-on) { animation: none; } html:not(.adv-motion-on).ik-leave body { transition: none; } }

/* выпадающие списки форм в стиле сайта */
.ik-sel { position: relative; width: 100%; }
.ik-sel__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ik-sel__btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: start; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ik-sel__btn:hover { border-color: #9CCBFA !important; }
.ik-sel__btn:focus-visible, .ik-sel__btn[aria-expanded="true"] { outline: none; border-color: #3097F4 !important; box-shadow: 0 0 0 3px rgba(48,151,244,.18); }
.ik-sel__btn.is-empty .ik-sel__val { color: #505965; }
.ik-sel__car { flex: none; color: #505965; transition: transform .2s ease; }
.ik-sel__btn[aria-expanded="true"] .ik-sel__car { transform: rotate(180deg); color: #3097F4; }
.ik-sel__native[aria-invalid="true"] ~ .ik-sel__btn { border-color: #C0392B !important; }
.ik-sel__list { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 40; box-sizing: border-box; min-width: 100%; max-height: 360px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  border-radius: 12px; background: #FFFFFF; border: 1px solid #E3E8EE; box-shadow: 0 18px 40px rgba(19,46,72,.14); animation: ik-sel-in .15s ease both; }
.ik-sel__list[hidden] { display: none; }
.ik-sel__opt { padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 1.35; color: #132E48; cursor: pointer; }
.ik-sel__opt.is-empty { color: #505965; }
.ik-sel__opt.is-active { background: #F4F7F9; }
.ik-sel__opt:hover { background: #EAF3FE; }
.ik-sel__opt[aria-selected="true"] { color: #3097F4; font-weight: 500; }
@keyframes ik-sel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html:not(.adv-motion-on) .ik-sel__list { animation: none; } }

/* сообщения об ошибках под полями форм */
.ik-fe { grid-column: 1 / -1; font-size: 12px; line-height: 1.4; color: #C0392B; }
[aria-invalid="true"]:not(.ik-sel__native) { border-color: #C0392B !important; }

/* мобильное меню: языки в одну строку, кнопка «Войти» под ними */
@media (max-width: 1024px) {
  header div:has(> .lang) { flex-wrap: wrap !important; row-gap: 12px; }
  header .lang { flex-wrap: nowrap !important; }
  header .lang a { white-space: nowrap; }
}

/* телефон: текстовые ссылки и мелкие кнопки — удобная зона нажатия (от 44 px) */
@media (max-width: 640px) {
  main :is(section, div) > a:not([class]), .hp-reg a, .hp-cta__c a, .hp-scene-foot button, .hp-dir__foot a:not(.adv-btn) {
    display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 640px) {
  .adv-root .adv-link, main a[href^="mailto:"], main a[href^="tel:"], main a[href^="#"]:not(.adv-btn):not(.adv-card), .ik-sel__opt { min-height: 44px; }
  .adv-root .adv-link, main a[href^="mailto:"], main a[href^="tel:"] { display: inline-flex; align-items: center; }
}
@media (max-width: 640px) {
  section a:not([class]):not(p a):not(li a):not(label a):not(.lang a), a[href^="mailto:"], a[href^="tel:"], .adv-replay {
    display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 640px) {
  [style*="position: sticky"] a { display: inline-flex; align-items: center; min-height: 40px; }
}
