/*
 * FineTurf referral form (TKT-1841). Matches the approved mock-up "Referral form: final
 * version": white card with a green top edge on a pale green band, navy and green
 * headline, orange pill button. Site tokens: navy #134e93 and orange #d96a1a / #c25f17
 * are the live site's; green #6cbd45 / #3f7d22 are the mailer pages'.
 * Everything is scoped under .ftref because Divi sets bare h2, p, input and button rules.
 */

.ftref {
  --ftref-navy: #134e93;
  --ftref-green: #6cbd45;
  --ftref-green-dark: #3f7d22;
  --ftref-wash: #eef6e8;
  --ftref-orange: #d96a1a;
  --ftref-orange-dark: #c25f17;
  --ftref-ink: #231f20;
  --ftref-muted: #4b5563;
  --ftref-line: #d6dbe1;
  --ftref-error: #b91c1c;
  font-family: 'Mulish', Arial, sans-serif;
  color: var(--ftref-ink);
  -webkit-font-smoothing: antialiased;
}
.ftref *, .ftref *::before, .ftref *::after { box-sizing: border-box; }
.ftref h2, .ftref p, .ftref fieldset, .ftref legend { margin: 0; padding: 0; border: 0; }
.ftref [hidden] { display: none !important; }

/*
 * The site header (.ft-header) is position: fixed, 73px tall below 1024px and 89px from
 * there up. The post hero clears it with its own top margin; the card now sits above the
 * hero, so the card clears the header instead and the hero's margin goes. The script
 * replaces --ftref-header with the header's measured height.
 */
.ftref { padding-top: var(--ftref-header, 73px); }
@media (min-width: 1024px) { .ftref { padding-top: var(--ftref-header, 89px); } }
#et-main-area > .ftref ~ #main-content .ft-hero-post { margin-top: 0 !important; }

/*
 * The post hero on this page only (Dan, 2026-11-07): no date, no "Back to Resources",
 * no featured photo; the title runs the full width. The Theme Builder template is
 * shared by every post, so this is done here rather than in the template.
 */
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-post-date,
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-post-category-badge,
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-back-button,
#et-main-area > .ftref ~ #main-content .ft-hero-post .et_pb_button_module_wrapper:has(.ft-back-button),
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-hero-image-col { display: none !important; }
/* The spacing those elements needed (H1 24px + 10px, the stacked column's 32px) goes too,
   so the hero's own padding sits evenly above and below the title. */
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-hero-text-col { width: 100% !important; margin-right: 0 !important; margin-bottom: 0 !important; }
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-post-title { margin-bottom: 0 !important; }
#et-main-area > .ftref ~ #main-content .ft-hero-post h1.entry-title { margin-bottom: 0 !important; padding-bottom: 0 !important; }
/* Title centred at every width (Dan, 2026-11-08); the template left-aligns it on desktop. */
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-post-title,
#et-main-area > .ftref ~ #main-content .ft-hero-post .ft-post-title .et_pb_title_container,
#et-main-area > .ftref ~ #main-content .ft-hero-post h1.entry-title { text-align: center !important; }

.ftref-band {
  background: var(--ftref-wash);
  padding: 16px 16px 24px;
  border-bottom: 1px solid #dfe8d8;
}
.ftref-card {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  border-top: 5px solid var(--ftref-green);
  box-shadow: 0 6px 22px rgba(19, 78, 147, .10), 0 1px 3px rgba(0, 0, 0, .06);
  padding: 24px 20px 24px;
  scroll-margin-top: calc(var(--ftref-header, 89px) + 12px);
}

/* Headline: large, two lines, navy then green */
.ftref .ftref-title,
.ftref .ftref-done-title {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 800;
  line-height: 1.08;
  text-align: center;
  letter-spacing: -.01em;
  padding: 0;
}
.ftref .ftref-title { font-size: 34px; color: var(--ftref-navy); }
.ftref-title-a, .ftref-title-b { display: block; }
.ftref-title-b { color: var(--ftref-green-dark); }

.ftref .ftref-sub {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  margin: 12px auto 20px;
  max-width: 300px;
  color: var(--ftref-ink);
}
.ftref .ftref-sub strong { color: var(--ftref-navy); font-weight: 800; }

/* Fields */
.ftref-form { display: block; margin: 0; }
.ftref .ftref-group { display: grid; gap: 14px; margin: 0 0 24px; min-width: 0; }
.ftref .ftref-legend {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ftref-green-dark);
  margin-bottom: 2px;
}
.ftref-field { display: grid; gap: 6px; }
.ftref-field label {
  font-family: 'Mulish', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ftref-ink);
  padding: 0;
}
.ftref-hint { font-weight: 400; font-size: 12.5px; color: var(--ftref-muted); }

.ftref .ftref-field input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 10px 14px;
  font-family: 'Mulish', Arial, sans-serif;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--ftref-ink);
  background: #fff;
  border: 1.5px solid var(--ftref-line);
  border-radius: 8px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.ftref .ftref-field input:focus {
  outline: none;
  border-color: var(--ftref-navy);
  box-shadow: 0 0 0 3px rgba(19, 78, 147, .18);
}
.ftref .ftref-field input.ftref-invalid { border: 2px solid var(--ftref-error); background: #fef2f2; }
.ftref .ftref-field input.ftref-invalid:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .22); }
.ftref .ftref-error { font-size: 13px; font-weight: 700; color: var(--ftref-error); }

/* Honeypot: hidden from people, never type="hidden", which bots skip */
.ftref-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.ftref .ftref-note {
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ftref-muted);
  margin: 4px 8px 16px;
}
.ftref-turnstile:empty { display: none; }
.ftref-turnstile { display: flex; justify-content: center; margin: 0 0 12px; }

.ftref-status:empty { display: none; }
.ftref-status {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #991b1b;
  background: #fef2f2;
  border: 2px solid var(--ftref-error);
}

/* Button, matching the site's orange CTA */
.ftref .ftref-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ftref-orange);
  color: #fff;
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(217, 106, 26, .32);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.ftref .ftref-btn::after { display: none; } /* Divi's button arrow */
.ftref .ftref-btn:hover { background: var(--ftref-orange-dark); transform: translateY(-1px); }
.ftref .ftref-btn:focus-visible { outline: 3px solid #f6b26b; outline-offset: 3px; }
.ftref .ftref-btn:disabled { opacity: .7; cursor: wait; transform: none; }

/* Confirmation */
.ftref-done { text-align: center; }
.ftref-check {
  width: 60px;
  height: 60px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--ftref-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ftref-check svg { width: 30px; height: 30px; }
.ftref .ftref-done-title { font-size: 30px; color: var(--ftref-navy); margin-bottom: 12px; outline: none; }
.ftref .ftref-done p { font-size: 16px; line-height: 1.5; margin: 0 auto 12px; max-width: 320px; }
.ftref .ftref-done p.ftref-saved {
  max-width: none;
  text-align: left;
  font-size: 14px;
  background: var(--ftref-wash);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 18px;
  color: var(--ftref-ink);
}
.ftref-saved strong { color: var(--ftref-green-dark); }

@media (min-width: 768px) {
  .ftref-band { padding: 40px 24px 48px; }
  .ftref-card { padding: 36px 40px 36px; }
  .ftref .ftref-title { font-size: 44px; }
  .ftref .ftref-sub { font-size: 17px; max-width: 360px; }
  .ftref .ftref-done-title { font-size: 34px; }
}
