/* Иконки связи */
.company-links-cont {
  position: fixed;
  bottom: 48px;
  right: 48px;
  z-index: 1000;
}

.company-links-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  
  position: absolute;
  bottom: 84px;
  right: 12px;
  
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding-bottom: 12px;
}

.link-to-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  background-color: rgba(23, 98, 186, 0.2);
  filter: drop-shadow(0 0 20.76px rgba(23, 98, 186, 0.2));
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.link-to-mobile-cont {
  background-color: var(--color-foreground-accent);
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.link-to-mobile-cont .img {
  object-fit: contain;
  background: url(../../img/general/phone-icon.svg);
  background-repeat: no-repeat;
  background-size: 45%;
  background-position: center;
  width: 100%;
  height: 100%;
}

.company-links-link {
  display: flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  
  transform: translateY(30px);
  opacity: 0;
  
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.company-links-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  z-index: 2;
}

.company-links-link img {
  width: 50%;
  height: 50%;
  object-fit: contain;
  position: relative;
  z-index: 3;
}

.company-links-link-des {
  display: flex;
  width: 60px;
  height: 60px;
  background-color: var(--color-background-page);
  border-radius: 100px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;

  align-items: center;
  justify-content: center;

  color: var(--color-foreground-secondary);
  font-size: var(--font-size-md);
  line-height: 125%;

  padding-right: 60px;
  
  opacity: 0;
  pointer-events: none;
  
  transition: opacity .3s ease-in-out, width .3s ease-in-out;
}

/* Фоны для кнопок */
.company-links-link.tg {
  background: linear-gradient(#2AABEE, #229ED9);
}

.company-links-link.max {
  background: url(../../img/general/max-back.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.company-links-link.mobile {
  background: #1EBE44;
}

.company-links-link.form {
  background: #CF2222;
}

.company-links-link.message {
  background: #A6B4C5;
  cursor: pointer;
}

.company-links-link.tg,
.company-links-link.max,
.company-links-link.mobile {
  display: none;
}
@media (min-width: 1201px) {
  .company-links-cont:hover .link-to-mobile {
    background-color: transparent;
  }

  .company-links-cont:hover .link-to-mobile-cont {
    background-color: var(--color-background-primary);
    box-shadow: 0 0 4px 0 rgba(19, 22, 28, 0.08);
  }

  .company-links-cont:hover .img {
    background-image: url(../../img/general/close-link-icon.svg);
    background-size: 20%;
  }

  .company-links-cont:hover .company-links-items {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .company-links-cont:hover .company-links-link {
    transform: translateY(0);
    opacity: 1;
  }

  .company-links-cont:hover .company-links-link:nth-child(1) { transition-delay: 0.25s; }
  .company-links-cont:hover .company-links-link:nth-child(2) { transition-delay: 0.2s; }
  .company-links-cont:hover .company-links-link:nth-child(3) { transition-delay: 0.15s; }
  .company-links-cont:hover .company-links-link:nth-child(4) { transition-delay: 0.1s; }
  .company-links-cont:hover .company-links-link:nth-child(5) { transition-delay: 0.05s; }

  .company-links-link:hover .company-links-link-des {
    opacity: 1;
    width: 272px;
    pointer-events: auto;
  }

  .company-links-link-des span {
    opacity: 0;
    white-space: nowrap;
    transition: opacity .15s ease;
  }

  .company-links-link:hover .company-links-link-des span {
    opacity: 1;
    transition: opacity .15s ease .15s;
  }
}

/* Мобильная версия */
@media (max-width: 1200px) {
  .company-links-link.tg,
  .company-links-link.max {
    display: flex;
  }

  .company-links-cont {
    position: fixed;
    bottom: 42px;
    right: 16px;
    z-index: 1001;
  }

  .company-links-link {
    width: 47px;
    height: 47px;
  }

  .link-to-mobile {
    width: 64px;
    height: 64px;
  }

  .link-to-mobile-cont {
    width: 47px;
    height: 47px;
  }

  .company-links-link-des {
    display: none;
  }

  .company-links-items {
    gap: 15px;
    bottom: calc(40.4px + 16px);
    right: 8px;
    padding-bottom: 12px;
  }

  .company-links-cont.active .company-links-items {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .company-links-cont.active .company-links-link {
    transform: translateY(0);
    opacity: 1;
  }

  .company-links-cont.active .link-to-mobile-cont {
    background-color: var(--color-background-primary);
    box-shadow: 0 0 4px 0 rgba(19, 22, 28, 0.08);
  }

  .company-links-cont.active .img {
    background-image: url(../../img/general/close-link-icon.svg) !important;
    background-size: 20%;
  }
  
  .company-links-cont.active .link-to-mobile {
    background-color: transparent;
  }

  /* Задержки для анимации (общие) */
  .company-links-cont .company-links-link:nth-child(1) { transition-delay: 0.25s; }
  .company-links-cont .company-links-link:nth-child(2) { transition-delay: 0.2s; }
  .company-links-cont .company-links-link:nth-child(3) { transition-delay: 0.15s; }
  .company-links-cont .company-links-link:nth-child(4) { transition-delay: 0.1s; }
  .company-links-cont .company-links-link:nth-child(5) { transition-delay: 0.05s; }
}


@media screen and (max-width: 600px) {
  .company-links-link.mobile {
    display: flex;
  }
}