/* =========================================================================
   INTERIOR PAGES
   Shared styles for every non-homepage template.
   The page header lives in its own component (components/page-header.css).
   Consumes tier 2 theme tokens only.
   ========================================================================= */

.page-main {
  padding-block-start: var(--theme-space-section);
  padding-block-end: var(--theme-space-region);
}

/* -------------------------------------------------------------------------
   Prose — long-form article body. Used on service detail, about,
   location, resource, and clinician bio bodies.
   ------------------------------------------------------------------------- */

.prose {
  max-width: var(--theme-measure-prose);
  margin-inline: auto;
}

.prose > * + * {
  margin-top: var(--theme-space-stack-md);
}

.prose p,
.prose li,
.prose blockquote {
  font-size: var(--theme-font-size-lead);
  line-height: var(--theme-line-height-loose);
  color: var(--theme-color-text-default);
}

.prose h2 {
  font-size: var(--theme-font-size-heading-md);
  margin-top: var(--theme-space-stack-xl);
}

.prose h3 {
  font-size: var(--theme-font-size-heading-sm);
  margin-top: var(--theme-space-stack-lg);
}

.prose ul,
.prose ol {
  padding-left: var(--theme-space-inline-lg);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: var(--theme-space-stack-xs);
}

.prose li::marker {
  color: var(--theme-color-brand-emphasis);
}

.prose a {
  color: var(--theme-color-text-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--theme-color-text-link-hover);
}

.prose blockquote {
  margin-block: var(--theme-space-stack-lg);
}

/* -------------------------------------------------------------------------
   Index grid — used by services, clinicians, resources index pages
   ------------------------------------------------------------------------- */

.index-grid {
  display: grid;
  gap: var(--theme-space-stack-lg);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 44rem) {
  .index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 68rem) {
  .index-grid--3col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.index-card {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-stack-sm);
  height: 100%;
  padding: var(--theme-space-stack-lg);
  background-color: var(--theme-color-background-surface);
  border: 1px solid var(--theme-color-border-subtle);
  border-radius: var(--theme-radius-surface);
  box-shadow: var(--theme-shadow-card);
  color: var(--theme-color-text-default);
  text-decoration: none;
  transition:
    transform var(--theme-duration-default) var(--theme-easing-default),
    box-shadow var(--theme-duration-default) var(--theme-easing-default),
    border-color var(--theme-duration-default) var(--theme-easing-default);
}

.index-card:hover,
.index-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow-lifted);
  border-color: var(--theme-color-brand-secondary);
  color: var(--theme-color-text-default);
}

.index-card__eyebrow {
  font-size: var(--theme-font-size-small);
  font-weight: var(--theme-font-weight-emphasis);
  text-transform: uppercase;
  letter-spacing: var(--theme-letter-spacing-eyebrow);
  color: var(--theme-color-brand-emphasis);
}

.index-card__title {
  font-size: var(--theme-font-size-heading-sm);
  color: var(--theme-color-text-heading);
  margin: 0;
}

.index-card__description {
  color: var(--theme-color-text-default);
  max-width: none;
  flex-grow: 1;
  font-size: var(--theme-font-size-body);
  white-space: pre-line;
}

.index-card__more {
  font-size: var(--theme-font-size-small);
  font-weight: var(--theme-font-weight-emphasis);
  letter-spacing: var(--theme-letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--theme-color-brand-emphasis);
  margin-top: auto;
}

/* People card — used on the clinicians index + support-staff section.
   Adds a portrait at the top, tightens the spacing between the name and
   pronouns line, and removes the hover lift on the static (non-link) variant. */
.index-card--person {
  gap: var(--theme-space-stack-xs);
}

.index-card--static {
  cursor: default;
}

.index-card--static:hover,
.index-card--static:focus-visible {
  transform: none;
  box-shadow: var(--theme-shadow-card);
  border-color: var(--theme-color-border-subtle);
}

