/* MiGaRa Care Referral page — matches homepage palette and typography */
:root {
  --primary: #c89b2c;
  --primary-dark: #243b55;
  --heading: #17263a;
  --referral-muted: #697586;
  --referral-border: #eceff2;
}
.referrals-page,
.referrals-page * {
  box-sizing: border-box;
}
.referrals-page {
  overflow: hidden;
  background: #fff;
  color: var(--heading);
}
.referrals-page .container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
/* Compact banner: intentionally much shorter than the homepage hero */
.referrals-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px 0 39px;
  background: linear-gradient(110deg, #ffebc8 0%, #fff 56%, #faeac3 100%);
}
.referrals-hero-shape {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.referrals-hero-shape-one {
  width: 300px;
  height: 300px;
  right: -100px;
  top: -190px;
  border: 1px solid rgba(200, 155, 44, 0.22);
}
.referrals-hero-shape-two {
  width: 170px;
  height: 170px;
  left: -100px;
  bottom: -125px;
  background: rgba(200, 155, 44, 0.07);
}
.referrals-hero-inner {
  position: relative;
  z-index: 1;
}
.referrals-eyebrow,
.referrals-section-eyebrow {
  display: inline-block;
  color: #a97912;
  font-family: Poppins, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.4;
  text-transform: uppercase;
}
.referrals-hero h1 {
  margin: 9px 0 8px;
  color: #17263a;
  font-family: Poppins, sans-serif;
  font-size: clamp(32px, 4vw, 45px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.12;
}
.referrals-hero h1 span {
  color: #b4871c;
}
.referrals-hero p {
  max-width: 690px;
  margin: 0;
  color: #5f6b7a;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
.referrals-content {
  padding: 65px 0 82px;
  background: #fff;
}
.referrals-section-heading {
  max-width: 730px;
  margin: 0 auto 35px;
  text-align: center;
}
.referrals-section-heading h2 {
  margin: 7px 0 0;
  color: #17263a;
  font-family: Poppins, sans-serif;
  font-size: clamp(27px, 3.5vw, 39px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
}
.referrals-section-heading p {
  margin: 12px auto 0;
  color: #667085;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.8;
}
.referral-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}
.referral-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 27px 26px 24px;
  background: #fff;
  border: 1px solid #eceff2;
  border-radius: 17px;
  box-shadow: 0 12px 34px rgba(31, 43, 57, 0.055);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}
.referral-card:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 155, 44, 0.4);
  box-shadow: 0 20px 42px rgba(31, 43, 57, 0.09);
}
.referral-card-featured {
  background: linear-gradient(145deg, #fffaf0, #fff 72%);
  border-color: rgba(200, 155, 44, 0.3);
}
.referral-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.referral-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  background: #fff2d5;
  color: #b4871c;
  border-radius: 50%;
  font-size: 20px;
}
.referral-number {
  color: #d7dbe0;
  font-family: Poppins, sans-serif;
  font-size: 22px;
  font-weight: 700;
}
.referral-card h3 {
  margin: 21px 0 11px;
  color: #17263a;
  font-family: Poppins, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.referral-card p {
  margin: 0 0 22px;
  color: #697586;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.8;
}
.referral-card-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
}
.form-available,
.form-pending {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.form-available {
  color: #37745e;
}
.form-pending {
  color: #7b838d;
}
.referral-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 2px solid #c89b2c;
  border-radius: 8px;
  background: #c89b2c;
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.referral-button:hover,
.referral-button:focus-visible {
  background: #ae821d;
  border-color: #ae821d;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 155, 44, 0.2);
}
.referral-button-pending,
.referral-button-pending:hover {
  border-color: #e5e7eb;
  background: #f1f3f5;
  color: #89919b;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}
.referral-card-wide {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(230px, 280px);
  align-items: center;
  gap: 23px;
  padding: 25px 28px;
}
.referral-card-wide .referral-card-top {
  grid-row: 1;
}
.referral-card-wide h3 {
  margin: 0 0 7px;
}
.referral-card-wide p {
  margin: 0;
}
.referral-card-wide .referral-card-bottom {
  grid-column: 3;
  grid-row: 1;
}
.referral-help {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  padding: 25px 28px;
  background: #fff7e7;
  border: 1px solid #ead8aa;
  border-radius: 16px;
}
.referral-help-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  background: #c89b2c;
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
}
.referral-help-copy {
  flex: 1;
}
.referral-help-copy h2 {
  margin: 0 0 5px;
  color: #17263a;
  font-family: Poppins, sans-serif;
  font-size: 17px;
  line-height: 1.4;
}
.referral-help-copy p {
  margin: 0;
  color: #667085;
  font-family: Inter, sans-serif;
  font-size: 13px;
  line-height: 1.7;
}
.referral-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 12px 17px;
  background: #fff;
  border: 2px solid #c89b2c;
  border-radius: 8px;
  color: #17263a;
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.referral-help-button:hover {
  background: #c89b2c;
  color: #fff;
}
.referrals-page a:focus-visible,
.referrals-page button:focus-visible {
  outline: 3px solid rgba(200, 155, 44, 0.45);
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .referral-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .referral-card-wide {
    grid-column: 1/-1;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .referral-card-wide .referral-card-bottom {
    grid-column: 2;
    grid-row: auto;
    margin-top: 4px;
  }
  .referral-card-wide .referral-card-top {
    grid-row: 1 / span 2;
    align-self: start;
  }
}
@media (max-width: 700px) {
  .referrals-page .container {
    width: min(100% - 32px, 600px);
  }
  .referrals-hero {
    padding: 28px 0 31px;
  }
  .referrals-hero h1 {
    font-size: 34px;
  }
  .referrals-hero p {
    font-size: 14px;
  }
  .referrals-content {
    padding: 49px 0 60px;
  }
  .referrals-section-heading {
    margin-bottom: 28px;
  }
  .referrals-section-heading h2 {
    font-size: 29px;
  }
  .referral-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .referral-card,
  .referral-card-wide {
    grid-column: auto;
    display: flex;
    align-items: stretch;
    padding: 24px 22px;
  }
  .referral-card-wide .referral-card-top {
    align-self: auto;
  }
  .referral-card-wide .referral-card-bottom {
    margin-top: auto;
  }
  .referral-help {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 22px;
    gap: 14px;
  }
  .referral-help-copy {
    flex: 1 1 calc(100% - 70px);
  }
  .referral-help-button {
    width: 100%;
  }
  .referral-card h3 {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .referrals-page *,
  .referrals-page *::before,
  .referrals-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
