/* ---- Hero -------------------------------------------------------------
   Red panel with a navy edge, like the About Us hero. The band gradient
   starts lighter here than on the other pages (0.3 rather than 0.5).
   fade-left-soft lives in site.css. */
.contact-hero {
  position: relative;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image: url('/images/Layer-645-1-scaled.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* height (not min-height) so the band stays pinned to the bottom of
   .contact-hero instead of growing with its contents. */
.contact-hero-band {
  height: 260px;
  border-bottom: 50px solid rgba(112, 146, 180, 0.5);
  background: linear-gradient(90deg, rgba(31, 78, 132, 0.3) 0%, rgba(28, 66, 110, 0.5) 100%);
}

/* Anchored to the bottom of .contact-hero (the nearest positioned ancestor)
   rather than pushed there by a negative margin: the panel's height varies
   with font metrics, so any fixed offset drifts off the edge. */
.contact-hero-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.contact-hero-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.contact-hero-panel {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 100px 0;
  background: #d54553;
  border-right: 25px solid #0f467c;
  animation: fade-left-soft 2s ease forwards;
}

.contact-hero-spacer {
  width: 60%;
}

.contact-hero-panel h1 {
  width: 82%;
  margin: 0;
  font-family: var(--font-din);
  font-size: 60px;
  font-weight: 700;
  line-height: 75px;
  color: #fff;
}

.contact-hero-panel p {
  width: 82%;
  margin: 0;
  font-family: var(--font-myriad);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  color: #fff;
}

/* ---- Body -------------------------------------------------------------
   Form on the left, contact details on the right. */
.contact-body {
  background: #fff;
  padding: 0 12px;
}

.contact-body-inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: 100px 0;
}

.contact-row {
  display: flex;
  flex-direction: row;
  gap: 80px;
}

.contact-form-col {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-intro {
  margin: 0 0 20px;
  font-family: var(--font-myriad);
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
  color: #538baf;
}

/* ---- Form ------------------------------------------------------------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-field {
  display: flex;
  flex-direction: column;
}

.contact-form input {
  width: 100%;
  height: 59px;
  padding: 7px 20px;
  border: 1px solid #aeaeb9;
  border-radius: 0;
  background: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  color: #3b3b3b;
}

.contact-form input::placeholder {
  color: #3b3b3b;
  opacity: 0.75;
}

.contact-form input:focus {
  outline: 2px solid #538baf;
  outline-offset: 1px;
  border-color: #538baf;
}

.contact-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px 20px;
  border: 1px solid #aeaeb9;
  border-radius: 0;
  background: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: #3b3b3b;
  resize: vertical;
}

.contact-textarea::placeholder {
  color: #3b3b3b;
  opacity: 0.75;
}

.contact-textarea:focus {
  outline: 2px solid #538baf;
  outline-offset: 1px;
  border-color: #538baf;
}

/* Honeypot. Taken out of the layout without display:none or visibility:hidden,
   which the better bots check for and skip. */
.contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit {
  align-self: flex-start;
  padding: 16px 44px;
  border: 0;
  border-radius: 16px;
  background: #538baf;
  font-family: "Open Sans", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-submit:hover {
  background: #3975b4;
}

/* Validation + confirmation messaging. Nothing on the live page styles
   these, so they follow the palette rather than a measured spec. */
.contact-error,
.contact-errors {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #d54553;
}

.contact-error:not(:empty) {
  margin-top: 6px;
}

.contact-errors ul {
  margin: 0;
  padding-left: 18px;
}

.contact-success {
  margin: 0 0 20px;
  padding: 16px 20px;
  background: var(--color-offwhite);
  border-left: 4px solid #538baf;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 26px;
  color: #0d323a;
}

/* ---- Contact details -------------------------------------------------- */
.contact-details {
  flex: 0 0 472px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 100px 0 0 100px;
}

.contact-details h2 {
  margin: 0;
  font-family: var(--font-myriad);
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  color: #538baf;
}

.contact-details address,
.contact-details p {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
  font-style: normal;
  color: #538baf;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-details-note {
  font-style: italic;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
  .contact-hero-panel h1 {
    font-size: 44px;
    line-height: 56px;
  }

  .contact-row {
    gap: 40px;
  }

  /* The 100px left inset only makes sense beside a wide form column. */
  .contact-details {
    flex-basis: 340px;
    padding: 100px 0 0 0;
  }
}

@media (max-width: 860px) {
  .contact-row {
    flex-direction: column;
    gap: 50px;
  }

  .contact-details {
    flex-basis: auto;
    padding: 0;
  }
}

@media (max-width: 768px) {
  /* Back into normal flow: stacked full-width the panel can outgrow the hero,
     and anchoring it to the bottom would spill it over the section below.
     The band has to size to its content here for the same reason - at a fixed
     height the taller stacked panel overflows it. */
  .contact-hero-row {
    position: static;
  }

  .contact-hero-band {
    height: auto;
  }

  .contact-hero-inner {
    flex-direction: column;
    padding: 0;
  }

  .contact-hero-panel {
    width: 100%;
    align-items: flex-start;
    gap: 24px;
    padding: 50px 20px;
    border-right: 0;
    border-bottom: 25px solid #0f467c;
  }

  .contact-hero-panel h1,
  .contact-hero-panel p {
    width: 100%;
  }

  .contact-hero-panel h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .contact-hero-spacer {
    display: none;
  }

  .contact-body-inner {
    padding: 50px 0;
  }

  .contact-intro {
    font-size: 18px;
    line-height: 28px;
  }

  .contact-submit {
    align-self: stretch;
    text-align: center;
  }
}
