/* ICON */
.icon {
  display: block;
  user-select: none !important;
  width: var(--icon-width, var(--icon-size, 23px));
  min-width: var(--icon-width, var(--icon-size, 23px));
  height: var(--icon-height, var(--icon-size, 23px));

  & svg {
    width: 100%;
    height: 100%;
  }
  &:not(.icon--goodplace):not(.icon--star):not(.revert-layer):not(.icon--developer) :is(path) {
    fill: var(--icon-fill, currentColor);
    transition: fill .3s;
  }
}

/* Хорошее место */
.goodplace {
  display: flex;
  column-gap: 12px;
  align-items: center;

  font-size: 0.75rem;

  & .icon {
    --icon-width: 40px;
    --icon-height: 23px;

    @media screen and (max-width: 768px) {
      --icon-width: 28px;
      --icon-height: 16px;
    }
  }
}

/* VIDEO */
.video {
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  cursor: pointer;

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

  & > :is(picture, img) {
    width: 100%;
    height: 100%;
    display: block;
  }

  &:has(.icon--video-play)::before {
    content: '';
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--video-background, rgba(0,0,0,.6));
  }

  & div.play {
    z-index: 2;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}
.video-play, .video .play {
  --icon-size: 14px;
  --icon-fill: var(--color-text);

  width: 56px;
  height: 56px;
  position: relative;
  border-radius: 50%;
  background-color: var(--color-accent);

  &:has(.icon--video-play) {
    --icon-size: 20%;
    --icon-fill: var(--video-play-fill, var(--color-accent));

    width: 158px;
    height: 158px;
    background-color: transparent;
  }

  & :is(.icon--play, .icon--video-play) {
    z-index: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform .3s;

    :is(.video, .video-play):hover & {
      transform: translate(-50%, -50%) scale(1.2);
    }
  }

  & .icon--video-play-radial {
    width: 100%;
    height: 100%;
    animation: 10s rotate infinite linear;

    :is(.video, .video-play):hover & {
      animation-play-state: paused;
    }
  }
}
@keyframes rotate{
  from{
    transform: rotate(0);
  }
  to{
    transform: rotate(360deg);
  }
}

