/* Teacher Cards Styles */
.teachers {
  padding: 60px 0;
  overflow: hidden;
  background-color: #f5f9ff;
}

.teachers .container {
  max-width: 100%;
  padding: 0 15px;
}

.teachers h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1F2937;
}

.teacher-slider {
  position: relative;
  padding: 0 50px;
  margin: 0 auto;
  max-width: 1600px;
}

.teacher-cards {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 30px 10px 40px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
}

.teacher-cards::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.teacher-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border-radius: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 0;
  width: 280px;
  min-height: 420px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.teacher-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

/* Teacher Card Elements */
.card-level {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #3b82f6;
  background-color: #EFF6FF;
  padding: 4px 12px;
  border-radius: 16px;
  z-index: 10;
  display: none; /* Hide level tags */
}

.available-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: #22c55e; /* Green by default */
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  letter-spacing: 0.2px;
  animation: badgePulse 3s infinite ease-in-out;
}

/* All badges are green by default */

/* Use orange for limited availability */
.available-badge.limited {
  background-color: #ff946b;
  box-shadow: 0 4px 8px rgba(255, 148, 107, 0.3);
  border: 2px solid #e67e59;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.card-number {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  background-color: #434dea;
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  z-index: 10;
  display: none; /* Hide card numbers as requested */
}

.avatar-wrapper {
  width: 100%;
  height: 210px;
  position: relative;
  margin: 0 auto;
  background: linear-gradient(135deg, #eef1ff 0%, #e0e5ff 100%);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  padding-top: 25px;
}

.teacher-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(67, 77, 234, 0.15);
  border: 4px solid white;
  background-color: #EFF6FF;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Avatar state (default) */
.teacher-avatar img.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
  transition: opacity 0.4s ease-in-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

/* Real photo (hidden by default) */
.teacher-avatar img.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: scale(1.2);
  transition: opacity 0.4s ease-in-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

/* Hover state transition */
.teacher-avatar.show-photo {
  border-radius: 16px;
  transform: scale(1.08);
}

.teacher-avatar.show-photo img.avatar {
  opacity: 0;
  transform: scale(0.8);
}

.teacher-avatar.show-photo img.photo {
  opacity: 1;
  transform: scale(1);
}

/* Automatic avatar cycling animation */
.teacher-avatar {
  cursor: pointer;
  position: relative;
}

.teacher-avatar::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 3px;
  background-color: rgba(67, 77, 234, 0.5);
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.teacher-avatar.show-photo::after {
  background-color: rgba(255, 148, 107, 0.7);
  width: 25px;
}

/* Simple indicator for teacher avatar state */
.teacher-avatar::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 3px;
  background-color: rgba(67, 77, 234, 0.5);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.teacher-avatar.show-photo::after {
  background-color: rgba(255, 148, 107, 0.7);
}

/* Restart animation button */
.restart-animation {
  display: block;
  margin: 15px auto 0;
  background-color: #434dea;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.restart-animation:hover {
  background-color: #ff946b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.restart-animation i {
  margin-right: 5px;
}

.card-content {
  padding: 15px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100% - 180px);
}

.teacher-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: #434dea;
}

.teacher-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #6B7280;
  margin: 5px 0 10px;
}

.teacher-rating::before {
  content: '⭐';
  margin-right: 4px;
}

.teacher-specialty {
  font-size: 0.9rem;
  color: #4B5563;
  margin: 0 0 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.teacher-specialty::before {
  content: attr(data-emoji);
}

.teacher-location, .teacher-languages {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.teacher-location::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23434dea'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 4px;
}

.teacher-languages::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23434dea'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 4px;
}

.teacher-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
  justify-content: center;
}

.teacher-tags span {
  font-size: 0.75rem;
  background-color: #f8f0eb;
  color: #ff946b;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #ffded0;
}

/* Card content spacing adjustments */
.card-content {
  padding: 15px 20px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100% - 210px);
}

.teacher-tags {
  margin-top: auto;
}

/* Slider Controls */
.slider-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 10px;
}

.prev-btn, .next-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s, transform 0.2s;
}

.prev-btn:hover, .next-btn:hover {
  background-color: #4F46E5;
  transform: scale(1.1);
}

.prev-btn:hover i, .next-btn:hover i {
  color: white;
}

.prev-btn i, .next-btn i {
  color: #4F46E5;
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .teacher-slider {
    padding: 0 15px;
  }
  
  .slider-controls {
    display: none;
  }
  
  .teacher-card {
    width: 180px;
    min-height: 320px;
  }
}
  color: #4F46E5;
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .teacher-slider {
    padding: 0 15px;
  }
  
  .slider-controls {
    display: none;
  }
  
  .teacher-card {
    width: 180px;
    min-height: 320px;
  }
}
