#contact-widget-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  animation: subtlePulse 20s ease-in-out infinite;
}

#contact-widget-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#contact-widget-button:active {
  transform: scale(0.95);
}

#contact-widget-form {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-width: 90%;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: none;
  z-index: 1000;
  animation: slideInUp 0.3s ease-out;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  }
}

#contact-widget-form h4 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#contact-widget-form .form-control {
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 10px 12px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

#contact-widget-form .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

#contact-widget-form textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

#contact-widget-form button[type="submit"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#contact-widget-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

@media (max-width: 576px) {
  #contact-widget-button {
    bottom: 15px;
    right: 15px;
  }
  #contact-widget-form {
    right: 15px;
    width: 95%;
  }
}
/* Botón “X” en la esquina superior derecha del widget */
#contact-widget-close {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  font-size: 1.2rem;
  opacity: 0.7;
  z-index: 1;          /* por encima del resto del widget */
}

#contact-widget-close:hover {
  opacity: 1;
  cursor: pointer;
}

/* ===== Newsletter Widget ===== */
#newsletter-widget-button {
  position: fixed;
  bottom: 90px;
  right: 20px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #00a86b 0%, #007a4d 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 168, 107, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

#newsletter-widget-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.6);
}

#newsletter-widget-form {
  position: fixed;
  bottom: 145px;
  right: 20px;
  width: 320px;
  max-width: 90%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: none;
  z-index: 1000;
  animation: slideInUp 0.3s ease-out;
  border: 1px solid rgba(0, 168, 107, 0.15);
}

#newsletter-widget-form h4 {
  margin-bottom: 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #007a4d;
}

.newsletter-widget-subtitle {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 14px;
}

#newsletter-widget-form .form-control {
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 9px 12px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

#newsletter-widget-form .form-control:focus {
  border-color: #00a86b;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.12);
  outline: none;
}

#newsletter-widget-form textarea.form-control {
  min-height: 70px;
  resize: vertical;
}

#newsletter-widget-close {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  font-size: 1.2rem;
  opacity: 0.7;
}

#newsletter-widget-close:hover {
  opacity: 1;
  cursor: pointer;
}

@media (max-width: 576px) {
  #newsletter-widget-button {
    bottom: 85px;
    right: 15px;
  }
  #newsletter-widget-form {
    right: 15px;
    width: 95%;
    bottom: 140px;
  }
}

