/* Team Grid — card grid + bio modals (About: Leadership + Advisory) */
.upside-teamgrid { padding: var(--section-pad) 0; }
.upside-teamgrid.surf-care  { background: var(--surface-care); }
.upside-teamgrid.surf-white { background: #fff; }
.upside-tg-intro { max-width: 640px; margin: 16px 0 0; font-size: 18px; color: var(--secdark); }

.upside-tg-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
@media (max-width: 991px) { .upside-tg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .upside-tg-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }

.upside-tg-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--light);
  border-radius: var(--r-md);
  padding: 16px;
  font-family: var(--font);
  box-shadow: 0 8px 24px rgba(9, 76, 138, .06);
  transition: transform .2s, box-shadow .2s;
}
button.upside-tg-card { cursor: pointer; width: 100%; }
button.upside-tg-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(9, 76, 138, .14); }
button.upside-tg-card:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; }

.upside-tg-photo { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1 / 1; background: var(--light); }
.upside-tg-photo .upside-tg-img,
.upside-tg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upside-tg-photo .upside-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
/* No headshot (absent or failed to load) → hide the empty square, keep name/title. */
.upside-tg-photo:not(:has(img)) { display: none; }

.upside-tg-name { font-size: 18px; margin: 14px 0 2px; color: var(--dark); }
.upside-tg-title { font-size: 14px; color: var(--sec); margin: 0; }
.upside-tg-readbio { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--brand-primary); }

/* Modal */
.upside-tg-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.upside-tg-modal[hidden] { display: none; }
.upside-tg-modal-backdrop { position: absolute; inset: 0; background: rgba(9, 76, 138, .55); backdrop-filter: blur(2px); }
.upside-tg-modal-card {
  position: relative; z-index: 1; background: #fff; border-radius: var(--r-lg);
  max-width: 620px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: clamp(24px, 4vw, 44px); box-shadow: 0 30px 80px rgba(9, 76, 138, .35);
}
.upside-tg-modal-close { position: absolute; top: 14px; right: 16px; border: none; background: none; font-size: 30px; line-height: 1; color: var(--sec); cursor: pointer; }
.upside-tg-modal-close:hover { color: var(--dark); }
.upside-tg-modal-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.upside-tg-modal-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.upside-tg-modal-head h3 { font-size: 22px; margin: 0 0 2px; color: var(--dark); }
.upside-tg-li { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--brand-primary); }
.upside-tg-modal-bio { font-size: 16px; color: var(--secdark); line-height: 1.6; }
.upside-tg-modal-bio p { margin: 0 0 14px; }

@media (max-width: 767px) {
  .upside-teamgrid { padding: 56px 0; }
  .upside-tg-modal-head { flex-direction: column; text-align: center; }
}
