/* ==========================================================================
   Modern Contact Form (Floating UI Aesthetic)
   ========================================================================== */

body, html {
  height: 100%;
  background-color: #fdfdfd; /* Light theme background */
}

/* Page Wrapper */
.contact-page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

/* Back Link Navigation */
.nav-back-link {
  position: absolute;
  top: 32px;
  left: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  z-index: 10;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

/* ==========================================================================
   Floating Alternate Contact Buttons
   ========================================================================== */
.floating-contact {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
  z-index: 0;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-contact:hover {
  color: var(--text-main);
  border-color: var(--accent);
  /* box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1); */
}

.pos-left {
  top: 25%;
  left: 7%;
}

.pos-right {
  bottom: 30%;
  right: 8%;
}

/* Gentle floating animations */
@keyframes float1 {
  0% { transform: translateY(0px) rotate(-1deg); }
  100% { transform: translateY(-15px) rotate(1deg); }
}
@keyframes float2 {
  0% { transform: translateY(0px) rotate(1deg); }
  100% { transform: translateY(12px) rotate(-1deg); }
}

.float-anim-1 { animation: float1 4s ease-in-out infinite alternate; }
.float-anim-2 { animation: float2 5s ease-in-out infinite alternate 1s; }

/* ==========================================================================
   Main Contact Card
   ========================================================================== */
.modern-contact-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.03);
  z-index: 2;
}

.card-header {
  margin-bottom: 32px;
}

.card-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Inputs */
.form-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.minimal-input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.minimal-input.full-width {
  margin-bottom: 16px;
}

.message-box {
  resize: vertical;
  min-height: 120px;
}

.minimal-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.minimal-input:hover {
  background: #f1f5f9;
}

.minimal-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Footer & Actions */
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.secondary-routing {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.secondary-routing a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.secondary-routing a:hover {
  color: var(--accent);
}

/* Matched EXACTLY to Home Nav Button */
.btn-pill {
  background: var(--text-main);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-pill:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 980px) {
  .pos-left, .pos-right {
    display: none; /* Hide floating elements on smaller screens to prevent overlap */
  }
}

@media (max-width: 640px) {
  .contact-page-wrapper {
    padding: 100px 16px 40px;
    align-items: flex-start;
  }
  
  .nav-back-link {
    top: 24px;
    left: 24px;
  }
  
  .modern-contact-card {
    padding: 32px 24px;
  }
  
  .form-input-grid {
    grid-template-columns: 1fr;
  }
  
  .form-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .btn-pill {
    width: 100%; /* Full width button on mobile */
  }
}