/* ============================================
   НАША КОМАНДА (BLOCK14)
   ============================================ */
.block14 {
  max-width: var(--page-width);
  width: 100%;
  margin: 0 auto;
  padding: 0px var(--side-padding);
  box-sizing: border-box;
  background-color: var(--color-white);
  overflow: visible;
  /* Выше секции «Правила поступления», иначе модалка кампуса перекрывается / обрезается */
  position: relative;
  z-index: 3;
}

.block14_container {
  max-width: var(--content-width);
  margin: 0 auto;
  overflow: visible;
}

/* Заголовок и навигация в одной строке */
.block14_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}

.block14_title {
  font-family: Lora, serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.33;
  color: var(--color-black);
  margin: 0;
}

/* Нижний блок с описанием и кнопкой */
.block14_bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 60px;
  gap: 30px;
}

.block14_subtitle {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-black);
  flex: 1;
  max-width: 780px;
  margin: 0;
}

/* Селектор кампуса в block14_bottom */
.block14_bottom .block14_campus_selector_wrapper {
  flex-shrink: 0;
  display: none; /* По умолчанию скрыт, показывается только на 769px+ */
}

@media (min-width: 769px) {
  .block14_subtitle {
    font-size: 16px;
  }
  
  .block14_bottom .block14_campus_selector_wrapper {
    display: block;
  }
}

.block14_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center !important;
  background: #D2232A;
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 400;
  font-family: Roboto, Arial, sans-serif;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
  height: 38px;
  min-width: 318px;
  flex-shrink: 0;
  text-decoration: none;
}

.block14_btn .block14_btn_text {
  display: block;
  width: 100%;
  text-align: center;
}

.block14_btn:hover {
  background: #b01e25;
}

/* Кнопки выбора кампуса в блоке 14 */
.block14_campus_buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
  gap: 10px;
  width: 100%;
}

/* На 769px+ показываем селектор вместо кнопок */
@media (min-width: 769px) {
  .block14_campus_buttons {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .block14_campus_btn {
    display: none;
  }
  
  .block14_campus_selector_wrapper {
    position: relative;
    display: block;
    min-width: 250px;
  }
  
  /* Скрываем селектор в block14_campus_buttons на 769px+ */
  .block14_campus_buttons .block14_campus_selector_wrapper {
    display: none;
  }
  
  /* Показываем селектор в block14_bottom на 769px+ */
  .block14_bottom .block14_campus_selector_wrapper {
    display: block;
  }
  
  /* Стили для селектора в block14_bottom: белый фон, красный текст и стрелка */
  .block14_bottom .block14_campus_selector_btn {
    background: #fff;
    color: #D2232A;
    border: 2px solid #D2232A;
  }
  
  .block14_bottom .block14_campus_selector_btn .block14_campus_arrow {
    color: #D2232A;
  }
  
  .block14_campus_selector_btn {
    padding: 5px 20px;
    width: 100%;
    min-height: 48px;
    background: #D2232A;
    color: #fff;
    border: 2px solid #D2232A;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    gap: 10px;
  }
  
  .block14_campus_selector_btn .block14_campus_arrow {
    font-size: 17px;
    transition: transform 0.3s ease;
    color: inherit;
    display: inline-block;
  }
  
  .block14_campus_selector_btn.menu-open .block14_campus_arrow {
    transform: rotate(180deg);
  }
  
  .block14_campus_modal {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: inset 0px 4px 8px 0px rgba(217, 217, 217, 1);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 400px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
    box-sizing: border-box;
  }
  
  .block14_campus_modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .block14_campus_option {
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.171875em;
    color: #231F20;
    border-bottom: 1px solid #EFEFEF;
    position: relative;
    z-index: 1001;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    flex-shrink: 0;
    min-height: 36px;
    height: 36px;
    display: flex;
    align-items: center;
  }
  
  .block14_campus_option:last-child {
    border-bottom: none;
  }
  
  .block14_campus_option:hover {
    background: #f9f9f9;
  }
  
  .block14_campus_option.selected,
  .block14_campus_option.active {
    background: #EFEFEF;
    font-weight: 700;
  }
}

/* Адаптивность для block14_campus_buttons при 1023px и меньше (только для 768px и меньше) */
@media (max-width: 768px) {
  .block14_campus_buttons {
    display: flex !important;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
  }
  
  .block12_campus_tabs {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .block14_campus_btn {
    display: none;
  }

  .block14_campus_buttons .block14_campus_selector_wrapper {
    position: relative;
    display: block;
    width: 100%;
  }
  
  .block14_bottom .block14_campus_selector_wrapper {
    display: none !important;
  }

  .block14_campus_buttons .block14_campus_selector_btn {
    padding: 5px 20px;
    width: 100%;
    min-height: 48px;
    background: #D2232A !important;
    color: #fff !important;
    border: 2px solid #D2232A !important;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    font-family: "Roboto";
    font-size: 16px;
    gap: 10px;
  }

  .block14_campus_buttons .block14_campus_selector_btn .block14_campus_arrow {
    font-size: 14px !important;
    transition: transform 0.3s ease;
    color: inherit;
    display: inline-block;
  }

  .block14_campus_buttons .block14_campus_selector_btn.menu-open .block14_campus_arrow {
    transform: rotate(180deg);
  }

  .block14_campus_buttons .block14_campus_modal {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: inset 0px 4px 8px 0px rgba(217, 217, 217, 1);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 400px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
    box-sizing: border-box;
  }

  .block14_campus_buttons .block14_campus_modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .block14_campus_buttons .block14_campus_option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-black);
    border-bottom: 1px solid #E4E4E7;
    position: relative;
    z-index: 1001;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    align-items: center;
  }

  .block14_campus_buttons .block14_campus_option:last-child {
    border-bottom: none;
  }

  .block14_campus_buttons .block14_campus_option:hover {
    background: #F5F5F5;
  }

  .block14_campus_option.selected,
  .block14_campus_option.active {
    background: #EFEFEF;
    font-weight: 700;
  }
}


