.ec-educator-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--ec-8);
  text-align: center;
  border-radius: var(--ec-radius-xl);
  border: 1px solid rgba(28, 43, 74, 0.12);
  background: var(--ec-surface);
  box-shadow:
    0 10px 30px rgba(36, 41, 46, 0.1),
    0 2px 8px rgba(36, 41, 46, 0.06);
  height: 100%;
  transition: transform var(--ec-dur-2) var(--ec-ease), box-shadow var(--ec-dur-2) var(--ec-ease);
}

.ec-educator-card:hover {
  box-shadow:
    0 28px 56px rgba(241, 50, 82, 0.26),
    0 12px 28px rgba(251, 191, 36, 0.3);
}

.ec-educator-card__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--ec-4);
  border-radius: 8rem;
  width: 14rem;
  height: 14rem;
}

.ec-educator-card__photo:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(251, 191, 36, 0.22));
  animation: rotate-gradient linear 2s infinite;
  animation-play-state: paused;
  clip-path: circle();
}

.ec-educator-card:hover .ec-educator-card__photo:before {
  background: linear-gradient(
    135deg,
    rgba(241, 50, 82, 0.4),
    rgba(251, 191, 36, 0.42)
  );
  animation-play-state: running;
}

@keyframes rotate-gradient {
  to { transform: rotate(360deg) }
}

.ec-educator-card__photo img {
  width: 85%;
  clip-path: circle();
}

.ec-educator-card__name {
  font-weight: 1000;
  font-size: var(--ec-text-xl);
}

.ec-educator-card__title {
  margin-top: 6px;
  color: #2f6b3a;
  font-weight: 900;
}

.ec-educator-card__bio {
  margin-top: var(--ec-3);
  color: var(--ec-muted);
  font-weight: 700;
  line-height: var(--ec-leading-normal);
}

.ec-educator-card__actions {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.ec-educator-card__overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  justify-content: center;
  align-items: center;
  padding: var(--ec-4);
}

.ec-educator-card__overlay.is-open {
  display: flex;
}

.ec-educator-card__overlayPanel {
  position: relative;
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  color: #1f2937;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ec-5);
  padding: var(--ec-8);
}

.ec-educator-card__overlayClose {
  position: absolute;
  top: var(--ec-3);
  right: var(--ec-3);
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.ec-educator-card__overlayClose:hover {
  background: #f8fafc;
}

.ec-educator-card__biography {
  text-align: left;
  line-height: var(--ec-leading-normal);
  color: var(--ec-muted);
  font-weight: 700;
}

.ec-educator-card__video video {
  width: 100%;
  border-radius: 12px;
}

.ec-educator-card__media img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

@media (max-width: 768px) {
  .ec-educator-card__overlayPanel {
    grid-template-columns: 1fr;
    padding: var(--ec-6);
  }

  .ec-educator-card__photo {
    width: 11rem;
    height: 11rem;
  }
}
