/* RATINGS */
.ratings {
  & .list {
    --ratings-list-count: var(--ratings-count, 4);

    display: flex;
    flex-wrap: wrap;
    row-gap: var(--list-gap);
    column-gap: var(--list-gap);
    align-items: stretch;

    @media screen and (max-width: 1024px) {
      --ratings-list-count: calc(var(--ratings-count, 4) / 2);
    }

    & .item {
      width: calc((100% / var(--ratings-list-count)) - (var(--list-gap) / var(--ratings-list-count) * (var(--ratings-list-count) - 1)));

      @media screen and (max-width: 1024px) {
        & .rating-card {
          align-items: start;
          flex-direction: row;
          justify-content: space-between;

          & .values {
            margin-top: 0;
            align-items: end;
          }
        }
      }

      @media screen and (max-width: 768px) {
        width: 100%;
      }
    }
  }
}

/* STAGES */
.stages {
  & .wrapper {
    display: flex;
    row-gap: 0;
    column-gap: 40px;
    align-items: start;
    justify-content: space-between;

    @media screen and (max-width: 991px) {
      flex-direction: column;
    }

    & .block-title {
      top: var(--page-header-height);
      position: sticky;

      @media screen and (max-width: 991px) {
        position: inherit;
      }
      @media screen and (max-width: 768px) {
        --block-title-bottom: 24px;
      }
    }

    & .list {
      display: flex;
      row-gap: 16px;
      flex-direction: column;
      width: 100%;
      min-width: 580px;
      counter-reset: stages;

      @media screen and (max-width: 1200px) {
        min-width: 480px;
      }
      @media screen and (max-width: 991px) {
        min-width: auto;
      }
    }
  }
}

