/* TEAM PAGE CSS OVERRIDE
   Add AFTER all existing page styles. No HTML or JavaScript changes required.
   This stylesheet deliberately targets existing class names. */

/* All Team colors inherit from basestyle.css. */
:root {
  --tp-navy: var(--blue-deep);
  --tp-teal: var(--teal);
  --tp-blue: var(--blue-pale);
  --tp-text: var(--text-mid);
  --tp-muted: var(--text-light);
  --tp-border: var(--border);
  --tp-white: var(--white);
}

/* Compact dark blue hero, centered as in the reference screenshot */
body { overflow-x: clip; }
.page-hero {
  background: linear-gradient(180deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  padding: 2.5rem 0 2.7rem;
  text-align: center;
}
.page-hero::after { display: none; }
.page-hero .page-hero-content {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0;
}
.page-hero .breadcrumb {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: rgba(255,255,255,.55);
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.60); }
.page-hero .section-tag {
  display: block;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.60);
  letter-spacing: .14em;
}
.page-hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
}
/* The screenshot uses a gold highlight; this is the sole non-base accent. */
.page-hero h1 em { color: #D5AA63; font-style: italic; }
.page-hero p {
  max-width: 950px;
  margin: 1.2rem auto 0;
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  line-height: 1.7;
}
.team-section {
  background: linear-gradient(180deg, var(--warm-white) 0%, var(--white) 68%);
  padding: clamp(34px, 5vw, 72px) 0 clamp(55px, 6vw, 90px);
}
.team-section > .container { max-width: 1180px; }

/* Tabs: easy to scan, wrap on narrow screens */
.team-section .team-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  margin: 0 auto clamp(26px, 4vw, 44px);
  background: var(--white);
  border: 1px solid var(--tp-border);
  border-radius: 17px;
  box-shadow: 0 9px 32px rgba(16,43,70,.06);
}
.team-section .team-tabs > .tab-btn {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.team-section .team-tabs > .tab-btn:hover { background: var(--blue-pale); color: var(--tp-teal); }
.team-section .team-tabs > .tab-btn.active {
  color: var(--white);
  background: var(--tp-navy);
  box-shadow: 0 4px 12px rgba(16,43,70,.18);
}
.team-section .team-tabs > .tab-btn:focus-visible,
.team-section .advisor-btn:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

/* Intro copy and section dividers */
.team-section .category-desc {
  max-width: 760px;
  margin: 0 auto 34px;
  color: var(--tp-muted);
  font-size: .96rem;
  line-height: 1.85;
  text-align: center;
}
.team-section .section-label {
  margin: 30px 0 22px;
  padding: 0 0 12px;
  color: var(--tp-navy);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -.02em;
  border-bottom: 1px solid var(--tp-border);
}

/* Same portrait cards across Board, Management, Medical, Volunteers */
.team-section .members-grid:not(.advisor-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}
.team-section .members-grid:not(.advisor-grid) > .member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 30px 22px 27px;
  background: var(--white);
  border: 1px solid var(--tp-border);
  border-radius: 19px;
  box-shadow: 0 4px 18px rgba(16,43,70,.045);
  text-align: center;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.team-section .members-grid:not(.advisor-grid) > .member-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-bright);
  box-shadow: 0 16px 34px rgba(16,43,70,.10);
}
.team-section .members-grid:not(.advisor-grid) .card-photo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  min-width: 128px;
  margin: 0 auto 19px;
  padding: 4px;
  overflow: hidden;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--warm-white);
}
.team-section .members-grid:not(.advisor-grid) .card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
}
.team-section .members-grid:not(.advisor-grid) .card-photo .card-initials {
  position: absolute;
  inset: 4px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--tp-teal);
  font-size: 2rem;
  font-weight: 700;
}
.team-section .members-grid:not(.advisor-grid) .card-photo .card-initials.visible { display: flex; }
.team-section .members-grid:not(.advisor-grid) .card-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: center;
}
.team-section .member-card .card-badge {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 0 13px;
  padding: 7px 12px;
  color: var(--tp-teal);
  background: var(--blue-pale);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  text-transform: none;
}
.team-section .member-card .card-name {
  margin: 0 0 8px;
  color: var(--tp-navy);
  font-family: var(--font-body);
  font-size: clamp(1.04rem, 1.5vw, 1.2rem);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.team-section .member-card .card-credentials {
  margin: 0;
  color: var(--tp-text);
  font-size: .84rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.team-section .member-card .card-institution {
  margin-top: 8px;
  color: var(--tp-muted);
  font-size: .8rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Advisors retain existing circular portrait layout, match the cards above */
.team-section .advisor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  gap: 22px;
  margin: 30px auto 0;
}
.team-section .advisor-grid > .advisor-card {
  min-height: 340px;
  padding: 30px 24px 24px;
  border: 1px solid var(--tp-border);
  border-radius: 19px;
  box-shadow: 0 4px 18px rgba(16,43,70,.045);
}
.team-section .advisor-grid > .advisor-card:hover {
  border-color: var(--blue-bright);
  box-shadow: 0 16px 34px rgba(16,43,70,.10);
}
.team-section .advisor-photo {
  width: 128px;
  height: 128px;
  min-width: 128px;
  margin-bottom: 19px;
  border-color: var(--warm-white);
}
.team-section .advisor-info { display: flex; flex-direction: column; align-items: center; }
.team-section .advisor-card .card-name { font-size: 1.2rem; }
.team-section .advisor-btn {
  min-height: 43px;
  color: var(--white);
  background: var(--tp-navy);
  border: 0;
  border-radius: 9px;
  text-decoration: none;
}
.team-section .advisor-btn:hover { color: var(--white); background: var(--tp-teal); }

/* CAFE cards share the base site palette */
#cafe.team-panel {
  width: calc(100% - 40px);
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 0 55px;
  box-sizing: border-box;
}
#cafe .cafe-heading { margin-bottom: 34px; }
#cafe .cafe-heading h2 { color: var(--tp-navy); }
#cafe .cafe-group-image { max-width: 940px; }
#cafe .cafe-photo-frame { border-color: var(--tp-border); }
#cafe .cafe-members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
#cafe .cafe-member {
  min-height: 175px;
  padding: 24px 22px;
  border: 1px solid var(--tp-border);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 4px 18px rgba(16,43,70,.045);
}
#cafe .cafe-member:hover { border-color: var(--blue-bright); box-shadow: 0 15px 30px rgba(16,43,70,.09); }
#cafe .cafe-name { color: var(--tp-navy); }
#cafe .cafe-role { background: var(--blue-pale); color: var(--tp-teal); }

