/* ============================================================
   Faculty & Staff — Bio pop-up
   Markup (per person, in the article body):
     <button type="button" class="bio-open">Bio</button>
     <dialog class="bio-dialog"> ... </dialog>
   Opened by the delegated click handler in Page Settings JS.
   ============================================================ */

/* ---- the Bio button under each person ---- */
.bio-open {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 22px;
  background: rgb(var(--primary-color-rgb, 0, 13, 63));
  color: #fff;
  font-family: var(--body-font-family, Lato, sans-serif);
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  -webkit-appearance: none;
  appearance: none;
}

.bio-open:hover,
.bio-open:focus {
  background: rgb(var(--secondary-color-rgb, 198, 147, 56));
  color: #fff;
}

/* ---- the pop-up itself ---- */
.bio-dialog {
  width: min(620px, 92vw);
  max-width: none;
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #333;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: var(--body-font-family, Lato, sans-serif);
}

.bio-dialog::backdrop {
  background: rgba(0, 13, 63, 0.66);
}

.bio-dialog-inner {
  position: relative;
  box-sizing: border-box;
  padding: 30px 32px 28px;
  max-height: 88vh;
  overflow-y: auto;
  text-align: left;
}

.bio-dialog h3 {
  margin: 0 0 4px;
  font-family: var(--title-font-family, "EB Garamond", serif);
  font-size: 1.7rem;
  line-height: 1.2;
  color: rgb(var(--primary-color-rgb, 0, 13, 63));
}

.bio-dialog .bio-role {
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--secondary-color-rgb, 198, 147, 56));
}

.bio-dialog .bio-body {
  font-size: 1rem;
  line-height: 1.65;
  color: #333;
}

.bio-dialog .bio-body p {
  margin: 0 0 12px;
}

.bio-dialog .bio-body p:last-child {
  margin-bottom: 0;
}

.bio-dialog .bio-body a {
  color: rgb(var(--primary-color-rgb, 0, 13, 63));
}

.bio-dialog .bio-close {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 0 6px;
  background: none;
  border: 0;
  font-family: Lato, sans-serif;
  font-size: 1.7rem;
  line-height: 1;
  color: #8a93a5;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.bio-dialog .bio-close:hover,
.bio-dialog .bio-close:focus {
  color: rgb(var(--primary-color-rgb, 0, 13, 63));
}

@media (max-width: 600px) {
  .bio-dialog-inner {
    padding: 24px 20px 20px;
  }

  .bio-dialog h3 {
    font-size: 1.4rem;
  }
}

/* ============================================================
   Isolation inside the pop-up.
   The grid ships !important typography rules such as
   .grid-text-align-center .g-array-item-text p { text-align:center!important }
   which reach into anything nested in a card. These scoped rules
   win inside the dialog only, and touch nothing else on the site.
   ============================================================ */

dialog.bio-dialog,
dialog.bio-dialog p,
dialog.bio-dialog h3,
dialog.bio-dialog div {
  text-align: left !important;
}

dialog.bio-dialog h3 {
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--title-font-family, "EB Garamond", serif) !important;
  font-size: 1.7rem !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: rgb(var(--primary-color-rgb, 0, 13, 63)) !important;
}

dialog.bio-dialog p.bio-role {
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--body-font-family, Lato, sans-serif) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgb(var(--secondary-color-rgb, 198, 147, 56)) !important;
}

dialog.bio-dialog .bio-body,
dialog.bio-dialog .bio-body p {
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--body-font-family, Lato, sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  text-align: left !important;
  text-transform: none !important;
  color: #333 !important;
}

dialog.bio-dialog .bio-body p:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 600px) {
  dialog.bio-dialog h3 {
    font-size: 1.4rem !important;
  }
}

/* ============================================================
   Final specificity fix.
   The grid's rule is  .grid-text-align-center .g-array-item-text p
   (3 classes + 1 element, !important). These selectors carry a
   doubled .bio-dialog class so they outrank it on class count,
   which settles the tie regardless of stylesheet order.
   ============================================================ */

dialog.bio-dialog.bio-dialog .bio-dialog-inner p,
dialog.bio-dialog.bio-dialog .bio-dialog-inner h3,
dialog.bio-dialog.bio-dialog .bio-dialog-inner .bio-role {
  text-align: left !important;
}

dialog.bio-dialog.bio-dialog .bio-dialog-inner p.bio-role {
  text-align: left !important;
  margin: 0 0 16px !important;
}

dialog.bio-dialog.bio-dialog .bio-dialog-inner .bio-body p {
  text-align: left !important;
  margin: 0 0 12px !important;
  font-family: var(--body-font-family, Lato, sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  text-transform: none !important;
  color: #333 !important;
}

dialog.bio-dialog.bio-dialog .bio-dialog-inner .bio-body p:last-child {
  margin-bottom: 0 !important;
}

/* ============================================================
   Faculty & Staff articles — contact lines centred.
   Added 2026-11-24 (direct chat, dakota@solutiosoftware.com).
   Each article in Faculty & Staff Items (category 51) carries
       <p class="trinity-staff-contact">Name<br>Position<br>Email</p>
   above the read-more break. Only that block is centred; the bio
   paragraph below the break keeps the site's normal alignment.
   ============================================================ */

.item-page [itemprop="articleBody"] .trinity-staff-contact {
  text-align: center;
}

/* ============================================================
   Faculty & Staff articles — image row below the read-more.
   Added 2026-11-24/25 (direct chat, dakota@solutiosoftware.com).
   Markup per article:
       <p class="trinity-staff-figs"><img src="/images/pub/favorite-things/..." alt="..."></p>
   One image sits centred at half width; a second image added to
   the same paragraph drops in beside it (two-up), and the pair
   stacks on narrow screens.
   ============================================================ */

.trinity-staff-figs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 1.25rem 0 0;
}

.trinity-staff-figs img {
  display: block;
  width: calc(50% - .625rem);
  max-width: calc(50% - .625rem);
  height: auto;
  border-radius: 8px;
}

@media only screen and (max-width: 45rem) {
  .trinity-staff-figs img {
    width: 100%;
    max-width: 100%;
  }
}

/* ============================================================
   Faculty & Staff image row — clickable images.
   Added 2026-11-25 (direct chat, dakota@solutiosoftware.com).
   Each image is now wrapped in a link to its own full-size file
   (target="_blank"), so a click opens it in its own tab where it
   can be saved or printed. The link carries the width, not the
   image, so the rules above still lay out two per row / one
   centred, and the overrides below win on element count.
   ============================================================ */

.trinity-staff-figs a {
  display: block;
  width: calc(50% - .625rem);
  max-width: calc(50% - .625rem);
  border-radius: 8px;
  transition: opacity .2s ease;
}

.trinity-staff-figs a img {
  width: 100%;
  max-width: 100%;
}

.trinity-staff-figs a:hover img,
.trinity-staff-figs a:focus-visible img {
  opacity: .85;
}

.trinity-staff-figs a:focus-visible {
  outline: 3px solid rgba(var(--secondary-color-rgb), 1);
  outline-offset: 3px;
}

@media only screen and (max-width: 45rem) {
  .trinity-staff-figs a {
    width: 100%;
    max-width: 100%;
  }
}
