/* ============================================
   Плавающее боковое меню контактов (справа)
   ============================================ */

.floating-contacts {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.floating-contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color, #014dd5);
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.floating-contact-item .contact-label {
  position: absolute;
  right: 60px;
  white-space: nowrap;
  background: var(--secondary-color, #122853);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  font-family: 'Nunito', sans-serif;
}

.floating-contact-item .contact-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--secondary-color, #122853);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.floating-contact-item:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-contact-item:hover .contact-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Иконка MAX (логотип SVG) */
.floating-contact-item .contact-max-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Индивидуальные цвета для каждой кнопки */
.floating-contact-item.contact-phone {
  background: #28a745;
}

.floating-contact-item.contact-whatsapp {
  background: #25d366;
}

.floating-contact-item.contact-telegram {
  background: #0088cc;
}

.floating-contact-item.contact-max {
  background: #6c5ce7;
}

/* Анимация появления */
.floating-contacts {
  animation: fadeInRight 0.6s ease forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Адаптация под мобильные — меню внизу */
@media (max-width: 768px) {
  .floating-contacts {
    right: auto;
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.4s ease forwards;
    border-radius: 12px 12px 0 0;
  }

  .floating-contact-item {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .floating-contact-item .contact-label {
    display: none;
  }

  .floating-contact-item:hover {
    transform: scale(1.1);
  }

  .floating-contact-item .contact-max-icon {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 480px) {
  .floating-contacts {
    padding: 6px 8px;
  }

  .floating-contact-item {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .floating-contact-item .contact-max-icon {
    width: 24px;
    height: 24px;
  }
}

/* Анимация появления снизу для мобильных */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
