/* Floating Contact Button & Menu — iOS Compatible */
.floating-contact-btn {
  position: fixed;
  bottom: 82px;
  right: 22px;
  z-index: 9999;
  width: 56px; min-width: 56px; max-width: 56px;
  height: 56px; min-height: 56px; max-height: 56px;
  background: -webkit-linear-gradient(315deg, #DAA520, #FFD700);
  background: linear-gradient(135deg, #DAA520, #FFD700);
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  clip-path: circle(50% at 50% 50%);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(218, 165, 32, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
  -webkit-appearance: none;
  animation: contactPulse 2.5s infinite;
  pointer-events: all;
  /* iOS fix: ensure button is on top */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.floating-contact-btn:hover,
.floating-contact-btn:focus {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(218, 165, 32, 0.6);
}

.floating-contact-btn.active {
  -webkit-transform: rotate(45deg) translateZ(0);
  transform: rotate(45deg) translateZ(0);
  background: -webkit-linear-gradient(315deg, #a87820, #DAA520);
  background: linear-gradient(135deg, #a87820, #DAA520);
  animation: none;
}

@-webkit-keyframes contactPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(218, 165, 32, 0.4); }
  50%       { box-shadow: 0 4px 32px rgba(218, 165, 32, 0.7), 0 0 0 8px rgba(218, 165, 32, 0.1); }
}
@keyframes contactPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(218, 165, 32, 0.4); }
  50%       { box-shadow: 0 4px 32px rgba(218, 165, 32, 0.7), 0 0 0 8px rgba(218, 165, 32, 0.1); }
}

/* Contact Menu */
.floating-contact-menu {
  position: fixed;
  bottom: 150px;
  right: 22px;
  z-index: 9998;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-transform: translateY(20px) scale(0.9) translateZ(0);
  transform: translateY(20px) scale(0.9) translateZ(0);
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-contact-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  -webkit-transform: translateY(0) scale(1) translateZ(0);
  transform: translateY(0) scale(1) translateZ(0);
}

.contact-menu-item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  /* iOS: promote to own layer */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.contact-menu-item:hover,
.contact-menu-item:active {
  -webkit-transform: translateX(-4px) translateZ(0);
  transform: translateX(-4px) translateZ(0);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.contact-menu-item .icon {
  width: 36px;
  height: 36px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  border-radius: 50%; aspect-ratio: 1/1;
  font-size: 1.1rem;
  color: #fff;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.contact-menu-item.phone .icon { background: #007bff; }
.contact-menu-item.email .icon { background: #ea4335; }
.contact-menu-item.instagram .icon { background: linear-gradient(135deg,#833ab4,#e1306c); }

.contact-menu-item .label {
  color: #333;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Staggered open animations */
.floating-contact-menu.open .contact-menu-item:nth-child(1) {
  -webkit-animation: slideInRight 0.3s ease-out 0.05s backwards;
  animation: slideInRight 0.3s ease-out 0.05s backwards;
}
.floating-contact-menu.open .contact-menu-item:nth-child(2) {
  -webkit-animation: slideInRight 0.3s ease-out 0.1s backwards;
  animation: slideInRight 0.3s ease-out 0.1s backwards;
}
.floating-contact-menu.open .contact-menu-item:nth-child(3) {
  -webkit-animation: slideInRight 0.3s ease-out 0.15s backwards;
  animation: slideInRight 0.3s ease-out 0.15s backwards;
}

@-webkit-keyframes slideInRight {
  from { opacity: 0; -webkit-transform: translateX(20px); transform: translateX(20px); }
  to   { opacity: 1; -webkit-transform: translateX(0);    transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .floating-contact-btn {
    bottom: calc(70px + env(safe-area-inset-bottom));
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  .floating-contact-menu {
    bottom: calc(132px + env(safe-area-inset-bottom));
    right: 16px;
  }
  .contact-menu-item {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  .contact-menu-item .icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .contact-menu-item .label { font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .floating-contact-btn {
    bottom: calc(58px + env(safe-area-inset-bottom));
    right: 14px;
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }
  .floating-contact-menu {
    bottom: calc(116px + env(safe-area-inset-bottom));
    right: 14px;
  }
  .contact-menu-item {
    padding: 9px 14px;
    font-size: 0.8rem;
  }
  .contact-menu-item .icon {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }
  .contact-menu-item .label { font-size: 0.78rem; }
}