.index-card__portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--theme-radius-card);
  background-color: var(--theme-color-background-subtle);
  margin-bottom: var(--theme-space-stack-sm);
}

.index-card__pronouns {
  font-size: var(--theme-font-size-small);
  color: var(--theme-color-text-muted);
  margin: 0;
}

.index-card--person .index-card__eyebrow {
  margin-top: var(--theme-space-stack-xs);
}

/* Support-staff section sits below the clinicians grid on /clinicians/. */
.support-staff {
  margin-top: var(--theme-space-section);
}

/* -------------------------------------------------------------------------
   Clinician profile — used on clinicians/<slug>/
   ------------------------------------------------------------------------- */

.clinician-hero {
  display: grid;
  gap: var(--theme-space-stack-lg);
  grid-template-columns: 1fr;
  align-items: start;
  margin-bottom: var(--theme-space-stack-xl);
}

@media (min-width: 48rem) {
  .clinician-hero {
    grid-template-columns: 18rem 1fr;
    gap: var(--theme-space-stack-xl);
  }
}

.clinician-hero__portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 18rem;
  object-fit: cover;
  border-radius: var(--theme-radius-surface);
  background-color: var(--theme-color-background-subtle);
  box-shadow: var(--theme-shadow-card);
}

.clinician-hero__name {
  font-family: var(--theme-font-family-display);
  font-weight: var(--theme-font-weight-heading);
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  color: var(--theme-color-text-heading);
  margin: 0;
}

.clinician-hero__credentials {
  font-size: var(--theme-font-size-lead);
  color: var(--theme-color-text-muted);
  margin-top: var(--theme-space-stack-xs);
}

.clinician-hero__role {
  font-size: var(--theme-font-size-body);
  color: var(--theme-color-brand-emphasis);
  font-weight: var(--theme-font-weight-emphasis);
  text-transform: uppercase;
  letter-spacing: var(--theme-letter-spacing-eyebrow);
  margin-top: var(--theme-space-stack-sm);
}

.clinician-meta {
  margin-top: var(--theme-space-stack-md);
  margin-bottom: var(--theme-space-stack-md);
  display: grid;
  gap: var(--theme-space-stack-xs);
  padding: var(--theme-space-stack-md);
  background-color: var(--theme-color-background-subtle);
  border-radius: var(--theme-radius-card);
  font-size: var(--theme-font-size-body);
}

.clinician-meta dt {
  font-weight: var(--theme-font-weight-emphasis);
  color: var(--theme-color-text-heading);
}

.clinician-meta dd {
  margin: 0 0 var(--theme-space-stack-xs) 0;
  color: var(--theme-color-text-default);
}

.clinician-meta dd:last-child {
  margin-bottom: 0;
}

.clinician-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-inline-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.clinician-tags li {
  font-size: var(--theme-font-size-small);
  padding: 0.25rem 0.75rem;
  border-radius: var(--theme-radius-pill);
  background-color: color-mix(in srgb, var(--theme-color-brand-primary) 15%, transparent);
  color: var(--theme-color-text-heading);
  border: 1px solid color-mix(in srgb, var(--theme-color-brand-primary) 30%, transparent);
}

/* -------------------------------------------------------------------------
   Events list
   ------------------------------------------------------------------------- */

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--theme-space-stack-lg);
}

.event-card {
  padding: var(--theme-space-stack-lg);
  background-color: var(--theme-color-background-surface);
  border: 1px solid var(--theme-color-border-subtle);
  border-radius: var(--theme-radius-surface);
  box-shadow: var(--theme-shadow-card);
  display: grid;
  gap: var(--theme-space-stack-sm);
}

@media (min-width: 48rem) {
  .event-card {
    grid-template-columns: 14rem 1fr;
    gap: var(--theme-space-stack-lg);
    align-items: start;
  }
}

.event-card__when {
  font-size: var(--theme-font-size-body);
  font-weight: var(--theme-font-weight-emphasis);
  color: var(--theme-color-brand-emphasis);
  text-transform: uppercase;
  letter-spacing: var(--theme-letter-spacing-eyebrow);
}

