/* Social Hub - Single icon that expands to 2x2 grid */

/* Hide the original social media block */
.block-social-media-links {
  display: none !important;
}

/* Social Hub Container */
.social-hub-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

[dir="rtl"] .social-hub-container {
  right: auto;
  left: 30px;
}

/* Main trigger button */
.social-hub-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4), 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
}

.social-hub-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6), 0 4px 15px rgba(0, 0, 0, 0.15);
}

.social-hub-trigger svg {
  width: 24px;
  height: 24px;
  fill: white;
  transition: transform 0.3s ease;
}

.social-hub-container.active .social-hub-trigger svg {
  transform: rotate(45deg);
}

/* Grid popup */
.social-hub-grid {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

[dir="rtl"] .social-hub-grid {
  right: auto;
  left: 0;
}

.social-hub-container.active .social-hub-grid,
.social-hub-container:hover .social-hub-grid {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Individual social link */
.social-hub-link {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-hub-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0.1;
  border-radius: 16px;
  transition: opacity 0.3s ease;
}

.social-hub-link:hover::before {
  opacity: 0.2;
}

.social-hub-link:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.social-hub-link i,
.social-hub-link svg {
  font-size: 26px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-hub-link:hover i,
.social-hub-link:hover svg {
  transform: scale(1.15);
}

/* Platform-specific colors */
.social-hub-link.facebook {
  color: #1877f2;
  background: linear-gradient(135deg, rgba(24, 119, 242, 0.1), rgba(24, 119, 242, 0.05));
}

.social-hub-link.facebook:hover {
  background: linear-gradient(135deg, #1877f2, #0d65d9);
  color: white;
}

.social-hub-link.instagram {
  color: #e4405f;
  background: linear-gradient(135deg, rgba(228, 64, 95, 0.1), rgba(228, 64, 95, 0.05));
}

.social-hub-link.instagram:hover {
  background: linear-gradient(135deg, #e4405f, #c13584, #833ab4);
  color: white;
}

.social-hub-link.tiktok {
  color: #000000;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
}

.social-hub-link.tiktok:hover {
  background: linear-gradient(135deg, #000000, #25f4ee);
  color: white;
}

.social-hub-link.whatsapp {
  color: #25d366;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(37, 211, 102, 0.05));
}

.social-hub-link.whatsapp:hover {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
}

/* Tooltip */
.social-hub-link::after {
  content: attr(data-name);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.social-hub-link:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -32px;
}

/* Pulse animation on trigger */
.social-hub-trigger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: -1;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.social-hub-container.active .social-hub-trigger::after,
.social-hub-container:hover .social-hub-trigger::after {
  animation: none;
  opacity: 0;
}

/* Entry animations for grid items */
.social-hub-link {
  opacity: 0;
  transform: translateY(10px);
}

.social-hub-container.active .social-hub-link,
.social-hub-container:hover .social-hub-link {
  opacity: 1;
  transform: translateY(0);
}

.social-hub-link:nth-child(1) { transition-delay: 0.05s; }
.social-hub-link:nth-child(2) { transition-delay: 0.1s; }
.social-hub-link:nth-child(3) { transition-delay: 0.15s; }
.social-hub-link:nth-child(4) { transition-delay: 0.2s; }

/* Edit button in the hub */
.social-hub-edit-btn {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.social-hub-container.active .social-hub-edit-btn,
.social-hub-container:hover .social-hub-edit-btn {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.social-hub-edit-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #553c9a 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.social-hub-edit-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .social-hub-container {
    bottom: 20px;
    right: 20px;
  }
  
  [dir="rtl"] .social-hub-container {
    right: auto;
    left: 20px;
  }
  
  .social-hub-trigger {
    width: 50px;
    height: 50px;
  }
  
  .social-hub-grid {
    bottom: 60px;
    padding: 12px;
    gap: 10px;
  }
  
  .social-hub-link {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }
  
  .social-hub-link i,
  .social-hub-link svg {
    font-size: 22px;
  }
}

