/* NMC Directory (inc/directory.php), on top of cti-program.css + gofurther.css + explore-programs.css (the Explore
   Programs look): hero with counts, the frosted search bar with division chips, department cards on grey, people found,
   other program directories, and the department page's photo cards with a contact sheet. */

/* ---- hero ---------------------------------------------------------------------------------------------------------- */
.dir .dp-hero-name a { color: inherit; text-decoration: none; }
.dir .dp-hero-name a:hover { text-decoration: underline; }
.dir-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 0 !important; }
.dir-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 980px; background: var(--gray);
  font-size: 15px; font-weight: 500; color: var(--ink); }
.dir-pill-icon { width: 17px; height: 17px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- search bar ---------------------------------------------------------------------------------------------------- */
.dir .dir-search { max-width: 680px; margin: 0 auto; flex-basis: 100%; }
.dir .dir-search input { height: 46px; font-size: 17px; border-radius: 13px; }
.dir .ep-bar-in { justify-content: center; }
.dir .ep-chips { margin: 0 auto; }

/* ---- departments by division --------------------------------------------------------------------------------------- */
.dir-group[hidden], .dir-cell[hidden] { display: none; }
.dir-group-h { display: flex; align-items: center; gap: 14px; }
.dir-group-badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); }
.dir-group-icon { width: 22px; height: 22px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 !important; }
.dir-cell { display: flex; min-width: 0; margin: 0; }
.dir .dir-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 84px; padding: 18px 22px;
  border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none !important;
  transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s cubic-bezier(.16,1,.3,1); }
.dir .dir-card:hover { transform: scale(1.015); box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.dir .dir-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.dir-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dir-card-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.dir-card-meta { font-size: 14px; color: var(--muted); }
.dir-card .ctip-chev { flex: none; width: 13px; height: 13px; color: var(--red); transition: transform .25s; }
.dir .dir-card:hover .ctip-chev { transform: translateX(3px); }

/* ---- people found -------------------------------------------------------------------------------------------------- */
.dir-people { padding-top: 36px; }
.dir-people[hidden], .dir-more-wrap[hidden] { display: none; }
.dir-people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 !important; }
.dir-people-grid li { display: flex; min-width: 0; margin: 0; }
.dir-person { display: flex; gap: 16px; align-items: flex-start; width: 100%; padding: 18px 20px; border-radius: 18px; background: #fff; }
.dir-avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(160deg, #c23542, var(--red) 55%, var(--red-deep)); color: #fff; font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.dir-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dir-person-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dir .dir-person-name { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.dir .dir-person-name:hover { color: var(--red); }
.dir-person-title { font-size: 15px; line-height: 1.35; color: var(--ink); }
.dir-person-role { display: flex; flex-direction: column; gap: 1px; }
.dir-person-role--also { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(0,0,0,.07); }
.dir .dir-person-dept { font-size: 14px; color: var(--muted); }
.dir .dir-person-dept:hover { color: var(--red); }
/* the sheet: the person's other departments */
.dir-also { margin: 0 !important; border-radius: 18px; background: var(--gray); overflow: hidden; }
.dir-also li { margin: 0; }
.dir-also li + li { border-top: 1px solid rgba(0,0,0,.07); }
.dir .dir-also a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 14px 18px;
  color: var(--ink); text-decoration: none; }
.dir .dir-also a:hover { background: rgba(0,0,0,.03); }
.dir-also-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.dir-also-dept { grid-row: 2; font-size: 14px; color: var(--muted); }
.dir-also .ctip-chev { grid-row: 1 / span 2; grid-column: 2; width: 12px; height: 12px; color: var(--red); }
.dir-person-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; }
.dir .dir-person-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--red); overflow-wrap: anywhere; }
.dir-person-links svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dir-more-wrap { margin: 22px 0 0 !important; text-align: center; }
.dir .ep-group-h mark, .dir-person mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---- other program directories ------------------------------------------------------------------------------------- */
.dir .dir-others { padding: 110px 0 120px; }
.dir .dir-others .ctip-h2 { color: var(--ink); }
.dir-others-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 40px 0 0 !important; }
.dir-others-grid li { display: flex; margin: 0; }
.dir .dir-other { display: flex; flex-direction: column; width: 100%; padding: 30px 30px 28px; border-radius: 28px; background: var(--gray);
  color: var(--ink); text-decoration: none !important; transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; }
