.agent-search-section {
  margin: 64px auto;
}

.agent-search-header {
  text-align: center;
  margin-bottom: 64px;
}

.agents-cards {
  display: none;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}
.agents-cards-active {
  display: flex;
}

.agents-cards-wrap {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 40px;
}

.agent-phone {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 8px;
  top: 8px;
  width: 36px;
  height: 36px;
  background-color: white;
  border-radius: 8px;
  opacity: 0;
  transition: ease 0.6s;
  box-shadow: 0 2px 8px 0 rgba(33, 37, 48, 0.3);
}
.agent-phone svg {
  width: 16px;
  height: 16px;
  fill: #1582E7;
}

.agent-img {
  display: flex;
  width: 100%;
  aspect-ratio: 298/493;
  border-radius: 8px;
  overflow: hidden;
}
.agent-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-info {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: 0;
  padding: 0 24px 24px;
  color: white;
  z-index: 1;
  margin-bottom: -68px;
  transition: ease 0.4s;
}
.agent-info .agent-full-name {
  font-size: 20px;
  font-family: Semi;
  line-height: 1.7;
  text-transform: uppercase;
}
.agent-info .agent-position-card {
  font-size: 14px;
  font-family: Medium;
  line-height: 1.4;
}
.agent-info .agent-card-btn {
  margin-top: 24px;
}

.agent-bg-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 200px;
  z-index: 0;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  background: linear-gradient(180deg, rgba(33, 37, 48, 0) 0%, #212530 100%);
}

.agent-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 23%;
  max-width: 24%;
}
.agent-card:hover .agent-phone {
  opacity: 1;
}
.agent-card:hover .agent-info {
  margin-bottom: 0;
}
.agent-card:hover .agent-card-btn {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .agent-card {
    flex: 1 1 31%;
    max-width: 32%;
  }
}
@media (max-width: 768px) {
  .agent-search-section {
    margin: 32px 0;
  }
  .agent-search-header {
    margin-bottom: 24px;
  }
  .agent-card {
    flex: 1 1 48%;
    max-width: 49%;
  }
  .agents-cards-active {
    row-gap: 32px;
  }
  .agent-img {
    aspect-ratio: 1;
  }
  .agent-img img {
    object-position: top;
  }
  .agent-card .agent-phone {
    opacity: 1;
  }
  .agent-card .agent-info {
    padding: 0 20px 20px;
    margin-bottom: 0;
  }
  .agent-card .agent-card-btn {
    margin-top: 16px;
  }
  .agents-cards-wrap {
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .agent-card {
    flex: 1 1 100%;
    max-width: unset;
  }
}