/* Стили каталога высшего образования МТИ (partner.mti-university.ru).
   Фирменный стиль МТИ (mti.moscow): жёлтый #f9db00 + тёмно-серый #2b2b2b
   на белом фоне, Montserrat. Карточки программ — фото серое → цветное при hover. */

:root {
  /* Фирменные токены mti.moscow */
  --brand-yellow:   #f9db00;   /* --main-yellow — основной акцент */
  --brand-yellow-d: #ffc701;   /* --yellow — hover акцента */
  --yellow-hover:   #ffeb56;
  --ink:            #2b2b2b;   /* --grey — основной текст / заголовки */
  --ink-2:          #2e2e2e;   /* --dark-grey — тёмные подложки */
  --muted:          #7e7e7e;   /* --grey4 */
  --line:           #e2e2e2;   /* --lightest-grey2 */
  --bg:             #ffffff;   /* --white — основной фон */
  --bg-soft:        #f2f2f2;   /* --lightest-grey — мягкая подложка */
  --card:           #ffffff;
  /* mti.moscow (страница vyisshee-obrazovanie): острые углы, радиусов нет */
  --radius:         0;
  --radius-sm:      0;
  --shadow:         0 2px 10px rgba(0, 0, 0, .05);
  --shadow-hover:   0 6px 20px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }

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

a { color: var(--ink); }

img { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 50px; }
@media (max-width: 768px) { .wrap { padding: 0 15px; } }

/* --------------------------- Шапка --------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
}
.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; }
@media (max-width: 980px) { .site-header__logo .site-header__logo-full { height: 30px; } }
@media (max-width: 620px) {
  .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; }
}
.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(--brand-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: var(--brand-yellow-d); }
@media (max-width: 980px) {
  .site-header__nav { display: none; }
}

/* --------------------------- Крошки --------------------------- */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs span { color: var(--ink); }

/* --------------------------- Hero-баннер направления --------------------------- */
.dir-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0 4px;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  background: var(--ink-2);
}
.dir-hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .9;
}
.dir-hero__overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 34px 40px;
  background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,0) 100%);
}
.dir-hero__overlay h1 {
  color: #fff;
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 800;
}
.dir-hero__overlay .blurb { color: #f2f2f2; max-width: 760px; margin: 0; font-size: 15px; }
@media (max-width: 768px) {
  .dir-hero { min-height: 200px; }
  .dir-hero__overlay { padding: 22px 18px; }
  .dir-hero__overlay h1 { font-size: 28px; }
}

/* --------------------------- Заголовок страницы --------------------------- */
.page-head { padding: 22px 0 8px; }
.page-head h1 {
  font-size: 44px;
  line-height: 1.1;
  margin: 6px 0 14px;
  color: var(--ink);
  font-weight: 800;
}
.page-head .blurb { max-width: 820px; color: var(--ink); margin: 0; }
@media (max-width: 620px) { .page-head h1 { font-size: 28px; } }

/* Чипы под заголовком программы */
.summary-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.summary-chips .chip {
  background: var(--bg-soft);
  color: var(--ink);
  border-radius: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* --------------------------- Фильтр-бар --------------------------- */
.filterbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group > label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chips button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s ease;
}
.filter-chips button:hover { border-color: var(--ink); }
.filter-chips button.is-active {
  background: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: var(--ink);
}
.filter-search { flex: 1 1 240px; min-width: 200px; }
.filter-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
}
.filter-search input:focus { outline: none; border-color: var(--ink); }
.filter-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.filter-reset {
  background: none;
  border: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------- Сетка карточек --------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin: 0 0 40px;
}
/* Карточка программы — в стиле .card-course mti.moscow:
   слева текст, справа фото (серое → цветное при наведении). */
.card-item {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 22px 24px;
  text-decoration: none;
  color: inherit;
  gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
a.card-item:hover {
  transform: translateY(-4px);
  border-color: var(--brand-yellow);
  box-shadow: var(--shadow-hover);
}
.card-item__content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.card-item__badge {
  align-self: flex-start;
  margin-bottom: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg-soft); color: var(--ink); border-radius: 0; padding: 4px 10px;
}
.card-item__title { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: var(--ink); line-height: 1.25; }
.card-item__meta { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.card-item__price { margin-top: auto; padding-top: 14px; font-weight: 800; color: var(--ink); font-size: 17px; }
.card-item__cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
a.card-item:hover .card-item__cta { color: var(--brand-yellow-d); }

/* Фото программы: два слоя — серый (default) и цветной (показывается при hover) */
.card-item__img-wrap {
  position: relative;
  flex: 0 0 88px;
  width: 88px; height: 88px;
  align-self: center;
}
.card-item__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
}
.card-item__img--color { opacity: 0; }
a.card-item:hover .card-item__img--default { opacity: 0; }
a.card-item:hover .card-item__img--color { opacity: 1; }
@media (max-width: 360px) {
  .card-item { flex-direction: column; }
  .card-item__img-wrap { align-self: flex-start; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 50px 20px;
}

/* --------------------------- Секции программы --------------------------- */
.section { margin: 0 0 14px; }
.section-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px;
  margin: 0 0 18px;
}
.section-card h2 { font-size: 24px; color: var(--ink); margin: 0 0 18px; font-weight: 800; }
.section-card h2 .num {
  display: inline-block;
  color: var(--ink);
  background: var(--brand-yellow);
  border-radius: 0;
  padding: 2px 10px;
  margin-right: 12px;
  font-size: 18px;
}
.section-card ul { padding-left: 22px; margin: 0; }
.section-card li { margin-bottom: 8px; }

