/*
 * HGI - Resource Page
 * 26-resource.css
 *
 * Shared styling for the patient-resource pages:
 * Resources, Patient Forms, Prep Forms, Insurance & Billing,
 * Online Bill Pay, Careers.
 */


/* ═══════════════════════════════════════════
   INTRO
═══════════════════════════════════════════ */

.res-intro {
  background: var(--color-bg-base);
}

.res-intro__inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.res-intro__inner .eyebrow {
  display: block;
  margin-bottom: var(--space-3);
}

.res-intro__body {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
}

.res-intro__body p {
  margin-bottom: var(--space-4);
}

.res-intro__body p:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════
   ITEM CARDS
═══════════════════════════════════════════ */

.res-items__heading {
  text-align: center;
  margin-bottom: var(--space-10);
}

.res-items__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.res-card {
  display: flex;
}

.res-card__link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  padding: var(--space-8);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out),
    transform    var(--duration-base) var(--ease-out);
}

.res-card__link:hover,
.res-card__link:focus-visible {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.res-card__meta {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.res-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

.res-card__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
  margin: 0;
}

.res-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-action);
  transition: gap var(--duration-base) var(--ease-out);
}

.res-card__link:hover .res-card__cta {
  gap: var(--space-3);
  color: var(--color-action-hover);
}


/* ═══════════════════════════════════════════
   RICH CONTENT
═══════════════════════════════════════════ */

.res-body {
  background: var(--color-bg-base);
}

.res-body__text {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
  margin-top: var(--space-6);
}

.res-body__text h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.res-body__text h3:first-child {
  margin-top: 0;
}

.res-body__text p {
  margin-bottom: var(--space-4);
}

.res-body__text ul,
.res-body__text ol {
  margin: 0 0 var(--space-5) var(--space-5);
}

.res-body__text li {
  margin-bottom: var(--space-2);
}

/* A long list of accepted plans reads better in columns */
.res-body__text ul.columns {
  column-count: 2;
  column-gap: var(--space-10);
  list-style-position: inside;
  margin-left: 0;
}


/* ═══════════════════════════════════════════
   EMBED (payment form + Zelle QR)
═══════════════════════════════════════════ */

.res-embed__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-10);
}

.res-embed__intro {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
  max-width: 60ch;
  margin: var(--space-5) auto 0;
}

.res-embed__layout {
  display: grid;
  gap: var(--space-6);
  max-width: 760px;
  margin: 0 auto;
}

.res-embed__layout--split {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  max-width: 1040px;
  align-items: stretch;
}

.res-embed__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-10);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.res-embed__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-action);
}

.res-embed__card-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-4);
}

.res-embed__frame {
  overflow-x: auto;
}

/* Keep third-party iframes responsive */
.res-embed__frame iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

/* ── Payment form ── */
.res-embed__frame form { margin: 0; }
.res-embed__frame br { display: none; }

.res-embed__frame label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.hgi-pay-form__row {
  display: flex;
  gap: var(--space-3);
}

.res-embed__frame input[type="text"],
.res-embed__frame input[type="email"],
.res-embed__frame input[type="number"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 54px;
  padding: 0 var(--space-5);
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background   var(--duration-fast) var(--ease-out),
    box-shadow   var(--duration-fast) var(--ease-out);
}

.res-embed__frame input[type="text"]::placeholder {
  color: var(--color-text-muted);
}

.res-embed__frame input[type="text"]:focus,
.res-embed__frame input[type="email"]:focus,
.res-embed__frame input[type="number"]:focus {
  outline: none;
  background: var(--color-bg-white);
  border-color: var(--color-action);
  box-shadow: 0 0 0 4px var(--color-action-light);
}

.res-embed__frame input[type="submit"],
.res-embed__frame button[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  height: 54px;
  padding: 0 var(--space-8);
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-cta);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-out),
    transform  var(--duration-fast) var(--ease-out);
}

.res-embed__frame input[type="submit"]:hover,
.res-embed__frame button[type="submit"]:hover,
.res-embed__frame input[type="submit"]:focus-visible {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
}

.hgi-pay-form__secure {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.hgi-pay-form__secure::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: var(--color-action);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Zelle QR panel ── */
.res-embed__card--qr {
  align-items: center;
  text-align: center;
  background: var(--color-panel-deep);
  border-color: var(--color-panel-deep);
}

.res-embed__card--qr .res-embed__label { color: rgba(247, 249, 250, 0.7); }
.res-embed__card--qr .res-embed__card-title { color: #fff; }

.res-embed__qr {
  padding: var(--space-4);
  background: #fff;
  border-radius: var(--radius-lg);
  line-height: 0;
}

.res-embed__image {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}

.res-embed__note {
  margin: var(--space-6) auto 0;
  text-align: center;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.res-embed__card--qr .res-embed__note {
  margin-top: var(--space-5);
  color: rgba(247, 249, 250, 0.85);
  max-width: none;
}

.res-embed__card--qr .res-embed__note a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

@media (max-width: 600px) {
  .res-embed__card { padding: var(--space-6); }
  .hgi-pay-form__row { flex-direction: column; }
  .res-embed__frame input[type="submit"] { width: 100%; }
}

/* ═══════════════════════════════════════════
   LOCAL SEO
═══════════════════════════════════════════ */

.res-local {
  background: var(--color-bg-base);
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.res-local__text {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}


/* ═══════════════════════════════════════════
   PREP FORMS (document library)
   Used inside res_body_text on /prep-forms/
═══════════════════════════════════════════ */

.res-body:has(.prep-wrap) .section-heading {
  text-align: center;
}

/* Break out of container--text to full container width */
.res-body__text .prep-wrap {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100vw - 2 * var(--space-6)));
  margin-top: var(--space-4);
}

/* wpautop safety */
.prep-wrap br { display: none; }
.prep-wrap p:empty { display: none; }

.prep-wrap a { text-decoration: none; }

.prep-wrap .prep-lead {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-8);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-body);
}

