/**
 * @file
 * Basic page sections (paragraphs): text, image and text, callout, contact
 * box, accordion. Callout/contact/text reuse the Canvas component classes;
 * their CSS is attached with this library.
 */
.gmu-section { margin: 0 0 1.75rem; }
/* The theme gives content h2s a 2.25rem top margin; between sections that
   doubled the gap, so section headings start flush. */
.gmu-section__heading { margin: 0 0 0.75rem !important; color: var(--gmu-primary-green, #005239); }
.gmu-section.gmu-callout,
.gmu-section.gmu-contact { margin-bottom: 1.75rem; }
.gmu-section .gmu-text > :first-child { margin-top: 0; }
.gmu-section .gmu-text > :last-child { margin-bottom: 0; }
.gmu-section .gmu-text { margin-bottom: 0; }

/* Image and text: the image takes a quarter (small), 40% (medium) or 60%
   (large) of the row; the text sits beside it, vertically centered. */
.gmu-image-text { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem 2rem; align-items: center; max-width: 60rem; }
.gmu-image-text--small { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.gmu-image-text--large { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.gmu-image-text--right.gmu-image-text--small { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.gmu-image-text--right.gmu-image-text--medium { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.gmu-image-text--right.gmu-image-text--large { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.gmu-image-text__body .gmu-section__heading { margin-top: 0; }
.gmu-image-text__body .gmu-text > :last-child { margin-bottom: 0; }
.gmu-image-text--right .gmu-image-text__media { order: 2; }
.gmu-image-text__media img { display: block; width: 100%; height: auto; border-radius: 0.5rem; }
@media (max-width: 40em) {
  .gmu-image-text, .gmu-image-text[class*="gmu-image-text--"] { grid-template-columns: 1fr; }
  .gmu-image-text--right .gmu-image-text__media { order: 0; }
}

/* Callout button */
.gmu-callout__action { margin: 0.75rem 0 0; }
.gmu-callout .gmu-button { display: inline-block; padding: 0.5rem 1rem; background: var(--gmu-primary-green, #005239); color: #fff; font-weight: 700; text-decoration: none; border-radius: 0.25rem; }
.gmu-callout .gmu-button:hover, .gmu-callout .gmu-button:focus { background: var(--gmu-green-dark, #003d29); color: #fff; text-decoration: underline; }

/* Accordion */
.gmu-accordion { max-width: 48rem; }
.gmu-accordion__item { margin: 0 0 0.6rem; background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 0.4rem; }
.gmu-accordion__summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.1rem; cursor: pointer; list-style: none; background: #ededed; border-radius: 0.4rem; }
.gmu-accordion__summary::-webkit-details-marker { display: none; }
.gmu-accordion__summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; color: #333; }
.gmu-accordion__item[open] > .gmu-accordion__summary { border-radius: 0.4rem 0.4rem 0 0; }
.gmu-accordion__item[open] > .gmu-accordion__summary::after { content: "\2212"; }
.gmu-accordion__summary:focus-visible { outline: 3px solid var(--gmu-accent-yellow, #ffc733); outline-offset: 2px; }
.gmu-accordion__title { margin: 0; font-size: 1rem; color: #1a1a1a; }
.gmu-accordion__body { padding: 0.75rem 1.1rem 0.25rem; }

/* Card grid button styles (field_grid_style cards_*). */
.gmu-cards { display: grid; gap: 1.25rem; margin: 0 0 2rem; padding: 0; list-style: none; }
/* Fixed columns (the style names promise "three per row" / "two per row"). */
.gmu-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gmu-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 60em) { .gmu-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .gmu-cards--3, .gmu-cards--2 { grid-template-columns: 1fr; } }
.gmu-cards__card { display: flex; flex-direction: column; margin: 0; overflow: hidden; background: #fff; border: 1px solid #e0e0e0; border-radius: 0.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.gmu-cards--text .gmu-cards__card { border-top: 4px solid var(--gmu-primary-green, #005239); background: #f7f7f7; }
.gmu-cards__media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gmu-cards--2 .gmu-cards__media img { aspect-ratio: 16 / 9; }
.gmu-cards__body { display: flex; flex: 1; flex-direction: column; padding: 1rem 1.25rem 1.25rem; }
.gmu-cards__title { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--gmu-primary-green, #005239); }
.gmu-cards__text { margin: 0 0 1rem; line-height: 1.6; }
.gmu-cards__text p { margin: 0 0 0.5rem; }
.gmu-cards__action { margin: auto 0 0; }
.gmu-cards .gmu-button { display: inline-block; padding: 0.5rem 1rem; background: var(--gmu-primary-green, #005239); color: #fff; font-weight: 700; text-decoration: none; border-radius: 0.25rem; }
.gmu-cards .gmu-button:hover, .gmu-cards .gmu-button:focus { background: var(--gmu-green-dark, #003d29); color: #fff; text-decoration: underline; }
.gmu-cards .gmu-button:focus-visible { outline: 3px solid var(--gmu-accent-yellow, #ffc733); outline-offset: 2px; }

/* Buttons keep their own colors. Theme rules for links in page content
   (`article .layout__region.content a`, `article a:not(...)`) are more
   specific than these classes, so the colors are pinned. */
a.gmu-button,
a.gmu-button:visited { color: #fff !important; text-decoration: none !important; }
a.gmu-button:hover,
a.gmu-button:focus { color: #fff !important; text-decoration: underline !important; }

/* Staff entries in an accordion (e.g. /tl-staff): a photo in its own first
   paragraph shows as a round thumbnail beside the text, whatever its size. */
.gmu-accordion__body p:first-child > img:only-child {
  float: left;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0.25rem 1.25rem 0.75rem 0;
  box-sizing: border-box;
  border: 3px solid var(--gmu-accent-yellow, #ffc733); /* same ring as the staff directory */
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}
.gmu-accordion__body p:first-child:has(> img:only-child) { margin: 0; }
.gmu-accordion__body::after { content: ""; display: block; clear: both; }
.gmu-accordion__body img { max-width: 100%; height: auto; }
@media (max-width: 30em) {
  .gmu-accordion__body p:first-child > img:only-child { float: none; display: block; margin: 0 0 0.75rem; }
}

/* Long words and web addresses wrap instead of running out of their box
   (sections, every card style, callouts, accordions, contact boxes). */
.gmu-section,
.gmu-section *,
.gmu-cards__card,
.gmu-cards__card *,
.widerblocks2 > ul > li,
.widerblocks2 > ul > li *,
.widerblocks3 > ul > li,
.widerblocks3 > ul > li *,
.gmu-accordion__item,
.gmu-accordion__item * {
  overflow-wrap: anywhere;
}
.gmu-image-text__media,
.gmu-image-text__body,
.gmu-cards__body,
.gmu-callout__text,
.gmu-accordion__body,
.gmu-accordion__title { min-width: 0; }
.gmu-accordion__summary > * { min-width: 0; }

/* Image on top: image above the text; Small / Medium / Large set its width. */
.gmu-image-text.gmu-image-text--top { grid-template-columns: 1fr; align-items: start; }
.gmu-image-text--top .gmu-image-text__media { order: 0; }
.gmu-image-text--top.gmu-image-text--small .gmu-image-text__media { max-width: 25%; min-width: 10rem; }
.gmu-image-text--top.gmu-image-text--medium .gmu-image-text__media { max-width: 50%; min-width: 14rem; }
.gmu-image-text--top.gmu-image-text--large .gmu-image-text__media { max-width: 100%; }
@media (max-width: 40em) {
  .gmu-image-text--top .gmu-image-text__media { max-width: 100% !important; }
}

/* Buttons in sections (image and text, etc.). */
.gmu-section__action { margin: 1rem 0 0; }
.gmu-section .gmu-button { display: inline-block; padding: 0.6rem 1.25rem; background: var(--gmu-primary-green, #005239); font-weight: 700; text-decoration: none; border-radius: 0.25rem; }
.gmu-section .gmu-button:hover, .gmu-section .gmu-button:focus { background: var(--gmu-green-dark, #003d29); }

/* Hero banner: wide photo, green panel overlapping its bottom edge. */
.gmu-hero { position: relative; max-width: none; margin-bottom: 7rem; }
.gmu-hero__image { min-height: 540px; background: #ddd center / cover no-repeat; }
.gmu-hero__panel {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 30%);
  box-sizing: border-box; width: 90%; max-width: 760px; padding: 2.5rem 2.25rem;
  border-radius: 8px; background: #005239; color: #fff; text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.gmu-hero .gmu-hero__heading {
  margin: 0 0 1rem !important; padding: 0 !important; border: 0 !important;
  color: #fff !important; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.25; text-align: center;
}
.gmu-hero__text, .gmu-hero__text p { margin: 0 0 1.5rem; color: rgba(255, 255, 255, 0.95) !important; font-size: 1.05rem; line-height: 1.7; }
.gmu-hero__text p:last-child { margin-bottom: 0; }
a.gmu-hero__button, a.gmu-hero__button:visited {
  display: inline-block; margin-top: 0.25rem; padding: 0.9rem 2.5rem; border-radius: 4px;
  background: var(--gmu-accent-yellow, #ffc733); color: #005239 !important; font-size: 1.05rem; font-weight: 700; text-decoration: none !important;
}
a.gmu-hero__button:hover, a.gmu-hero__button:focus { background: #fff; text-decoration: underline !important; }
@media (max-width: 780px) {
  .gmu-hero { margin-bottom: 2rem; }
  .gmu-hero__image { min-height: 260px; }
  .gmu-hero__panel { position: static; transform: none; width: 92%; margin: -2rem auto 0; padding: 1.75rem 1.25rem; }
}

/* Stats: big numbers in a row. */
.gmu-stats__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem 2rem; margin: 0; padding: 0; list-style: none; text-align: center; }
.gmu-stats__item { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 0.5rem; border-top: 4px solid var(--gmu-accent-yellow, #ffc733); }
.gmu-stats__number { color: #005239; font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.1; }
.gmu-stats__label { color: #333; font-size: 1rem; line-height: 1.4; }

/* Philanthropy lists keep their own styling from gmu_philanthropy. */
.gmu-phil-list { max-width: none; }
