.rwds-team-grid {
  display: grid;
  gap: 36px;
  margin: 32px 0;
}

.rwds-team-columns-1 { grid-template-columns: 1fr; }
.rwds-team-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rwds-team-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rwds-team-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rwds-team-card {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  align-items: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.rwds-team-image-right {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 38%);
}

.rwds-team-image-right .rwds-team-photo-wrap {
  grid-column: 2;
}

.rwds-team-image-right .rwds-team-card-content {
  grid-column: 1;
  grid-row: 1;
}

.rwds-team-card-no-photo {
  grid-template-columns: 1fr;
}

.rwds-team-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 280px;
  max-height: 520px;
  overflow: hidden;
  background: #f7f4f1;
}

.rwds-team-photo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 520px;
  object-fit: contain;
}

.rwds-team-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.rwds-team-name {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

.rwds-team-position {
  margin: 0 0 16px;
  font-weight: 600;
  opacity: 0.75;
}

.rwds-team-bio {
  margin: 0;
}

.rwds-team-bio p:last-child {
  margin-bottom: 0;
}

.rwds-team-empty {
  text-align: center;
}

@media (max-width: 1100px) {
  .rwds-team-columns-3,
  .rwds-team-columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .rwds-team-columns-2,
  .rwds-team-columns-3,
  .rwds-team-columns-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .rwds-team-card,
  .rwds-team-image-right {
    grid-template-columns: 1fr;
  }

  .rwds-team-image-right .rwds-team-photo-wrap,
  .rwds-team-image-right .rwds-team-card-content {
    grid-column: auto;
    grid-row: auto;
  }

  .rwds-team-photo-wrap,
  .rwds-team-photo {
    min-height: 0;
  }

  .rwds-team-photo {
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .rwds-team-card-content {
    padding: 24px;
  }

  .rwds-team-name {
    font-size: 24px;
  }
}
