.social-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  transition: all 0.3s ease;
  max-width: 50px;
  box-sizing: border-box;
}

.social-sidebar a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: white;
  text-decoration: none;
  padding: 10px 0 10px 14px;
  text-align: center;
  margin-bottom: 1px;
  transition: all 0.3s ease;
  width: 50px;
  overflow: hidden;
  height: 50px;
  white-space: nowrap;
}

.social-sidebar a i {
  font-size: 20px;
  width: 30px;
}

.social-sidebar a span {
  opacity: 0;
  transition: all 0.3s ease;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  transform: translateX(-10px);
  padding-left: 5px;
}

.social-sidebar a:hover {
  width: 140px;
}

.social-sidebar a:hover span {
  opacity: 1;
  transform: translateX(0);
}

.social-sidebar .instagram {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.social-sidebar .tiktok {
  background-color: #000000;
}

.social-sidebar .youtube {
  background-color: #ff0000;
}

@media (max-width: 768px) {
  .social-sidebar .facebook {
    background-color: #3b5998;
    box-shadow: 2px 2px 10px rgba(59, 89, 152, 0.9);
  }
  .social-sidebar .instagram {
    background: linear-gradient(
      45deg,
      #f09433 0%,
      #e6683c 25%,
      #dc2743 50%,
      #cc2366 75%,
      #bc1888 100%
    );
    box-shadow: 2px 2px 10px rgba(225, 48, 108, 0.9);
  }
  .social-sidebar .tiktok {
    background-color: #000000;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 2px 2px 10px rgba(255, 255, 255, 0.3);
  }
  .social-sidebar .youtube {
    background-color: #ff0000;
    box-shadow: 2px 2px 10px rgba(255, 0, 0, 0.9);
  }
}

@media (min-width: 769px) {
  .social-sidebar a {
    transform: translateX(-5px);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    will-change: transform, width, opacity;
    transition: transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;
  }

  .social-sidebar a:hover {
    transform: translateX(0);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
  }

  @keyframes socialBounce {
    0% {
      transform: translateX(-50px);
      opacity: 0;
    }
    60% {
      transform: translateX(5px);
      opacity: 1;
    }
    80% {
      transform: translateX(-2px);
      opacity: 1;
    }
    100% {
      transform: translateX(-5px);
      opacity: 1;
    }
  }

  .social-sidebar a:nth-child(1) {
    animation: socialBounce 0.5s ease-out 0.1s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(2) {
    animation: socialBounce 0.5s ease-out 0.2s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(3) {
    animation: socialBounce 0.5s ease-out 0.3s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(4) {
    animation: socialBounce 0.5s ease-out 0.4s forwards;
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .social-sidebar {
    position: fixed;
    top: 50%;
    left: 0;
    bottom: auto;
    right: auto;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    z-index: 9999;
    width: auto;
  }
  .social-sidebar a {
    display: flex;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    margin-right: 0;
    border-radius: 0 8px 8px 0;
    justify-content: center;
    align-items: center;
    padding: 0;
    opacity: 0.9;
    transform: none;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  }

  .social-sidebar a i {
    margin: 0;
    font-size: 18px;
    color: white;
  }
  .social-sidebar a:hover {
    width: 36px;
    transform: translateX(3px);
    opacity: 1;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.6);
  }

  .social-sidebar a span {
    display: none;
  }

  .social-sidebar a:hover span {
    opacity: 0;
  }
  @keyframes sidebarAppear {
    from {
      opacity: 0;
      transform: translateX(-15px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .social-sidebar a:nth-child(1) {
    animation: sidebarAppear 0.3s ease 0.1s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(2) {
    animation: sidebarAppear 0.3s ease 0.2s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(3) {
    animation: sidebarAppear 0.3s ease 0.3s forwards;
    opacity: 0;
  }
  .social-sidebar a:nth-child(4) {
    animation: sidebarAppear 0.3s ease 0.4s forwards;
    opacity: 0;
  }
}

@media (max-width: 768px) {
  a[href^="https://wa.me/"]
  {
    bottom: 15px !important;
    right: 15px !important;
    z-index: 9998 !important;
  }

  a[href^="https://wa.me/"] img
  {
    width: 50px !important;
    height: 50px !important;
  }
}

@media (max-width: 380px) {
  .social-sidebar a {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  .social-sidebar a i {
    font-size: 16px;
  }
}