/* TEXT ADDITIONALS */
.text-additionals {
  --text-additionals-wrapper-gap: 40px;

  & .wrapper {
    display: flex;
    row-gap: var(--text-additionals-wrapper-gap);
    column-gap: var(--text-additionals-wrapper-gap);
    align-items: stretch;

    @media screen and (max-width: 768px) {
      --text-additionals-wrapper-gap: 24px;
      flex-direction: column;
    }

    &:has(.media .image:nth-child(2)) {
      flex-direction: column;
    }

    &:has(.swiper) {
      flex-direction: column;
    }
  }

  & .block-title {
    --block-title-bottom: 24px;
    --block-title-text-gap: 16px;

    @media screen and (max-width: 768px) {
      --block-title-bottom: 16px;
    }

    & .subtitle {
      font-weight: 400;
    }
  }

  & .block-title + .wrapper {
    margin-top: 40px;

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

  &:has(.media) .block-title .subtitle {
    font-size: 1.125rem;

    @media screen and (max-width: 768px) {
      font-size: 1rem;
    }
  }

  & .media {
    width: 100%;
    min-width: 40%;
    display: flex;
    row-gap: 16px;
    column-gap: 22px;
    align-items: stretch;

    @media screen and (max-width: 768px) {
      order: 5;
    }
    @media screen and (max-width: 600px) {
      &:not(.media--video) {
        flex-direction: column;
      }
    }

    &.media--on-right {
      order: 5;
      
      .text-additionals:not(:has(.button)) & {
        min-width: 56%;

        @media screen and (max-width: 1200px) {
          min-width: 40%;
        }
      }
    }

    &.media--video {
      min-width: 56%;
      display: flex;
      column-gap: 16px;
      align-items: end;

      @media screen and (max-width: 1200px) {
        min-width: 46%;
      }

      & > :is(picture, img) {
        width: calc(100% - 36% - 16px);
      }

      & .video {
        width: 36%;
        min-width: 36%;
        aspect-ratio: 1;

        /* @media screen and (max-width: 1200px) {
          width: 140px;
          min-width: 140px;
        } */

        .media--on-right & {
          @media screen and (min-width: 769px) {
            order: -1;
          }
        }

        & .play {
          width: 57%;
          height: auto;
          aspect-ratio: 1;
        }
      }
    }

    &:has(.image:nth-child(2)) {
      order: 5;
    }

    &:not(.media--video):not(:has(.swiper)):not(:has(.image:nth-child(2))) {
      max-width: 680px;
    }

    &:has(.swiper) {
      order: 5;
      min-width: auto;
      max-width: none;

      & :is(picture, img) {
        border-radius: 24px;
      }
    }

    & .image {
      width: 100%;
      position: relative;

      @media screen and (min-width: 769px) {
        height: max-content;
        position: sticky;
        top: var(--page-header-height);
      }

      &:has(.counters) :is(picture, img) {
        height: 100%;
        min-height: 480px;
      }
      &:has(.rating-mini-card) :is(picture, img) {
        min-height: auto;
      }
    }

    & :is(picture, img) {
      width: 100%;
      height: auto;
      aspect-ratio: auto;
      border-radius: 40px;

      @media screen and (max-width: 1024px) {
        /* height: 100%; */
      }
      @media screen and (max-width: 768px) {
        border-radius: 24px;
      }
    }

    &:has(.image:nth-child(2)) :is(picture, img) {
      aspect-ratio: 699 / 581;
    }

    & .swiper:not(.swiper-container-initialized) .swiper-wrapper {
      display: flex;
      column-gap: 22px;
      align-items: stretch;

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

      & .swiper-slide {
        width: calc((100% / 3) - (22px / 3 * 2));

        @media screen and (max-width: 1024px) {
          width: calc((100% / 2.3) - (22px / 3 * 2));
        }
        @media screen and (max-width: 600px) {
          width: calc((100% / 1.3) - (16px / 2 * 1));

          &:nth-child(1n + 3) {
            display: none;
          }
        }

        &:nth-child(1n + 4) {
          display: none;
        }
      }
    }

    & .counters {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      padding: 24px;

      display: flex;
      row-gap: 0px;
      flex-direction: column;
      justify-content: space-between;

      @media screen and (max-width: 1024px) {
        padding: 20px;
      }

      & .counter {
        display: flex;
        row-gap: 0px;
        flex-direction: column;
        width: min-content;
        min-width: 200px;

        padding: 20px;
        border-radius: 24px;
        background-color: var(--color-light);

        @media screen and (max-width: 1024px) {
          padding: 16px;
        }

        & .number {
          font-weight: 400;
          font-size: 24px;
          line-height: 1.2;
          color: var(--color-additional);

          @media screen and (min-width: 400px) {
            font-size: calc(24px + 24 * (100vw - 320px) / 1460);
          }

          @media screen and (min-width: 1400px) {
            font-size: 48px;
          }
        }

        & .text {
          font-size: 0.875rem;
        }
      }

      &:not(:has(.counter:nth-child(2))) .counter:first-child {
        margin-top: auto;
      }
      & .counter:first-child {
        margin-left: auto;
      }

      & .rating-mini-card {
        margin-top: auto;
        margin-left: auto;
      }
    }
  }

  &:has(.quote) .media {
    min-width: auto;
    max-width: 460px !important;
  }

  & .goodplace {
    margin-bottom: 16px;
  }

  & .description {
    max-width: 1200px;

    &:has(.quote) {
      padding-left: 70px;

      @media screen and (max-width: 1024px) {
        padding-left: 50px;
      }
      @media screen and (max-width: 768px) {
        padding-left: 40px;
      }

      & .quote {
        --quote-padding-left: 0 !important;
      }
    }

    & .doctor-name-position {
      --doctor-name-position-gap: 4px;
      --doctor-name-position-size: 1.125rem;

      margin-top: 88px;

      @media screen and (max-width: 1024px) {
        margin-top: 50px;
      }
      @media screen and (max-width: 768px) {
        --doctor-name-position-size: 1rem;

        margin-top: 24px;
      }
    }
  }

  & .buttons {
    margin-top: 24px;
    display: flex;
    column-gap: 16px;
    align-items: stretch;
  }
}

/* ADVANTAGES */
.advantages {
  --block-title-bottom: 0;

  &:has(.items:empty) {
    display: none;
  }

  &:not(:first-child) {
    margin-top: 40px;

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

  & .wrapper {
    display: flex;
    row-gap: 40px;
    flex-direction: column;

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

    & .list {
      display: flex;
      column-gap: 40px;
      align-items: stretch;

      @media screen and (max-width: 1200px) {
        column-gap: 20px;
        align-items: start;
      }
      @media screen and (max-width: 1024px) {
        column-gap: 18px;
        align-items: start;
      }
      @media screen and (max-width: 768px) {
        row-gap: 16px;
        flex-direction: column;
      }
    }

    & .items {
      width: 100%;
      display: flex;
      row-gap: 22px;
      column-gap: 22px;
      flex-wrap: wrap;
      align-items: stretch;

      @media screen and (max-width: 1200px) {
        row-gap: 20px;
        column-gap: 20px;
      }
      @media screen and (max-width: 1024px) {
        row-gap: 18px;
        column-gap: 18px;
      }
      @media screen and (max-width: 768px) {
        row-gap: 16px;
        flex-direction: column;
      }

      &:not(:has(.item:nth-child(4))) {
        /* flex-wrap: nowrap; */
      }

      &:has(.image,.services) .item {
        min-width: calc(100% / 2 - (22px / 2 * 1));

        @media screen and (max-width: 1200px) {
          min-width: 100%;
        }
      }
      &:not(:has(.image,services)):has(.item:nth-child(4)) .item {
        min-width: calc(100% / 4 - (22px / 4 * 3));

        @media screen and (max-width: 1200px) {
          min-width: calc(100% / 3 - (22px / 3 * 2));
        }
        @media screen and (max-width: 991px) {
          min-width: calc(100% / 2 - (22px / 2 * 1));
        }
      }
      &:not(:has(.item:nth-child(4))) .item {
        /* width: 100%; */
        min-width: calc(100% / 3 - (22px / 3 * 2));

        @media screen and (max-width: 1100px) {
          min-width: calc(100% / 2 - (22px / 2 * 1));
        }
      }

      .list:has(.additional) & .item {
        min-width: calc(100% / 2 - (22px / 2 * 1)) !important;

        @media screen and (max-width: 1200px) {
          min-width: 100% !important;
        }
      }

      & .item {
        width: min-content;

        @media screen and (max-width: 768px) {
          min-width: 100% !important;
        }
      }
      &.counter {
        counter-reset: advantages;
      }
    }

    & .list:has(.additional.image) {
      & .item:has(:not(.icon)) .detail {
        /* height: 100%; */

        & .name {
          margin-bottom: 44px;

          @media screen and (max-width: 1200px) {
            margin-bottom: 30px;
          }
          @media screen and (max-width: 1024px) {
            margin-bottom: 18px;
          }
          @media screen and (max-width: 768px) {
            margin-bottom: 0px;
          }
        }
        & .text {
          /* margin-top: auto !important; */
        }
      }
      & .icon--star {
        display: none;
      }
    }

    & .list > .additional {
      display: flex;
      row-gap: 24px;
      flex-direction: column;
      max-width: 520px;

      @media screen and (max-width: 1200px) {
        row-gap: 20px;
        top: var(--page-header-height);
        position: sticky;
      }
      @media screen and (max-width: 1024px) {
        row-gap: 18px;
        max-width: min-content;
      }
      @media screen and (max-width: 768px) {
        position: initial;
        max-width: 100%;
      }
    }

    & .list > .additional.image {
      width: 600px;
      min-width: 600px;

      @media screen and (max-width: 1400px) {
        width: 475px;
        min-width: 475px;
      }
      @media screen and (max-width: 1200px) {
        width: 350px;
        min-width: 350px;
      }
      @media screen and (max-width: 768px) {
        width: 100%;
        min-width: none;
      }

      & img {
        width: 100%;
        display: block;
        border-radius: 40px;
        object-fit: cover;
      }
    }

    & .list > .additional .doctor-mini-card {
      padding: 24px;
      border-radius: 24px;
      background-color: var(--color-light);

      @media screen and (max-width: 1024px) {
        padding: 20px;
      }
    }

    & .bottom {
      display: flex;
      column-gap: 40px;
      align-items: start;

      padding: 24px;
      border-radius: 24px;
      background-color: var(--color-light-additional);

      @media screen and (max-width: 1024px) {
        row-gap: 40px;
        flex-direction: column;
      }

      & .text {
        width: 100%;
        font-size: 1rem;

        @media screen and (max-width: 1024px) {
          font-size: 0.875rem;
        }

        & strong {
          display: block;
          font-size: 1.125rem;

          @media screen and (max-width: 1024px) {
            font-size: 1rem;
          }
        }
      }
    }
  }
}

/* CAROUSEL */
.carousel {
  & .buttons {
    display: flex;
    column-gap: 8px;
    align-items: center;
    justify-content: end;
    margin-bottom: 24px;

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

    &:not(:has(.swiper-button-lock)):has([role="button"]) {
      @media screen and (min-width: 769px) {
        display: flex !important;
      }
    }

    & .arrow {
      --icon-size: 16px;
      --icon-fill: var(--color-text);

      width: 56px;
      height: 56px;
      border-radius: 50%;
      user-select: none;
      border: 1px solid var(--color-stroke);
      position: relative;
      transition: border-color .3s;

      & .icon {
        transform: scale(1, 1);
        transition: transform .3s;
      }

      &:hover {
        border-color: var(--color-text);

        & .icon {
          transform: scale(1.3, 1.3);
        }
      }
    }
  }

  & .slider {
    --carousel-sidebar-gap: 22px;

    display: flex;
    column-gap: var(--carousel-sidebar-gap);
    align-items: stretch;

    @media screen and (max-width: 1200px) {
      --carousel-sidebar-gap: 16px;
    }
    @media screen and (max-width: 768px) {
      --carousel-sidebar-gap: 0px;

      row-gap: 24px;
      align-items: start;
      flex-direction: column;
    }

    &.slider--works {
      --carousel-slides: 1;
    }

    &.slider--accordion {
      @media screen and (min-width: 1025px) {
        overflow: hidden;
      }
    }
  }

  &:has(.sidebar) {
    --carousel-sidebar-width: 41%;
  }

  & .sidebar {
    width: var(--carousel-sidebar-width);
    min-width: var(--carousel-sidebar-width);
    min-height: 370px;
    z-index: 2;
    position: relative;

    @media screen and (max-width: 768px) {
      width: 100%;
      min-height: auto;
    }

    &::after {
      content: '';
      z-index: -1;
      position: absolute;
      right: calc(-1 * var(--carousel-sidebar-gap));
      top: 0;
      width: 100vw;
      height: 100%;
      background-color: var(--site-background);
    }

    & .body {
      width: 100%;
      height: 100%;
      display: flex;
      row-gap: 16px;
      flex-direction: column;
      padding: 32px 24px;
      border-radius: 32px;
      background-color: var(--color-medium-additional);

      @media screen and (max-width: 768px) {
        border-radius: 24px;
      }

      & > .title {
        font-weight: 400;
        font-size: 1.5rem;

        @media screen and (max-width: 1024px) {
          font-size: 1.25rem;
        }
      }
      & > .text {
        font-size: 1rem;

        @media screen and (max-width: 1024px) {
          font-size: 0.875rem;
        }

        &:not(:last-child) {
          margin-bottom: 24px;
        }
      }
    }

    & .button {
      margin-top: auto;
      margin-left: auto;
    }
  }

  & .swiper {
    border-radius: 32px 32px 0 0;
    width: calc(100% - var(--carousel-sidebar-width, 0%) - var(--carousel-sidebar-gap, 0px));

    @media screen and (max-width: 1200px) {
      overflow: initial;
    }
    @media screen and (max-width: 768px) {
      width: 100%;
      border-radius: 24px 24px 0 0;
    }

    &:has(:is(.carousel-item, .carousel-review, .carousel-works-item)) {
      border-radius: 32px;

      @media screen and (max-width: 768px) {
        border-radius: 24px;
      }
    }

    &:not(.swiper-container-initialized) {
      & .swiper-wrapper {
        display: flex;
        column-gap: var(--carousel-gap, 22px);
        align-items: stretch;
      }

      & .item {
        width: 100%;
        max-width: calc(100% / var(--carousel-slides, 3) - ((var(--carousel-gap, 22px) / var(--carousel-slides, 3)) * (var(--carousel-slides, 3) - 1)));
      }
    }

    .slider--accordion & {
      margin-left: 0;
      overflow: initial;

      @media screen and (min-width: 1024px) {
        width: calc((var(--container-max) * .63) - ((16px / 2) * 3));
      }
    }

    & .item {
      .slider--works &:not(.swiper-slide-active) {
        opacity: .3;
      }

      .slider--accordion & {

        @media screen and (min-width: 1025px) {
          padding-right: 24px;
        }

        &:not(.swiper-slide-active) {
          padding-right: 0;
          
          @media screen and (min-width: 1025px) {
            width: calc(((var(--container-max) - (var(--container-max) * .63)) / 2) - ((16px / 2) * 3)) !important;
          }
          @media screen and (max-width: 1024px) {
            opacity: .3;
          }
        }
      }

      & > div {
        height: 100%;
      }

      & :is(picture, img) {
        display: block;
        object-fit: cover;
      }
    }
  }
}

/* SERVICES */
.services {
  
}

/* CATEGORIES */
.categories {
  & .wrapper {
    display: grid;
    row-gap: 22px;
    column-gap: 22px;
    grid-template-columns: repeat(3, 1fr);

    @media screen and (max-width: 1100px) {
      grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
    @media screen and (max-width: 1024px) {
      row-gap: 12px;
      column-gap: 12px;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    @media screen and (max-width: 768px) {
      /* grid-template-columns: repeat(1, 1fr); */
    }

    & .categories-box:has(.image) {
      @media screen and (min-width: 1101px) {
        grid-row-start: 1;
        grid-row-end: 3;
      }

      &:nth-child(4) {
        @media screen and (min-width: 1101px) {
          grid-column-start: 3;
          grid-column-end: 4;
        }
      }
    }
  }

  & .additional {
    display: flex;
    row-gap: 40px;
    flex-direction: column;
    margin-top: 32px;

    padding: 24px;
    border-radius: 24px;
    background-color: var(--color-light-additional);

    @media screen and (max-width: 1024px) {
      row-gap: 24px;
      padding: 20px;
    }

    & .tags {
      display: flex;
      column-gap: 16px;
      align-items: center;

      @media screen and (max-width: 1024px) {
        column-gap: 8px;
      }

      & .tag {
        font-weight: 400;
        font-size: 1.125rem;
        border-radius: 20px;
        padding: 8px 16px;
        background-color: var(--color-additional-1);

        @media screen and (max-width: 1024px) {
          font-size: 0.875rem;
          padding: 4px 8px;
          border-radius: 20px;
        }
      }
    }

    & .bottom {
      display: flex;
      column-gap: 140px;
      align-items: center;

      @media screen and (max-width: 1200px) {
        column-gap: 80px;
      }
      @media screen and (max-width: 1024px) {
        column-gap: 40px;
      }
      @media screen and (max-width: 768px) {
        row-gap: 24px;
        align-items: start;
        flex-direction: column;
      }

      & > .text {
        font-weight: 400;
        font-size: 1.125rem;

        @media screen and (max-width: 1024px) {
          font-size: 1rem;
        }
      }

      & .buttons {
        display: flex;
        column-gap: 16px;
        align-items: start;

        @media screen and (max-width: 1024px) {
          column-gap: 8px;
        }
      }
    }
  }
}

/* SUB SERVICES */
.sub-services {
  & .grid {
    display: grid;
    row-gap: 40px;
    column-gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));

    @media screen and (max-width: 1200px) {
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    @media screen and (max-width: 1024px) {
      row-gap: 24px;
      column-gap: 16px;
    }
  }
}

/* CONTACTS & MAP */
.contacts-map {
  & .wrapper {
    display: flex;
    column-gap: 32px;
    align-items: stretch;

    @media screen and (max-width: 768px) {
      row-gap: 32px;
      flex-direction: column;
    }

    & .contacts {
      width: 100%;

      @media screen and (max-width: 1200px) {
        width: min-content;
        min-width: max-content;
      }
    }

    & .map {
      width: 100%;
      min-width: 66%;

      @media screen and (max-width: 1200px) {
        min-width: inherit;
      }

      & iframe {
        aspect-ratio: 934 / 491;

        @media screen and (max-width: 768px) {
          aspect-ratio: 335 / 225;
        }
      }
    }
  }
}

/* PRICES */
.prices {
  & table {
    width: 100%;

    & td {
      padding: 24px;
      font-weight: 400;
      font-size: 1.125rem;

      @media screen and (max-width: 1024px) {
        font-size: 1rem;
        padding: 16px 20px;
      }
      @media screen and (max-width: 640px) {
        font-size: 0.875rem;
        padding: 16px 10px;
      }

      &:first-child {
        border-radius: 16px 0 0 16px;
        color: var(--color-secondary);
      }
      &:last-child {
        text-align: right;
        border-radius: 0 16px 16px 0;
        color: var(--color-additional);
        white-space: nowrap;
      }
    }

    & tr.text td {
      text-align: left;
      font-size: 1.5rem;
      color: var(--color-text);
      padding-left: 0;
      padding-top: 0;
      white-space: normal;

      @media screen and (max-width: 1200px) {
        font-size: 1.125rem;
      }
      @media screen and (max-width: 1024px) {
        font-size: 1rem;
      }

      & span {
        color: var(--color-additional);
      }
    }

    & tr:not(.text) {
      &:nth-of-type(odd) td {
        background-color: var(--color-light-additional);
      }
    }
  }

  & .caption {
    padding: 24px;
    margin-top: 40px;
    border-radius: 16px;
    background-color: var(--color-light);
    display: flex;
    column-gap: 8px;
    align-items: center;

    @media screen and (max-width: 1024px) {
      padding: 20px;
      margin-top: 24px;
      align-items: start;
    }

    & .icon--info {
      --icon-size: 24px;
      --icon-fill: var(--color-therity);
    }
    & p {
      margin: 0;
      font-size: 1rem;

      @media screen and (max-width: 1024px) {
        font-size: 0.875rem;
      }
    }
  }
}

/* EDUCATION */
.education {
  .text-additionals ~ & {
    margin-top: 40px;

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

  & .groups {
    display: flex;
    row-gap: 40px;
    flex-direction: column;

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

    & .group {
      display: flex;
      row-gap: 24px;
      flex-direction: column;
    }

    & .name {
      font-weight: 400;
      font-size: 1.5rem;
      color: var(--color-secondary);

      @media screen and (max-width: 1024px) {
        font-size: 1.25rem;
      }
    }

    & .list {
      & tr {
        @media screen and (max-width: 991px) {
          display: flex;
          row-gap: 8px;
          flex-direction: column;
        }
      }

      & td {
        font-size: 1rem;
        padding: 12px 20px;
        vertical-align: top;

        @media screen and (max-width: 991px) {
          width: 100%;
          padding: 0;
          font-size: 0.875rem;
        }

        &:first-child {
          padding-left: 0;

          & strong {
            width: max-content;
            display: block;
            padding: 4px 14px;
            border-radius: 20px;
            background-color: var(--color-light-1);
          }
        }
        &:last-child {
          padding-right: 0;

          @media screen and (max-width: 991px) {
            padding-bottom: 24px;
          }
        }
      }
    }
  }
}

/* DROPDOWN */
.dropdown-wrapper {
  & .dropdown-table {
    --dropdown-table-gap: 16px;
    --dropdown-table-radius: 24px;
    --dropdown-table-background: var(--color-light);

    width: 100%;

    &:has(.icon--plus) {
      --dropdown-table-background: var(--color-light-additional);
    }

    & :is(th, td) {
      border: 0;
      padding: calc(var(--dropdown-table-gap) * 2) 24px;
      vertical-align: middle;
      border-collapse: collapse;

      &.controll {
        width: 92px;

        & .button {
          --icon-size: 20px;
          --icon-fill: var(--color-additional);

          padding: 14px;
          margin: 0 auto;

          & svg {
            transition: transform .3s;
          }
          .heading.shown & svg {
            transform: rotate(90deg);
          }

          &:has(.icon--plus) {
            padding: 0;
          }

          & .icon--plus {
            --icon-size: 44px;
            --icon-fill: var(--color-accent);

            padding: 12px;
            border-radius: 12px;
            background-color: var(--color-additional);
            transition: background-color .3s;

            @media screen and (max-width: 768px) {
              --icon-size: 40px;
            }

            .button:hover & {
              background-color: var(--color-additional-hover);
            }
            .button:active & {
              background-color: var(--color-additional);
            }
            
            .heading.shown & svg {
              transform: rotate(45deg);
            }
          }
        }
      }
    }

    & tr {
      width: 100%;
      
      @media screen and (max-width: 768px) {
        display: flex;
        row-gap: 8px;
        flex-wrap: wrap;
        align-items: center;
        padding: 20px;

        &:has(.icon--plus) {
          align-items: start;
        }

        & :is(th, td) {
          width: 100%;
          text-align: left !important;
          padding: 0 !important;

          &.name {
            order: 0;
            width: auto;
            max-width: calc(100% - 50px);
          }
          &.caption {
            order: 2;
            width: 100%;
          }
          &.controll {
            order: 1;
            width: max-content;
            margin-left: auto;

            & .button {
              padding: 0 14px;

              &:has(.icon--arrow-next) {
                padding-right: 0;
              }
            }
          }
        }
      }
    }
    
    & .heading {
      z-index: 0;
      position: relative;
      cursor: pointer;

      &::before {
        content: '';
        display: block;
        width: 100%;
        height: calc(100% - var(--dropdown-table-gap));
        z-index: -1;
        position: absolute;
        left: 0;
        top: calc(var(--dropdown-table-gap) / 2);
        border-radius: var(--dropdown-table-radius);
        background-color: var(--dropdown-table-background);
      }
      &:first-child :is(th, td) {
        padding-top: calc(var(--dropdown-table-gap) / 2 * 3);
      }
      &:first-child::before {
        top: 0;
        height: calc(100% - var(--dropdown-table-gap) / 2);
      }

      & .name {
        font-weight: 400;
        font-size: 1.25rem;
        color: var(--color-secondary);

        @media screen and (max-width: 1200px) {
          font-size: 1.125rem;
        }
      }
      & .caption {
        font-weight: 400;
        font-size: 1.25rem;
        color: var(--color-therity);
        text-align: right;

        @media screen and (max-width: 1400px) {
          font-size: 1rem;
        }
        @media screen and (max-width: 991px) {
          font-size: 0.875rem;
        }

        & strong {
          white-space: nowrap;
          color: var(--color-secondary);
        }
      }

      &:not(.shown) + .description {
        display: none;
      }
    }

    & .description {
      z-index: 1;
      position: relative;

      &::before {
        content: '';
        display: block;
        width: 100%;
        height: calc(100% + var(--dropdown-table-gap));
        z-index: -1;
        position: absolute;
        left: 0;
        top: 0;
        border-radius: 0 0 var(--dropdown-table-radius) var(--dropdown-table-radius);
        background-color: var(--dropdown-table-background);
        transform: translateY(calc(-1 * (var(--dropdown-table-gap) + (var(--dropdown-table-gap) / 2))));
      }

      & td {
        padding-top: 0;
        transform: translateY(calc(-1 * var(--dropdown-table-gap)));
      }

      & .name {
        font-weight: 400;
        font-size: 1.125rem;
        color: var(--color-secondary);

        @media screen and (max-width: 768px) {
          font-size: 1rem;
        }

        &:not(:first-child) {
          margin-top: 24px;
        }
      }
      & .text {
        font-size: 1rem;

        @media screen and (max-width: 768px) {
          font-size: 0.875rem;
        }

        &:not(:first-child) {
          margin-top: 16px;

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

    &:has(.heading.shown) {
      margin-bottom: calc(-1 * (var(--dropdown-table-gap) / 2));
    }
  }
}

/* PAGE CARDS */
.page-cards {
  & .cards {
    display: grid;
    row-gap: 40px;
    column-gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));

    @media screen and (max-width: 1200px) {
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    @media screen and (max-width: 1024px) {
      row-gap: 24px;
      column-gap: 16px;
    }
  }
}

/* DOCTOR CARD */
.doctor-cards {
  .cards {
    display: grid;
    row-gap: 40px;
    column-gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));

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

/* MARQUEE */
.block--marquee {
  --blocks-gap: var(--blocks-marquee-gap, 80px);

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

  .block:has( + &) {
    margin-bottom: 80px;
    
    @media screen and (max-width: 1024px) {
      margin-top: 60px;
    }
  }

  & + .block {
    margin-top: 80px;

    @media screen and (max-width: 1024px) {
      margin-top: 60px;
    }
  }
}
.marquee {
  width: 100%;
  overflow: hidden;

  & .items {
    display: flex;
    column-gap: 40px;
    align-items: center;
    justify-content: center;

    @media screen and (max-width: 1024px) {
      column-gap: 24px;
    }
  }
  & :is(.item, .separator) {
    line-height: 1.4;
    font-size: 1.5rem;
    color: var(--color-disable);
    white-space: nowrap;

    @media screen and (min-width: 400px) {
      font-size: calc(24px + 28 * (100vw - 320px) / 1460);
    }
    @media screen and (min-width: 1400px) {
      font-size: 3.25rem;
    }
  }
  & .link:hover {
    color: var(--color-additional-hover);

    &:active {
      color: var(--color-additional);
    }
  }
}

/* COVER */
.block--cover:first-child {
  --offset-top: calc(var(--page-top) - 20px);
  margin-top: calc(-1 * (var(--page-header-height) + var(--offset-top)));

  body:not(.page-loaded) & {
    display: none;
  }
}
.cover {
  height: var(--page-body-height, 100vh);
  z-index: 0;
  position: relative;

  & .underlay {
    height: 100%;
    z-index: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 100px 100px;
    transition: border-radius .3s;

    @media screen and (max-width: 1024px) {
      border-radius: 0 0 32px 32px;
    }

    body:not(.scroll) & {
      border-radius: 0;
    }

    &::before {
      content: '';
      z-index: 1;
      position: absolute;
      inset: 0;
      background-color: var(--color-underlay);
    }

    & .video {
      height: 100%;
      transition: inherit;
      border-radius: inherit;
    }
    & :is(picture, img) {
      height: 100%;
      display: block;
      object-fit: cover;
    }
  }

  & .wrapper {
    z-index: 2;
    position: absolute;
    left: 0;
    bottom: 100px;
    right: 0;

    @media screen and (max-width: 1024px) {
      bottom: 42px;
    }
  }

  & .contant {
    display: flex;
    column-gap: 80px;
    align-items: end;
    justify-content: space-between;

    color: var(--color-accent);

    @media screen and (max-width: 1024px) {
      row-gap: 50px;
      align-items: start;
      justify-content: start;
      flex-direction: column;
    }

    & .title {
      width: 100%;
      display: flex;
      row-gap: 24px;
      flex-direction: column;

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

      & .prefix {
        font-weight: 400;
        font-size: 1.5rem;
        position: relative;

        display: flex;
        column-gap: 12px;
        align-items: center;

        @media screen and (max-width: 1024px) {
          font-size: 0.875rem;
        }
        @media screen and (max-width: 500px) {
          width: 100% !important;
        }

        &:has(.text) {
          width: max-content;
        }

        & .text .icon {
          --icon-size: 34px;

          @media screen and (max-width: 1024px) {
            --icon-size: 22px;
          }
        }
      }
      & .video-play {
        position: absolute;
        bottom: 0;
        left: 100%;
        margin-left: 40px;

        width: 80px;
        height: auto;
        aspect-ratio: 1;

        @media screen and (min-width: 400px) {
          width: calc(80px + 70 * (100vw - 320px) / 1460);
        }
        @media screen and (min-width: 1400px) {
          width: 150px;
        }
        @media screen and (max-width: 500px) {
          bottom: 100%;
          margin-left: 0;
          margin-bottom: 20px;
          transform: translateX(-100%);
        }

        .prefix:not(:has(.text)) & {
          left: 80%;
        }

        & .icon--video-play-radial {
          --icon-fill: var(--color-therity);
        }
      }
      & .parts {
        display: flex;
        row-gap: 16px;
        flex-direction: column;

        & + * {
          display: none;
        }
      }
      & .part {
        line-height: 1;
        font-weight: 400;
        font-size: 1.75rem;

        display: flex;
        column-gap: 30px;
        align-items: center;

        @media screen and (min-width: 400px) {
          font-size: calc(28px + 52 * (100vw - 320px) / 1460);
        }
        @media screen and (min-width: 1400px) {
          font-size: 5rem;
        }

        & span span {
          color: var(--color-additional);
        }

        & :is(picture, img) {
          --cover-title-image-size: 32px;

          display: block;
          width: auto;
          height: var(--cover-title-image-size);
          border-radius: var(--cover-title-image-size);

          @media screen and (min-width: 400px) {
            --cover-title-image-size: calc(32px + 38 * (100vw - 320px) / 1460);
          }
          @media screen and (min-width: 1400px) {
            --cover-title-image-size: 70px;
          }
        }
      }
    }

    & .follow {
      width: 100%;

      @media screen and (min-width: 1025px) {
        width: max-content;
        max-width: 280px;
      }

      & a {
        --cover-follow-padding: 16px;

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

        width: 100%;
        padding: var(--cover-follow-padding);
        border-radius: 20px;
        backdrop-filter: blur(20px);

        @media screen and (min-width: 1025px) {
          --cover-follow-padding: 24px;
          row-gap: 12px;
        }

        & .text {
          display: flex;
          row-gap: 0;
          flex-direction: column;

          font-weight: 300;
          font-size: 0.75rem;

          & strong {
            font-weight: 400;
            font-size: 2rem;
            line-height: 1.3;

            @media screen and (max-width: 1024px) {
              font-size: 1.5rem;
            }
          }
        }
        & :is(picture, img) {
          display: block;
          width: auto;
          height: 40px;
          margin-top: 26px;
          margin-right: auto;
        }

        & .icon {
          --icon-size: 44px;
          margin-left: auto;
          padding: 15px;

          @media screen and (max-width: 1024px) {
            --icon-size: 32px;
            padding: 10px;
          }
        }
        &:has(picture, img) .icon {
          position: absolute;
          right: var(--cover-follow-padding);
          bottom: var(--cover-follow-padding);
        }
        &:hover .icon svg {
          transform: rotate(45deg);
        }
      }
    }
  }
}

/* FORM */
.form {
  & .wrapper {
    display: flex;
    column-gap: 0;
    align-items: stretch;

    @media screen and (max-width: 1024px) {
      row-gap: 0;
      align-items: start;
      flex-direction: column;
    }
  }
  & .sidebar {
    width: 48%;
    min-width: 48%;
    padding: 24px;
    border-radius: 40px;
    display: flex;
    row-gap: 20px;
    flex-direction: column;
    background-color: var(--color-light);

    font-size: 1rem;
    line-height: 1.4;

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

    & strong {
      font-weight: 400;
      font-size: 1.5rem;
    }

    & .top {
      padding-bottom: 20px;
      border-bottom: 1px solid var(--color-medium-additional);
    }

    & .doctor {
      display: flex;
      column-gap: 30px;
      align-items: center;

      @media screen and (max-width: 1024px) {
        row-gap: 24px;
        flex-direction: column;
        align-items: start;
      }

      & .button {
        margin-left: auto;
      }
    }

    & > :is(picture, img) {
      width: auto;
      height: 125px;
      display: block;
      margin: 0 auto;
      margin-top: auto;
    }

    &:has(> :is(picture, img)) {
      padding-bottom: 0;
    }

    &.left {
      order: -1;
    }
  }
  & .media {
    width: 50%;
    min-width: 50%;
    overflow: hidden;
    border-radius: 40px;

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

    &.left {
      order: -1;
    }
  }
  & .form-wrapper {
    width: 100%;
    display: flex;
    row-gap: 32px;
    flex-direction: column;

    .wrapper:has(.sidebar.left) & {
      padding-left: 40px;
    }
    .wrapper:has(.sidebar:not(.left)) & {
      padding-right: 40px;
    }

    .wrapper:has(.media) & {
      padding: 40px;
      border-radius: 40px;
      background-color: var(--color-medium-additional);

      @media screen and (max-width: 1024px) {
        padding: 20px;
        border-radius: 24px;
      }
    }
    & > .icon {
      --icon-size: 60px;

      @media screen and (max-width: 1024px) {
        --icon-size: 40px;
      }
    }
  }
  & form {
    width: 100%;

    .form:has(.media) & {
      margin-top: auto;
    }
  }
}