/* Stage 5: B2B and contact forms. */

.t5-form-section {
  margin-block: 1rem 4rem;
  border: 1px solid var(--t2-line);
  border-radius: 1.4rem;
  padding: clamp(1.1rem,3vw,2rem);
  background: #fff;
  box-shadow: 0 16px 42px rgba(4,38,84,.08);
}
.post-50 > .section-heading,
.post-72 > .section-heading,
.post-93 > .section-heading { display: none; }

.t5-form-heading { max-width: 48rem; margin-bottom: 1.25rem; }
.t5-form-heading .t-eyebrow { margin-bottom: .45rem; }
.t5-form-heading :is(h1,h2) { margin: 0; color: var(--t2-navy-900); font-size: clamp(1.45rem,3vw,2.1rem); line-height: 1.12; }
.t5-form-heading p { margin: .55rem 0 0; color: var(--t2-muted); line-height: 1.55; }
.entry-content .t-card .t5-existing-card-heading { margin: 0 0 .65rem; font-size: 1rem; line-height: 1.3; }

.t5-form {
  position: relative;
  border-radius: 1.1rem;
  padding: clamp(1rem,2.5vw,1.5rem);
  background: #f6f9fd;
}
.t5-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}
.t5-field { display: grid; align-content: start; gap: .4rem; min-width: 0; }
.t5-field--wide { grid-column: 1/-1; }
.t5-field > label {
  color: var(--t2-navy-900);
  font-size: .82rem;
  font-weight: 750;
}
.t5-field label small { color: var(--t2-muted); font-size: .7rem; font-weight: 500; }
.t5-field input:not([type="checkbox"]),
.t5-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 3rem;
  border: 1px solid #c8d6e5;
  border-radius: .72rem;
  padding: .72rem .82rem;
  background: #fff;
  color: var(--t2-text);
  font: inherit;
  font-size: .9rem;
  line-height: 1.45;
  transition: border-color 150ms ease,box-shadow 150ms ease,background 150ms ease;
}
.t5-field textarea { min-height: 7rem; resize: vertical; }
.t5-field input:focus,
.t5-field textarea:focus {
  border-color: var(--t2-blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(10,112,245,.12);
}
.t5-field input::placeholder,
.t5-field textarea::placeholder { color: #8997a8; }
.t5-field.has-error input,
.t5-field.has-error textarea { border-color: #c93d4d; background: #fffafa; }
.t5-field-error { color: #a52535; font-size: .74rem; line-height: 1.35; }
/* UI/UX: persistent equipment guidance is separate from optional details. */
.t5-field-hint { color: #52657a; font-size: .8rem; line-height: 1.5; }


.t5-field--consent { margin-top: 1rem; }
.t5-field--consent > label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  color: #44566c;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.45;
}
.t5-field--consent input {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  margin-top: .12rem;
  accent-color: var(--t2-blue);
}
.t5-field--consent a { color: var(--t2-blue); font-weight: 700; }
.t5-field--consent.has-error > label { color: #a52535; }

.t5-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.15rem;
}
.t5-form-actions button { border: 0; cursor: pointer; font: inherit; }
.t5-form-actions small { color: var(--t2-muted); font-size: .72rem; }

.t5-notice {
  margin-bottom: 1rem;
  border-radius: .8rem;
  padding: .85rem 1rem;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.45;
}
.t5-notice--success { border: 1px solid #98d4b1; background: #edfbf2; color: #17633a; }
.t5-notice--error { border: 1px solid #e4a9b0; background: #fff2f3; color: #8a2330; }

.t5-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.t5-contact-layout {
  display: grid;
  grid-template-columns: minmax(240px,.72fr) minmax(0,1.28fr);
  gap: 1rem;
  align-items: start;
  margin-block: 1rem 4rem;
}
.t5-contact-actions { display: grid; gap: .75rem; }
.t5-contact-action {
  display: grid;
  grid-template-columns: 2.6rem minmax(0,1fr);
  gap: .15rem .75rem;
  align-items: center;
  min-height: 5rem;
  border: 1px solid var(--t2-line);
  border-radius: 1rem;
  padding: .9rem;
  background: #fff;
  color: var(--t2-navy-900);
  text-decoration: none;
  transition: transform 160ms ease,border-color 160ms ease,box-shadow 160ms ease;
}
.t5-contact-action:hover {
  transform: translateY(-2px);
  border-color: #b9d8ff;
  box-shadow: 0 12px 28px rgba(4,38,84,.08);
  color: var(--t2-blue);
}
.t5-contact-action > span {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  grid-row: 1/3;
  place-items: center;
  border-radius: .72rem;
  background: #eaf4ff;
  color: var(--t2-blue);
  font-size: .8rem;
  font-weight: 850;
}
.t5-contact-action strong { min-width: 0; overflow-wrap: anywhere; font-size: .88rem; }
.t5-contact-action small { color: var(--t2-muted); font-size: .72rem; }
.t5-contact-action--whatsapp > span { background: #e8f9ef; color: #0b6938; }
.t5-contact-action--whatsapp:hover { border-color: #9ed8b7; color: #0b6938; }

.t5-form-card {
  border: 1px solid var(--t2-line);
  border-radius: 1.25rem;
  padding: clamp(1rem,2.5vw,1.5rem);
  background: #fff;
  box-shadow: 0 16px 42px rgba(4,38,84,.07);
}
.t5-form-card .t5-form { padding: 0; background: transparent; }

@media (max-width: 800px) {
  .t5-contact-layout { grid-template-columns: 1fr; margin-bottom: 2.5rem; }
  .t5-contact-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .t5-contact-action { grid-template-columns: 1fr; place-items: center; text-align: center; }
  .t5-contact-action > span { grid-row: auto; }
}

@media (max-width: 640px) {
  .t5-form-section { margin-bottom: 2.5rem; border-radius: 1rem; padding: .85rem; }
  .t5-form { padding: .9rem; }
  .t5-form-grid { grid-template-columns: 1fr; gap: .85rem; }
  .t5-field--wide { grid-column: auto; }
  .t5-contact-actions { grid-template-columns: 1fr; }
  .t5-contact-action { grid-template-columns: 2.6rem minmax(0,1fr); place-items: initial; text-align: left; }
  .t5-contact-action > span { grid-row: 1/3; }
  .t5-form-actions { align-items: stretch; flex-direction: column; }
  .t5-form-actions button { width: 100%; }
}

@media (max-width: 360px) {
  .t5-form-section,
  .t5-form-card { padding: .7rem; }
  .t5-form { padding: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .t5-contact-action,
  .t5-field input,
  .t5-field textarea { transition: none; }
}


/* Form controls remain usable when assets load slowly or previews change. */
.t5-form-section, .t5-contact-layout { scroll-margin-top: 170px; }
@media (max-width: 640px) {
  .t5-form-section, .t5-contact-layout { scroll-margin-top: 105px; }
}
.t5-honeypot[hidden] { display: none !important; }
.t5-form { min-width: 0; }
.t5-field { min-width: 0; }
.t5-field textarea { overflow-wrap: anywhere; }
.t5-form button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 640px) {
  .t5-field input, .t5-field textarea { font-size: 16px; }
  .t5-form-actions .t2-button { white-space: normal; text-align: center; }
}