/* ── Jump chips ── */
.prep-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-16);
}

.prep-wrap .prep-jump a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    transform    var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out);
}

.prep-wrap .prep-jump a:hover,
.prep-wrap .prep-jump a:focus-visible {
  border-color: var(--color-action);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.prep-jump__count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-action-light);
  color: var(--color-action);
  font-size: var(--text-xs);
}

/* ── Group header ── */
.prep-group {
  scroll-margin-top: 140px;
  margin-bottom: var(--space-12);
}

.prep-group__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.prep-group__num {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 0.9;
  color: var(--color-action);
  opacity: 0.3;
}

.prep-wrap .prep-eyebrow {
  display: block;
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-action);
}

.prep-wrap .prep-group__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin: 0;
}

.prep-wrap .prep-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-action);
  transition: gap var(--duration-base) var(--ease-out);
}

.prep-wrap .prep-more::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center / contain no-repeat;
}

.prep-wrap .prep-more:hover { gap: var(--space-3); }

/* ── Colonoscopy tiles ── */
.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.prep-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out),
    transform    var(--duration-base) var(--ease-out);
}

.prep-tile:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.prep-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.prep-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-action-light);
}

.prep-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background: var(--color-action);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='17' x2='13' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='17' x2='13' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
}

.prep-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.prep-tag--es {
  border-color: var(--color-action);
  background: var(--color-action-light);
  color: var(--color-action);
}

.prep-wrap .prep-tile__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin: 0;
}

.prep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--color-border);
}

.prep-wrap .prep-dl {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-action);
  border-radius: var(--radius-full);
  background: var(--color-action);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  transition:
    background var(--duration-fast) var(--ease-out),
    transform  var(--duration-base) var(--ease-out);
}

.prep-wrap .prep-dl::after {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

.prep-wrap .prep-dl:hover,
.prep-wrap .prep-dl:focus-visible {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* ── EGD, FlexSig, PillCam cards ── */
.prep-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.prep-proc {
  scroll-margin-top: 140px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-8);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}

.prep-proc__num {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  line-height: 1;
  color: var(--color-action);
  opacity: 0.3;
  margin-bottom: var(--space-2);
}

.prep-wrap .prep-proc .prep-group__title { font-size: var(--text-2xl); }

.prep-proc .prep-more { margin-top: auto; padding-top: var(--space-3); }

.prep-docs {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.prep-wrap .prep-doc {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background   var(--duration-fast) var(--ease-out),
    transform    var(--duration-base) var(--ease-out);
}

.prep-wrap .prep-doc:hover,
.prep-wrap .prep-doc:focus-visible {
  border-color: var(--color-action);
  background: var(--color-bg-white);
  transform: translateX(3px);
}

.prep-doc .prep-icon {
  width: 36px;
  height: 36px;
}

.prep-doc .prep-icon::before {
  width: 18px;
  height: 18px;
}

.prep-doc__label { flex: 1; }

.prep-doc .prep-tag { padding: 2px var(--space-2); }

.prep-wrap .prep-doc::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: var(--color-action);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Call note ── */
.prep-wrap .prep-note {
  margin: var(--space-8) 0 var(--space-12);
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--color-action);
  background: var(--color-bg-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
}

.prep-wrap .prep-note a {
  color: var(--color-action);
  font-weight: var(--weight-semibold);
}

/* ── Before any procedure ── */
.prep-before {
  padding: var(--space-12) var(--space-10);
  background: var(--color-panel-deep);
  border-radius: var(--radius-xl);
}

.prep-wrap .prep-before .prep-eyebrow {
  color: rgba(247, 249, 250, 0.7);
  text-align: center;
}

.prep-wrap .prep-before__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-medium);
  color: #fff;
  text-align: center;
  margin: 0 0 var(--space-10);
}

.prep-before__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
}

.prep-before__item {
  padding-top: var(--space-5);
  border-top: 1px solid rgba(247, 249, 250, 0.2);
}

.prep-wrap .prep-before__item h4 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: #fff;
}

.prep-wrap .prep-before__item h4::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: var(--color-action-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.prep-wrap .prep-before__item p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(247, 249, 250, 0.85);
  max-width: none;
}

.prep-wrap .prep-before__links {
  margin: var(--space-10) 0 0;
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(247, 249, 250, 0.85);
  max-width: none;
}

.prep-wrap .prep-before__links a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .prep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prep-trio { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .res-items__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .res-card__link {
    padding: var(--space-6);
  }

  .res-intro__body {
    font-size: var(--text-base);
  }


  .res-body__text ul.columns {
    column-count: 1;
  }

  .prep-group__head {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .prep-grid { grid-template-columns: 1fr; }
  .prep-proc { padding: var(--space-6); }
  .prep-jump { margin-bottom: var(--space-10); }
  .prep-before { padding: var(--space-8) var(--space-6); }
  .prep-before__cols { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ── Grouped cards (e.g. Patient Forms) ── */

.res-items__group-heading {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin: var(--space-12) 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.res-items .container > .res-items__group-heading:first-of-type {
  margin-top: 0;
}

@media (max-width: 768px) {
  .res-items__group-heading {
    font-size: var(--text-lg);
    margin-top: var(--space-10);
  }
}