/* Page-specific styles — add exceptions here only when a page needs unique layout or styling */

/* Home Page */

.header-submark {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2xl);

  @media (min-width: 48rem) {
    justify-content: flex-start;
  }
}

/* About page — Hero pull-quote */

.page-hero__pullquote {
  margin: var(--space-lg) 0 0;
  padding: 0 0 0 var(--space-lg);
  border-left: 2px solid var(--color-primary-sage);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
}

/* About page — Meet Megan section */

.about-portrait-placeholder {
  background-color: var(--color-surface-sage);
  border-radius: var(--radius-md);
  min-height: 480px;
  width: 100%;
  overflow: hidden;
}

.about-portrait-placeholder picture,
.about-portrait-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

@media (max-width: 64rem) {
  .about-portrait-placeholder {
    width: 100%;
    max-width: clamp(16rem, 55vw, 22rem);
    min-height: 0;
    margin-inline: auto;
  }
}

/* About page — Career and Experience section */

.career-grid {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 64rem) {
  .career-grid {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
}

.career-narrative-block+.career-narrative-block {
  margin-top: var(--space-xl);
}

.career-narrative-block__heading {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.career-narrative-block p {
  max-width: none;
  margin: 0;
}


/* About page — Qualifications and Memberships section */

.section__header+.quals-group {
  margin-top: 0;
}

.quals-group {
  margin-top: var(--space-2xl);
}

.quals-group__heading {
  font-size: var(--text-lg);
  margin-top: 0;
  color: var(--color-text);
}

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

.quals-list--grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .quals-list--grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quals-item {
  padding: var(--space-xs) 0 var(--space-xs) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: var(--line-height-body);
  position: relative;
}

.quals-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--space-xs) + 0.55em);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary-sage);
}

.quals-list--plain {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quals-callout {
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-surface-sand);
  border-left: 3px solid var(--color-primary-sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quals-callout__heading {
  font-size: var(--text-base);
  margin-top: 0;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.quals-callout p {
  font-size: var(--text-sm);
  max-width: none;
  margin: 0;
  color: var(--color-muted-text);
}

/* Services page — anchor service sections
   Anchor offset is handled globally via scroll-padding-top on html (layout.css).
   Apply .service-section to every anchor section on services.html for spacing rules. */

.service-section p+.quals-list {
  margin-top: var(--space-md);
}

.service-section .quals-list+p {
  margin-top: var(--space-lg);
}

/* Your Next Steps page — How It Works uses shared .subsection pattern (components.css). */

.section--prefooter {
  padding-top: 0;
}

/* Contact Page
   ========================================= */

/* Form section — space between the form and the follow-up paragraph,
   and between the paragraph and the notice boxes */
.contact-form-content>.form {
  margin-bottom: var(--space-xl);
}

.contact-form-content .privacy-note {
  margin-top: var(--space-xl);
}

/* Location cards — stretch to equal grid height; map fills remaining space
   and sits flush with the card bottom (no padding/border gap) */
.location-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 0;
  overflow: hidden;
}

.location-card .card__title {
  margin-bottom: var(--space-sm);
}

.location-card .map-block {
  flex: 1 1 auto;
  aspect-ratio: unset;
  min-height: 16rem;
  margin-top: var(--space-lg);
  margin-left: calc(-1 * var(--space-xl));
  margin-right: calc(-1 * var(--space-xl));
  margin-bottom: 0;
  width: calc(100% + 2 * var(--space-xl));
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
}

/* Map iframe fills the map-block completely (removes inline-gap under iframe) */
.location-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 0;
}

/* =========================================
   Services page — CTA band directly above the footer.
   At 64rem+ the footer wave uses margin-top: -140px / height: 140px.
   The default section bottom padding (max 7rem = 112px) is not enough to
   clear the wave, causing it to cut into the dark card. Push the bottom
   padding above 140px so the card sits safely above the wave's bleed area. */
@media (min-width: 64rem) {
  .section--prefooter {
    padding-bottom: 9.5rem;
  }
}

/* Referrers page
   Anchor offset is handled globally via scroll-padding-top on html (layout.css).
   ========================================= */

.referral-fieldset-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.referral-form-preference {
  gap: var(--space-sm);
}

.referral-other-input {
  margin-top: var(--space-xs);
  display: block;
  width: 100% !important;
}