/* BOARD & EXECUTIVE TEAM — built on the ProvidusUnity Bank design
   system (gold #fdb813 · dark #212529 · Montserrat + Inter) */

/* Team grid */
.tm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}


/* Board of Directors has 8 non-spotlight members over a 3-column grid,
   so the last row only has 2 cards. Flex + justify-content:center makes
   that trailing row center itself instead of sitting flush left. */
#tmBoard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

#tmBoard .tm-card {
  flex: 0 1 calc((100% - 32px) / 3);
}

.tm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s,
    border-color 0.3s;
}

.tm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 5px 14px rgba(0, 0, 0, 0.03);
  border-color: rgba(253, 184, 19, 0.45);
}

/* avatar block: real headshot when available, gold monogram as fallback.
   aspect-ratio (not a fixed short height) keeps portrait photos from being
   squashed into a wide letterbox, which is what was chopping faces off. */
.tm-avatar {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #1a1200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* gold gradient + dot pattern only shows when there's no photo */
.tm-avatar.no-photo {
  background: linear-gradient(135deg, #fdb813 0%, #f0a90c 100%);
}

.tm-avatar.no-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(26, 18, 0, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* photo fills the avatar block edge-to-edge */
.tm-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.tm-initials {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1a1200;
  color: var(--gold);
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 17px rgba(26, 18, 0, 0.12);
}

.tm-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.tm-name {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 5px;
}

.tm-role {
  font-size: 13px;
  line-height: 1.5;
  color: #76766f;
}

/* View Profile action — solid gold fill.
   margin-top: auto pins it to the bottom of the card even when role
   text runs to two lines on some cards and one on others. */
.tm-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  align-self: stretch;
  margin-top: 24px;
  margin-bottom: 0;
  padding: 12px 20px;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1a1200;
  background: var(--gold);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.25s,
    transform 0.15s;
}

.tm-btn:hover {
  background: #f0a90c;
}

.tm-btn:active {
  transform: scale(0.97);
}

.tm-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  background: #1a1200;
  color: var(--gold);
  z-index: 2;
}

/* Chairman / md spotlight row
   Full-width cards, photo + bio side by side. .reverse (the 2nd
   card) flips which side the photo sits on. */
.tm-grid.spotlight {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.tm-spotlight-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 420px;
}

.tm-spotlight-card.reverse {
  flex-direction: row-reverse;
}

.tm-spotlight-card .tm-avatar {
  flex: 0 0 420px;
  aspect-ratio: auto;
  align-self: stretch;
  min-height: 420px;
}

.tm-spotlight-card .tm-body {
  justify-content: center;
  padding: 40px 44px;
}

.tm-spotlight-card .tm-initials {
  width: 100px;
  height: 100px;
  font-size: 30px;
}

.tm-spotlight-card .tm-name {
  font-size: 30px;
}

.tm-spotlight-card .tm-role {
  font-size: 17px;
}

.tm-bio {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: #4a4a45;
  max-width: 70ch;
}

.tm-spotlight-card .tm-btn {
  align-self: flex-start;
  display: inline-block;
  margin-top: 26px;
  width: auto;
  padding: 14px 34px;
  font-size: 14.5px;
}

@media (max-width: 760px) {
  .tm-spotlight-card,
  .tm-spotlight-card.reverse {
    flex-direction: column;
    min-height: 0;
  }

  .tm-spotlight-card .tm-avatar {
    flex-basis: auto;
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
}

/* GROUP HEADS TABLE (no photos available for this group) */
#tmGroup,
#tmExec {
  display: block;
  width: 100%;
}

.tm-table {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.tm-table th:nth-child(1),
.tm-table td:nth-child(1) {
  width: 30%;
}

.tm-table th:nth-child(2),
.tm-table td:nth-child(2) {
  width: 52%;
}

.tm-table th:nth-child(3),
.tm-table td:nth-child(3) {
  width: 18%;
}

.tm-table th {
  text-align: left;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #1a1200;
  padding: 12px 20px;
}

.tm-table td {
  padding: 14px 20px;
  font-size: 13px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tm-table tbody tr {
  transition: background 0.2s;
}

.tm-table tbody tr:hover {
  background: rgba(253, 184, 19, 0.08);
}

.tm-table-name {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: #1a1a1a;
}

.tm-table-role {
  color: #76766f;
}

@media (max-width: 640px) {
  .tm-table thead {
    display: none;
  }

  .tm-table,
  .tm-table tbody,
  .tm-table tr,
  .tm-table td {
    display: block;
    width: 100%;
  }

  .tm-table tr {
    padding: 14px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .tm-table td {
    border-top: none;
    padding: 3px 0;
  }

}

/* Responsive */
@media (max-width: 760px) {
  .tm-grid,
  .tm-grid.spotlight {
    grid-template-columns: 1fr;
  }

  #tmBoard .tm-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 480px) {
  .tm-grid,
  #tmBoard .tm-card {
    flex-basis: 100%;
  }
}
