@import url('../../scripts/splide/splide-core.min.css');

.benefit-block {
  background: var(--primary-main);
  color: var(--tertiary-white);
  font-family: var(--font-primary-nexa);
  padding-bottom: 40px;
  margin-bottom: -1px;

  @media (width >=768px) {
    padding-bottom: 64px;
  }

  .benefit-block-title {
    margin: 40px 0 48px;
    font-size: 32px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0.64px;

    @media (width >=1024px) {
      margin: 64px 0;
      font-size: 48px;
      line-height: 58px;
      letter-spacing: 0.96px;
    }
  }

  .benefit-container {
    .benefit-item {

      .item-image {
        margin: 0;
        object-fit: cover;
        object-position: center;
      }

      .item-title :is(h1, h2, h3, h4, h5, h6, p) {
        margin: 24px 0 8px;
        font-size: 20px;
        font-weight: 500;
        line-height: 28px;
        letter-spacing: 0.4px;

        @media(width>=1024px) {
          margin: 24px 0 12px;
        }

        p {
          margin: 0;
        }

        @media (width >=1024px) {
          line-height: 26px;
        }
      }

      .item-content {
        margin: 0;
        color: var(--tertiary-light-grey);
        font-size: 14px;
        font-weight: 300;
        line-height: 20px;

        p,
        ul {
          margin: 0;

          &:not(:last-child) {
            margin: 0 0 16px 0;
          }
        }

        ul {
          padding: 0 0 0 20px;
          list-style: disc;

          li:not(:last-child) {
            padding-bottom: 8px;
          }
        }

        @media (width >=1024px) {
          font-size: 16px;
        }
      }
    }
  }

  .bottom-area {
    margin-top: 48px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    justify-content: center;

    @media (width >=1024px) {
      justify-content: flex-end;
    }

    .arrow-buttons {
      display: flex;
      gap: 16px;
      justify-content: space-between;
      order: 2;
      width: 100%;
      z-index: 9;
      max-width: 320px;

      @media (width >=1024px) {
        justify-content: flex-end;
        gap: 24px;
      }

      .arrow.right,
      .arrow.left {
        background: none;
        border: none;
        padding: 0;
        width: 32px;
        height: 32px;

        @media (width >=768px) {
          width: 48px;
          height: 48px;
        }
      }

      .arrow.right::after,
      .arrow.left::after {
        content: '';
        width: 32px;
        height: 32px;
        cursor: pointer;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        display: block;
        background-image: url(../../icons/carousel_arrow_white_mobile.svg);

        @media (width >=1024px) {
          width: 48px;
          height: 48px;
          background-image: url(../../icons/carousel_arrow_white.svg);
        }
      }

      .arrow.left {
        transform: scale(-1, 1);
      }

      .arrow.right:hover,
      .arrow.left:hover {
        @media (width >=1024px) {
          display: flex;
          background: url(../../icons/carousel_arrow_white_border.svg) no-repeat;
        }
      }

      .arrow {
        width: 48px;
        height: 48px;

        &:disabled {
          cursor: not-allowed;
          opacity: 0.5;

          &:hover {
            background: none;
          }
        }
      }
    }

    .splide__arrows.arrow-buttons.splide__arrows--ltr {

      .splide__arrow.splide__arrow--prev.hide,
      .splide__arrow.splide__arrow--next.hide {
        display: none;
      }
    }

    @media (width >=1024px) {
      .splide__arrows {
        order: 2;
      }
    }

    .pagination {
      position: absolute;
      top: calc(50% - 2px);
      width: 100%;
      column-gap: 4px;
      display: flex;
      justify-content: center;

      @media (width >=1024px) {
        display: none;
      }

      .dot {
        transition: background 0.3s;
        background-image: url(../../icons/carousel_dot_inactiveMobile.svg);
        background-position: center;
        background-size: cover;
        height: 0.25rem;
        width: 0.411rem;

        @media (width >=1024px) {
          width: 8.6px;
          height: 8px;
        }

        &.active {
          background-image: url(../../icons/carousel_dot_activeMobile.svg);
          width: 46.2px;
          height: 4px;

          @media (width >=1024px) {
            width: 48px;
            height: 8px;
          }
        }
      }
    }
  }
}

.block.darkThemeWithoutEdges,
.block.whiteThemeWithoutEdges {

  &::after,
  &::before {
    display: none;
  }

  .benefit-block {
    .benefit-block-title {
      font-family: var(--font-primary-nexa);
      font-size: var(--body-font-size-xl);
      font-style: normal;
      font-weight: var(--fw-500);
      line-height: var(--heading-lh-4-des-display);
      letter-spacing: 0.96px;

      @media(width>=1024px) {
        font-size: var(--heading-font-9-mob);
      }
    }

  }
}

.block.darkThemeWithoutEdges {
  .benefit-block {
    background: var(--tertiary-black);

    .benefit-block-title {
      color: var(--tertiary-white);
      max-width: 615px;
    }
  }
}

.block.whiteThemeWithoutEdges {
  .benefit-block {
    background: var(--tertiary-light-grey);

    .benefit-block-title {
      color: var(--tertiary-black);
      max-width: 402px;
    }

    .item-title :is(h1, h2, h3, h4, h5, h6, p) {
      color: var(--primary-main);
    }

    .item-content {
      color: var(--secondary-main);
    }

    .arrow-buttons {
      .arrow.right {
        &:after {
          background: url('/icons/carousel-black.svg') no-repeat center;
        }
      }

      .arrow.left {
        &:after {
          background: url('/icons/carousel-black.svg') no-repeat center;
        }
      }
    }

    .pagination {
      .dot {
        transform: skewX(-40deg);
        background: var(--tertiary-medium-grey);

        &.active {
          background: var(--secondary-main);
        }
      }
    }
  }
}