/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 16px less than .container (60px → 44px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 44px;
  }
}

/* Landscape mobile (≤767px): 16px less than .container (2rem → 1rem) */
@media (max-width: 767px) {
  .container-wide {
    padding: 0 1rem;
  }
}


/* ============================================================
   ReferralsTermsSection — Figma bbBZfM3MEfbBCKzElufLvw, node 658:4105.
   Spec: ReferralsTermsSection.figma.md.

   The closing cream panel's TOP half. The panel recipe is COPIED from
   LeadFormSection's `closing-panel` variant
   (src/components/sections/shared/LeadFormSection/LeadFormSection.css, the
   block "Variant: closing-panel — the redesign's closing cream panel, TOP
   half"); keep the two in step. The container hand-back is
   LawPracticeFinalCtaSection's, which puts a `.container` in the same panel.

   The panel spans this section AND the footer under it, so it is open at the
   bottom: no bottom border or corners, and the --secondary → --background
   gradient stops at --closing-panel-mid, where SiteFooter's `closing-panel`
   variant picks it up. Place the two together.
   ============================================================ */

.hp-section.referrals-terms {
  /* Figma's 128 top counts from the panel's outer edge, where the 16px border
     sits; the 128 below the paragraph runs on into the footer. */
  padding:       7rem 0 8rem;                   /* 112px / 128px */
  background:    linear-gradient(180deg, var(--secondary) 0%, var(--closing-panel-mid) 100%);
  border:        16px solid var(--background-white);
  border-bottom: 0;
  border-radius: 48px 48px 0 0;                 /* no 48px radius token */
}

/* Below the rail breakpoint the container hands the 16px border back, so the
   heading sits on the same edge as every section above at every width. At
   ≥1480 the stock container is centred and its 80px padding is what the
   rail is positioned from, so it stays as-is. */
@media (max-width: 1479px) {
  .referrals-terms > .container {
    max-width:      calc(1024px + 128px);
    padding-inline: 64px;
  }
}

/* The section-header + sticky-badge convention: the stack every railed
   section has. It holds only the header here. */
.referrals-terms__content {
  display:        flex;
  flex-direction: column;
  gap:            4rem;                         /* 64px */
}

/* 18/28 Light; the 800 measure is `.section-header__text`'s. */
.referrals-terms__body {
  margin:      0;
  font-size:   var(--font-size-lg);             /* 18px */
  line-height: var(--line-height-lg);           /* 28px */
  font-weight: var(--font-weight-light);        /* 300 */
  color:       var(--foreground);
}

@media (max-width: 1199px) {
  .hp-section.referrals-terms {
    padding: 6rem 0;                            /* 96px */
  }
}

@media (max-width: 991px) {
  .hp-section.referrals-terms {
    padding:       5rem 0;                      /* 80px */
    border-radius: 32px 32px 0 0;
  }

  /* 44 + the 16px border = 60, `.container`'s tablet edge. */
  .referrals-terms > .container {
    padding-inline: 44px;
  }
}

/* Mobile: the panel's 12px border; 20 + 12 = the 2rem mobile text edge. 64
   under the paragraph, as PartnerDirectoryCtaSection's: LeadFormSection's 16
   is for a card, and leaves the text sitting on the footer's list. */
@media (max-width: 767px) {
  .hp-section.referrals-terms {
    padding:       2rem 0 4rem;                 /* 32px / 64px */
    border-width:  12px 12px 0;
    border-radius: 24px 24px 0 0;
  }

  .referrals-terms > .container {
    padding-inline: 20px;
  }
}

