
/* =====================================
   FLOATING SOCIAL WIDGET
   POSITION: BOTTOM RIGHT
===================================== */

.social-widget,
.social-widget * {
  box-sizing: border-box;
}

.social-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  left: auto;
  z-index: 999999;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  font-family: Arial, sans-serif;
}

/* SINGLE SOCIAL BUTTON */

/* Social toggle button — desktop and mobile */
.social-toggle {
  display: none;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  flex-shrink: 0;
  padding: 0;

  background: #be7c20;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  box-shadow: 0 5px 20px rgba(190, 124, 32, 0.3);
  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.social-toggle svg {
  width: 25px;
  height: 25px;
}

.social-toggle:hover {
  background: #a96d18;
  box-shadow: 0 8px 24px rgba(190, 124, 32, 0.4);
  transform: translateY(-2px);
}


.social-toggle svg {
  width: 25px;
  height: 25px;
}

.social-toggle:hover {
  background: #292929;
  transform: translateY(-2px);
}

/* SOCIAL ICON ROW */
.social-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  max-width: 300px;
  opacity: 1;
  visibility: visible;
  overflow: visible;

  transition: opacity .25s ease, max-width .3s ease;
}

/* INDIVIDUAL SOCIAL ICONS */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  flex-shrink: 0;

  color: #fff;
  text-decoration: none;
  border-radius: 50%;

  box-shadow: 0 5px 18px rgba(0,0,0,.2);

  transition:
    transform .25s ease,
    filter .25s ease,
    box-shadow .25s ease;
}

.social-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.social-icon:hover {
  transform: translateY(-4px);
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* BRAND COLORS */
.whatsapp {
  background: #25D366;
}

.instagram {
  background: linear-gradient(
    135deg,
    #833AB4,
    #FD1D1D,
    #FCB045
  );
}

.linkedin {
  background: #0A66C2;
}

/* CLOSE BUTTON */
.social-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;
  min-width: 32px;
  flex-shrink: 0;
  padding: 0;

  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: #242424;
  color: #fff;

  font-size: 23px;
  line-height: 1;
  cursor: pointer;

  transition: background .2s ease, transform .2s ease;
}

.social-close:hover {
  background: #414141;
  transform: rotate(90deg);
}

/* =====================================
   DESKTOP: SHOW THREE ICONS INITIALLY
===================================== */

@media (min-width: 601px) {
  .social-widget:not(.is-collapsed) .social-links {
    max-width: 300px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .social-widget:not(.is-collapsed) .social-toggle {
    display: none;
  }

  /* After close, show one toggle button */
  .social-widget.is-collapsed .social-links {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
  }

  .social-widget.is-collapsed .social-toggle {
    display: flex;
  }
}

/* =====================================
   MOBILE: SINGLE BUTTON INITIALLY
===================================== */

@media (max-width: 600px) {
  .social-widget {
    right: 14px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: auto;
    gap: 8px;
  }

  .social-toggle {
    display: flex;
    width: 50px;
    height: 50px;
  }

  .social-links {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    gap: 7px;

    transition:
      max-width .3s ease,
      opacity .2s ease,
      visibility .3s ease;
  }

  /* Expand icons horizontally on click */
  .social-widget.is-open .social-links {
    max-width: 210px;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    pointer-events: auto;
  }

  .social-widget.is-open .social-toggle {
    display: none;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon svg {
    width: 20px;
    height: 20px;
  }

  .social-close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 20px;
  }
}

/* REDUCED MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .social-widget *,
  .social-widget *::before,
  .social-widget *::after {
    transition: none !important;
    animation: none !important;
  }
}


.social-widget .social-toggle {
  background-color: #be7c20 !important;
  color: #ffffff;
}

.social-widget .social-toggle:hover {
  background-color: #a96d18 !important;
}