/* =========================================================
   CAREPLANCOMPASS — CONTACT PAGE
   Applies to:
   /contact.php

   Purpose:
   Official support/contact intake page styling.
   Works with legal-card structure but adds contact-specific
   grids, forms, support cards, consent, and close section.
========================================================= */

.contact-hero {
  padding-top: 44px;
  padding-bottom: 22px;
  background:
    radial-gradient(circle at 16% 10%, rgba(36, 79, 158, 0.10), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f6f8fb 100%);
}

.contact-hero .legal-card {
  max-width: 1040px;
  margin: 0 auto;
}

.contact-hero .legal-title {
  max-width: 900px;
  font-size: clamp(2.05rem, 4vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.contact-hero .legal-intro {
  max-width: 850px;
}

.methodology-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.methodology-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d9e2f1;
  border-radius: 999px;
  background: #f8fafc;
  color: #42536e;
  font-size: 0.82rem;
  font-weight: 850;
}

/* =========================================================
   CONTACT BODY
========================================================= */

.contact-body {
  padding-top: 24px;
}

.contact-body .legal-card {
  max-width: 1040px;
  margin: 0 auto;
}

.contact-body .legal-section + .legal-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid #d9e2f1;
}

/* =========================================================
   SUPPORT OPTION CARDS
========================================================= */

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.support-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid #d9e2f1;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 30px rgba(20, 40, 80, 0.07);
}

.support-card h3 {
  margin: 0;
  color: #0f2b63;
  font-size: 1.08rem;
  line-height: 1.22;
}

.support-card p {
  margin: 0;
  color: #4c5d76;
  font-size: 0.95rem;
  line-height: 1.62;
}

.support-card .btn {
  margin-top: auto;
}

/* =========================================================
   CONTACT FORM
========================================================= */

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  color: #0f2b63;
  font-size: 0.9rem;
  font-weight: 900;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid #cfdaf0;
  border-radius: 18px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-group input,
.form-group select {
  min-height: 48px;
  padding: 0 14px;
}

.form-group textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #244f9e;
  box-shadow: 0 0 0 4px rgba(36, 79, 158, 0.12);
}

.form-group select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #244f9e 50%),
    linear-gradient(135deg, #244f9e 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 20px,
    calc(100% - 13px) 20px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* =========================================================
   CONSENT CHECKBOXES
========================================================= */

.form-consent {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 18px;
  border: 1px solid #d9e2f1;
  border-radius: 22px;
  background: #f8fafc;
}

.form-consent label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #42536e;
  font-size: 0.93rem;
  line-height: 1.55;
}

.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #244f9e;
}

.form-consent a {
  color: #244f9e;
  font-weight: 850;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-form > .btn-primary {
  justify-self: start;
  min-width: 180px;
}

/* =========================================================
   RECOGNIZED EMAIL / NOTE BAND
========================================================= */

.note-band {
  padding: 16px 18px;
  border: 1px solid #d6ead1;
  border-radius: 20px;
  background: #eef6ec;
}

.note-band p {
  margin: 0;
  color: #30445f;
  line-height: 1.6;
}

/* =========================================================
   CONTACT RESOURCE CLOSE
========================================================= */

.contact-resource-close {
  padding: 40px 0 64px;
  background: #f6f8fb;
}

.contact-resource-close__card {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border: 1px solid #d9e2f1;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(77, 139, 95, 0.12), transparent 34%),
    #ffffff;
  box-shadow: 0 16px 42px rgba(20, 40, 80, 0.08);
}

.contact-resource-close__content h2 {
  margin: 0;
  color: #0f2b63;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.contact-resource-close__content p:not(.section-eyebrow) {
  margin: 12px 0 0;
  max-width: 620px;
  color: #4c5d76;
  line-height: 1.65;
}

.contact-resource-close__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .support-grid {
    grid-template-columns: 1fr;
  }

  .contact-resource-close__card {
    grid-template-columns: 1fr;
  }

  .contact-resource-close__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .contact-hero {
    padding-top: 30px;
  }

  .contact-hero .legal-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .methodology-meta {
    flex-direction: column;
  }

  .methodology-meta span {
    width: 100%;
  }

  .contact-form > .btn-primary {
    width: 100%;
  }

  .form-consent {
    padding: 14px;
  }

  .contact-resource-close__actions {
    flex-direction: column;
  }

  .contact-resource-close__actions .btn {
    width: 100%;
  }
}

/* =========================================================
   CONTACT PAGE WIDTH FIX
   Keeps contact.php from being trapped in the narrow default container.
========================================================= */

.contact-hero .container,
.contact-body .container,
.contact-resource-close .container {
  width: min(1240px, calc(100% - 56px)) !important;
  max-width: 1240px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.contact-hero .legal-card,
.contact-body .legal-card,
.contact-resource-close__card {
  max-width: none !important;
  width: 100% !important;
}

.contact-hero .legal-head {
  max-width: 980px;
}

.contact-hero .legal-title {
  max-width: 980px;
}

.contact-hero .legal-intro {
  max-width: 980px;
}

.support-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Make the message/form area feel less pinched */
.contact-body .legal-card {
  padding: 34px 36px;
}

/* Responsive width */
@media (max-width: 900px) {
  .contact-hero .container,
  .contact-body .container,
  .contact-resource-close .container {
    width: min(100% - 32px, 1240px) !important;
  }
}

@media (max-width: 680px) {
  .contact-hero .container,
  .contact-body .container,
  .contact-resource-close .container {
    width: min(100% - 24px, 1240px) !important;
  }

  .contact-body .legal-card {
    padding: 22px;
  }
}