/* ============================================================
   FAQ — двухколоночный блок с ответами на частые вопросы
   ============================================================ */

.faq {
  background-color: var(--clr-bg-primary);
  min-height: clamp(640px, 56.1vw, 1077px);
  padding-block: clamp(2.5rem, 6vw, 4.6rem);
  position: relative;

  &__frame {
    box-sizing: border-box;
    margin-inline: 0;
    max-width: none;
    width: 100%;
  }

  &__container {
    padding-block: 23px;
    padding-inline: clamp(28px, 5.5vw, 105px) clamp(24px, 4vw, 77px);

    @media (max-width: $bp-md) {
      padding-block: clamp(16px, 4vw, 23px);
      padding-inline: var(--container-padding);
    }

    @media (width <= #{$features-mq-narrow}) {
      margin-inline: auto;
      max-width: 394px;
      padding-inline: 16px;
    }
  }

  &__grid {
    align-items: start;
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 4vw, 3rem);

    @media (min-width: $bp-md) {
      align-items: flex-start;
      flex-direction: row;
      gap: clamp(2rem, 4vw, 5rem);
    }

    @media (width <= #{$features-mq-narrow}) {
      gap: 52px;
    }
  }

  &__intro {
    max-width: 22rem;

    @media (min-width: $bp-md) {
      flex: 0 1 39%;
      max-width: none;
    }
  }

  &__badge {
    color: var(--clr-text-inverse);
    display: inline-block;
    font-family: var(--font-manrope);
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: var(--font-size-56);
    font-style: normal;
    font-weight: 600;
    height: auto;
    leading-trim: both;
    letter-spacing: -1.4px;
    line-height: 100%;
    margin: 18px 0 8px 28px;
    min-height: 1.2em;
    position: relative;
    text-align: center;
    text-edge: cap;
    text-transform: uppercase;
    z-index: 0;

    &::before {
      background: #02a8a8;
      content: '';
      height: 56px;
      inset: 0;
      position: absolute;
      transform: translate(-21px, -8px) rotate(-1.412deg);
      width: 624px;
      z-index: -1;
    }

    @media (max-width: $bp-1600) {
      &::before {
        height: 52px;
        width: 560px;
      }
    }

    @media (max-width: $bp-1440) {
      &::before {
        height: 48px;
        width: 500px;
      }
    }

    @media (max-width: $bp-1280) {
      &::before {
        height: 44px;
        width: 440px;
      }
    }

    @media (max-width: 1920px) {
      &::before {
        width: 365px;
      }
    }

    @media (max-width: 1140px) {
      &::before {
        width: 440px;
      }
    }

    @media (width >= 1420px) {
      &::before {
        height: 70px;
        width: 623px;
      }
    }

    @media (max-width: $bp-md) {
      color: #353535;
      font-size: 32px;
      font-weight: 300;
      letter-spacing: -0.8px;
      line-height: 32px;
      margin: 0 auto;
      max-width: 100%;
      text-transform: none;

      &::before {
        display: none;
      }
    }

    @media (width <= #{$features-mq-narrow}) {
      color: #fff;
      font-family: var(--font-manrope);
      font-size: 32px;
      font-style: normal;
      font-weight: 600;
      letter-spacing: -0.8px;
      line-height: 100%;
      padding-left: 12px;
      text-align: center;
      text-transform: uppercase;

      /* stylelint-disable order/properties-alphabetical-order, property-no-unknown */
      font-feature-settings: 'liga' off, 'clig' off;
      leading-trim: both;
      text-edge: cap;
      /* stylelint-enable order/properties-alphabetical-order, property-no-unknown */

      /* Подложка за текстом: ширина и сдвиг под узкую мобильную колонку. */
      &::before {
        background: #02a8a8;
        content: '';
        display: block;
        height: 35px;
        position: absolute;
        transform: translate(9px, -2px) rotate(-1.412deg);
        width: 342px;
        z-index: -1;
      }
    }
  }

  &__intro-sub {
    color: #353535;
    font-family: var(--font-manrope);
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: clamp(0.875rem, 2.2vw, 27px);
    font-style: normal;
    font-weight: 400;
    leading-trim: both;
    line-height: 1.15;
    margin: 0;
    margin-left: clamp(0px, 1.25vw, 24px);
    position: relative;
    text-align: center;
    text-edge: cap;
    text-transform: uppercase;
    z-index: 1;

    @media (max-width: $bp-md) {
      color: #353535;
      font-size: 32px;
      font-weight: 300;
      letter-spacing: -0.8px;
      line-height: 32px;
      margin-left: 0;
      text-align: center;
      text-transform: none;
    }

    @media (width <= #{$features-mq-narrow}) {
      color: #353535;
      font-family: var(--font-manrope);
      font-size: 15px;
      font-style: normal;
      font-weight: 400;
      line-height: 100%;
      margin-top: 3px;
      text-transform: uppercase;

      /* stylelint-disable order/properties-alphabetical-order, property-no-unknown */
      font-feature-settings: 'liga' off, 'clig' off;
      leading-trim: both;
      text-edge: cap;
      /* stylelint-enable order/properties-alphabetical-order, property-no-unknown */
    }

    @media (min-width: #{$bp-md + 1px}) {
      line-height: 100%;
      text-align: start;
    }
  }

  &__entries {
    display: flex;
    flex-direction: column;
    gap: 27px;
    min-width: 0;

    @media (min-width: $bp-md) {
      flex: 1 1 62%;
    }

    @media (width <= #{$features-mq-narrow}) {
      gap: 22px;
    }
  }

  &__block {
    &:first-child {
      padding-top: 0;
    }

    &--last {
      padding-bottom: 0;
    }
  }

  /* Перенос в заголовке вопроса — только на узких экранах. */
  &__question-br-490 {
    display: none;

    @media (width <= #{$features-mq-narrow}) {
      display: block;
    }
  }

  &__question-heading {
    border-bottom: 1px solid rgba(53, 53, 53, 0.22);
    color: #353535;
    display: block;
    font-family: var(--font-manrope);
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: var(--font-size-56);
    font-style: normal;
    font-weight: 600;
    leading-trim: both;
    letter-spacing: -1.68px;
    line-height: 1.12;
    margin: 0 0 0.75rem;
    padding-bottom: 0.75rem;
    text-edge: cap;

    @media (max-width: $bp-1600) {
      letter-spacing: -1.4px;
    }

    @media (max-width: $bp-1440) {
      letter-spacing: -1.2px;
    }

    @media (max-width: $bp-1280) {
      letter-spacing: -1px;
    }

    @media (max-width: $bp-md) {
      border-bottom-color: #000;
      border-bottom-width: 0.5px;
      font-size: 32px;
      font-weight: 600;
      letter-spacing: -0.8px;
      line-height: 32px;
      text-align: left;
    }

    @media (width <= #{$features-mq-narrow}) {
      color: #353535;
      font-family: var(--font-manrope);
      font-size: 32px;
      font-style: normal;
      font-weight: 600;
      letter-spacing: -0.8px;
      line-height: 100%;

      /* stylelint-disable order/properties-alphabetical-order, property-no-unknown */
      font-feature-settings: 'liga' off, 'clig' off;
      leading-trim: both;
      text-edge: cap;
      /* stylelint-enable order/properties-alphabetical-order, property-no-unknown */
    }
  }

  &__answer-text {
    color: #353535;
    font-family: var(--font-manrope);
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: var(--font-size-28);
    font-style: normal;
    font-weight: 400;
    leading-trim: both;
    line-height: 1;
    margin: 0;
    max-width: 54rem;
    text-edge: cap;

    @media (max-width: $bp-md) {
      font-size: 16px;
      line-height: 16px;
    }

    @media (width <= #{$features-mq-narrow}) {
      br {
        display: none;
      }
    }
  }

  &__brand {
    bottom: 40px;
    display: block;
    height: 16.583px;
    left: 50%;
    margin: 0;
    position: absolute;
    transform: translateX(-50%);
    width: 125px;
  }

  @media (width <= #{$features-mq-narrow}) {
    padding-bottom: 67px;

    &__brand {
      bottom: 14px;
      width: 76px;
    }
  }
}
