.agents-column-custom-layout * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.agents-column-custom-layout :where(ul, li) {
  list-style: none;
}

#content .agents-column-custom-layout :where(p, ul, li) {
  margin: 0;
  padding: 0;
}

.agents-column-custom-layout {
  margin-block: 2em;

  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  flex-flow: row wrap;
}

@media screen and (width <= 640px) {
  .agents-column-custom-layout:hover .agents-item:hover {
    width: 100%;
  }
  .agents-column-custom-layout:hover .agents-item:not(:hover) {
    width: 100%;
  }
  .agents-item {
    flex-grow: 1;
    width: 100%;
  }
}
@media screen and (width > 640px) {
  .agents-column-custom-layout:hover .agents-item:hover {
    width: 60%;
  }
  .agents-column-custom-layout:hover .agents-item:not(:hover) {
    width: 40%;
  }
  .agents-item {
    flex-grow: 0.5;
    width: 50%;
  }
}
@media screen and (width > 768px) {
  .agents-column-custom-layout:hover .agents-item:hover {
    width: 40%;
  }
  .agents-column-custom-layout:hover .agents-item:not(:hover) {
    width: 20%;
  }
  .agents-item {
    flex-grow: 0.25;
    width: 25%;
  }
}

.agents-item {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-rows: max-content;
  grid-template-areas:
    "image"
    "name";
  place-items: center;

  padding: 0.1em;

  text-align: center;

  transition: width 0.5s ease;

  isolation: isolate;
}

.agents-item .agents-img {
  grid-area: image;

  width: 100%;
  height: 100vw;
  max-height: 500px;

  background-color: var(--aios-agents-primary-color);

  overflow: hidden;
}
.agents-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;

  opacity: 1;
  transition: opacity 0.8s ease;
}
.agents-item:hover .agents-img img {
  opacity: 0.25;
}
.agents-item .agents-name {
  grid-area: name;
}
.agents-item .agents-info {
  grid-area: image;

  scale: 0.2;
  z-index: -1;
  transition: scale 0.5s ease;
}
.agents-item:hover .agents-info {
  scale: 1;
  z-index: 2;
}

#content .agents-column-custom-layout .agents-smi {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 1em;

  margin-block: 1em;
}
#content
  .agents-column-custom-layout
  .agents-item
  .agents-info
  :where(a, span, p) {
  color: #fff;
  text-shadow: 1px 1px 1px hsl(0, 0%, 0%, 0.5);
}
#content
  .agents-column-custom-layout
  .agents-item
  .agents-info
  :where(a):hover {
  color: var(--aios-agents-hover-color);
}

.agents-read-more {
  --border-thickness: 1px;
  --border-style: solid;
  border: var(--border-thickness) var(--border-style) #fff;
  padding: 0.75em 1.25em;
}
.agents-read-more:hover {
  border: var(--border-thickness) var(--border-style)
    var(--aios-agents-hover-color);
  color: var(--aios-agents-hover-color);
}
.agents-item .agents-name .position {
  text-transform: uppercase;
  font-size: 0.75rem;
}
#content .agents-column-custom-layout .agents-item .agents-name .name a {
  font-size: 1.5rem;
  color: var(--primary-text-color);
}
