/* ------------------------------------------------------------------
   Преподаватели: страница преподавателя, архив CPT, архив предмета.
   Токены взяты из main.min.css: Lato, #0f1a2c / #e84722 / #d4fe4c,
   скругления 40px у фото и 100px у пилюль, кнопки .btn.
   ------------------------------------------------------------------ */

/* --- Страница преподавателя ------------------------------------- */

.teacher-single__inner {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.teacher-single__hero {
  align-items: start;
  display: grid;
  gap: 60px;
  grid-template-columns: 420px 1fr;
}

.teacher-single__photo img {
  aspect-ratio: 3 / 4;
  border-radius: 40px;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top;
  width: 100%;
}

.teacher-single__body {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.teacher-single__name {
  color: #0f1a2c;
  font-size: 42px;
  font-weight: 700;
  line-height: 110%;
}

.teacher-single__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.teacher-single__subjects a {
  align-items: center;
  background-color: #4f21fe;
  border-radius: 100px;
  color: #fff;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  height: 30px;
  padding: 0 15px;
  transition: 0.3s ease;
  white-space: nowrap;
}

.teacher-single__subjects a:hover {
  background-color: #e84722;
}

/* Таблица фактов */

.teacher-facts {
  display: flex;
  flex-direction: column;
}

.teacher-facts__row {
  align-items: baseline;
  border-bottom: 1px solid #ececec;
  display: grid;
  gap: 20px;
  grid-template-columns: 220px 1fr;
  padding: 14px 0;
}

.teacher-facts__row:first-child {
  border-top: 1px solid #ececec;
}

.teacher-facts dt {
  color: #7b8291;
  font-size: 15px;
  line-height: 140%;
}

.teacher-facts dd {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
  line-height: 140%;
}

.teacher-rating {
  align-items: center;
  color: #e84722;
  display: inline-flex;
  gap: 6px;
}

.teacher-rating b {
  color: #0f1a2c;
  font-weight: 700;
}

.teacher-rating__count {
  color: #7b8291;
  font-weight: 400;
}

.teacher-single__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

.teacher-single__actions .btn {
  text-decoration: none;
}

.teacher-single__lead {
  color: #3d4453;
  font-size: 20px;
  line-height: 150%;
  max-width: 900px;
}

/* Образование */

.teacher-education {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.teacher-education__item {
  border-left: 3px solid #d4fe4c;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
}

.teacher-education__institution {
  font-size: 17px;
  font-weight: 600;
  line-height: 140%;
}

.teacher-education__speciality {
  color: #3d4453;
  font-size: 16px;
  line-height: 140%;
}

.teacher-education__year {
  color: #7b8291;
  font-size: 14px;
}

/* --- Архивы: сетка карточек -------------------------------------- */

.teachers-archive__inner {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.teachers-archive__desc {
  color: #3d4453;
  font-size: 18px;
  line-height: 150%;
  max-width: 900px;
}

.teachers-archive__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.teachers-archive__filter a,
.teachers-archive__filter span {
  align-items: center;
  background-color: #f4f5f7;
  border-radius: 100px;
  color: #0f1a2c;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  height: 36px;
  padding: 0 18px;
  transition: 0.3s ease;
  white-space: nowrap;
}

.teachers-archive__filter a:hover {
  background-color: #d4fe4c;
}

.teachers-archive__filter .is-active {
  background-color: #1c092c;
  color: #fff;
}

.teachers-archive__empty {
  color: #7b8291;
  font-size: 18px;
}

.teachers-grid {
  display: grid;
  gap: 40px 30px;
  grid-template-columns: repeat(4, 1fr);
}

.teacher-card {
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.teacher-card__top {
  border-radius: 40px;
  overflow: hidden;
  position: relative;
}

.teacher-card__img img {
  aspect-ratio: 3 / 4;
  border-radius: 40px;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: 0.3s ease;
  width: 100%;
}

.teacher-card:hover .teacher-card__img img {
  transform: scale(1.05);
}

.teacher-card__rating {
  align-items: center;
  background-color: #fff;
  border-radius: 100px;
  color: #e84722;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 5px;
  height: 30px;
  left: 20px;
  padding: 0 14px;
  position: absolute;
  top: 20px;
}

.teacher-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.teacher-card__name {
  font-size: 24px;
  font-weight: 500;
  line-height: 130%;
  transition: 0.3s ease;
}

.teacher-card:hover .teacher-card__name {
  color: #e84722;
}

.teacher-card__subjects {
  color: #7b8291;
  font-size: 15px;
  line-height: 140%;
}

.teacher-card__subjects li {
  display: inline;
}

.teacher-card__subjects li:not(:last-child):after {
  content: ", ";
}

.teacher-card__experience {
  color: #7b8291;
  font-size: 14px;
}

/* Пагинация */

.teachers-archive .navigation.pagination {
  display: flex;
  justify-content: center;
}

.teachers-archive .nav-links {
  align-items: center;
  display: flex;
  gap: 10px;
}

.teachers-archive .page-numbers {
  align-items: center;
  background-color: #f4f5f7;
  border-radius: 100px;
  color: #0f1a2c;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0 14px;
  transition: 0.3s ease;
}

.teachers-archive .page-numbers:hover,
.teachers-archive .page-numbers.current {
  background-color: #1c092c;
  color: #fff;
}

/* --- Адаптив ------------------------------------------------------ */

@media (max-width: 1200px) {
  .teacher-single__hero {
    gap: 40px;
    grid-template-columns: 340px 1fr;
  }

  .teacher-single__name {
    font-size: 36px;
  }

  .teachers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.5px) {
  .teacher-single__hero {
    grid-template-columns: 280px 1fr;
  }

  .teacher-facts__row {
    grid-template-columns: 180px 1fr;
  }

  .teachers-grid {
    gap: 30px 20px;
  }
}

@media (max-width: 767px) {
  .teacher-single__inner {
    gap: 35px;
  }

  .teacher-single__hero {
    gap: 25px;
    grid-template-columns: 1fr;
  }

  .teacher-single__photo img {
    aspect-ratio: 4 / 3;
    border-radius: 30px;
  }

  .teacher-single__name {
    font-size: 28px;
  }

  .teacher-facts__row {
    gap: 4px;
    grid-template-columns: 1fr;
  }

  .teacher-single__actions .btn {
    flex: 1 1 100%;
  }

  .teacher-single__lead {
    font-size: 17px;
  }

  .teachers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .teacher-card__top,
  .teacher-card__img img {
    border-radius: 30px;
  }

  .teacher-card__name {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .teachers-grid {
    grid-template-columns: 1fr;
  }

  .teacher-card__subjects,
  .teacher-card__experience {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------------
   Форма записи к преподавателю (якорь #signup).
   Внешний вид наследуется от блока «Бесплатная консультация»,
   здесь только раскладка полей и мелочи поверх него.
   ------------------------------------------------------------------ */

.teacher-signup {
  scroll-margin-top: 120px;
}

.teacher-signup__fields {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-signup__fields select {
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231B0F33' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 17px center;
  background-repeat: no-repeat;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #1b0f33;
  cursor: pointer;
  font-family: lato, sans-serif;
  font-size: 14px;
  line-height: 130%;
  min-height: 44px;
  opacity: 0.9;
  outline: none;
  padding: 14px 40px 14px 17px;
  width: 100%;
}

.teacher-signup__fields select:required:invalid {
  color: #8a819c;
}

.teacher-signup__fields select option {
  color: #1b0f33;
}

.teacher-signup__fields input.invalid,
.teacher-signup__fields select.invalid {
  border-color: #1b0f33;
}

.teacher-signup__bottom {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  margin-top: 16px;
}

.teacher-signup__agree {
  align-items: center;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 8px;
  line-height: 130%;
}

.teacher-signup__agree input {
  accent-color: #1b0f33;
  flex-shrink: 0;
  height: 16px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.teacher-signup__agree input.invalid {
  outline: 2px solid #1b0f33;
  outline-offset: 2px;
}

.teacher-signup__agree a {
  color: inherit;
  text-decoration: underline;
}

.teacher-signup__submit {
  margin-top: 0;
}

.teacher-signup__error {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 0;
}

@media (max-width: 767px) {
  .teacher-signup__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-signup__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-signup__submit {
    max-width: none;
  }
}

/* ------------------------------------------------------------------
   Новые данные преподавателя: специализация, цена, филиалы, отзывы
   ------------------------------------------------------------------ */

.teacher-card__specialization {
  color: #4b3f63;
  font-size: 15px;
  line-height: 130%;
}

.teacher-card__price {
  color: #1b0f33;
  font-weight: 600;
}

.teacher-card__verified {
  color: #8b5cf6;
  display: inline-flex;
  vertical-align: middle;
}

.teacher-single__specialization {
  color: #4b3f63;
  font-size: 18px;
  line-height: 130%;
  margin: 6px 0 0;
}

.teacher-single__verified {
  align-items: center;
  color: #8b5cf6;
  display: flex;
  font-size: 14px;
  gap: 6px;
  margin: 10px 0 0;
}

.teacher-facts__price {
  font-size: 18px;
  font-weight: 700;
}

.teacher-branches {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.teacher-branches__address {
  color: #6b6480;
  display: block;
  font-size: 14px;
}

.teacher-reviews {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.teacher-review {
  background: #f7f5fb;
  border-radius: 16px;
  padding: 18px 20px;
}

.teacher-review__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.teacher-review__author {
  font-weight: 600;
}

.teacher-review__score {
  align-items: center;
  color: #f5a623;
  display: inline-flex;
  font-weight: 600;
  gap: 4px;
}

.teacher-review__date {
  color: #6b6480;
  font-size: 14px;
}

.teacher-review__text p:last-child {
  margin-bottom: 0;
}

.teachers-archive__filter--exams {
  margin-top: -8px;
}
