.specialists {
  --sp-bg: #ffffff;
  --sp-text: #101820;
  --sp-text-muted: #a2a5ab;
  --sp-divider: rgba(16, 24, 32, 0.1);

  position: relative;
  font-family: "Montserrat", var(--font-main);
  background: var(--sp-bg);
  color: var(--sp-text);
}
.specialists * {
  box-sizing: border-box;
}
.specialists a {
  color: inherit;
  text-decoration: none;
}
.specialists a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.specialists__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 76px var(--container-pad) 0;
}

.specialists--compact .specialists__container {
  padding-top: 44px;
}
.specialists--compact .specialists__media {
  top: 44px;
}

.specialists__head {
  width: var(--container-max);
    margin: 0 auto;
    padding-top: 55px;
}
.specialists__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-weight: 400;
    text-transform: uppercase;
    line-height: 100%;
    letter-spacing: -4%;
    font-size: 85px;
    color: var(--sp-text);
}
.specialists__title-line--second {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.specialists__brand {
  font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.34em;
    color: #0000001A;
    white-space: nowrap;
}

/* ===== Тело секции: список + фото ===== */
.specialists__body {
  position: relative;
  display: block;
  padding-top: 40px;
  padding-bottom: 0;
  min-height: 670px;
  width: var(--container-max);
    margin: 0 auto;
}

/* ===== Список сотрудников ===== */
.specialists__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0;
  padding-right: 600px;
}
.specialists__list li {
  border-bottom: 1px solid var(--sp-divider);
}

.specialists__list li:last-child{
  border-bottom: none;
}

.specialist-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 24px 0;
  cursor: pointer;
}
.specialist-row__role {
  flex: 0 0 120px;
  font-size: 17px;
  line-height: 1.4;
  color: #00000066;
  width: 120px;
  font-family: "Montserrat", var(--font-main);
}
.specialist-row__name {
  flex: 1 1 auto;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -4%;
  text-transform: uppercase;
  color: rgba(16, 24, 32, 0.32);
  transition: color var(--transition-base);
}
.specialist-row.is-active .specialist-row__name,
.specialist-row:hover .specialist-row__name,
.specialist-row:focus-visible .specialist-row__name {
  color: var(--sp-text);
}

/* ===== Фото-панель ===== */

.specialists__media {
    position: absolute;
    top: 159px;
    right: var(--container-pad);
    width: 562px;
    height: 667px;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
}

@media (min-width: 641px) {
    .specialists:has(.specialist-row:hover) .specialists__media,
    .specialists:has(.specialist-row:focus-visible) .specialists__media {
        opacity: 1;
        visibility: visible;
    }
}


.specialists__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 0;
}
.specialists__photo.is-active {
    opacity: 1;
    z-index: 1;
}


.specialists__media.is-revealing::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    z-index: 10;

    background: #eef2f4;

    pointer-events: none;

    animation: specialistsCurtainDown 0.8s
        cubic-bezier(.77, 0, .175, 1)
        forwards;
}



@keyframes specialistsCurtainDown {

    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

/* ===================== Планшет ===================== */
@media (max-width: 768px) {
  .specialists__container {
    padding: 56px var(--container-pad) 0;
  }
  .specialists__body {
    display: block;
    padding-top: 24px;
    min-height: auto;
  }
  .specialist-row__role {
    flex-basis: 130px;
  }
  .specialist-row__name {
    font-size: 18px;
  }

  .specialists__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    min-height: 0;
    z-index: 2;
    margin-top: 24px;
  }

  .specialists__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .specialists__photo.is-active {
    opacity: 1;
    z-index: 1;
  }

  .specialists__title{
    font-size: 40px;
    line-height: 1.4;
  }

  .specialists__list{
    width: 100%;
    padding-right: 0;
  }
}

/* ===================== Мобильные: фото поверх списка, как в макете ===================== */
@media (max-width: 640px) {
.specialists__head {
    width: var(--container-max);
    margin: 0 auto;
    padding-top: 20px;
    padding-left: 20px;
}

  .speciast-row,.specialist-row__role.is-active{
    color: black;
  }

  .specialists__container {
    padding: 44px 20px 0;
  }
  .specialists__title-line--second {
    gap: 10px;
    margin-left: 0.5em;
    display: contents;
  }
  .specialists__brand {
   position: absolute;
        top: 35px;
        left: 170px;
  }

  .specialists__brand svg{
    width: 96px;
  }

  .specialists__body {
    position: relative;
    padding: 20px;
  }
   .specialist-row {
     display: grid;
    grid-template-columns: 95px 1fr;
    gap: 40px;
    width: 100%;
    padding: 13px 0px;
    align-items: center;
    height: 75px;  
  }
   .specialist-row__role {
    width: 95px;
    flex: none;
    font-size: 16px;
    line-height: 1.3;
    color: #9c9c9c;
  }
  .specialist-row__name {
    font-size: 20px;
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.2);
    max-width: 250px;
    word-break: normal;
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .specialists__list {
    width: 100%;
    border-top: none;
  }

  .specialists__media {
    position: absolute;
    top: 0;
    right: 20px;
    width: 185px;
    height: 220px;
    z-index: 10;

    opacity: 0;
    visibility: hidden;

    will-change: transform, opacity;
    pointer-events: none;
    overflow: hidden;
    background: #eef2f4;

    transition:
        opacity 0.35s ease,
        transform 0.5s ease;
}

.specialists__media.is-visible {
    opacity: 1;
    visibility: visible;
}

  .specialists__media.is-above-row {
    box-shadow: 12px -12px 0 var(--sp-bg);
  }

  .specialists__list li {
    position: relative;
    border-bottom: none;
}

.specialists__list li::after {
    content: "";
    position: absolute;
    left: 0;
    right: -150px;
    bottom: 0;
    height: 1px;
    background: var(--sp-divider);
}
.specialists__list li:last-child::after{
  content: none;
}

@media (max-width: 640px) {

   .specialists__photo {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;

    transform: none;

    z-index: 0;
}
    .specialists__photo.is-active {
        opacity: 1;
        z-index: 1;
        clip-path: inset(0 0 0 0);

        transform: none;
    }
}

}
.specialists__media.is-revealing::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    z-index: 10;

    background: #eef2f4;

    pointer-events: none;

    animation:
        specialistsCurtainDown 0.8s
        cubic-bezier(.77, 0, .175, 1)
        forwards;
}

@keyframes specialistsCurtainDown {

    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

