@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 50px;
  align-items: stretch;
}

.team-member-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member-card::before {
  content: "";
  position: absolute;
  inset: -2px; 
  border-radius: 18px;
  background: conic-gradient(from var(--angle), transparent 75%, #FFF130 100%);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px; 
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; 
}

.team-member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: transparent; 
}

.team-member-card:hover::before {
  opacity: 1; 
  animation: spin-border 1.5s linear infinite; 
}

@keyframes spin-border {
  to {
    --angle: 360deg;
  }
}

.team-member-card-image {
  display: block;
  width: calc(100% - 20px);
  aspect-ratio: 4 / 5;
  margin: 10px auto 0;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  background-color: #f9f9f9;
  z-index: 1;
  position: relative; 
}

.team-member-card-info {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  z-index: 1;
  position: relative;
}

.team-member-full-name {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

.team-member-job-title {
  font-size: 14px;
  color: #555;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 14px;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e0e0e0; 
}

.team-member-job-description {
  font-size: 13.5px;
  color: #777;
  line-height: 1.6;
  margin: 0;
  text-align: left;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

@media (max-width: 1100px) {
  .cards-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .cards-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .team-member-card-image {
    width: calc(100% - 16px);
    margin-top: 8px;
    border-radius: 10px;
  }
  .team-member-card-info {
    padding: 16px 14px;
  }
  .team-member-full-name {
    font-size: 17px;
  }
  .team-member-job-title {
    font-size: 13.5px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .team-member-job-description {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .cards-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .team-member-card {
    width: 100%;
  }
  .team-member-card-image {
    width: calc(100% - 20px);
    margin-top: 10px;
    border-radius: 12px;
  }
  .team-member-card-info {
    padding: 20px;
  }
  .team-member-full-name {
    font-size: 20px;
  }
  .team-member-job-title {
    font-size: 15px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
  .team-member-job-description {
    font-size: 14px;
  }
}