.sga-equipo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: 0;
}

.sga-equipo-card {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  color: #fff;
}

.sga-equipo-card__photo {
  position: absolute;
  inset: 25px 0 0;
  width: 100%;
  height: calc(100% - 25px);
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

.sga-equipo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 43%, rgba(0, 0, 0, .25) 62%, rgba(0, 0, 0, .88) 100%);
  z-index: 1;
}

.sga-equipo-card__content {
  position: absolute;
  z-index: 2;
  left: 5%;
  right: 5%;
  bottom: 5%;
  padding: 5px;
  box-sizing: border-box;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

.sga-equipo-card__name,
.sga-equipo-card__role,
.sga-equipo-card__specialty {
  margin: 0;
  padding: 0;
  line-height: 1.25;
}

.sga-equipo-card__name {
  color: #fff;
  font-size: clamp(13px, 1.05vw, 18px);
  font-weight: 800;
  text-transform: uppercase;
}

.sga-equipo-card__role {
  color: #ed1c24;
  font-size: clamp(11px, .85vw, 14px);
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
}

.sga-equipo-card__specialty {
  color: #fff;
  font-size: clamp(10px, .75vw, 13px);
  font-weight: 400;
  margin-top: 2px;
}

/* The placeholder is the last child: its position is the member count + 1. */
.sga-equipo-placeholder {
  display: none;
  container: sga-equipo-fill / inline-size;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  align-items: center;
  background: radial-gradient(ellipse at 100% 0, #432025, transparent 75%), #191919;
  color: #fff;
}

.sga-equipo-placeholder:nth-child(4n + 2) {
  display: flex;
  grid-column: span 3;
}

.sga-equipo-placeholder:nth-child(4n + 3) {
  display: flex;
  grid-column: span 2;
}

.sga-equipo-placeholder:nth-child(4n + 4) {
  display: flex;
  grid-column: span 1;
}

.sga-equipo-placeholder__logo {
  position: absolute;
  z-index: -1;
  right: 6%;
  bottom: 8%;
  width: 60%;
  height: auto;
  /* The source PNG is 162px wide: never enlarge it beyond its native size. */
  max-width: 162px;
  max-height: 80%;
  object-fit: contain;
  opacity: .1;
  pointer-events: none;
}

.sga-equipo-placeholder__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(20px, 2vw, 40px);
}

.sga-equipo-placeholder__content > p {
  flex: 0 0 auto;
}

.sga-equipo-placeholder .sga-equipo-placeholder__eyebrow {
  margin: 0 0 12px;
  color: #ff5760;
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sga-equipo-placeholder .sga-equipo-placeholder__name {
  max-width: 20ch;
  margin: 0 0 12px;
  color: #fff;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: clamp(22px, 4.5cqi, 36px);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: normal;
  text-transform: none;
}

.sga-equipo-placeholder .sga-equipo-placeholder__text {
  max-width: 33ch;
  margin: 0;
  color: #dedede;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(14px, 2.8cqi, 18px);
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
}

.sga-equipo-placeholder .sga-equipo-placeholder__values {
  display: none;
  margin: 22px 0 0;
  color: #c6c6c6;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.sga-equipo-placeholder__values span {
  padding-inline: 8px;
  color: #ed1c24;
}

/* Wider fillers use larger type and a second text line. */
@container sga-equipo-fill (min-width: 460px) {
  .sga-equipo-placeholder__logo {
    right: 4%;
    width: 46%;
    opacity: .15;
  }

  .sga-equipo-placeholder .sga-equipo-placeholder__values {
    display: block;
  }
}

@media (max-width: 1080px) {
  .sga-equipo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sga-equipo-placeholder:nth-child(n) {
    display: none;
  }

  .sga-equipo-placeholder:nth-child(3n + 2) {
    display: flex;
    grid-column: span 2;
  }

  .sga-equipo-placeholder:nth-child(3n + 3) {
    display: flex;
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .sga-equipo-card__name { font-size: 16px; }
  .sga-equipo-card__role { font-size: 13px; }
  .sga-equipo-card__specialty { font-size: 12px; }
}

@media (max-width: 830px) {
  .sga-equipo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sga-equipo-placeholder:nth-child(n) {
    display: none;
  }

  .sga-equipo-placeholder:nth-child(2n) {
    display: flex;
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .sga-equipo-card__content {
    left: 6%;
    right: 6%;
    bottom: 6%;
  }
}

@media (max-width: 500px) {
  .sga-equipo-grid {
    grid-template-columns: 1fr;
  }

  .sga-equipo-placeholder:nth-child(n) {
    display: none;
  }
}
