/*-- -------------------------- -->
<---           Steps            -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #steps {
    background-color: var(--secondaryLight);
    padding: var(--sectionPadding);
  }
  #steps .cs-container {
    width: 100%;
    /* changes to 1104px on tablet */
    max-width: 34.375rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 48px - 64px */
    gap: clamp(3rem, 6vw, 4rem);
  }
  #steps .cs-content {
    /* set text align to left if content needs to be left aligned */
    text-align: left;
    width: 100%;
    max-width: 27.125rem;
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: flex-start;
  }

  #steps .cs-text {
    margin-bottom: 1rem;
  }
  #steps .cs-text:last-of-type {
    margin-bottom: 2rem;
  }

  #steps .cs-right-section {
    margin: 0;
    padding: 0;
    max-width: 35.125rem;
  }
  #steps .cs-item {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  #steps .cs-item-text {
    font-family: "Jost", sans-serif;
  }

  #steps .cs-item:nth-of-type(1) .cs-item-text:before {
    height: 50%;
    top: auto;
    bottom: -1px;
  }
  #steps .cs-item:nth-of-type(2),
  #steps .cs-item:nth-of-type(4) {
    justify-content: flex-end;
    text-align: right;
  }
  #steps .cs-item:nth-of-type(2) .cs-number,
  #steps .cs-item:nth-of-type(4) .cs-number {
    /* Send number to the right */
    order: 2;
    margin: 0;
    /* 15px - 24px */
    margin-left: clamp(0.9375rem, 3vw, 1.5rem);
  }
  #steps .cs-item:nth-of-type(2) .cs-item-text,
  #steps .cs-item:nth-of-type(4) .cs-item-text {
    /* reverse padding */
    padding-left: 0;
    /* 15px - 24px */
    padding-right: clamp(0.9375rem, 3vw, 1.5rem);
    /* reset the border on the :before */
  }
  #steps .cs-item:nth-of-type(2) .cs-item-text:before,
  #steps .cs-item:nth-of-type(4) .cs-item-text:before {
    border-top: 1px solid var(--primary);
    border-left: none;
    border-right: 1px solid var(--primary);
    left: auto;
    right: 0;
    bottom: 0;
    border-radius: 0 0.5rem 0.5rem 0;
  }
  #steps .cs-item:nth-of-type(2) .cs-item-text:after,
  #steps .cs-item:nth-of-type(4) .cs-item-text:after {
    /* move dot to the right now */
    left: auto;
    right: -0.9375rem;
  }
  #steps .cs-item:nth-of-type(3) .cs-item-text:before {
    height: auto;
    border-top: 1px solid var(--primary);
    border-radius: 0.5rem 0 0 0.5rem;
    top: 1px;
    bottom: 0px;
  }
  #steps .cs-item:nth-of-type(4) .cs-item-text:before {
    height: 50%;
    border-radius: 0 0.5rem 0 0;
    border-bottom: none;
    top: -1px;
  }
  #steps .cs-number {
    /* 16px - 20px */
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    /* 15px - 24px */
    margin-right: clamp(0.9375rem, 3vw, 1.5rem);
    /* 40px - 52px */
    width: clamp(2.5rem, 5.1vw, 3.25rem);
    height: clamp(2.5rem, 5.1vw, 3.25rem);
    border-radius: 50%;
    border: 2px solid var(--primary);
    color: var(--headerColor);
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    /* prevents flexbox from squishing it */
    flex: none;
    position: relative;
  }
  #steps .cs-item-text {
    /* 14px - 16px */
    font-size: clamp(0.875rem, 1.6vw, 1rem);
    line-height: 1.5em;
    margin: 0;
    max-width: 18.75rem;
    /* 22px - 32px */
    padding: clamp(1.375rem, 3vw, 2rem) 0;
    /* 15px - 24px */
    padding-left: clamp(1.2375rem, 3vw, 1.5rem);
    position: relative;
  }
  #steps .cs-item-text:before {
    /* Green line */
    content: "";
    width: 70%;
    height: 100%;
    border-radius: 0 0 0 0.5rem;
    border-left: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
    opacity: 1;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
  }

}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #steps .cs-container {
    max-width: 69rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    column-gap: 2.75rem;
  }
  #steps .cs-content {
    width: 50%;
    /* reset margin to play nice with flexbox */
    margin: 0;
  }
  #steps .cs-right-section {
    width: 57%;
    /* 20px - 25px - this pulls the section up so it's flush with the top of the left section, the padding top on the .cs-item-text is creating a gap at the top of the section. Wrapped in a calc() function to turn clamp() value into a negative number */
    margin-top: calc(clamp(1.25rem, 2vw, 1.5625rem) * -1);
  }
}
