/* ==========================================================================
   home.css — адаптивная вёрстка главной страницы partner.mti-university.ru
   Фирменный стиль mti.moscow: жёлтый #f9db00 + тёмно-серый #2b2b2b, Montserrat.
   ========================================================================== */

:root {
  --yellow: #f9db00;       /* --main-yellow mti.moscow */
  --yellow-d: #ffc701;     /* --yellow (hover) */
  --black: #2b2b2b;        /* --grey */
  --ink: #2b2b2b;
  --muted: #7e7e7e;        /* --grey4 */
  --bg: #ffffff;
  --bg-soft: #f2f2f2;      /* --lightest-grey */
  /* mti.moscow (страница vyisshee-obrazovanie): острые углы, радиусов нет */
  --radius: 0;
  --radius-sm: 0;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html.home-html, body.home { overflow-x: hidden; max-width: 100%; }
/* нейтрализуем возможное скрытие контента анимацией Tilda */
.home .t-records { opacity: 1 !important; }

body.home {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.home img { max-width: 100%; display: block; }
.home a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- секции ---------- */
.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.section__title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}
.section__title--center { text-align: center; }

/* ---------- кнопки ---------- */
/* Кнопка в стиле .button mti.moscow: вес 800, padding 15/35, острые углы */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 35px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
  text-align: center;
}
/* Селекторы a.btn нужны, чтобы перебить .home a { color: inherit }
   (та же специфичность, но тип элемента поднимает вес правила). */
.btn--yellow, a.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover, a.btn--yellow:hover { background: var(--yellow-d); }
.btn--dark, a.btn--dark { background: var(--black); color: #fff; }
.btn--dark:hover, a.btn--dark:hover { background: var(--ink); }
.btn--block { width: 100%; }

/* ==========================================================================
   ШАПКА
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
  padding-top: 0;
  padding-bottom: 0;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo img { width: auto; }
.site-header__logo .site-header__logo-full { height: 34px; display: block; }
.site-header__logo .site-header__logo-mark { display: none; }
.site-header__nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.site-header__nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  padding-bottom: 3px;
  transition: color .3s ease;
}
.site-header__nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.site-header__nav a:hover::after { transform: scaleX(1); }
.site-header__phone {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.site-header__phone:hover { color: #ffc701; }
@media (max-width: 980px) { .site-header__logo .site-header__logo-full { height: 30px; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: 28px 0 0; }
.hero__card {
  position: relative;
  background: var(--yellow);
  border-radius: var(--radius);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  min-height: 420px;
}
.hero__eyebrow { font-size: 18px; font-weight: 500; margin: 0 0 14px; }
.hero__title {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.hero__lead { font-size: 19px; line-height: 1.45; margin: 0 0 30px; max-width: 28ch; }
.hero__content { position: relative; z-index: 2; }
/* Фото занимает правую часть карточки и упирается в верхний, правый и нижний края */
.hero__media {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 52%;
  z-index: 1;
}
.hero__media img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  aspect-ratio: auto;
  display: block;
}
/* Жёлтый градиент перетекает поверх левого края фото, сливаясь с фоном */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--yellow) 0%,
    rgba(249, 219, 0, 0.55) 28%,
    rgba(249, 219, 0, 0) 60%);
  pointer-events: none;
}

