/* ===== HeizPuls: Team ===== */

.hp-team {
  --team-navy: #101831;
  --team-red: #ed1c24;
  --team-text: #566079;
  --team-light: #f2f4f7;
  --team-border: #dfe3eb;

  padding: 64px 0;
  color: var(--team-navy);
  font-family: inherit;
}

.hp-team,
.hp-team * {
  box-sizing: border-box;
}

.hp-team__wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Заголовок */

.d14 .hp-team .hp-team__head {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto 40px;
  text-align: center;
}

.d14 .hp-team .hp-team__head .eb {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
}

.d14 .hp-team .hp-team__head h2.d1 {
  width: 100%;
  max-width: 1000px;
  margin: 18px auto 0;
  text-align: center;
}

.hp-team .hp-team__intro {
  max-width: 780px;
  margin: 22px auto 0;
  color: var(--team-text);
  font-size: 18px;
  line-height: 1.7;
}

/* Карточки */

.hp-team__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.hp-team .hp-team__card {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--team-border);
}

/* Фотографии */

.hp-team__photo {
  position: relative;
  aspect-ratio: 4 / 4.5;
  overflow: hidden;
  isolation: isolate;
  background: var(--team-light);

  clip-path: polygon(
    0 0,
    calc(100% - 26px) 0,
    100% 26px,
    100% 100%,
    0 100%
  );
}

.hp-team__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(145deg, #f2f4f7 0%, #e3e7ef 100%);
  color: #a3acbf;
}

.hp-team__placeholder svg {
  display: block;
  width: 94px;
  height: 94px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.hp-team__placeholder span {
  color: var(--team-navy);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
}

.hp-team__placeholder small {
  margin-top: -15px;
  color: var(--team-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hp-team .hp-team__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center 25%;
  border: 0;
  border-radius: 0;
}

/* Не показываем неработающие ссылки-заглушки */

.hp-team__photo img[src^="PHOTO_URL_"] {
  display: none;
}

.hp-team__photo::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--team-red);
}

.hp-team__badge {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 19px;
  max-width: calc(100% - 36px);
  padding: 9px 12px;
  background: var(--team-navy);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.hp-team__badge--partner {
  background: #fff;
  color: var(--team-navy);
  border-left: 3px solid var(--team-red);
}

/* Текст */

.hp-team__body {
  padding: 26px;
}

.hp-team .hp-team__category {
  display: block;
  margin: 0 0 12px;
  color: var(--team-red);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.d14 .hp-team h3.hp-team__name {
  margin: 0 0 10px;
  color: var(--team-navy);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

.hp-team .hp-team__role {
  margin: 0;
  color: var(--team-navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.hp-team .hp-team__specialty {
  margin: 10px 0 0;
  color: var(--team-text);
  font-size: 14px;
  line-height: 1.6;
}

.hp-team .hp-team__description {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--team-border);
  color: var(--team-text);
  font-size: 16px;
  line-height: 1.75;
}

/* Раскрывающийся список направлений */

.hp-team__details {
  margin-top: 18px;
  border-top: 1px solid var(--team-border);
}

.hp-team__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 0;
  color: var(--team-navy);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.hp-team__details summary::-webkit-details-marker {
  display: none;
}

.hp-team__details summary::after {
  content: "+";
  flex: 0 0 24px;
  color: var(--team-red);
  font-size: 24px;
  font-weight: 400;
  text-align: center;
}

.hp-team__details[open] summary::after {
  content: "−";
}

.hp-team__details summary:focus-visible {
  outline: 2px solid var(--team-red);
  outline-offset: 5px;
}

.hp-team .hp-team__details ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.hp-team .hp-team__details li {
  position: relative;
  margin: 0;
  padding: 0 0 0 17px;
  color: var(--team-text);
  font-size: 14px;
  line-height: 1.65;
}

.hp-team__details li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--team-red);
}

/* Завершающая полоса */

.hp-team__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
  padding: 28px 32px;
  border-left: 3px solid var(--team-red);
  background: var(--team-light);
}

.hp-team .hp-team__footer p {
  margin: 0;
  color: var(--team-navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.hp-team .hp-team__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  color: var(--team-red);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.hp-team__link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.hp-team .hp-team__link:hover {
  color: var(--team-navy);
}

.hp-team__link:focus-visible {
  outline: 2px solid var(--team-red);
  outline-offset: 6px;
}

/* Планшет */

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

/* Телефон */

@media (max-width: 600px) {
  .hp-team {
    padding: 44px 0;
  }

  .hp-team__wrap {
    padding: 0 20px;
  }

  .d14 .hp-team .hp-team__head {
    margin-bottom: 28px;
    text-align: left;
  }

  .d14 .hp-team .hp-team__head .eb {
    justify-content: flex-start;
  }

  .d14 .hp-team .hp-team__head h2.d1 {
    text-align: left;
  }

  .hp-team .hp-team__intro {
    margin-top: 18px;
    font-size: 16px;
  }

  .hp-team__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hp-team__photo {
    aspect-ratio: 4 / 4.2;
  }

  .hp-team__body {
    padding: 24px;
  }

  .hp-team__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
  }
}
