/* ==========================================================================
   Social: Instagram-icoon in header en floating WhatsApp-knop
   Gebruikt design tokens uit variables.css.
   ========================================================================== */

/* --- Instagram link in de hoofdnavigatie ---------------------------------- */
.site-nav-list .nav-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  color: var(--color-navy);
  background-color: transparent;
  transition: background-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

.site-nav-list .nav-instagram svg {
  width: 20px;
  height: 20px;
  display: block;
}

.site-nav-list .nav-instagram:hover,
.site-nav-list .nav-instagram:focus-visible {
  background-color: var(--color-accent-soft);
  color: var(--color-accent-dark);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .site-nav-list .nav-instagram {
    width: auto;
    height: auto;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-md);
    justify-content: flex-start;
    gap: var(--sp-3);
    color: var(--color-navy);
  }

  .site-nav-list .nav-instagram svg {
    width: 22px;
    height: 22px;
  }

  .site-nav-list .nav-instagram .nav-instagram-label {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
  }
}

@media (min-width: 821px) {
  .site-nav-list .nav-instagram .nav-instagram-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* --- Floating WhatsApp-knop ---------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483600;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  isolation: isolate;
  transition: background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  background-color: var(--color-whatsapp-dark);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.whatsapp-float:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  display: block;
  fill: var(--color-white);
}

.whatsapp-float .whatsapp-float-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pulse-ring achter de knop, zonder overlap met het icoon */
@media (prefers-reduced-motion: no-preference) {
  .whatsapp-float::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    animation: whatsapp-pulse 2.4s ease-out infinite;
    pointer-events: none;
    z-index: -1;
  }

  @keyframes whatsapp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
  }
}

/* Iets compacter op kleine telefoons, blijft duidelijk zichtbaar */
@media (max-width: 480px) {
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}

/* --- Mobile: Instagram-item bovenaan verbergen, social links komen onder Direct contact --- */
@media (max-width: 820px) {
  .site-nav-list > li.nav-instagram-item {
    display: none;
  }

  .nav-contact-whatsapp svg,
  .nav-contact-instagram svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .nav-contact-whatsapp {
    color: var(--color-whatsapp);
  }

  .nav-contact-whatsapp:hover,
  .nav-contact-whatsapp:focus-visible {
    color: var(--color-whatsapp-dark);
  }

  .nav-contact-instagram {
    color: var(--color-accent);
  }

  .nav-contact-instagram:hover,
  .nav-contact-instagram:focus-visible {
    color: var(--color-accent-dark);
  }
}

/* Extra hardening voor mobiele zichtbaarheid van de floating knop */
@media (max-width: 820px) {
  .whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    top: auto;
    left: auto;
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}
