/* ==========================================================================
   Teachers — Premium 3D cards (GPU transforms)
   ========================================================================== */

.teachers--premium {
  position: relative;
  overflow: hidden;
}

.teachers__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.teachers__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.teachers__orb--emerald {
  width: min(400px, 52vw);
  height: min(400px, 52vw);
  top: -5%;
  right: -8%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, transparent 70%);
}

.teachers__orb--violet {
  width: min(280px, 38vw);
  height: min(280px, 38vw);
  bottom: 10%;
  left: -6%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.teachers__container {
  position: relative;
  z-index: 1;
}

.teachers-swiper--premium {
  padding-bottom: var(--space-12) !important;
  overflow: visible;
  perspective: 1400px;
}

.teachers-swiper--premium .swiper-slide {
  height: auto;
  display: flex;
}

/* Premium card shell */
.teachers--premium .teacher-card--premium {
  --tilt-x: 0;
  --tilt-y: 0;
  --lift: 0;
  --shine-x: 50%;
  --shine-y: 50%;
  --glow: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform-style: preserve-3d;
  transform: perspective(1000px)
    rotateX(calc(var(--tilt-y) * -1deg))
    rotateY(calc(var(--tilt-x) * 1deg))
    translate3d(0, calc(var(--lift) * 1px), 0);
  transition:
    transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.2s ease;
  will-change: transform;
}

.teachers--premium .teacher-card--premium:not(.is-hovered) {
  will-change: auto;
}

.teachers--premium .teacher-card--premium.is-hovered {
  --lift: -12;
  --glow: 1;
}

.teachers--premium .teacher-card--premium:hover {
  transform: perspective(1000px)
    rotateX(calc(var(--tilt-y) * -1deg))
    rotateY(calc(var(--tilt-x) * 1deg))
    translate3d(0, calc(var(--lift) * 1px), 0);
}

.teachers--premium .teacher-card__surface {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.94) 100%
  );
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transform: translateZ(0);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__surface {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.05),
    0 28px 56px rgba(5, 150, 105, 0.16),
    0 0 0 1px rgba(16, 185, 129, 0.08);
}

.teachers--premium .swiper-slide-active .teacher-card__surface {
  border-color: rgba(5, 150, 105, 0.22);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 20px 48px rgba(5, 150, 105, 0.12);
}

.teacher-card__border-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, calc(var(--glow) * 0.65)),
    transparent 42%,
    rgba(99, 102, 241, calc(var(--glow) * 0.35)),
    rgba(251, 191, 36, calc(var(--glow) * 0.4))
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--glow);
  z-index: 3;
  transition: opacity 0.15s ease;
}

.teacher-card__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--glow) * 0.85);
  background: radial-gradient(
    320px circle at var(--shine-x) var(--shine-y),
    rgba(255, 255, 255, 0.5) 0%,
    rgba(16, 185, 129, 0.1) 35%,
    transparent 65%
  );
  z-index: 2;
  transition: opacity 0.15s ease;
}

.teacher-card__body {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  transform-style: preserve-3d;
}

/* Avatar — rotating ring */
.teachers--premium .teacher-card__avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 0 var(--space-2);
  padding: 0;
  background: none;
  box-shadow: none;
  transform: translateZ(32px);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__avatar-wrap {
  transform: translateZ(48px) scale(1.04);
}

.teacher-card__avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #059669,
    #34d399,
    #6366f1,
    #fbbf24,
    #059669
  );
  animation: teacherRingSpin 6s linear infinite;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__avatar-ring {
  opacity: 1;
  animation-duration: 3s;
}

@keyframes teacherRingSpin {
  to { transform: rotate(360deg); }
}

.teachers--premium .teacher-card__avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: var(--color-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  transition: box-shadow 0.2s ease;
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__avatar {
  box-shadow: 0 12px 32px rgba(5, 150, 105, 0.25);
}

.teachers--premium .teacher-card__badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
  transform: translateZ(20px);
}

.teachers--premium .teacher-card__badge svg {
  width: 14px;
  height: 14px;
}

/* Typography */
.teachers--premium .teacher-card__name {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  transform: translateZ(20px);
  transition: color 0.15s ease;
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__name {
  color: var(--color-primary-dark);
}

.teachers--premium .teacher-card__role {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  transform: translateZ(16px);
}

.teacher-card__rating-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transform: translateZ(14px);
}

.teachers--premium .teacher-card__stars {
  letter-spacing: 2px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.teacher-card__rating-num {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Language pills */
.teachers--premium .teacher-card__languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  transform: translateZ(12px);
}

.teachers--premium .teacher-card__lang {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  background: rgba(236, 253, 245, 0.9);
  border: 1px solid rgba(5, 150, 105, 0.15);
  border-radius: var(--radius-full);
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.teachers--premium .teacher-card--premium.is-hovered .teacher-card__lang {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(5, 150, 105, 0.25);
}

.teachers--premium .teacher-card__exp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  background: rgba(241, 245, 249, 0.9);
  border-radius: var(--radius-full);
  transform: translateZ(10px);
}

.teachers--premium .teacher-card__exp svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

.teachers--premium .teacher-card__bio {
  margin: 0;
  flex: 1;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  transform: translateZ(8px);
}

/* CTA — premium 3D button */
.teachers--premium .teacher-card__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 220px;
  margin-top: auto;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(5, 150, 105, 0.35);
  border-radius: var(--radius-full);
  overflow: hidden;
  transform: translateZ(28px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.12);
  transition:
    transform 0.15s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.teacher-card__cta-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.teachers--premium .teacher-card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}

.teachers--premium .teacher-card__cta:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateZ(36px) translateY(-2px);
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.35);
}

.teachers--premium .teacher-card__cta:hover .teacher-card__cta-shine {
  transform: translateX(120%);
}

.teachers--premium .teacher-card__cta:hover svg {
  transform: translateX(4px);
}

.teachers--premium .teacher-card__cta:active {
  transform: translateZ(28px) translateY(0);
}

/* Swiper nav — premium */
.teachers-swiper__nav .swiper-nav__btn {
  border: 1px solid rgba(5, 150, 105, 0.2);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.teachers-swiper__nav .swiper-nav__btn:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, 0.4);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.15);
  background: #fff;
}

.teachers-swiper--premium .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(5, 150, 105, 0.25);
  opacity: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.teachers-swiper--premium .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
}

@media (prefers-reduced-motion: reduce) {
  .teacher-card__avatar-ring {
    animation: none !important;
  }

  .teachers--premium .teacher-card--premium,
  .teachers--premium .teacher-card--premium.is-hovered {
    transform: none;
  }
}

@media (max-width: 1023px) {
  .teachers--premium .teacher-card--premium.is-hovered {
    --lift: -6;
  }
}
