/* ============================= */
/* Contact Modal Overlay & Box    */
/* ============================= */
.contact-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.contact-modal-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
}

/* Close Button */
.close-modal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
  color: #333;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.close-modal:hover {
  background-color: #f0f0f0;
}
.close-modal:focus-visible {
  outline: 2px solid #1ba97f;
  outline-offset: 2px;
}

/* Form Layout */
.contact-modal-content form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  font-size: 16px;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #1ba97f;
  box-shadow: 0 0 0 2px rgba(27, 169, 127, 0.2);
  outline: none;
}

textarea {
  resize: vertical;
}

/* Submit Button */
.send-btn {
  background-color: #1ba97f;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.send-btn:hover {
  background-color: #168c68;
}
.send-btn:focus-visible {
  outline: 2px solid #1ba97f;
  outline-offset: 2px;
}

/* ============================= */
/* Animations                     */
/* ============================= */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes flyLetter {
  0% { transform: translateX(0) translateY(0) rotate(0deg); opacity: 1; }
  50% { transform: translateX(50px) translateY(-80px) rotate(20deg); opacity: 0.8; }
  100% { transform: translateX(100px) translateY(-150px) rotate(45deg); opacity: 0; }
}

/* ============================= */
/* Mobile modal adjustments      */
/* ============================= */
@media (max-width: 768px) {
  .contact-modal {
    padding: 0;
    overflow-y: auto;
  }
  .contact-modal-content {
    width: 95%;
    max-width: 400px;
    padding: 20px;
    margin: 0 10px;
  }
  .close-modal {
    top: 8px;
    right: 10px;
    font-size: 24px;
  }
  .contact-modal-content form {
    width: 100%;
  }
  .contact-modal-content input,
  .contact-modal-content textarea {
    width: 100%;
    max-width: 100%;
  }
}

/* ============================= */
/* Floating / Inline Messages     */
/* ============================= */
.inline-message,
.floating-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  min-width: 250px;
  text-align: center;
}

/* Success style */
.inline-message.success,
.floating-message.success {
  background-color: #e6f8f3;
  color: #1ba97f;
  border: 1px solid #1ba97f;
}

/* Error style */
.inline-message.error,
.floating-message.error {
  background-color: #fdecea;
  color: #d93025;
  border: 1px solid #d93025;
}

/* Show animation */
.floating-message.show,
.inline-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Icon inside message */
.msg-icon {
  font-size: 18px;
}

/* ============================= */
/* Success Popup (Modal)          */
/* ============================= */
.success-message {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
}

.success-content i {
  font-size: 48px;
  color: #1ba97f;
  margin-bottom: 10px;
}

.success-content button {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background-color: #1ba97f;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.success-content button:hover {
  background-color: #168c68;
}

/* ============================= */
/* Flying letter animation        */
/* ============================= */
.flying-letter {
  display: inline-block;
  animation: flyLetter 1.5s ease-in-out forwards;
  font-size: 20px;
}