/* ==========================================================================
   СТАТИСТИКА
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats__item { text-align: center; padding: 8px; }
.stats__num { font-size: clamp(30px, 4vw, 46px); font-weight: 800; color: var(--black); line-height: 1; }
.stats__label { font-size: 15px; color: var(--muted); margin-top: 10px; }

/* ==========================================================================
   УРОВНИ ОБРАЗОВАНИЯ
   ========================================================================== */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.level-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,.04);
}
.level-card__name { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.level-card__sub { font-size: 15px; color: var(--muted); margin: 0 0 20px; flex-grow: 0; min-height: 44px; }
.level-card__meta { margin-top: auto; padding-top: 18px; border-top: 1px solid #eee; }
.level-card__price { font-size: 18px; font-weight: 700; }
.level-card__term { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ==========================================================================
   НАПРАВЛЕНИЯ
   ========================================================================== */
.directions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.direction-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  min-height: 170px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.direction-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  border-color: var(--yellow);
}
.direction-card__name { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.direction-card__degree { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.direction-card__link {
  margin-top: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.direction-card__link::after { content: '→'; transition: transform .15s ease; }
.direction-card:hover .direction-card__link::after { transform: translateX(4px); }

/* ==========================================================================
   ФОРМА «ПОДОБРАТЬ НАПРАВЛЕНИЕ» (тёмная плашка)
   ========================================================================== */
.lead-bar {
  background: var(--black);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 36px;
}
.lead-bar__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: start; }
.lead-bar__field { display: flex; flex-direction: column; }
.lead-bar input[type="text"],
.lead-bar input[type="tel"] {
  width: 100%;
  padding: 18px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  background: #f0f0f0;
  color: #111;
}
.lead-bar input::placeholder { color: #8a8a8a; }
.lead-bar__consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #cfcfcf;
  line-height: 1.4;
}
.lead-bar__consent a { color: var(--yellow); text-decoration: underline; }
.lead-bar__consent input { margin-top: 2px; }
.lead-bar .btn { white-space: nowrap; padding: 18px 30px; }

/* ==========================================================================
   ЗАЯВКА — большая жёлтая кнопка
   ========================================================================== */
.cta-strip { text-align: center; padding: 12px 0 0; }

/* ==========================================================================
   ДОКУМЕНТЫ ДЛЯ ПОСТУПЛЕНИЯ
   ========================================================================== */
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.doc-card {
  border-radius: var(--radius);
  padding: 30px 32px;
  font-size: 15px;
  line-height: 1.55;
}
.doc-card--yellow { background: var(--yellow); }
.doc-card--soft { background: #fff; border: 1px solid #ececec; }
.doc-card b { font-weight: 700; }
.doc-card p { margin: 0 0 14px; }
.doc-card p:last-child { margin-bottom: 0; }

/* ==========================================================================
   КАК ПОСТУПИТЬ
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step__icon {
  width: 96px; height: 96px;
  flex: 0 0 96px;
  border-radius: 50%;
  border: 1.5px solid #1a1a1a;
  background: #fff;
  color: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
}
.step__icon svg { width: 46px; height: 46px; }
/* Пунктирный жёлтый соединитель между кругами */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  left: calc(50% + 56px);
  right: calc(-50% + 56px);
  border-top: 4px dotted var(--yellow);
}
.step__text { margin-top: 22px; font-size: 16px; font-weight: 500; max-width: 220px; }

/* ==========================================================================
   КОЛЛЕДЖ + ВУЗ
   ========================================================================== */
.collegevuz { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: stretch; }
.cv-path {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 32px;
}
.cv-stage { margin-bottom: 26px; }
.cv-stage:last-child { margin-bottom: 0; }
.cv-stage__head { font-size: 20px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px; font-weight: 600; }
.cv-stage__head b { font-weight: 800; }
.cv-stage ol { margin: 0; padding-left: 20px; }
.cv-stage li { margin-bottom: 6px; font-size: 15px; }
.cv-media { border-radius: var(--radius); overflow: hidden; }
.cv-media img { width: 100%; height: 100%; object-fit: cover; }
.cv-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.cv-box { border-radius: var(--radius); padding: 28px 30px; }
.cv-box--dark { background: var(--black); color: #fff; }
.cv-box--yellow { background: var(--yellow); }
.cv-box__title { font-size: 18px; font-weight: 800; margin: 0 0 16px; text-transform: uppercase; letter-spacing: .02em; }
.cv-box ul { margin: 0; padding-left: 20px; }
.cv-box li { margin-bottom: 8px; font-size: 15px; }

/* ==========================================================================
   ПРЕИМУЩЕСТВА ДИСТАНЦИОННОГО ОБРАЗОВАНИЯ
   ========================================================================== */
.benefits { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.benefits__list { list-style: none; margin: 0; padding: 0; }
.benefits__list li {
  position: relative;
  padding-left: 38px;
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.4;
}
.benefits__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 1px;
  width: 24px; height: 24px;
  border-radius: 0;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2 7.5l3.2 3.2L12 3.5' stroke='%231a1a1a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.benefits__media { display: flex; gap: 12px; justify-content: center; }
.benefits__media img { width: 31%; border-radius: 0; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.benefits__cta { margin-top: 28px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 860px; margin: 0 auto; }
.faq__item {
  border: 1px solid #e6e6e6;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
}
.faq__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 22px 56px 22px 26px;
  cursor: pointer;
  position: relative;
  color: var(--ink);
}
.faq__q::after {
  content: '+';
  position: absolute;
  right: 26px; top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s ease;
}
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq__a-inner { padding: 0 26px 24px; font-size: 15px; color: #3a3a3a; line-height: 1.6; }
.faq__a-inner a { color: #1F4E79; text-decoration: underline; }

/* ==========================================================================
   НИЖНЯЯ ЗАЯВКА (consult)
   ========================================================================== */
.consult { background: var(--yellow); border-radius: var(--radius); padding: 44px; text-align: center; }
.consult__title { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; margin: 0 0 8px; }
.consult__sub { font-size: 17px; margin: 0 0 28px; }
.consult__form { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.consult input[type="text"], .consult input[type="tel"] {
  padding: 18px 22px; border: 1px solid var(--yellow-d); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 16px; background: #fff;
}
.consult__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; text-align: left; }
.consult__consent a { text-decoration: underline; }

/* ==========================================================================
   ФУТЕР
   ========================================================================== */
.site-footer { background: var(--black); color: #d8d8d8; padding: 48px 0 32px; font-size: 14px; line-height: 1.6; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer__logos img { height: 40px; margin-bottom: 18px; filter: invert(1) brightness(2); }
.site-footer__col-title { color: #fff; font-weight: 700; margin: 0 0 12px; }
.site-footer__col a, .site-footer__col p { display: block; margin: 0 0 8px; color: #d8d8d8; }
.site-footer__phone b { color: #fff; font-size: 20px; }
.site-footer__bottom { border-top: 1px solid #333; padding-top: 22px; font-size: 12px; color: #9a9a9a; }

/* ==========================================================================
   АДАПТИВ
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__card { grid-template-columns: 1fr 1fr; padding: 36px; gap: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .directions { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 22px; }
  .step:not(:last-child)::after { display: none; }
}

@media (max-width: 860px) {
  .site-header__nav { display: none; }
  .levels { grid-template-columns: 1fr; }
  .directions { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .collegevuz { grid-template-columns: 1fr; }
  .cv-media { min-height: 240px; }
  .benefits { grid-template-columns: 1fr; }
  .benefits__media { max-width: 360px; margin: 0 auto; }
  .lead-bar__form { grid-template-columns: 1fr; }
  .lead-bar .btn { width: 100%; }
}

@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .container { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 16px 0 0; }
  .hero__card { grid-template-columns: 1fr; padding: 26px 22px; border-radius: var(--radius); min-height: 0; }
  .hero__title { font-size: 26px; overflow-wrap: anywhere; }
  .hero__lead { max-width: none; }
  .hero__content .btn { width: 100%; }
  /* На мобильном фото снова в потоке, сверху, без бокового градиента */
  .hero__media {
    position: static;
    width: 100%;
    order: -1;
  }
  .hero__media img { width: 100%; height: auto; max-width: 320px; margin: 0 auto; aspect-ratio: 367/363; }
  .hero__media::before { display: none; }

  /* Шапка: компактный логотип-марка + телефон */
  .site-header__logo .site-header__logo-full { display: none; }
  .site-header__logo .site-header__logo-mark { display: block; height: 26px; }
  .site-header__inner { height: 58px; gap: 12px; }
  .site-header__phone { font-size: 14px; }

  .directions { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .cv-extras { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .consult { padding: 30px 20px; }

  /* длинные слова в карточках/заголовках не должны распирать вёрстку */
  .section__title, .level-card__name, .direction-card__name,
  .doc-card, .benefits__list li, .faq__q { overflow-wrap: anywhere; }
}

/* ---------- отзывы студентов (видео-карусель) ---------- */
.reviews__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.reviews__header .section__title { margin: 0; }
.reviews__nav { display: flex; gap: 12px; flex-shrink: 0; }
.reviews__arrow {
  width: 56px;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, opacity .18s ease;
}
.reviews__arrow:hover { background: #e9e9e9; }
.reviews__arrow:disabled { opacity: .4; cursor: default; }

.reviews__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.reviews__track::-webkit-scrollbar { display: none; }

.reviews__slide {
  flex: 0 0 calc((100% - 72px) / 4);
  scroll-snap-align: start;
}
.reviews__card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.reviews__poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.reviews__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.reviews__card.is-playing .reviews__poster,
.reviews__card.is-playing .reviews__play { display: none; }
.reviews__card.is-playing .reviews__video { display: block; }

.reviews__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
  transition: transform .18s ease;
}
.reviews__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--black);
}
.reviews__play:hover { transform: translate(-50%, -50%) scale(1.08); }

@media (max-width: 980px) {
  .reviews__slide { flex-basis: calc((100% - 48px) / 3); }
}
@media (max-width: 760px) {
  .reviews__slide { flex-basis: calc((100% - 24px) / 2); }
  .reviews__header { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .reviews__track { gap: 16px; }
  .reviews__slide { flex-basis: 78%; }
  .reviews__play { width: 54px; height: 54px; }
}
