@import './../../styles/variables/index.scss';

.titleAndTextInRows {
  padding: 0 16px;
  margin-bottom: 80px;
  width: 100%;

  @media (min-width: 560px) {
    padding: 0 32px;
  }

  @media (min-width: 900px) {
    padding: 0 43px;
  }

  .title {
    margin-bottom: 16px;
    white-space: pre-line;
    @media (min-width: 560px) {
      margin-bottom: 26px;
    }
  }

  .subTitle p {
    margin: 0.3125em 0 0;
  }

  .subTitle p:first-child {
    margin: 0;
  }

  .subTitle h2 {
    color: $medium-blue;
    &:not(&:first-child) {
      margin-top: 40px;
    }
  }

  & + div[class*='highlightContainer'] {
    margin-top: 64px;

    @media (min-width: 560px) {
      margin-top: 80px;
    }

    @media (min-width: 900px) {
      margin-top: 120px;
    }
  }

  ul {
    padding: 0;
    margin: 0;

    li {
      list-style: none;
      padding-left: 15px;
      position: relative;
      margin: 0 0 0.35714285714285715em;

      &:before {
        content: '·';
        position: absolute;
        top: 0;
        left: 0;
        display: inline-block;
        vertical-align: middle;
        margin-right: 7px;
        margin-left: 4px;
      }
    }
  }

  .container {
    max-width: 1112px;
    width: 100%;
    margin: 0 auto;
    .content {
      width: 100%;
    }
  }

  &.small {
    .container {
      max-width: 576px;
      @media (min-width: 900px) {
        max-width: 770px;
      }
      .content {
        max-width: 683px;
      }
    }

    &.textLeft {
      .container {
        max-width: 576px;
        @media (min-width: 900px) {
          max-width: 1112px;
        }
        .content {
          max-width: 770px;
          .subTitle {
            max-width: 100%;
          }
        }
      }
    }

    &.textRight {
      .container {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        max-width: 576px;
        @media (min-width: 900px) {
          max-width: 1112px;
        }
        .content {
          max-width: 770px;
          .subTitle {
            max-width: 100%;
          }
        }
      }
    }
  }

  &.medium {
    .container {
      .content {
        max-width: 576px;
        @media (min-width: 900px) {
          max-width: 941px;
        }
      }
    }
    &.textRight {
      .container {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
      }
    }
    &.textCenter {
      .container {
        display: flex;
        flex-direction: row;
        justify-content: center;
      }
    }
  }

  &.large {
    .container {
      max-width: 576px;

      @media (min-width: 900px) {
        max-width: 1112px;
      }

      .content {
        max-width: 1024px;
      }
    }
    .subTitle {
      &.small {
        max-width: 683px;
      }
    }
    &.textRight {
      .container {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
      }
    }
    &.textCenter {
      .container {
        display: flex;
        flex-direction: row;
        justify-content: center;
      }
    }
  }

  &:first-of-type {
    margin-top: 70px;
    @media (min-width: 900px) {
      margin-top: 93px;
    }
  }
}
