/* ============================================
   team.css — Команда проекта: сетка + страница члена команды
   Подключать ПОСЛЕ pages.css (использует его переменные и .contact-info-box)
   ============================================ */

/* ===== СЕТКА КАРТОЧЕК ([team_grid]) ===== */
.tm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}

.tm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none !important;
  color: inherit;
}

.tm-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #E9ECF0;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(9, 30, 62, .04);
  transition: box-shadow .35s cubic-bezier(.22, 1, .36, 1), transform .35s cubic-bezier(.22, 1, .36, 1);
}
.tm-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0 !important;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.tm-card__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 30, 62, 0) 55%, rgba(9, 30, 62, .55) 100%);
  opacity: 0;
  transition: opacity .35s ease;
}
/* Заглушка без фото — «человечек» */
.tm-noimg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #E4E8EE 0%, #C9D1DC 100%);
  color: rgba(255, 255, 255, .85) !important;
  overflow: hidden;
}
.tm-noimg svg {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: auto;
  transform: translateX(-50%);
  display: block;
}

.tm-card__more {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  background: var(--orange, #FF7800);
  color: #fff !important;
  font: 600 14px/1 'Montserrat', sans-serif !important;
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity .3s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.tm-card__more svg { width: 16px; height: 16px; }

.tm-card:hover .tm-card__photo {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(9, 30, 62, .14);
}
.tm-card:hover .tm-card__photo img { transform: scale(1.04); }
.tm-card:hover .tm-card__photo::after { opacity: 1; }
.tm-card:hover .tm-card__more { opacity: 1; transform: translate(-50%, 0); }

.tm-card__name {
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--text-black, #1A1A1A);
  transition: color .2s;
}
.tm-card:hover .tm-card__name { color: var(--orange, #FF7800); }

.tm-card__position {
  margin: 0 !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #5B6472 !important;
}


/* ===== СТРАНИЦА ЧЛЕНА КОМАНДЫ ===== */
.tm-page {
  padding-top: 56px !important;
  padding-bottom: 72px !important;
}

.tm-profile {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* --- Левая колонка --- */
.tm-aside {
  position: sticky;
  top: 110px;
  background: #F1F2F4;
  border-radius: 28px;
  padding: 18px 18px 22px;
  animation: contactFadeUp .55s ease both;
}

.tm-aside__photo {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: #E2E6EB;
  margin-bottom: 20px;
}
.tm-aside__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0 !important;
}

.tm-aside__name {
  padding: 0 4px;
  margin-bottom: 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-black, #1A1A1A);
}
.tm-aside__position {
  padding: 0 4px;
  margin-bottom: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #7C8592;
}

.tm-page .tm-aside__contact {
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  margin-bottom: 12px;
}
.tm-page .tm-aside__contact .contact-info-box__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.tm-page .tm-aside__contact .contact-info-box__icon svg { width: 22px; height: 22px; }
.tm-page .tm-aside__contact .contact-info-box__label { font-size: 12px !important; color: #626A77 !important; }
.tm-page .tm-aside__contact .contact-info-box__value {
  font-size: 15px !important;
  color: var(--orange, #FF7800) !important;
  line-height: 1.35 !important;
}

.tm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 14px;
  background: var(--orange, #FF7800);
  color: #fff !important;
  font: 600 15px/1 'Montserrat', sans-serif !important;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.tm-btn:hover {
  background: var(--orange-hover, #E56B00);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 120, 0, .25);
}

.tm-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 4px 0;
  font-size: 14px !important;
  font-weight: 600;
  color: #626A77 !important;
}
.tm-back svg { width: 18px; height: 18px; transition: transform .2s; }
.tm-back:hover { color: var(--orange, #FF7800) !important; }
.tm-back:hover svg { transform: translateX(-3px); }

/* --- Правая колонка --- */
.tm-main { min-width: 0; }

.tm-lead {
  position: relative;
  margin-bottom: 8px;
  padding: 26px 30px;
  border-radius: 22px;
  background: #FFF6EE;
  border-left: 4px solid var(--orange, #FF7800);
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 500;
  color: #2B2F36;
}

.tm-section {
  padding: 36px 0;
  border-bottom: 1px solid #E8ECF1;
}
.tm-section:last-child { border-bottom: 0; padding-bottom: 0; }

.page-content .tm-section__title,
.tm-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-black, #1A1A1A);
}
.tm-section__title::before {
  content: '';
  flex: 0 0 auto;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--orange, #FF7800);
}

/* Сводка: должность / специализация / кратко */
.tm-summary {
  background: #F4F5F7;
  border-radius: 24px;
  padding: 6px 28px;
  margin-bottom: 4px;
}
.tm-summary__row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #E3E7EC;
}
.tm-summary__row:last-child { border-bottom: 0; }
.tm-summary__label {
  padding-top: 3px;
  font: 800 12px/1.4 'Montserrat', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange, #FF7800);
}
.tm-summary__value {
  font: 400 15px/1.65 'Montserrat', sans-serif;
  color: #2B2F36;
}
.tm-summary__value--strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: #1A1A1A;
}
.page-content ul.tm-summary__list { margin: 0; }
.page-content ul.tm-summary__list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 15px;
  color: #2B2F36;
}
.page-content ul.tm-summary__list li:last-child { margin-bottom: 0; }
.page-content ul.tm-summary__list li::before { top: 9px; width: 7px; height: 7px; }

/* Специализация (старый вид, не используется) */
.tm-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.tm-spec {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #F4F5F7;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: #2B2F36;
  transition: background .25s, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.tm-spec:hover { background: #EEF0F3; transform: translateY(-2px); }
.tm-spec span { font-size: inherit !important; color: inherit !important; line-height: inherit !important; }
.tm-spec__icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #F7E9DB;
  color: var(--orange, #FF7800) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-spec__icon svg { width: 18px; height: 18px; }

/* Темы для обращения — плашки */
.tm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.page-content .tm-chip,
.tm-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 30px;
  background: #fff;
  border: 1.5px solid #F2D9C2;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: #3A3F47;
  transition: border-color .2s, background .2s, color .2s;
}
.tm-chip:hover {
  background: #FFF6EE;
  border-color: var(--orange, #FF7800);
  color: var(--orange, #FF7800);
}

/* Проекты — список (перебиваем глобальные стили ul из pages.css) */
.page-content ul.tm-list { margin: 0; }
.page-content ul.tm-list li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #2B2F36;
}
.page-content ul.tm-list li:last-child { margin-bottom: 0; }
.page-content ul.tm-list li::before {
  top: 8px;
  left: 0;
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 4px #F7E9DB;
}

/* Публикации */
.page-content ol.tm-pubs {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pub;
}
.page-content ol.tm-pubs li {
  counter-increment: pub;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 16px 46px;
  margin: 0;
  border-bottom: 1px dashed #E1E5EA;
  font-size: 15px;
  line-height: 1.55;
  color: #2B2F36;
}
.page-content ol.tm-pubs li:first-child { padding-top: 0; }
.page-content ol.tm-pubs li:first-child::before { top: -2px; }
.page-content ol.tm-pubs li:last-child { border-bottom: 0; }
.page-content ol.tm-pubs li::before {
  content: counter(pub, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font: 800 15px/1.6 'Montserrat', sans-serif;
  color: var(--orange, #FF7800);
}
.tm-pubs__text { color: inherit !important; }
.page-content .tm-pubs__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #F7E9DB;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.page-content .tm-pubs__link:hover { background: var(--orange, #FF7800); color: #fff; }
.tm-pubs__link svg { width: 14px; height: 14px; }

/* Патенты */
.tm-patents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.tm-patent {
  padding: 20px 22px;
  border-radius: 18px;
  background: #F4F5F7;
  border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.tm-patent:hover { background: #fff; border-color: #F2D9C2; }
.tm-patent__num {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--dark-bg, #091E3E);
  color: #fff !important;
  font: 700 13px/1.4 'Montserrat', sans-serif !important;
  letter-spacing: .02em;
}
.tm-patent__title {
  font: 600 15px/1.5 'Montserrat', sans-serif;
  color: #1A1A1A;
}
.tm-patent__owner {
  margin-top: 8px;
  font: 400 13px/1.5 'Montserrat', sans-serif;
  color: #7C8592;
}

/* О себе */
.tm-extra p:last-child { margin-bottom: 0; }

/* Другие члены команды */
.tm-others {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid #E8ECF1;
}
.tm-others__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.tm-others__head .tm-section__title { margin: 0; }
.page-content .tm-others__all { font-weight: 600; font-size: 15px; white-space: nowrap; }


/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-profile { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 1024px) {
  .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }

  .tm-profile { grid-template-columns: 1fr; gap: 32px; }
  .tm-aside {
    position: static;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0 24px;
    align-items: start;
  }
  .tm-aside__photo { grid-row: 1 / span 6; margin-bottom: 0; }
  .tm-aside__name { padding-top: 6px; }
}

@media (max-width: 640px) {
  .tm-page { padding-top: 28px !important; padding-bottom: 48px !important; }

  .tm-grid { gap: 28px 14px; }
  .tm-card__photo { border-radius: 12px; margin-bottom: 12px; }
  .tm-card__name { font-size: 14px; }
  .tm-card__position { font-size: 12px !important; }
  .tm-card__more { display: none; }

  .tm-aside { display: block; padding: 14px 14px 18px; border-radius: 22px; }
  .tm-aside__photo { margin-bottom: 16px; aspect-ratio: 4 / 3.4; }
  .tm-aside__name { font-size: 18px; }

  .tm-lead { padding: 20px; font-size: 15px; border-radius: 18px; }
  .tm-summary { padding: 4px 18px; border-radius: 18px; }
  .tm-summary__row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .tm-summary__value--strong { font-size: 16px; }
  .tm-section { padding: 28px 0; }
  .page-content .tm-section__title,
  .tm-section__title { font-size: 17px; margin-bottom: 18px; }

  .tm-spec { padding: 14px 16px; font-size: 14px; }
  .tm-chip { font-size: 13px; padding: 8px 14px; }

  .page-content ol.tm-pubs li { flex-direction: column; gap: 10px; padding-left: 38px; }

  .tm-others { margin-top: 48px; padding-top: 36px; }
  .tm-others__head { flex-direction: column; align-items: flex-start; gap: 10px; }
}