/* RATING STARS */
.stars {
  display: flex;
  column-gap: 2px;
  align-items: center;

  & .icon {
    --icon-size: 16px;
    --icon-fill: var(--color-medium-additional);

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

/* Версия для слабовидящих */
.disability {
  --button-gap: 16px;
  --button-text-size: 1.25rem;

  & .icon {
    --icon-size: 32px;
  }
}

/* BUTTON */
.button {
  --icon-size: 24px;
  --icon-fill: currentColor;

  display: flex;
  row-gap: var(--button-gap, 16px);
  flex-direction: column;

  width: var(--button-width, auto);
  min-width: var(--button-width, auto);
  max-width: 100%;
  height: var(--button-height, auto);

  padding: var(--button-padding, 16px);
  border-radius: var(--button-radius, 16px);
  user-select: none !important;
  transition: background-color .3s, border-color .3s;

  @media screen and (max-width: 768px) {
    row-gap: var(--button-gap-mobile, 8px);
  }

  & .text {
    font-weight: 400;
    font-size: var(--button-text-size, 1.125rem);
    color: currentColor;
    white-space: nowrap;
    transition: color .3s;

    @media screen and (max-width: 1024px) {
      white-space: normal;
      font-size: 1rem;
    }
    
    &:empty {
      display: none;
    }
  }
  & .icon {
    transform: translateX(0);
    transition: transform .3s;

    .button:hover &.icon--arrow-next {
      transform: translateX(5px);
    }

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

  /* В строку */
  &.button--inline {
    column-gap: var(--button-gap, 8px);
    align-items: center;
    justify-content: center;
    flex-direction: row-reverse;

    &:has(.icon--arrow-next) {
      flex-direction: row;
    }
  }
  /* Без оформления */
  &.button--none {
    justify-content: start;
    padding: var(--button-padding, 0);
    color: var(--button-color, var(--color-text));
    background-color: transparent;

    &:hover {
      --button-color: var(--button-hover-color, var(--color-additional-hover));
    }
    & .text {
      white-space: normal;
    }
  }
  /* Стандартная кнопка */
  &.button--default {
    color: var(--button-color, var(--color-accent));
    background-color: var(--button-background, var(--color-additional));

    &:hover {
      --button-background: var(--button-hover-background, var(--color-additional-hover));
    }
    &:active {
      --button-background: var(--button-active-background, var(--color-additional));
    }
  }
  /* Светлая с рамкой */
  &.button--secondary {
    color: var(--button-color, var(--color-primary));
    background-color: var(--button-background, var(--color-accent));
    border: 1px solid var(--button-border-color, var(--color-additional));

    &:hover {
      --button-color: var(--button-hover-color, var(--color-accent));
      --button-background: var(--button-hover-background, var(--color-additional-hover));
      --button-border-color: var(--button-hover-border-color, var(--color-additional-hover));
    }
    &:active {
      --button-background: var(--button-active-background, var(--color-additional));
    }
  }
  /* Светлая с рамкой */
  &.button--nostroke {
    color: var(--button-color, var(--color-primary));
    background-color: var(--button-background, var(--color-accent));
    border: none;

    &:hover {
      --button-color: var(--button-hover-color, var(--color-accent));
      --button-background: var(--button-hover-background, var(--color-additional-hover));
    }
    &:active {
      --button-background: var(--button-active-background, var(--color-additional));
    }
  }
}

/* SOCIALS */
.socials {
  display: flex;
  row-gap: var(--socials-row-gap, 12px);
  flex-direction: column;

  & .title {
    font-size: var(--socials-title-size, 0.875rem);
  }

  & ul {
    display: flex;
    column-gap: var(--socials-list-gap, 16px);
    align-items: center;
  }

  & a {
    display: block;
    padding: var(--socials-link-padding, 14px);
    border-radius: var(--socials-link-radius, 10px);
    background-color: var(--socials-background, var(--color-light));

    & .icon {
      --icon-size: var(--socials-icon-size, 21px);

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

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

/* BREADCRUMBS */
.breadcrumbs {
  margin-bottom: 28px;

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

  & .nav {
    display: flex;
    row-gap: 4px;
    column-gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
  }

  & .item {
    white-space: nowrap;

    @media screen and (max-width: 1024px) {
      white-space: initial;
    }

    & .link {
      font-size: 0.875rem;
      color: var(--color-therity);

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

      &:hover {
        color: var(--color-additional-hover);
      }
      &:active {
        color: var(--color-additional);
      }
    }
    &:last-child .link {
      pointer-events: none;
      color: var(--color-additional);
    }
  }

  & .separator {
    width: 6px;
    min-width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-disable);
  }
}

/* MAP */
.map {
  width: 100%;
  min-height: 490px;
  overflow: hidden;
  border-radius: 32px;

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

  & > div {
    width: 100%;
    height: 100%;
  }
}

/* QUOTE */
.quote {
  font-weight: 300;
  font-size: calc(18px + 14 * (100vw - 320px) / 1600);
  line-height: 1.4;
  padding-top: 16px;
  padding-left: var(--quote-padding-left, 70px);
  position: relative;

  @media screen and (max-width: 1200px) {
    --quote-padding-left: 60px;
  }
  @media screen and (max-width: 1024px) {
    --quote-padding-left: 50px;
    line-height: 1.5;
  }

  @media screen and (max-width: 768px) {
    --quote-padding-left: 40px;
    padding-top: 10px;
  }

  & .icon--quote {
    --icon-width: 42px;
    --icon-height: 32px;
    --icon-fill: var(--color-medium-additional);

    z-index: 0;
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: 28px;

    @media screen and (max-width: 768px) {
      --icon-width: 24px;
      --icon-height: 18px;

      margin-right: 16px;
    }
  }
}

/* MORE TEXT */
.more-button {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--color-additional);
  z-index: 1;
  position: relative;

  &:hover:not(:active) {
    color: var(--color-additional-hover);
  }
  .more-shown &.more-button, .more-shown ~ &.more-button {
    font-size: 0;

    &::before {
      font-size: 0.875rem;
      content: attr(data-more-button-shown-text);
    }
  }
}
.more-text {
  --more-text-clamp: 10;

  position: relative;

  &:not(.more-shown) .more-body {
    display: -webkit-box;
    -webkit-line-clamp: var(--more-text-clamp);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &:has(.more-button) {
    margin-bottom: 25px;
  }

  & .more-button {
    position: absolute;
    left: 0;
    top: 100%;
  }
}
.more-text-tag, .more-text-wrap {
  position: relative;

  &.more-shown .hide {
    display: revert !important;
  }
  &.more-text-wrap.more-shown {
    height: auto !important;
  }
  &.more-shown .more-button {
    z-index: 0;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 18px;
  }
  & ~ .more-button::after {
    content: '';
    z-index: -1;
    position: absolute;
    inset: 0;
    height: 250%;
    pointer-events: none;
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent 0%, var(--color-accent) 20%, var(--color-accent) 100%);
  }
}

/* DATE */
.date-str {
  display: flex;
  column-gap: 8px;
  align-items: center;
  white-space: nowrap;

  & .icon {
    transform: translateY(-1px);
  }

  & span {
    line-height: 1;
    color: currentColor !important;
  }
}

/* PROMO PERIOD */
.promo-period {
  display: flex;
  column-gap: 8px;
  align-items: start;

  & .icon {
    --icon-size: 16px;
    --icon-fill: var(--color-therity);
  }

  & .value {
    display: flex;
    row-gap: 4px;
    flex-direction: column;

    & .caption {
      font-weight: 300;
      font-size: 0.875rem;
      color: var(--color-therity);
    }

    & .date {
      font-weight: 400 !important;
      font-size: 0.875rem !important;
      color: var(--color-primary) !important;
    }
  }
}

/* TABS BUTTONS */
.tabs-buttons {
  margin-bottom: 40px;

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

  & ul {
    display: flex;
    row-gap: 8px;
    column-gap: 8px;
    align-items: center;

    @media screen and (min-width: 1025px) {
      flex-wrap: wrap;
    }

    & li {
      width: auto !important;
      margin: 0 !important;
      padding-top: 2px;
      padding-bottom: 2px;

      &:last-child {
        margin-right: 24px !important;
      }
    }
    
    & a.link {
      padding: 16px;
      border-radius: 60px;
      border: 1px solid var(--color-stroke);
      background-color: var(--color-accent);

      font-weight: 400;
      font-size: 1.125rem;
      color: var(--color-text);
      white-space: nowrap;

      display: block;
      transition: .3s;

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

      &:hover {
        color: var(--color-accent);
        border-color: var(--color-additional-hover);
        background-color: var(--color-additional-hover);

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

      &.active {
        pointer-events: none;
        color: var(--color-accent);
        border-color: var(--color-additional);
        background-color: var(--color-additional);
      }
    }
  }
}

/* TREE */
.tree {
  --tree-list-rows: 40px;
  --tree-list-columns: 80px;
  --tree-links-gap: 16px;

  overflow: hidden;

  @media screen and (max-width: 1200px) {
    --tree-list-columns: 40px;
  }
  @media screen and (max-width: 991px) {
    --tree-list-columns: 22px;
  }
  @media screen and (max-width: 480px) {
    --tree-list-rows: 16px;
    /* transition: height .3s; */
  }

  & .breadcrumbs {
    margin-bottom: 0;
    overflow-x: auto;

    @media screen and (min-width: 480px) {
      display: none;
    }

    & .nav {
      padding-bottom: 4px;
      flex-wrap: nowrap;
    }
  }

  & .list {
    /* display: grid;
    row-gap: var(--tree-list-rows);
    column-gap: var(--tree-list-columns);
    grid-template-columns: repeat(auto-fill, minmax(345px, 1fr)); */
    column-count: 3;
    column-gap: var(--tree-list-columns);

    @media screen and (max-width: 1200px) {
      column-count: 2;
    }
    @media screen and (max-width: 768px) {
      column-count: 1;
    }

    z-index: 0;
    position: relative;

    & .group {
      break-inside: avoid;
      margin-bottom: var(--tree-list-rows);

      display: flex;
      row-gap: var(--tree-links-gap);
      flex-direction: column;

      @media screen and (max-width: 480px) {
        border-bottom: 1px solid var(--color-stroke);
      }

      & .parent {
        font-weight: 400;
        font-size: 1.5rem;
        line-height: 1.4;
        color: var(--color-additional);
        transition: opacity .3s, color .3s;

        display: flex;
        align-items: start;
        justify-content: space-between;

        @media screen and (max-width: 480px) {
          font-weight: 300;
          font-size: 1rem;
          color: var(--color-secondary);
          padding-bottom: 16px;
        }

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

        & span {
          display: flex;
          align-items: center;
          
          @media screen and (max-width: 480px) {
            min-height: 36px;
            padding: 6px 0;
          }
        }

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

          padding: 10px;

          @media screen and (min-width: 481px) {
            display: none;
          }
        }
      }

      &:not(:has(.links)) .icon {
        display: none;
      }
    }

    & .links {
      display: flex;
      row-gap: 8px;
      flex-direction: column;

      @media screen and (max-width: 480px) {
        row-gap: var(--tree-list-rows);
      }

      @media screen and (max-width: 480px) {
        opacity: 0;
        z-index: -99;
        position: absolute;
        left: 0;
        top: 0;
        pointer-events: none;
        background-color: var(--color-accent);
        transition: left .3s, opacity .3s;
      }

      & > .item {
        display: flex;
        align-items: center;

        @media screen and (max-width: 480px) {
          min-height: 36px;
          padding: 16px 16px 0 0;
          border-top: 1px solid var(--color-stroke);
        }
        
        .dropdown-menu-breadcrumbs + & {
          padding-top: 0;
          border-top: none;
        }
      }

      & .child {
        font-weight: 300;
        font-size: 1rem;
        color: var(--color-secondary);

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

  & .list:has(.group.shown) {
    @media screen and (max-width: 480px) {
      & .parent {
        opacity: 0;
      }

      & .group.shown {
        & .links {
          width: 100%;
          height: auto;
          z-index: 5;

          &.shown {
            opacity: 1;
            /* left: 0; */
            pointer-events: all;
          }
        }
      }
    }
  }
}

/* DOCTOR NAME & POSITION */
.doctor-name-position {
  display: flex;
  flex-direction: column;
  row-gap: var(--doctor-name-position-gap, 8px);
  font-size: var(--doctor-name-position-size, 1rem);

  & .name {
    font-weight: 400;
    font-size: 100%;
  }
  & .position {
    font-weight: 300;
    font-size: 78%;
    color: var(--color-therity);
  }
}
/* DOCTOR MINI CARD */
.doctor-mini-card {
  --doctor-mini-card-size: 80px;

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

  & .image {
    overflow: hidden;
    width: var(--doctor-mini-card-size);
    min-width: var(--doctor-mini-card-size);
    height: var(--doctor-mini-card-size);
    border-radius: 50%;
    border: 1px solid var(--color-accent);

    @media screen and (max-width: 1024px) {
      --doctor-mini-card-size: 70px;
    }

    & img {
      display: block;
      object-fit: cover;
    }
  }

  & span {
    line-height: 1.5;
    font-size: 0.875rem;
    color: var(--color-therity);

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

  & .name {
    line-height: 1.5;
    font-size: 1rem;
    color: var(--color-text);

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

    &:not(:first-child) {
      margin-top: 4px;
    }
  }
  &:hover .name {
    text-decoration: underline;
  }

  & .position span {
    font-size: 0.75rem;
    color: var(--color-therity);
  }
}
/* DOCTORS CARD */
.doctors-card {
  display: flex;
  row-gap: 16px;
  flex-direction: column;
  position: relative;

  .swiper-slide & {
    height: 100%;
  }

  &:not(:hover) .button {
    opacity: 0;
    transform: translateY(10px);

    @media screen and (max-width: 1024px) {
      opacity: 1;
      transform: none;
    }
  }

  & .top {
    position: relative;

    & .video {
      width: 45px;
      height: 45px;

      z-index: 2;
      position: absolute;
      left: 24px;
      top: 24px;

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

      & .icon {
        --icon-size: 12px;
      }
    }

    & .expirience {
      z-index: 1;
      position: absolute;
      right: 24px;
      top: 24px;

      font-weight: 400;
      font-size: 1rem;
      padding: 4px 12px;
      border-radius: 20px;
      background-color: var(--color-light-1);
      backdrop-filter: blur(20px);

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

    & .image {
      border-radius: 24px;
      aspect-ratio: 338 / 384;
      overflow: hidden;

      & :is(picture, img) {
        display: block;
      }
    }

    & .button {
      z-index: 2;
      position: absolute;
      right: 24px;
      bottom: 24px;
      transition: background-color .3s, opacity .3s, transform .3s;

      @media screen and (max-width: 1024px) {
        &:not(:hover) {
          --button-color: var(--color-accent);
          --button-background: var(--color-additional);
        }

        right: 20px;
        bottom: 20px;
      }
    }
  }

  & .name a {
    font-weight: 400;
    font-size: 1rem;
    color: var(--color-text);

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

    &:hover {
      color: var(--color-additional-hover);
      text-decoration: underline;
    }

    &::before {
      content: '';
      z-index: 1;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }
  }

  & .positions {
    font-size: 0.75rem;
    color: var(--color-therity);
    margin-top: 8px;
  }
}

/* BLOCK TITLE */
.block-title {
  &:not(:last-child) {
    margin-bottom: var(--block-title-bottom, 40px);
  }

  & .title {
    display: flex;
    column-gap: 24px;
    align-items: start;

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

    & .before {
      width: 214px;
      min-width: 214px;

      font-size: 0.875rem;
      color: var(--color-therity);
    }

    & .text {
      display: flex;
      row-gap: var(--block-title-text-gap, 24px);
      flex-direction: column;

      width: 100%;
      margin-left: auto;

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

      & .marks .icon {
        --icon-size: 42px;
        --icon-fill: var(--color-medium-additional);

        display: inline-block;
        transform: translateY(-14px);

        @media screen and (max-width: 1024px) {
          --icon-size: 20px;
          --icon-fill: var(--color-additional);

          transform: translateY(-10px);
        }
      }

      & :is(h1, h2, h3, h4), & > div {
        margin: 0;
      }
      & :is(h1, h2, h3, h4), & > div:not(.subtitle) {
        font-weight: 400;
        line-height: 1.2;
        font-size: 24px;

        .title--simple & {
          font-size: 20px;
        }
        .title--large & {
          font-size: 28px;
        }

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

          .title--simple & {
            font-size: calc(20px + 12 * (100vw - 320px) / 1460);
          }
          .title--large & {
            font-size: calc(28px + 40 * (100vw - 320px) / 1460);
          }
        }
        @media screen and (min-width: 1400px) {
          font-size: 48px;

          .title--simple & {
            font-size: 32px;
          }
          .title--large & {
            font-size: 68px;
          }
        }

        & span {
          color: var(--color-additional);
        }
      }
      & .icon ~ :is(h1, h2, h3, h4) {
        margin-top: 14px;
        display: inline;

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

    & .subtitle {
      font-size: 1.125rem;
      color: var(--color-secondary);
      max-width: 1200px;

      .title--large & {
        font-size: 1.5rem;
      }

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

      & strong {
        display: inline-block;
        border-radius: 16px;
        padding: 12px 16px;
        background-color: var(--color-light-additional);

        font-weight: 400;
        font-size: 1.5rem;
        line-height: 1.4;

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

      & span {
        font-weight: 300;
        font-size: 1rem;
        line-height: 1.6;
        color: var(--color-therity);

        &.date-str {
          font-weight: 400;
          color: var(--color-text);
        }
      }
    }
  }
}

/* RATINGS CART */
.rating-card {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background-color: var(--color-light-additional);
  padding: 32px 24px;
  position: relative;
  transition: background-color .3s;

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

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

  & .heading {
    display: flex;
    row-gap: 16px;
    flex-direction: column;

    & .link::before {
      content: '';
      z-index: 1;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }
    & .logo {
      height: 24px;
      display: flex;
      align-items: center;

      @media screen and (max-width: 768px) {
        height: 20px;
      }

      & :is(picture, img) {
        width: auto;
        display: block;
      }
    }
    & .name {
      font-weight: 400;
      font-size: 1rem;
    }
    & .additional {
      font-size: 0.75rem;

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

      & :is(picture, img) {
        width: auto;
        height: 18px;
        display: block;
      }
    }
  }

  & .values {
    display: flex;
    row-gap: 8px;
    flex-direction: column;
    margin-top: auto;

    & .rating {
      font-weight: 400;
      font-size: 3rem;
      line-height: 1.2;

      @media screen and (max-width: 768px) {
        font-size: 1.75rem;
      }
    }
    & .total {
      height: 22px;
      font-size: 0.875rem;

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

  &:hover {
    background-color: var(--color-medium-additional);
  }
}
/* RATING MINI */
.rating-mini-card {
  width: max-content;
  min-width: 150px;
  position: relative;
  padding: 16px;
  border-radius: 16px;
  background-color: var(--color-accent);

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

  & span {
    font-weight: 400;
    font-size: 1rem;

    @media screen and (min-width: 1025px) {
      white-space: nowrap;
    }
    @media screen and (max-width: 1024px) {
      font-size: 12px;
    }
  }

  & .rating {
    font-weight: 400;
    font-size: 24px;

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

  & .logo {
    display: flex;
    column-gap: 8px;
    align-items: center;

    @media screen and (max-width: 1024px) {
      row-gap: 0;
      align-items: start;
      flex-direction: column;
    }
    
    & :is(picture, img) {
      border-radius: 0 !important;
      width: auto !important;
      height: 18px !important;
      min-height: auto !important;
      object-fit: contain !important;
    }
  }

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

      right: 30px;
      top: 30px;
      position: absolute;
      transition: transform .3s;

      @media screen and (max-width: 1024px) {
        --icon-size: 12px;
        
        right: 20px;
        top: 18px;
      }
    }
    &:hover .icon {
      transform: rotate(45deg);
    }

    &::before {
      content: '';
      z-index: 1;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }
  }

  &:has(.logo) .link .text {
    display: none;
  }
}

/* STAGES ITEM */
.stages-item {
  display: flex;
  row-gap: 16px;
  flex-direction: column;

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

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

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

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

    &::before {
      content: '(' counter(stages) ')';
      counter-increment: stages;
      display: block;
      margin-bottom: 60px;

      font-size: 2rem;
      color: var(--color-additional);

      @media screen and (max-width: 1200px) {
        margin-bottom: 45px;
      }
      @media screen and (max-width: 768px) {
        margin-bottom: 32px;
        font-size: 1.25rem;
      }
    }
  }

  & .text {
    font-size: 1rem;

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

/* POSTS ITEM */
.post-item {
  --carousel-post-gap: 24px;
  --carousel-post-radius: 24px;

  height: 100%;
  display: flex;
  row-gap: var(--carousel-post-gap);
  flex-direction: column;
  position: relative;
  border-radius: var(--carousel-post-radius);
  background-color: var(--color-light);

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

  & .preview {
    overflow: hidden;
    border-radius: var(--carousel-post-radius);

    & :is(picture, img) {
      object-fit: cover;
      aspect-ratio: 338 / 320;

      @media screen and (max-width: 1024px) {
        aspect-ratio: 280 / 320;
      }

      .cards--services & {
        aspect-ratio: 458 / 320;
      }
    }
  }

  & .detail {
    display: flex;
    row-gap: 8px;
    flex-direction: column;

    padding: 0 var(--carousel-post-gap) var(--carousel-post-gap);

    & .date {
      --icon-size: 16px;

      height: 16px;
      font-weight: 400;
      font-size: 0.875rem;
      color: var(--color-therity);
    }

    & .name {
      font-weight: 400;
      font-size: 1.25rem;

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

      & .link {
        &:hover {
          color: var(--color-additional-hover);
          /* text-decoration: underline; */
        }

        &::before {
          content: '';
          z-index: 1;
          position: absolute;
          left: 0;
          top: 0;
          width: 100%;
          height: 100%;
        }

        & .icon {
          --icon-size: 44px;
          --icon-fill: currentColor;

          position: absolute;
          top: var(--carousel-post-gap);
          right: var(--carousel-post-gap);

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

        &:hover .icon {
          --icon-fill: var(--color-accent);
          background-color: var(--color-additional);

          & svg {
            transform: rotate(45deg);
          }
        }
      }
    }

    & .caption {
      font-size: 0.875rem;
      color: var(--color-secondary);
      margin-top: auto;
    }
  }
}

/* ADVANTAGES ITEM */
.advantages-item {
  --advantages-item-padding: 24px;

  display: flex;
  column-gap: 0;

  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background-color: var(--color-light);
  padding: var(--advantages-item-padding);

  @media screen and (max-width: 1024px) {
    --advantages-item-padding: 20px;
  }
  @media screen and (max-width: 768px) {
    row-gap: 24px;
    flex-direction: column;
    border-radius: 24px;
  }

  &:has(.icon) {
    row-gap: 40px;
    flex-direction: column;

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

  &:has(.image, .services) {
    padding: 0;
    border-radius: 32px;
    align-items: stretch;
  }

  &:has(.icon:not(.icon--star),.image,.services) {
    background-color: var(--color-light-additional);
  }

  .additional & {
    background-color: var(--color-light) !important;
  }

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

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

  & .icon:not(.icon--arrow-next) {
    --icon-size: 83px;
    --icon-fill: var(--color-additional);

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

    &.icon--star {
      --icon-size: 32px;
    }
  }

  & .image, .services {
    width: 44%;
    min-width: 44%;

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

  & .image {
    display: flex;
    align-items: end;
    justify-content: start;

    & :is(picture, img) {
      display: block;
      width: auto;
      height: auto;
      object-fit: contain;
      object-position: center;
    }
  }

  & .services {
    display: flex;
    row-gap: 8px;
    column-gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    height: min-content;

    padding: var(--advantages-item-padding);
    padding-right: 0;

    @media screen and (max-width: 1200px) {
      row-gap: 6px;
      column-gap: 6px;
    }
    @media screen and (max-width: 1024px) {
      row-gap: 4px;
      column-gap: 4px;
    }
    @media screen and (max-width: 768px) {
      padding-top: 0;
    }

    & .link {
      display: block;
      padding: 4px 12px;
      border-radius: 32px;
      background-color: var(--color-additional-1);
      transition: background-color .3s;
      
      &:hover {
        background-color: var(--color-additional-hover);
      }
      &:active {
        background-color: var(--color-additional);
      }

      & .text {
        font-weight: 400;
        font-size: 1rem;
        transition: color .3s;

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

        .link:hover & {
          color: var(--color-accent);
        }
      }
    }
  }

  & .detail {
    display: flex;
    row-gap: 16px;
    flex-direction: column;

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

    &:has(.icon:not(.icon--arrow-next)) {
      height: 100%;
    }

    & .name {
      font-weight: 400;
      font-size: 16px;
      line-height: 1.4;

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

      &:empty {
        display: none;
      }
    }

    & .text {
      display: -webkit-box;
      -webkit-line-clamp: 8;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;

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

    &:has(.icon:not(.icon--arrow-next)) .text {
      margin-bottom: 44px;

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

    & .icon:not(.icon--arrow-next) {
      margin-top: auto;
    }
  }

  &:has(.icon) .detail {
    & .name {
      font-size: 18px;

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

  &:has(.icon--star) .detail .text {
      display: -webkit-box;
      -webkit-line-clamp: 12;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
  }
  
  &:has(.image,.services) .detail {
    padding: var(--advantages-item-padding);

    @media screen and (max-width: 768px) {
      order: -1;
      padding-bottom: 0;
    }

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

  .additional & .detail {
    margin-top: auto;

    & .button {
      width: max-content;
    }
  }
  .counter & .icon--star {
    line-height: 1.3;

    & svg {
      display: none;
    }
    
    &::before {
      counter-increment: advantages;
      content: '(' counter(advantages) ')';

      color: var(--color-additional);
      font-style: normal;
      font-size: 2rem;
      text-transform: none;
      text-decoration: none;
    }
  }
}

/* CAROUSEL GALLERY ITEM */
.carousel-item {
  height: 100%;
  overflow: hidden;
  border-radius: 40px;

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

/* CAROUSEL REVIEWS ITEM */
.carousel-review {
  overflow: hidden;
  position: relative;

  height: 100%;

  &:has(.video) {
    &::before {
      content: '';
      width: 100%;
      height: 100%;
      display: block;
      z-index: 2;
      position: absolute;
      pointer-events: none;
      background-color: var(--color-overlay);
    }
    &, & .video {
      height: 100%;
      border-radius: 24px;
    }
  }

  &:not(:has(.video)) {
    display: flex;
    row-gap: 24px;
    flex-direction: column;
    padding: 32px 24px;
    border-radius: 32px;
    background-color: var(--color-light);

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

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

    & .avatar {
      --icon-size: 48px;
      --icon-fill: var(--color-disable);
    }
    & .name {
      font-size: 1rem;
      line-height: 1.6;
    }
    & .date {
      font-size: 0.75rem;
      color: var(--color-therity);
    }
  }

  & .message {
    --more-text-clamp: 8;

    font-weight: 300;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  & .ratings {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;

    & .source {
      & :is(picture, img) {
        width: auto;
        height: 18px;
        display: block;
      }
    }
  }
}

/* CAROUSEL WORKS ITEM */
.carousel-works-item {
  display: flex;
  column-gap: 40px;
  align-items: start;

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

  & .media {
    width: 66%;
    min-width: 66%;
    display: flex;
    column-gap: 2px;
    align-items: stretch;

    @media screen and (max-width: 1200px) {
      width: 40%;
      min-width: 40%;
      row-gap: 2px;
      flex-direction: column;
    }
    @media screen and (max-width: 991px) {
      width: 100%;
    }

    & :is(.before, .after) {
      width: 100%;
      position: relative;

      & :is(picture, img) {
        display: block;
        border-radius: 40px;
        aspect-ratio: 468 / 348;

        @media screen and (max-width: 1200px) {
          border-radius: 24px;
          aspect-ratio: 280 / 174;
        }
      }

      & span {
        min-width: 100px;
        z-index: 1;
        position: absolute;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        padding: 8px 16px;
        border-radius: 16px;
        font-weight: 400;
        font-size: 1.125rem;
        text-align: center;
        color: var(--color-text);
        background-color: var(--color-accent);
      }
    }
  }
  & > .detail {
    width: 100%;
    display: flex;
    row-gap: 32px;
    flex-direction: column;

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

    & > :is(.name, .comment, .service) {
      display: flex;
      row-gap: 8px;
      flex-direction: column;

      & > span {
        font-size: 0.75rem;
        color: var(--color-therity);
      }
      & > strong {
        font-weight: 300;
        font-size: 0.875rem;
        color: var(--color-secondary);
      }
      & ul {
        display: flex;
        row-gap: 4px;
        flex-direction: column;

        & a.link {
          font-weight: 400;
          font-size: 0.875rem;
          color: var(--color-additional);

          &:hover {
            text-decoration: underline;
            color: var(--color-additional-hover);
          }
        }
      }
    }
  }
}

/* CAROUSEL ACCORDION ITEM */
.carousel-accordion-item {
  display: flex;
  column-gap: 24px;
  align-items: stretch;
  overflow: hidden;

  @media screen and (min-width: 1025px) {
    max-height: 320px;
  }
  @media screen and (max-width: 768px) {
    row-gap: 20px;
    flex-direction: column;
  }

  & .media {
    position: relative;
    width: 44%;
    min-width: 44%;
    transition: width .3s;

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

    .item:not(.swiper-slide-active) & {
      width: 100%;
    }

    & :is(picture, img) {
      /* height: auto; */
      aspect-ratio: 382 / 320;
      border-radius: 24px;

      @media screen and (max-width: 1024px) {
        aspect-ratio: 280 / 232 !important;
      }

      .item:not(.swiper-slide-active) & {
        aspect-ratio: 244 / 320;
      }
    }

    & span {
      z-index: 1;
      position: absolute;
      left: 24px;
      top: 24px;
      font-weight: 400;
      font-size: 1rem;
      color: var(--color-text);
      padding: 4px 12px;
      border-radius: 20px;
      backdrop-filter: blur(20px);
      background-color: var(--color-light-1);

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

  & .detail {
    width: 100%;

    .item:not(.swiper-slide-active) & {
      @media screen and (min-width: 1025px) {
        display: none;
      }
    }

    & .name {
      font-weight: 400;
      font-size: 1.25rem;

      @media screen and (max-width: 1024px) {
        font-size: 1.125rem;
      }
    }
    & .caption {
      font-size: 0.875rem;
      color: var(--color-therity);
      margin-top: 4px;
    }
    & .text {
      font-size: 0.875rem;
      color: var(--color-secondary);
      margin-top: 24px;

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

/* CATEGORIES BOX */
.categories-box {
  display: flex;
  row-gap: 40px;
  flex-direction: column;
  position: relative;

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

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

  & .middle {
    display: flex;
    row-gap: 16px;
    flex-direction: column;
  }

  & .name {
    width: max-content;
    max-width: calc(100% - 60px);
    padding: 8px 16px;
    border-radius: 20px;
    /* backdrop-filter: blur(20px); */
    background-color: var(--color-light-2);

    & a.link {
      font-weight: 400;
      font-size: 1.125rem;

      &::before {
        content: '';
        z-index: 1;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
      }
      & .icon {
        --icon-size: 44px;
        --icon-fill: currentColor;

        z-index: 0;
        position: absolute;
        right: 24px;
        top: 24px;

        padding: 14px;
        border-radius: 12px;
        transition: transform .3s;
        background-color: var(--color-accent);
        transition: background-color .3s;
      }
      &:hover .icon {
        --icon-fill: var(--color-accent);
        background-color: var(--color-additional);

        & svg {
          transform: rotate(45deg);
        }
      }
    }
  }

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

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

  & .links {
    & ul {
      display: flex;
      row-gap: 6px;
      column-gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }

    & .link {
      display: block;
      z-index: 2;
      position: relative;
      font-size: 0.75rem;
      padding: 4px 8px;
      border-radius: 12px;
      background-color: var(--color-accent);
      transition: .3s;

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

  & .image {
    width: 100%;
    z-index: 0;
    margin-top: auto;
    position: relative;

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

    &::before {
      content: '';
      z-index: -1;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      aspect-ratio: 1;
      width: calc(100% - 90px);
      background: linear-gradient(180deg, var(--color-additional-2) 0%, var(--color-medium-additional-1) 100%);
      filter: blur(100px);
    }

    & :is(picture, img) {
      display: block;
    }
  }
}

/* SUB SERVICES CARD */
.sub-services-card {
  --sub-services-card-padding: 24px;
  position: relative;

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

  & .image {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 458 / 320;
    background-color: var(--color-light);

    & :is(picture, img) {
      display: block;
      object-fit: cover;
    }
    &:has(:is([alt="no-image.png"], [alt="no-image.svg"])) {
      padding: 20%;
    }
  }

  & .name {
    margin-top: 16px;

    & .link {
      --button-text-size: 1.5rem;

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

      &::before {
        content: '';
        z-index: 2;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
      }
      &:hover {
        /* text-decoration: underline; */
      }
    }

    & .icon {
      --icon-size: 44px;
      --icon-fill: currentColor;

      z-index: 1;
      position: absolute;
      right: var(--sub-services-card-padding);
      top: var(--sub-services-card-padding);
      padding: 14px;
      border-radius: 12px;
      background-color: var(--color-accent);
      transition: background-color .3s;

      .link:hover & {
        --icon-fill: var(--color-accent);
        background-color: var(--color-additional);

        & svg {
          transform: rotate(45deg);
        }
      }
    }
  }

  & .price {
    z-index: 1;
    position: absolute;
    left: var(--sub-services-card-padding);
    top: var(--sub-services-card-padding);
    background-color: var(--color-light-1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 4px 8px;
    font-weight: 400;
    font-size: 1.125rem;
  }
}

/* CONTACTS */
.contacts {
  display: flex;
  row-gap: 24px;
  flex-direction: column;

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

  & :is(.address, .schedule, .telephone, .email) {
    display: flex;
    row-gap: 4px;
    flex-direction: column;

    & span {
      font-size: 0.875rem;
      color: var(--color-therity);

      &:last-child {
        font-size: 0.75rem;
      }
    }

    & :is(p, a) {
      font-size: 1rem;
      margin: 0;
    }

    & a:hover {
      text-decoration: underline;
      color: var(--color-additional-hover);
    }

    &.email {
      font-weight: 400;

      & a {
        color: var(--color-additional);
      }
    }
  }
}
.contacts-mini {
  display: flex;
  row-gap: 16px;
  flex-direction: column;

  & p {
    font-size: 1.125rem;
    color: var(--color-secondary);
    margin-bottom: 0;
  }

  & .contacts {
    column-gap: 60px;
    flex-direction: row;
    align-items: start;

    & .telephone {
      & span {
        color: var(--color-secondary);
      }
      & a {
        font-weight: 400;
        font-size: 1.125rem;
        margin-top: 4px;
      }
    }
  }
}

/* FORM */
form {
  --form-placeholder-color: var(--color-therity);

  width: 100%;

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

  & .fields {
    display: flex;
    row-gap: 16px;
    flex-direction: column;


    & .field {
      width: 100%;
    }
  }
    
  & .group {
    width: 100%;
    padding: 24px;
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--color-light);

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

    .wrapper:has(.sidebar) & {
      border-radius: 0px;
      padding: 0 40px 40px 0;
      background-color: transparent;
    }
    .wrapper:has(.media) & {
      background-color: transparent;
    }

    & .heading {
      display: flex;
      row-gap: 16px;
      flex-direction: column;

      & .title {
        font-weight: 400;
        font-size: 1.5rem;
        line-height: 1.4;
        color: var(--color-secondary);
      }
      & .caption {
        color: var(--color-secondary);
      }
    }

    & .rows {
      display: flex;
      row-gap: 16px;
      flex-direction: column;

      & .title {
        font-weight: 400;
        color: var(--color-secondary);
      }
      & .fields {
        column-gap: 22px;
        flex-direction: row;
      }
      & .row {
        display: flex;
        row-gap: 16px;
        flex-direction: column;
      }
      & .row:not(:first-child):has(.title) {
        margin-top: 8px;
      }
    }
  }
}
.field {
  display: flex;
  row-gap: 4px;
  flex-direction: column;

  & > label {
    font-size: 0.875rem;
    
    & span {
      color: var(--color-danger);
    }
  }

  &:is(.field--text, .field--date, .field--tel, .field--email, .field--number) {
    --field-text-offset: 16px;
    --field-text-font-size: 0.875rem;

    & .control {
      position: relative;
    }

    & input {
      width: 100%;
      height: var(--field-text-height, 60px);
      border-radius: 12px;
      background-color: var(--color-accent);
      font-size: var(--field-text-font-size);
      padding: 0 var(--field-text-offset);
      color: var(--color-secondary);
    }

    & .placeholder {
      z-index: 1;
      position: absolute;
      left: var(--field-text-offset);
      top: 50%;
      transform: translateY(-50%);
      font-size: var(--field-text-font-size);
      color: var(--color-therity);
      pointer-events: none;

      transition: top .3s, transform .3s, font-size .3s;
    }
    & :is(input:focus-within, input:not(:placeholder-shown)) ~ .placeholder {
      font-size: 0.625rem;
      top: 4px;
      transform: none;
    }
  }
}