.event-card__title {
  font-size: var(--theme-font-size-heading-sm);
  color: var(--theme-color-text-heading);
  margin: 0 0 var(--theme-space-stack-xs) 0;
}

.event-card__details {
  font-size: var(--theme-font-size-body);
  color: var(--theme-color-text-muted);
  margin: 0 0 var(--theme-space-stack-sm) 0;
}

.event-card__description {
  color: var(--theme-color-text-default);
  max-width: none;
  margin: 0 0 var(--theme-space-stack-sm) 0;
}

/* -------------------------------------------------------------------------
   Locations page — Dormont and East Liberty as side-by-side columns
   (stacks on narrow viewports, side-by-side at ≥48rem).
   ------------------------------------------------------------------------- */

.locations-grid {
  display: grid;
  gap: var(--theme-space-section);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .locations-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--theme-space-stack-xl);
  }
}

.location-column {
  scroll-margin-top: var(--theme-space-section);
}

.location-column__image {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: var(--theme-radius-card);
  background-color: var(--theme-color-background-subtle);
  margin-bottom: var(--theme-space-stack-md);
}

.location-column .eyebrow {
  margin-bottom: var(--theme-space-stack-xs);
}

.location-column h2 {
  margin: 0 0 var(--theme-space-stack-sm);
}

.location-column h3 {
  margin-top: var(--theme-space-stack-lg);
  margin-bottom: var(--theme-space-stack-xs);
}

.location-column address {
  font-style: normal;
  font-size: var(--theme-font-size-lead);
  color: var(--theme-color-text-default);
  line-height: var(--theme-line-height-loose);
  margin-bottom: var(--theme-space-stack-md);
}

.location-column p {
  max-width: none;
}

.location-column p + p,
.location-column p + h3 {
  margin-top: var(--theme-space-stack-sm);
}

.location-column a:not(.button) {
  color: var(--theme-color-text-link);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Location detail
   ------------------------------------------------------------------------- */

.location-grid {
  display: grid;
  gap: var(--theme-space-stack-xl);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 48rem) {
  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.location-card {
  padding: var(--theme-space-stack-xl);
  background-color: var(--theme-color-background-surface);
  border: 1px solid var(--theme-color-border-subtle);
  border-radius: var(--theme-radius-surface);
  box-shadow: var(--theme-shadow-card);
  display: grid;
  gap: var(--theme-space-stack-sm);
}

.location-card h2 {
  font-size: var(--theme-font-size-heading-md);
  margin: 0;
}

.location-card__label {
  font-size: var(--theme-font-size-small);
  font-weight: var(--theme-font-weight-emphasis);
  text-transform: uppercase;
  letter-spacing: var(--theme-letter-spacing-eyebrow);
  color: var(--theme-color-brand-emphasis);
  margin: 0;
}

.location-card address {
  font-style: normal;
  color: var(--theme-color-text-default);
  line-height: var(--theme-line-height-loose);
}

.location-card__notes {
  color: var(--theme-color-text-default);
  max-width: none;
}

/* -------------------------------------------------------------------------
   Contact form — Netlify forms, progressively enhanced
   ------------------------------------------------------------------------- */

.contact-form {
  max-width: 38rem;
  margin-inline: auto;
  display: grid;
  gap: var(--theme-space-stack-md);
  padding: var(--theme-space-stack-xl);
  background-color: var(--theme-color-background-surface);
  border: 1px solid var(--theme-color-border-subtle);
  border-radius: var(--theme-radius-surface);
  box-shadow: var(--theme-shadow-card);
}

.contact-form .field {
  display: grid;
  gap: var(--theme-space-stack-xs);
}

.contact-form label {
  font-size: var(--theme-font-size-small);
  font-weight: var(--theme-font-weight-emphasis);
  color: var(--theme-color-text-heading);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--theme-font-family-body);
  font-size: var(--theme-font-size-body);
  color: var(--theme-color-text-default);
  padding: 0.75rem 1rem;
  border: 1px solid var(--theme-color-border-default);
  border-radius: var(--theme-radius-card);
  background-color: var(--theme-color-background-default);
  min-height: 3rem;
  width: 100%;
}

.contact-form textarea {
  min-height: 10rem;
  resize: vertical;
  font-family: var(--theme-font-family-body);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--theme-color-border-focus);
  outline-offset: 2px;
  border-color: var(--theme-color-border-focus);
}

