/* ===== Instructor card: name always visible, role + social drop down on hover ===== */

.instructor-card {
  position: relative;
  overflow: hidden;
  /* background: #fff; */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  background-color: #102147;

  outline: none;
}
.team-item.instructor-card {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.instructor-card .team-img img {
  display: block;
  /* width: 100%; */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  /* object-fit: contain !important; */
  object-position: center;
}

/* Lower part: always visible */
.instructor-card .team-content {
  position: relative;
  z-index: 2;
  /* background: #01121e; */
  background: rgb(4, 146, 194);
  color: #fff;
  text-align: center;
  padding: 16px;
  cursor: pointer;
}

.instructor-card .team-content h4 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Upper part: hidden, sits right above the name */
.instructor-card .team-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  padding: 20px 16px 16px;
  /* background: #0b3c5d; */
  /* background: #1e6fa8; */
  /* solid, same color as the name bar */
  /* background: rgb(4, 146, 194); */
  text-align: center;
  clip-path: inset(0 0 100% 0); /* fully hidden */
  opacity: 0;
  pointer-events: none;
  transition:
    clip-path 0.45s ease,
    opacity 0.3s ease;
}

/* Hover on the lower part (or keyboard focus / tap on mobile) → background drops down */
.instructor-card .team-content:hover .team-dropdown,
.instructor-card:focus-within .team-dropdown {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  pointer-events: auto;
}

.instructor-card .team-dropdown p {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
}

.instructor-card .team-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #0b3c5d;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.instructor-card .team-social-link:hover,
.instructor-card .team-social-link:focus-visible {
  background: #1e6fa8;

  color: #fff;
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .instructor-card .team-dropdown,
  .instructor-card .team-social-link {
    transition: none;
  }
}