.dir .dir-other:hover { transform: scale(1.015); box-shadow: 0 8px 34px rgba(0,0,0,.08); }
.dir .dir-other:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.dir-other-logo { display: flex; align-items: center; height: 92px; margin: 0 0 22px; padding: 14px 20px; border-radius: 18px; background: #fff; }
.dir-other-logo img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.dir-other-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 8px; }
.dir-other-text { font-size: 17px; line-height: 1.45; color: var(--muted); margin: 0 0 20px; }
.dir-other .ep-card-more { margin-top: auto; }
.dir-ext { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dir .dir-help .ctip-cta-btns { margin: 34px 0 0; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---- department page: the team --------------------------------------------------------------------------------------- */
.dir-team { padding: 56px 0 100px; }
.dir-pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 !important; }
.dir-pcell { display: flex; min-width: 0; margin: 0; }
.dir .dir-pcard { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 22px; overflow: hidden;
  background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s cubic-bezier(.16,1,.3,1); }
.dir .dir-pcard:hover { transform: scale(1.015); box-shadow: 0 10px 36px rgba(0,0,0,.1); }
.dir .dir-pcard:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.dir-pphoto { display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; background: #e8e8ed; }
.dir-pphoto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.dir .dir-pcard:hover .dir-pphoto img { transform: scale(1.03); }
/* no photo: a grey silhouette (Apple Contacts) */
.dir-pphoto:has(.dir-blank), .dir-panel-photo:has(.dir-blank), .dir-avatar:has(.dir-blank) { background: linear-gradient(180deg, #b4b8c1, #8e929c); }
.dir-blank { width: 100%; height: 100%; fill: #fff; opacity: .92; }
.dir-pphoto .dir-blank { width: 66%; height: auto; align-self: end; }
.dir-pbody { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 16px 18px 18px; }
.dir-pname { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.dir-ptitle { font-size: 14px; line-height: 1.38; color: var(--muted); margin: 0 0 10px; }
.dir-pbody .ep-card-more { font-size: 14px; }
.dir-pbody .ep-card-more { margin-top: auto; }

/* reporting lines: offices under this one (cards), and the office this one is under (a pill in the hero) */
.dir .dir-pill--link { color: var(--red); text-decoration: none !important; transition: background .2s; }
.dir .dir-pill--link:hover { background: var(--tint); }
.dir-pill--link .ctip-chev { width: 10px; height: 10px; }
.dir .dir-under { padding: 100px 0 0; }
.dir .dir-under .ctip-h2 { color: var(--ink); }
.dir-under-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0 !important; }
.dir-under-grid li { display: flex; margin: 0; }
.dir .dir-card--office { padding: 24px 26px; border-radius: 22px; background: var(--gray); }
.dir-card--office .dir-card-title { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.dir-faces { display: flex; margin-top: 12px; }
.dir-face { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -8px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 2px var(--gray); background: linear-gradient(180deg, #b4b8c1, #8e929c); }
.dir-face:first-child { margin-left: 0; }
.dir-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dir-face .dir-blank { width: 74%; height: auto; align-self: end; }
.dir-face--more { background: #fff; color: var(--muted); font-size: 12px; font-weight: 600; }
.dir .dir-siblings { padding: 100px 0 110px; }
.dir .dir-siblings .ctip-h2 { color: var(--ink); }
.dir-sib-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0 !important; }
.dir-sib-list li { margin: 0; }
.dir .dir-sib { text-decoration: none !important; min-height: 40px; padding: 0 18px; font-size: 15px; }
.dir .dir-sib:hover { background: var(--ink); color: #fff; box-shadow: none; }
.dir .dir-back { margin: 40px 0 0; }
.dir-division .dir-div-depts { margin-top: 56px; }
.dir-division .dir-team .ep-group-head:first-child { margin-top: 0; }

/* the sheet */
.dir-panel-head { display: flex; gap: 26px; align-items: center; margin: 0 0 26px; padding-right: 36px; }
.dir-panel-photo { flex: none; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(160deg, #c23542, var(--red) 55%, var(--red-deep)); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.dir-panel-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.dir-panel-photo .dir-blank, .dir-avatar .dir-blank { width: 74%; height: auto; align-self: end; }
.dir .dir-panel-title { font-size: clamp(28px, 3.6vw, 38px); }
.dir-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.dir .dir-btn-soft { background: var(--tint); color: var(--red) !important; }
.dir .dir-btn-soft:hover { background: #f6d9dd; }
.dir .dir-contact { gap: 12px; margin: 0 !important; }
.dir .dir-contact li { font-size: 17px; }
.dir-about { font-size: 17px; line-height: 1.5; color: var(--ink); }
.dir-about p { margin: 0 0 8px; }
.dir-about strong { font-weight: 600; }
.dir-about ul { margin: 0 0 12px !important; padding: 0 0 0 1.2em !important; list-style: disc !important; }
.dir-about li { margin: 0 0 4px; }
.dir .dir-panel-foot { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.dir .dir-panel-foot a { color: var(--red); }

/* ---- smaller screens ----------------------------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dir .dir-search input { height: 48px; font-size: 17px; }
  .dir-grid, .dir-people-grid, .dir-others-grid, .dir-under-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dir .dir-under { padding-top: 72px; }
  .dir .dir-card { min-height: 68px; padding: 14px 18px; border-radius: 16px; }
  .dir-group-badge { width: 38px; height: 38px; }
  .dir-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dir .dir-pcard { border-radius: 18px; }
  .dir-pbody { padding: 12px 14px 14px; }
  .dir-pname { font-size: 15px; }
  .dir-ptitle { font-size: 13px; }
  .dir-pbody .ep-card-more { font-size: 13px; }
  .dir .dir-others, .dir .dir-siblings { padding: 80px 0 90px; }
  .dir-panel-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .dir-panel-photo { width: 108px; height: 108px; }
}
/* ---- a person's own page (single-staff.php) ------------------------------------------------------------------------ */
.dir-prof-hero { padding: 72px 0 56px; }
.dir-prof-head { display: flex; align-items: center; gap: 44px; max-width: 980px; }
.dir .dir-prof-photo { width: 200px; height: 200px; }
.dir-prof-main { min-width: 0; }
.dir-prof-main .dp-hero-name { margin: 0 0 10px !important; text-align: left; }
.dir .dir-prof-name { margin: 0 !important; font-size: clamp(36px, 5vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -.02em; color: var(--ink); }
.dir .dir-prof-title { margin: 10px 0 22px !important; font-size: 21px; line-height: 1.35; color: var(--muted); }
.dir-prof-body { padding: 56px 0 90px; }
.dir-prof-cols { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 980px; }
.dir-prof-side { display: grid; gap: 20px; }
.dir-prof-card { padding: 28px 30px; border-radius: 22px; background: #fff; }
.dir .dir-prof-h { margin: 0 0 16px !important; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.dir-prof-about .dir-about p { margin: 0 0 14px; }
.dir-prof-cols:not(:has(.dir-prof-about)) { grid-template-columns: minmax(0, 480px); }
.dir-prof-back { max-width: 980px; margin: 36px auto 0 !important; }
@media (max-width: 767px) {
  .dir-prof-hero { padding: 44px 0 36px; }
  .dir-prof-head { flex-direction: column; align-items: flex-start; gap: 22px; }
  .dir .dir-prof-photo { width: 132px; height: 132px; }
  .dir .dir-prof-title { font-size: 18px; }
  .dir-prof-body { padding: 36px 0 70px; }
  .dir-prof-cols, .dir-prof-cols:not(:has(.dir-prof-about)) { grid-template-columns: minmax(0, 1fr); }
  .dir-prof-card { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .dir .dir-card, .dir .dir-pcard, .dir .dir-other, .dir-pphoto img { transition: none; }
  .dir .dir-card:hover, .dir .dir-pcard:hover, .dir .dir-other:hover, .dir .dir-pcard:hover .dir-pphoto img { transform: none; }
}