.contact-form__help {
  font-size: var(--theme-font-size-small);
  color: var(--theme-color-text-muted);
}

.contact-form__submit {
  justify-self: start;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.contact-form__optional {
  font-weight: var(--theme-font-weight-body);
  color: var(--theme-color-text-muted);
}

/* Fieldset wrapper for checkbox/radio groups — sheds the default border. */
.contact-form .field--group {
  border: 0;
  padding: 0;
  margin: 0;
}

.contact-form .field--group legend {
  font-size: var(--theme-font-size-small);
  font-weight: var(--theme-font-weight-emphasis);
  color: var(--theme-color-text-heading);
  padding: 0;
  margin-bottom: var(--theme-space-stack-xs);
}

/* Vertical option list (default — used for service interest). */
.contact-form__options {
  display: grid;
  gap: var(--theme-space-stack-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Inline variant — used for the contact-method radio row. */
.contact-form__options--inline {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: var(--theme-space-inline-md);
}

@media (max-width: 32rem) {
  .contact-form__options--inline {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: var(--theme-space-stack-xs);
  }
}

/* Inline options nested under another field (phone permissions). */
.contact-form__inline-options {
  display: grid;
  gap: var(--theme-space-stack-xs);
  list-style: none;
  padding: 0;
  margin: var(--theme-space-stack-xs) 0 0;
}

/* Shared label-with-control row for both checkbox and radio. */
.contact-form__check,
.contact-form__radio {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--theme-space-inline-sm);
  font-weight: var(--theme-font-weight-body);
  color: var(--theme-color-text-default);
  cursor: pointer;
  line-height: var(--theme-line-height-default);
}

.contact-form__check input[type="checkbox"],
.contact-form__radio input[type="radio"] {
  /* Override the inherited input styling so checkbox/radio render natively. */
  width: 1.15rem;
  min-height: 0;
  height: 1.15rem;
  padding: 0;
  margin: 0;
  margin-top: 0.15em;
  flex-shrink: 0;
  accent-color: var(--theme-color-brand-emphasis);
}

/* -------------------------------------------------------------------------
   Crisis callout — sits above the contact form
   ------------------------------------------------------------------------- */

.contact-crisis-callout {
  max-width: 38rem;
  margin: 0 auto var(--theme-space-stack-lg);
  padding: var(--theme-space-stack-sm) var(--theme-space-inline-md);
  background-color: color-mix(in srgb, var(--theme-color-accent-warning) 8%, var(--theme-color-background-surface));
  border-left: 4px solid var(--theme-color-accent-warning);
  border-radius: var(--theme-radius-card);
  font-size: var(--theme-font-size-small);
  color: var(--theme-color-text-default);
}

.contact-crisis-callout strong {
  color: var(--theme-color-text-heading);
}

.contact-crisis-callout a {
  color: var(--theme-color-text-link);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Insurance + billing callout
   ------------------------------------------------------------------------- */

.billing-callout {
  padding: var(--theme-space-stack-lg);
  border-left: 4px solid var(--theme-color-brand-primary);
  background-color: color-mix(in srgb, var(--theme-color-brand-primary) 10%, var(--theme-color-background-surface));
  border-radius: var(--theme-radius-card);
  max-width: var(--theme-measure-prose);
  margin-inline: auto;
  margin-block-start: var(--theme-space-stack-lg);
}

.billing-callout h3 {
  margin-top: 0;
  color: var(--theme-color-text-heading);
}
