/* ── combined filter bar ── */
.td-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.td-filters input[type="text"],
.td-filters select {
  padding: 8px 12px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.td-filters input[type="text"] {
  width: 200px;
}

/* ── grid (4 cols default) ── */
.td-grid {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width:1199px) { .td-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width:991px)  { .td-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:767px)  { .td-grid { grid-template-columns: repeat(1, 1fr); } }

/* ── member card ── */
.td-member {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
}
.td-member-inner {
  padding: 15px;
  text-align: center;
}
.td-member-img img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #eee;
}
.td-member-name {
  font-size: 1.1em;
  margin: 10px 0 5px;
}
.td-member-job {
  color: #777;
  margin-bottom: 10px;
  font-size: 0.9em;
}
.td-member-contacts {
  margin-bottom: 10px;
}
.td-member-contacts a {
  margin: 0 5px;
  color: #555;
  font-size: 1.2em;
  text-decoration: none;
}
.td-member-contacts a:hover {
  color: #000;
}

/* ── modal overlay ── */
#td-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  overflow: hidden; /* no scroll on overlay */
}

/* ── modal content: auto-height, centered ── */
#td-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  max-width: 600px;
  width: 90%;
  /* let content dictate height, up to 90% of viewport */
  max-height: 90vh;
  overflow-y: auto;    /* vertical scroll if bio is very tall */
  overflow-x: hidden;  /* prevent horizontal scroll */
  box-sizing: border-box;
  z-index: 100001;
}


/* ── close button ── */
#td-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* ── bio heading ── */
#td-modal-body h2 {
  margin-top: 0;
}

/* ── popup photo styling ── */
.td-modal-photo img {
  display: block;
  margin: 0 auto 15px;
  max-width: 300px;
  border-radius: 50%;
}