.block14_campus_btn {
  padding: 5px 20px;
  width: 206.75px;
  min-height: 48px;
  height: auto;
  background: #fff;
  color: #c00;
  border: 2px solid #c00;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: "Roboto";
  font-size: 16px;
  text-align: center;
  line-height: 1.2;
}

.block14_campus_btn:hover {
  background: #F5F5F5;
}

.block14_campus_btn.active {
  background: #c00;
  color: #fff;
  width: 246.56px;
  min-height: 48.02px;
}

.block14_campus_btn.active:hover {
  background: #c00;
}

/* Навигация слайдера преподавателей */
.teachers_navigation {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Слайдер с преподавателями */
.teachers_slider_wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  left: 0;
  transform: translateX(0);
}

.teachers_arrow {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #5C5D5D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.teachers_arrow:hover {
  background: var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.teachers_arrow:active {
  transform: scale(0.95);
}

.teachers_arrow svg {
  width: 24px;
  height: 24px;
}

.teachers_slides {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  padding: 10px 0;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  transition: scrollbar-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  position: relative;
  left: 0 !important;
}

/* На десктопе сбрасываем трансформацию */
@media (min-width: 769px) {
  .teachers_slides {
    transform: translateX(0) !important;
    left: 0 !important;
  }
}

.teachers_slides:hover,
.teachers_slides:active,
.teachers_slides.scrolling {
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.teachers_slides::-webkit-scrollbar {
  height: 6px;
}

.teachers_slides::-webkit-scrollbar-track {
  background: transparent;
}

.teachers_slides::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.3s ease;
}

.teachers_slides:hover::-webkit-scrollbar-thumb,
.teachers_slides:active::-webkit-scrollbar-thumb,
.teachers_slides.scrolling::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.teachers_slides::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.teachers_slides:active {
  cursor: grabbing;
}

.teacher_card {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 0;
  margin-right: 0;
}

.teacher_photo {
  width: 200px;
  height: 209.5px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.teacher_info {
  text-align: center;
}

.teacher_name {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.17;
  color: var(--color-black);
  margin-bottom: 4px;
}

.teacher_position {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.17;
  color: var(--color-black);
}

/* Отзывы учителей */
.block14_reviews_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.block14_reviews_title {
  font-family: Lora, serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.19;
  color: var(--color-black);
  margin: 0;
}

/* Навигация отзывов */
.reviews_navigation {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews_arrow {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #5C5D5D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.reviews_arrow:hover {
  background: var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.reviews_arrow:active {
  transform: scale(0.95);
}

.reviews_arrow svg {
  width: 24px;
  height: 24px;
}

/* Слайдер отзывов */
.reviews_slider_wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  left: 0;
  transform: translateX(0);
}

.block14_container {
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  left: 0;
  transform: translateX(0);
}

.block14 {
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  left: 0;
  transform: translateX(0);
}

.teachers_reviews {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  padding: 20px 0 10px 0;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  transition: scrollbar-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  position: relative;
  left: 0 !important;
}

/* На десктопе сбрасываем трансформацию */
@media (min-width: 769px) {
  .teachers_reviews {
    transform: translateX(0) !important;
    left: 0 !important;
  }
}

.teachers_reviews:hover,
.teachers_reviews:active,
.teachers_reviews.scrolling {
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.teachers_reviews::-webkit-scrollbar {
  height: 6px;
}

.teachers_reviews::-webkit-scrollbar-track {
  background: transparent;
}

.teachers_reviews::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.3s ease;
}

.teachers_reviews:hover::-webkit-scrollbar-thumb,
.teachers_reviews:active::-webkit-scrollbar-thumb,
.teachers_reviews.scrolling::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.teachers_reviews::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.teachers_reviews:active {
  cursor: grabbing;
}

.review_card {
  background: #FEFEFE;
  border: 1px solid #CCCCCC;
  border-radius: 12px;
  padding: 29px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex-shrink: 0;
  width: 368px;
  min-height: auto;
  max-height: 305px;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  margin-left: 0;
  margin-right: 0;
}

/* Верхняя часть: аватар + имя/должность */
.review_top {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

.review_avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review_header {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.review_name {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  /* line-height: 1.17; */
  color: var(--color-black);
}

.review_position {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-black);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-height: 0;
  word-break: break-word;
}

.review_text {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.29;
  color: var(--color-black);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  position: relative;
  transition: -webkit-line-clamp 0.3s ease;
}

/* Плавное скрытие текста с градиентом */
.review_card:not(.expanded) .review_text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(254, 254, 254, 0), rgba(254, 254, 254, 1));
  pointer-events: none;
}

.review_expand {
  background: transparent;
  border: none;
  color: var(--color-black);
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.71;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-top: auto;
  transition: color 0.2s ease;
  align-self: flex-start;
}

.review_expand:hover {
  color: #D2232A;
}

.review_card.expanded .review_text {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

.review_card.expanded .review_text::after {
  display: none;
}

.review_card.expanded {
  max-height: none;
  overflow: visible;
}

/* Адаптивность для block14 */
@media (max-width: 1023px) {
  .block14_header {
    flex-wrap: wrap;
  }

  .block14_btn {
    width: 100%;
    min-width: 0;
  }

  .block14_reviews_header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .review_card {
    width: 320px;
  }
}

/* На 769px-1023px делаем block14_subtitle справа от block14_campus_selector_btn, block14_btn под ними */
@media (min-width: 769px) and (max-width: 1023px) {
  .block14_bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
  }
  
  .block14_bottom .block14_campus_selector_wrapper {
    flex-shrink: 0;
  }
  
  .block14_subtitle {
    flex: 1;
    margin: 0;
    min-width: 0;
  }
  
  .block14_btn {
    width: 100%;
    flex-basis: 100%;
  }
}

@media (max-width: 768px) {
  .block14 {
    margin-top: 20px !important;
    overflow: visible !important;
  }
  
  .teachers_navigation {
    display: none !important;
  }
  
  .block14_header .teachers_navigation {
    display: none !important;
  }
  
  .block14_container .teachers_navigation {
    display: none !important;
  }
  
  .reviews_navigation {
    display: none !important;
  }
  
  .block14_reviews_header .reviews_navigation {
    display: none !important;
  }
  
  .block14_title {
    text-align: center !important;
    margin-bottom: 20px !important;
  }
  
  /* Карусель для teachers_slides при 768px */
  .block14_container {
    overflow: visible !important;
  }
  
  .teachers_slider_wrapper {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
    padding: 25px 0 !important;
    box-sizing: border-box !important;
  }
  
  .teachers_slides {
    display: flex;
    gap: 30px;
    width: fit-content;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    user-select: none;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-behavior: auto !important;
    padding: 0 !important;
  }
  
  .teachers_slides.dragging {
    cursor: grabbing;
    transition: none;
  }
  
  .teachers_slides .teacher_card {
    flex-shrink: 0;
    width: 200px;
  }
  
  /* Карусель для reviews_slider_wrapper при 768px */
  .reviews_slider_wrapper {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
    padding: 25px 0 !important;
    box-sizing: border-box !important;
  }
  
  .teachers_reviews {
    display: flex;
    gap: 13px;
    width: fit-content;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    user-select: none;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-behavior: auto !important;
    padding: 0 !important;
  }
  
  .teachers_reviews.dragging {
    cursor: grabbing;
    transition: none;
  }
  
  .teachers_reviews .review_card {
    flex-shrink: 0;
    width: 280px;
    padding: 20px;
  }
  
  .block14_reviews_header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .block14_reviews_title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .block14_bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 25px !important;
    margin-bottom: 32px !important;
    gap: 14px !important;
  }
  
  .block14_btn {
    font-size: 14px !important;
    width: auto !important;
    min-width: auto !important;
    padding: 10px 16px !important;
  }
  
  .block14_campus_arrow {
    font-size: 14px !important;
  }
}