.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.role {
  background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 18px;
  border-left: 3px solid var(--brand-yellow);
}
.role b { display: block; color: var(--ink); margin-bottom: 5px; }
.role span { font-size: 13px; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 14px 46px;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  background: var(--brand-yellow); color: var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

.price-table { display: grid; gap: 10px; }
.price-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  padding: 14px 18px; background: var(--bg-soft); border-radius: var(--radius-sm);
}
.price-row b { color: var(--ink); min-width: 90px; }
.price-row .price { font-weight: 800; font-size: 17px; }
.price-row .note { font-size: 12px; color: var(--muted); }

/* Видео-блок: постер + плашка play в фирменном стиле */
.video-placeholder {
  position: relative;
  background: var(--ink-2) center/cover no-repeat;
  color: #fff; border-radius: var(--radius-sm); padding: 64px 40px;
  text-align: center; font-weight: 600; overflow: hidden;
}
.video-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
}
.video-placeholder > * { position: relative; z-index: 1; }
.video-placeholder .play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin-bottom: 14px;
  background: var(--brand-yellow); color: var(--ink);
  border-radius: 50%; font-size: 24px;
}

/* --------------------------- Официальные документы (дипломы) --------------------------- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.docs-grid a {
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; background: #fff;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.docs-grid a:hover {
  border-color: var(--brand-yellow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.docs-grid img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 0; background: var(--bg-soft);
}
.docs-grid span { font-size: 13px; font-weight: 600; text-align: center; }

@media (max-width: 620px) { .section-card { padding: 22px 18px; } .section-card h2 { font-size: 20px; } }

/* --------------------------- Лид-форма --------------------------- */
.lead {
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: 36px 40px;
  color: #fff;
  margin: 28px 0;
}
.lead h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.lead p { margin: 0 0 20px; opacity: .85; }
.lead form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.lead input[type="text"], .lead input[type="tel"], .lead input[type="email"] {
  flex: 1 1 200px; min-width: 160px;
  border: none; border-radius: var(--radius-sm); padding: 14px 16px; font: inherit; font-size: 15px;
}
/* Кнопка в стиле .button mti.moscow: жёлтая, вес 800, padding 15/35, острые углы */
.lead button {
  background: var(--brand-yellow); color: var(--ink); border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 15px 35px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: all .3s ease;
}
.lead button:hover { background: var(--brand-yellow-d); }
.lead .consent { flex: 1 1 100%; font-size: 12px; opacity: .85; display: flex; gap: 8px; align-items: flex-start; }
.lead .consent a { color: #fff; text-decoration: underline; }
.lead .form-msg { flex: 1 1 100%; font-size: 14px; margin-top: 4px; }
.lead .form-msg.error { color: #ffd9c7; }
.lead .form-msg.success { color: #d6ffd9; }
@media (max-width: 620px) { .lead { padding: 26px 20px; } .lead h2 { font-size: 21px; } }

/* --------------------------- Отзывы --------------------------- */
.reviews { margin: 36px 0; }
.reviews h2 { font-size: 26px; color: var(--ink); margin: 0 0 20px; font-weight: 800; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.review {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; display: flex; flex-direction: column;
}
.review__stars { color: var(--brand-yellow-d); letter-spacing: 2px; margin-bottom: 10px; font-size: 16px; }
.review__text { margin: 0 0 14px; font-size: 14px; }
.review__author { margin-top: auto; font-weight: 700; color: var(--ink); }
.review__program { font-size: 12px; color: var(--muted); }

/* --------------------------- Подвал --------------------------- */
.site-footer {
  background: var(--ink-2); color: #c8c8c8;
  font-size: 13px; line-height: 1.7;
  padding: 40px 0; margin-top: 30px;
}
.site-footer a { color: #fff; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.site-footer__links a { text-decoration: none; font-weight: 600; transition: color .3s ease; }
.site-footer__links a:hover { color: var(--brand-yellow); }
.site-footer__legal { opacity: .8; }

/* ==========================================================================
   FAQ (ответы на вопросы абитуриентов) — каталог и страницы программ
   ========================================================================== */
#site-faq { padding: 56px 0; background: var(--bg-soft); }
.faq-section__title {
  color: #1F4E79;
  text-align: center;
  font-size: 30px;
  margin: 0 0 28px;
}
.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; }
@media (max-width: 640px) {
  .faq__q { overflow-wrap: anywhere; }
}
