/* ─────────────────────────────────────────
   Refer a Patient — page styles
   Breakpoints mirror index.html / bloom-pt.webflow.css:
     ≤ 991px  tablet
     ≤ 767px  mobile
     ≤ 479px  small mobile
   ───────────────────────────────────────── */

/* ─────────────────────────────────────────
   Hero
   ───────────────────────────────────────── */
.refer-hero {
  background-color: var(--light-green-2);
  background-image: url('../images/Green-Lines.svg');
  background-position: 100% 100%;
  background-repeat: no-repeat;
  background-size: 900px;
  padding-top: 160px;
  padding-bottom: 100px;
}

.refer-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 60px;
  align-items: center;
}

.refer-hero-text h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--black);
  margin-top: 12px;
  margin-bottom: 24px;
}

.refer-hero-text .label {
  display: block;
  margin-bottom: 8px;
}

.refer-hero-image {
  border-radius: 12px;
  overflow: hidden;
  height: 420px;
}

.refer-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* ─────────────────────────────────────────
   Common Conditions
   ───────────────────────────────────────── */
.refer-conditions {
  background-color: var(--white-smoke);
}

.refer-conditions-header {
  text-align: center;
  margin-bottom: 56px;
}

.conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 32px;
  grid-row-gap: 32px;
}

.condition-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 36px 40px;
}

.condition-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-top: 0;
  margin-bottom: 20px;
}

.condition-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.condition-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--dark-grey);
}

.condition-list li::before {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  background-color: var(--celadon);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222423' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}

/* ─────────────────────────────────────────
   Get in Touch
   ───────────────────────────────────────── */
.refer-contact {
  background-color: var(--white);
}

/* Two-column: left heading/CTA — right fax+email stack */
.refer-contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 80px;
  align-items: start;
}

.refer-contact-left h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.refer-contact-intro {
  margin-bottom: 36px;
}

.refer-contact-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Horizontal row inside right column */
.refer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.refer-contact-icon-wrap {
  width: 52px;
  height: 52px;
  background-color: var(--light-green-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
}

.refer-contact-icon-wrap .material-symbols-outlined {
  font-size: 26px;
}

.refer-contact-row-text {
  flex: 1;
}

.refer-contact-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.refer-contact-card-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-grey);
  margin: 0 0 10px;
}

.refer-contact-card-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  line-height: 1.5;
}

a.refer-contact-card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────────
   Partner With Us
   ───────────────────────────────────────── */
.refer-partner {
  background-color: #d5e6d8;
  text-align: center;
}

.refer-partner-inner {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.refer-partner h2 {
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────
   Modal
   ───────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(34, 36, 35, 0.5);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 48px 48px 40px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  scroll-behavior: smooth;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--black);
  background: var(--white-smoke);
}

.modal-close .material-symbols-outlined {
  font-size: 22px;
}

/* Step indicator */
.modal-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.modal-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.modal-step.is-active,
.modal-step.is-done {
  opacity: 1;
}

.modal-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--gainsboro);
  color: var(--dark-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.modal-step.is-active .modal-step-dot {
  background-color: var(--black);
  color: var(--white);
}

.modal-step.is-done .modal-step-dot {
  background-color: var(--celadon);
  color: var(--black);
}

.modal-step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark-grey);
  white-space: nowrap;
}

.modal-step-connector {
  flex: 1;
  height: 1px;
  background-color: var(--gainsboro);
  margin: 0 12px;
}

/* Modal titles */
.modal-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--black);
  margin-top: 0;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 15px;
  color: var(--grey);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Form steps */
.form-step {
  animation: stepFadeIn 0.2s ease;
}

.form-step.is-hidden {
  display: none;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Form fields */
.form-section-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 7px;
  line-height: 1.3;
}

.form-required {
  color: #ec8675;
}

.form-optional {
  font-style: italic;
  font-weight: 400;
  color: var(--grey);
}

.form-field input,
.form-field select,
.form-field textarea {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--white);
  border: 1.5px solid var(--gainsboro);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: Red Hat Display, sans-serif;
  font-size: 15px;
  color: var(--black);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23afafaf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--celadon);
  box-shadow: 0 0 0 3px rgba(183, 226, 191, 0.3);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--grey);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--gainsboro);
  margin: 8px 0 24px;
}

/* Form actions */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 12px;
}

.form-next-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 140px;
  justify-content: center;
}

.form-next-btn .material-symbols-outlined {
  font-size: 18px;
}

.form-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: Red Hat Display, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-grey);
  padding: 0;
  transition: color 0.2s;
}

.form-back-btn:hover {
  color: var(--black);
}

.form-back-btn .material-symbols-outlined {
  font-size: 18px;
}

.form-note {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.5;
  margin-top: 14px;
  text-align: center;
}

/* Success view */
.form-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: var(--celadon);
  border-radius: 50%;
  margin: 0 auto 20px;
  color: var(--black);
}

.form-success-icon .material-symbols-outlined {
  font-size: 36px;
}

#form-success {
  text-align: center;
  padding: 20px 0 8px;
}

#form-success .modal-title {
  margin-bottom: 12px;
}

#close-success-modal {
  margin: 8px auto 0;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   Responsive — ≤ 991px (tablet)
   ───────────────────────────────────────── */
@media screen and (max-width: 991px) {
  .refer-hero {
    padding-top: 130px;
    padding-bottom: 80px;
  }

  .refer-hero-inner {
    grid-column-gap: 40px;
  }

  .refer-hero-text h1 {
    font-size: 42px;
  }

  .refer-hero-image {
    height: 360px;
  }

  .conditions-grid {
    grid-column-gap: 24px;
    grid-row-gap: 24px;
  }

  .refer-contact-layout {
    grid-column-gap: 56px;
  }

  .value-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─────────────────────────────────────────
   Responsive — ≤ 767px (mobile)
   ───────────────────────────────────────── */
@media screen and (max-width: 767px) {
  .refer-hero {
    padding-top: 110px;
    padding-bottom: 60px;
  }

  .refer-hero-inner {
    grid-template-columns: 1fr;
    grid-row-gap: 32px;
  }

  .refer-hero-image {
    height: 280px;
    order: -1;
  }

  .refer-hero-text h1 {
    font-size: 36px;
  }

  .conditions-grid {
    grid-template-columns: 1fr;
  }

  .condition-card {
    padding: 28px 28px;
  }

  .refer-contact-layout {
    grid-template-columns: 1fr;
    grid-row-gap: 48px;
  }

  .refer-contact-left .button {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .refer-contact-right {
    gap: 32px;
  }

  .modal-box {
    padding: 36px 24px 28px;
    border-radius: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────
   Responsive — ≤ 479px (small mobile)
   ───────────────────────────────────────── */
@media screen and (max-width: 479px) {
  .refer-hero {
    padding-top: 100px;
    padding-bottom: 50px;
    background-size: 500px;
  }

  .refer-hero-text h1 {
    font-size: 30px;
  }

  .refer-hero-image {
    height: 220px;
  }

  .conditions-grid {
    grid-row-gap: 16px;
  }

  .condition-card {
    padding: 24px;
  }

  .refer-contact-right {
    gap: 24px;
  }

  .refer-partner-inner {
    max-width: none;
  }

  .modal-box {
    padding: 28px 18px 24px;
    border-radius: 14px;
  }

  .modal-title {
    font-size: 22px;
  }
}
