/* -----------------------------------------
   CONTACT FORM WRAPPER
----------------------------------------- */
#contactForm {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Fade-in when section becomes visible */
.contact-section.in-view #contactForm {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------------
   FIELD GROUP (Bootstrap-style)
----------------------------------------- */
.field {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 18px;

  /* Animation base state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Staggered field animations */
.contact-section.in-view #contactForm .field {
  opacity: 1;
  transform: translateY(0);
}

.contact-section.in-view #contactForm .field:nth-of-type(1) { transition-delay: 0.1s; }
.contact-section.in-view #contactForm .field:nth-of-type(2) { transition-delay: 0.25s; }
.contact-section.in-view #contactForm .field:nth-of-type(3) { transition-delay: 0.4s; }
.contact-section.in-view #contactForm .field:nth-of-type(4) { transition-delay: 0.55s; }

/* -----------------------------------------
   ICON BOX (left side)
----------------------------------------- */
.icon-container {
  background: #e9ecef;
  padding: 12px 14px;
  border-right: 1px solid #ced4da;
  font-size: 1.1rem;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

/* -----------------------------------------
   INPUTS + TEXTAREA
----------------------------------------- */
.field input,
.field textarea {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  resize: none;
}

.field textarea {
  min-height: 120px;
}

/* Focus highlight */
.field input:focus,
.field textarea:focus {
  box-shadow: inset 0 0 0 2px #0d6efd33;
}

/* Highlight when JS adds .has-text */
.field.has-text input,
.field.has-text textarea {
  border-color: #444;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

/* -----------------------------------------
   BUTTON FIELD
----------------------------------------- */
.button-field {
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-section.in-view #contactForm .button-field {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

/* -----------------------------------------
   SEND BUTTON (Bootstrap-style)
----------------------------------------- */
.send-btn {
  width: 100%;
  background: #0d6efd;
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.send-btn:hover {
  background: #0b5ed7;
}

/* Shine animation (JS adds .shine) */
.send-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.send-btn.shine::after {
  left: 120%;
}

/* -----------------------------------------
   FORM FADE-OUT ON SUBMIT
----------------------------------------- */
#contactForm.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

/* -----------------------------------------
   THANK-YOU MESSAGE
----------------------------------------- */
.thankyou-message {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.thankyou-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* -----------------------------------------
   CONTACT CANVAS ANIMATION
----------------------------------------- */
.contact-canvas {
  opacity: 0;
  transform: scale(0.85) translateY(-40px) skewY(3deg);
  transform-origin: top center;
  transition: opacity 0.6s ease, transform 1.1s cubic-bezier(.22,.61,.36,1);
}

.contact-canvas.canvas-drop {
  opacity: 1;
  transform: scale(1) translateY(0) skewY(0deg);
}

/* -----------------------------------------
   INTRO FADE-OUT
----------------------------------------- */
.contact-intro.hidden {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
