/* ============================== */
/* Секция "Наши преподаватели"    */
/* ============================== */

.teachers {
  padding: 4rem 0 2.5rem;
}

.teachers-slider-outer {
  position: relative;
  width: 100%;
}

.teachers-slider-track {
  display: flex;
  gap: 2rem;
  padding: 1.25rem var(--container-padding);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.teachers-slider-track::-webkit-scrollbar {
  display: none;
}

/* Пустой слайд — только отступ */
.teacher-slide.empty {
  flex: 0 0 10rem;
  scroll-snap-align: start;
  box-shadow: none;
}

/* === Основная карточка преподавателя === */
.teacher-slide {
  flex: 0 0 calc(40% - 1rem);
  max-width: 480px;
  min-height: 380px;
  height: auto;
  scroll-snap-align: start;
  border-radius: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.3s ease;

  /* Градиентный фон + фото справа (фоновое изображение) — слои */
  /* background-size: cover; */
  background-position: right;
  background-repeat: no-repeat;
}


/* ——— Градиентные классы — теперь задают фон через ::before */
.teacher-slide.soft-primary{ background-color: #f0f7ff; }
.teacher-slide.soft-red    { background-color: #fff5f5; }
.teacher-slide.soft-green  { background-color: #f6fdf9; }
.teacher-slide.soft-purple{ background-color: #f8f6ff; }

/* ——— Шапка — с z-index > 0 и фоном, чтобы не просвечивало */
.teacher-header {
  padding: 1.6rem 1.5rem 1.2rem 1.8rem;
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  z-index: 2;
  background: transparent; /* важно для прозрачности */
  color: var(--fg);
}

.teacher-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

/* ——— Бейдж: компактный — только под текст */
.teacher-badge {
  display: inline-block;
  background: #FFD166;
  color: #222;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* ← ширина зависит от текста — inline-block + no flex/rigid width */
}

/* ——— Девиз (цитата) ——— */
.teacher-motto-bubble {
  position: relative;
  margin: 0;
   max-width: 60%;
}
.bubble-inner {
  background: white;
  color: var(--fg);
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  line-height: 1.3;
}
.bubble-inner span:first-child {
  margin-right: 0.2em;
  opacity: 0.4;
}
.bubble-inner span:last-child {
  margin-left: 0.2em;
  opacity: 0.4;
}
.bubble-tail {
  position: absolute;
  bottom: -5px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid white;
}

/* ——— Подвал: с галочками ——— */
.teacher-footer {
  background: white;
  padding: 1rem 1.5rem 1.3rem 1.8rem;
  border-top: 1px solid #f1f1f1;
  z-index: 2;
}
.teacher-bio {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teacher-bio li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
  font-weight: 500;
}
.teacher-bio li:last-child {
  margin-bottom: 0;
}
.teacher-bio li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: bold;
  margin-top: 2px;
}

/* === Кнопки навигации === */
.teacher-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 1.375rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}
.teacher-slider-nav:hover {
  background: white;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(94, 114, 228, 0.25);
}
.teacher-slider-nav.prev { left: calc(var(--container-padding) + 4px); }
.teacher-slider-nav.next { right: calc(var(--container-padding) + 4px); }

/* ======================== */
/*    МОБИЛЬНАЯ АДАПТАЦИЯ   */
/* ======================== */
@media (max-width: 768px) {
  .teacher-slide.empty {
    flex: 0 0 0.75rem;
  }

  .teacher-slide {
    flex: 0 0 calc(58% - 1rem);
    min-height: 600px;
  }

  /* Сдвиг фото ближе к краю на мобилке */
  .teacher-slide::before {
    background-position: right 0.8rem center;
  }

  .teacher-header,
  .teacher-footer {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .teacher-name {
    font-size: 1.35rem;
  }

  .teacher-badge {
    font-size: 0.85rem;
    padding: 0.25rem 0.7rem;
  }

  .teacher-motto-bubble {
    display: none;
  }

  .teacher-bio li {
    font-size: 0.92rem;
  }
}

/* Скрываем стрелки на очень узких экранах */
@media (max-width: 640px) {
  .teacher-slider-nav {
    display: none;
  }
}