/* Tablet */
@media (max-width: 950px) {
  .team-section .team-tabs > .tab-btn { flex: 1 1 calc(33.333% - 10px); }
  .team-section .members-grid:not(.advisor-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #cafe .cafe-members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones */
@media (max-width: 620px) {
  .team-section { padding: 30px 0 48px; }
  .page-hero { padding: 2rem 0 2.2rem; }
  .page-hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .page-hero p { font-size: .9rem; line-height: 1.6; }
  .team-section .team-tabs { padding: 7px; gap: 7px; border-radius: 12px; margin-bottom: 26px; }
  .team-section .team-tabs > .tab-btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 48px;
    padding: 10px 7px;
    font-size: .77rem;
  }
  .team-section .category-desc { margin-bottom: 24px; font-size: .9rem; }
  .team-section .members-grid:not(.advisor-grid) { grid-template-columns: 1fr; gap: 16px; }
  .team-section .members-grid:not(.advisor-grid) > .member-card { padding: 25px 20px 23px; }
  .team-section .members-grid:not(.advisor-grid) .card-photo { width: 116px; height: 116px; min-width: 116px; }
  .team-section .advisor-grid { grid-template-columns: 1fr; max-width: 390px; gap: 16px; }
  .team-section .advisor-grid > .advisor-card { min-height: 0; }
  #cafe.team-panel { width: calc(100% - 32px); padding: 16px 0 40px; }
  #cafe .cafe-members-grid { grid-template-columns: 1fr; gap: 14px; }
  #cafe .cafe-member { min-height: 150px; }
  #cafe .cafe-photo-frame { padding: 5px; }
}
@media (max-width: 360px) {
  .team-section .team-tabs > .tab-btn { flex-basis: 100%; }
  .team-section .member-card .card-badge { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .team-section .member-card, .team-section .tab-btn, #cafe .cafe-member { transition: none !important; }
  .team-section .member-card:hover, #cafe .cafe-member:hover { transform: none !important; }
}

/* Override CAFE variables set by older embedded styles in the HTML. */
#cafe {
  --cafe-navy: var(--blue-deep);
  --cafe-teal: var(--teal);
  --cafe-accent: var(--blue-bright);
  --cafe-muted: var(--text-light);
  --cafe-border: var(--border);
}
#cafe .cafe-heading h2 span,
#cafe .cafe-fullname,
#cafe .cafe-eyebrow { color: var(--teal); }
#cafe .cafe-divider,
#cafe .cafe-heading-line { background: var(--blue-bright); }
#cafe .cafe-member::before { background: var(--blue-bright); }
