/* ===== Contact Form Container ===== */
.contact-form-container {
  max-width: 860px;
  margin: 2rem auto 4rem;
  padding: 2.5rem 2rem 3.5rem;

  /* TEKNOWERKZ GLOW BACKGROUND (matches error card) */
  background:
    radial-gradient(circle at top left, rgba(0, 255, 204, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 0, 170, 0.12), transparent 60%),
    rgba(5, 5, 15, 0.92); /* core card color */

  /* Softer “card” rounding */
  border-radius: 16px;

  /* GLOW SHADOW STACK */
  box-shadow:
    0 0 32px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(0, 255, 204, 0.18),
    0 0 55px rgba(255, 0, 170, 0.14);

  /* Subtle frame around the card */
  border: 1px solid rgba(255, 255, 255, 0.10);

  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Title */
.contact-form-container h1 {
  font-size: 2.4rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: #EE2B3A;
}

/* ===== FORM Layout ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* space between rows */
}

/* Rows with two fields */
.form-row {
  display: flex;
  gap: 2rem; /* horizontal gap between inputs */
  flex-wrap: wrap;
}

/* Each input group */
.form-group {
  flex: 1;
  min-width: 280px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem; /* gap between label, input, error */
  position: relative;
}

/* ===== Inputs, Select, Textarea ===== */
.floating-input {
  width: 100%;
  padding: 1.1rem 1rem 0.6rem;
  font-size: 1rem;

  /* TEKNOWERKZ “dark glass” field */
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background-color: rgba(8, 10, 20, 0.95);
  color: #f5f5f5;

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  font-family: inherit;
  resize: vertical; /* textarea respects this */
  box-sizing: border-box;
}

.floating-input::placeholder {
  color: #777; /* fallback if you ever add placeholders */
}

/* Focus state with neon rim */
.floating-input:focus {
  border-color: #00ffcc;              /* TEK accent */
  outline: none;
  background-color: rgba(10, 14, 28, 1);
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.32);
}

/* For textarea specific height */
textarea.floating-input {
  min-height: 140px;
  padding-top: 1.2rem;
  padding-bottom: 0.8rem;
}

/* ===== Floating Labels ===== */
.form-group label {
  position: absolute;
  left: 1rem;
  top: 1.2rem;

  /* Match dark card so label chip blends into background */
  background-color: rgba(5, 5, 15, 0.98);
  padding: 0 0.25rem;

  font-size: 1rem;
  color: #9a9a9a;
  pointer-events: none;
  transition: 0.2s ease all;
  user-select: none;
}

/* Label floats up when input is focused or has value (via .focused class) */
.floating-input.focused + label {
  top: -0.6rem;
  left: 0.9rem;
  font-size: 0.75rem;
  color: #00ffcc;  /* neon label */
  font-weight: 600;
}

/* ===== Character Count ===== */
.char-count {
  font-size: 0.8rem;
  color: #ccc;
  text-align: right;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ===== Error Messages ===== */
.error-msg {
  font-size: 0.85rem;
  color: #e74c3c;
  font-weight: 600;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

/* ===== Form Success Message ===== */
.form-success {
  background-color: #e6f9e8;
  color: #217a26;
  padding: 1.1rem 1.3rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(33, 122, 38, 0.3);
  text-align: center;
  font-size: 1.1rem;
}

/* ===== Submit Button ===== */
.btn.subdued {
  background-color: #5a6a78;
  color: #f0f0f0;
  padding: 0.85rem 2.2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(90, 106, 120, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
  align-self: flex-start;
}

.btn.subdued:hover,
.btn.subdued:focus {
  background-color: #44515a;
  box-shadow: 0 6px 12px rgba(68, 81, 90, 0.5);
  transform: translateY(-2px);
  outline: none;
}

/* ===== Cloudflare Turnstile (CAPTCHA) ===== */
.cf-turnstile,
.cf-turnstile iframe {
  display: block;
  margin: 1.5rem auto 0;   /* center it under the fields */
  width: fit-content;
}

/* ===== Responsive ===== */
/* === MOBILE FIXES === */
@media (max-width: 650px) {
  .form-group {
    position: relative;
  }

  /* Extend the card background so CAPTCHA and button stay on it */
  .contact-form-container {
    padding: 2rem 1.25rem 4.5rem; /* extra bottom padding for Turnstile */
  }

  /* Style the select box (How did you hear…) */
  select#referral.floating-input {
    padding: 1.35rem 1rem 0.6rem; /* Enough space at top for label */
    font-size: 1rem;
    line-height: 1.4;
    appearance: none;

    background-color: rgba(8, 10, 20, 0.95);
    color: #f5f5f5;

    background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
    box-sizing: border-box;
    border-radius: 8px;
  }

  /* Default label position for select */
  select#referral.floating-input + label {
    position: absolute;
    top: 1.35rem; /* Adjusted lower for visual alignment */
    left: 1rem;
    font-size: 1rem;
    color: #9a9a9a;
    background: rgba(5, 5, 15, 0.98);
    padding: 0 0.25rem;
    pointer-events: none;
    transition: 0.2s ease all;
    user-select: none;
    z-index: 2;
  }

  /* Floated label (when .focused class is present) */
  select#referral.floating-input.focused + label {
    top: -0.4rem; /* Slightly lower than before for balance */
    left: 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #00ffcc;
    z-index: 2;
  }
}

/* 
@media (max-width: 650px) {
  .form-row {
    flex-direction: column;
  }
  .form-group {
    min-width: 100%;
  }
}
*/