/* ===========================
   SOCIAL FLOATING WIDGET
   Floating social media widget with animation
   =========================== */

.social-floating-widget {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #5b8dc7 0%, #79abe5 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  position: relative;
  animation: pulse 2.8s infinite ease-in-out;
  will-change: transform, box-shadow, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s, opacity 0.28s ease;
}

.social-circle i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.12em;
  height: 1.12em;
  font-size: 1.12em;
  line-height: 1;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  transform: translate(-4%, 4%) translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: transform 0.28s ease, font-size 0.18s ease;
}

.social-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.social-floating-widget.active .social-circle,
.social-circle:hover {
  animation: none;
  transform: scale(1);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
  opacity: 0.96;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.42s ease, opacity 0.42s ease;
}

.social-floating-widget.active .social-circle::after,
.social-circle:hover::after {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  filter: blur(6px);
  transition: opacity 0.42s ease, transform 0.42s ease, filter 0.42s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 6px 16px rgba(91, 141, 199, 0.22);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 14px 40px rgba(91, 141, 199, 0.56), 0 0 0 12px rgba(91, 141, 199, 0.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 16px rgba(91, 141, 199, 0.22);
    opacity: 1;
  }
}

.social-circle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(121, 171, 229, 0.36), rgba(91, 141, 199, 0.10) 40%, rgba(91, 141, 199, 0) 60%);
  opacity: 0.95;
  filter: blur(10px);
  animation: glow 2.6s infinite ease-in-out;
  will-change: transform, opacity;
}

@keyframes glow {
  0% {
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0.6;
  }
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  margin-bottom: 0;
  pointer-events: none;
}

.social-floating-widget.active .social-links {
  opacity: 1;
  visibility: visible;
  max-height: 220px;
  transform: translateY(0);
  margin-bottom: 8px;
  pointer-events: auto;
}

.social-link {
  width: 48px;
  height: 48px;
  background-color: var(--neutral-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.social-link:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, #5b8dc7 0%, #79abe5 100%);
  color: white;
}

/* ========== RESPONSIVE ==========*/
@media (max-width: 480px) {
  .social-floating-widget {
    right: 12px;
    bottom: 12px;
  }

  .social-circle {
    width: 52px;
    height: 52px;
    font-size: 1.1em;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }
}

@media (hover: hover) and (min-width: 769px) {
  .social-circle:hover ~ .social-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .social-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  }

  .social-floating-widget .social-circle {
    width: 68px;
    height: 68px;
    font-size: 1.35em;
  }

  .social-floating-widget .social-circle i {
    font-size: 0.95em;
    width: 0.95em;
    height: 0.95em;
  }

  .social-floating-widget .social-link {
    width: 46px;
    height: 46px;
  }
}
