body {
  & main .page__container {
    @media screen and (min-width: 1400px) {
      padding: 0 40px !important;
    }
    @media screen and (min-width: 1441px) {
      padding: 0 60px !important;
    }
    @media screen and (min-width: 1800px) {
      padding: 0 !important;
    }
  }

  & .tabs-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    transition: all 0.2s ease;

    @media screen and (max-width: 1024px) {
      width: 60px;
      height: 60px;
    }

    & svg {
      width: 32px;
      height: 32px;
      margin-left: 2px;
      fill: #ffffff;
      transition: all 0.2s ease;
      scale: 1;

      @media screen and (max-width: 1024px) {
        width: 24px;
        height: 24px;
      }
    }
  }
}

.patient-histories {
  margin: 140px 0 130px;
  font-family: "Mulish", serif;

  @media screen and (max-width: 1024px) {
    margin: 90px 0;
  }
  @media screen and (max-width: 575px) {
    margin: 60px 0;
  }

  & .headline {
    display: flex;
    row-gap: 32px;
    align-items: start;
    flex-direction: column;

    @media screen and (max-width: 768px) {
      row-gap: 16px;
    }
  }

  & .title {
    line-height: 1.1;
    max-width: 780px;

    span {
      line-height: inherit;
      font-family: inherit;
      font-size: inherit;
      color: #7D9C9E;
      text-transform: inherit;
      letter-spacing: inherit;
      max-width: none;
      margin-top: 0;
      display: inline;
    }
  }

  & .title-caption {
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 2%;
    font-family: "Mulish", serif;
    font-size: calc(14px + 6 * ((100vw - 375px) / 1545));
    max-width: 1026px;
    margin: 0 !important;
  }
}

.patient-histories__container {
  --patient-histories-container-gap: 80px;
  --patient-histories-categories-width: 320px;

  display: flex;
  column-gap: var(--patient-histories-container-gap);
  align-items: start;

  @media screen and (max-width: 1600px) {
    --patient-histories-container-gap: 50px;
  }
}
.patient-histories__categories {
  width: 100%;
  max-width: var(--patient-histories-categories-width);

  top: 40px;
  position: sticky;

  @media screen and (max-width: 991px) {
    display: none !important;
  }

  & ul {
    margin: 0;
    padding: 0;
    display: flex;
    row-gap: 20px;
    flex-direction: column;
    list-style: none;
  }
  & li {
    margin: 0;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #7D9C9E;
    background-color: #ffffff;
    color: #7D9C9E;
    font-size: 28px;
    letter-spacing: 0.004em;
    font-weight: 400;
    font-family: "Forum", serif;
    text-transform: uppercase;
    transition: all .25s;
    list-style: none;
    position: relative;
    
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    @media screen and (max-width: 1440px) {
      font-size: 22px;
    }
  }
  & li:hover, & li.active {
    color: #F1F1F4;
    background-color: #7D9C9E;
  }
  & :is(span, a) {
    position: relative;
    transition: all .25s;
    transform: translateX(-30px);
    text-decoration: none;
  }
  & li:not(.active):not(:hover) :is(span, a) {
    transform: translateX(0);
  }
  & li a::before {
    content: '';
    z-index: 1;
    position: absolute;
    inset: 0;
  }

  & svg {
    width: 36px;
    z-index: 1;
    position: absolute;
    top: 50%;
    transition: all .25s;
    fill: currentColor;

    opacity: 0;
    left: 100%;
    transform: translateY(-50%) translateX(0);
  }
  & li.active svg, & li:hover svg {
    opacity: 1;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(12px);
  }
}
.patient-histories__works {
  width: 100%;
  max-width: calc(100% - (var(--patient-histories-categories-width) + var(--patient-histories-container-gap)));
  display: flex;
  row-gap: 50px;
  column-gap: 68px;
  flex-wrap: wrap;

  @media screen and (max-width: 1600px) {
    column-gap: 32px;
    row-gap: 32px;
  }
  @media screen and (max-width: 1280px) and (min-width: 992px) {
    flex-direction: column;
  }
  @media screen and (max-width: 991px) {
    max-width: 100%;
  }
  @media screen and (max-width: 600px) {
    flex-direction: column;
  }

  & ul, & li {
    margin: 0;
    padding: 0;
    list-style: none;
  }
}
.patient-histories__work {
  overflow: hidden;
  border-radius: 30px;
  background-color: #EFF3F3;
  padding: 0 40px 40px;
  width: calc(50% - 34px);

  @media screen and (max-width: 1600px) {
    width: calc(50% - 16px);
  }
  @media screen and (max-width: 1440px) {
    padding: 0 24px 24px;
  }
  @media screen and (max-width: 1280px) and (min-width: 992px) {
    width: 100%;
  }
  @media screen and (max-width: 600px) {
    width: 100%;
  }
}
/* АНИМАЦИЯ */
.patient-histories__work.is-hidden {
  @media screen and (min-width: 769px) {
    display: none;
  }
}
.patient-histories__work.is-entering,
.patient-histories__work.is-leaving {
  pointer-events: none;
}
.patient-histories__work.is-leaving {
  animation: patient-history-hide 0.22s ease-in both;
}
.patient-histories__work.is-entering {
  animation: patient-history-show 0.28s ease-out both;
}
@keyframes patient-history-hide {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-18px);
  }
}
@keyframes patient-history-show {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .patient-histories__work.is-entering,
  .patient-histories__work.is-leaving {
    animation: none;
  }
}
/* КОНЕЦ АНИМАЦИИ */

.patient-histories__work-collage {
  display: flex;
  column-gap: 0;
  align-items: stretch;
  margin: 0 -40px 36px;

  @media screen and (max-width: 1440px) {
    margin: 0 -24px 24px;
  }

  & img {
    width: 50%;
    aspect-ratio: 280 / 292;
    object-fit: cover;
  }
}
.patient-histories__work-label {
  color: #000;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-family: "Forum", serif;
  text-transform: uppercase;
  margin-bottom: 20px;
  
  @media screen and (max-width: 1440px) {
    margin-bottom: 12px;
  }

  & ~ p {
    font-size: 0.875rem;
    line-height: 160%;
  }
}
.patient-histories__work-result {
  margin-top: 24px;
}

.patient-histories__work-doctors {
  margin-top: 52px;

  @media screen and (max-width: 1440px) {
    margin-top: 32px;
  }

  & ul {
    display: flex;
    row-gap: 20px;
    flex-direction: column;
  }
}
.patient-histories__work-doctor {
  display: flex;
  column-gap: 12px;
  align-items: start;

  & img {
    width: 60px;
    min-width: 60px;
    height: 60px;
  }
  & a {
    color: #000;
    font-size: 0.875rem;
    line-height: 120%;
    text-decoration: none;

    display: flex;
    row-gap: 8px;
    flex-direction: column;

    & span + span {
      color: #9F9F9F;
      line-height: inherit;
    }
    &:hover span:first-child {
      text-decoration: underline;
    }
  }
}