.max-speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.max-speaker-grid .speaker-grid-item {
  position: relative;
  overflow: hidden;
  text-align: center;
  border: 1px solid #eee;
  padding: 0;
  border-radius: 10px;
  transition: box-shadow 0.2s ease;
  background: white;
}

/* Colour-coded key / legend at the top of the page */
.max-show-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
  padding: 12px 18px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
}

.max-show-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9em;
  line-height: 1;
}

.max-show-legend-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--show-color, #ccc);
}

/* Coloured bottom strip driven by the speaker's show (--show-color set inline) */
.max-speaker-grid .speaker-grid-item .speaker-show-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--show-color, transparent);
  z-index: 2;
}

/* Speaker name coloured to match its show */
.max-speaker-grid .speaker-grid-item[data-show] .speaker-grid-details h3 {
  color: var(--show-color) !important;
}

.max-speaker-grid .speaker-grid-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.max-speaker-grid .speaker-grid-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  max-height: 220px;
}

.max-speaker-grid .speaker-grid-details {
  padding: 20px;
}

.max-speaker-grid .speaker-grid-details > h3 {
  margin: 0;
}

.max-speaker-grid .speaker-job {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
}
