/* Set the width, padding, max-width, min-width, margin, and background-color of elements with class "content" and "archive-pagination" inside elements with class "blog-listing" */
.blog-listing .content,
.blog-listing .archive-pagination {
  width: 80%;
  padding-top: 60px;
  max-width: 1066px;
  min-width: 290px;
  margin: 0px auto;
  background-color: #fff;
}

/* Set the position and z-index of elements with class "content" inside elements with class "blog-listing" */
.blog-listing .content {
  position: relative;
  z-index: 1;
}

/* Set the background-color, width, and height of elements with class "ipwt-row" inside elements with class "blog-listing article" */
.blog-listing article.ipwt-row {
  background-color: unset;
  width: 48%;
  height: 520px;
}

/* Set the display, flex-direction, padding, background-color, and min-height of elements with class "article-wrap" inside elements with class "blog-listing" */
.blog-listing .article-wrap {
  display: flex;
  flex-direction: column;
  padding: 0px;
  background-color: #f6f6f6;
  height: inherit !important;
}

/* Set the padding-top of elements with class "entry-content" inside elements with class "article-wrap" inside elements with class "blog-listing" */
.blog-listing .article-wrap .entry-content {
  padding-top: 0px;
}

/* Set the order of elements with class "ipwt-image-wrap" inside elements with class "article-wrap" inside elements with class "blog-listing" */
.blog-listing .article-wrap .ipwt-image-wrap {
  order: 0;
}

/* Set the order of elements with class "ipwt-title" inside elements with class "article-wrap" inside elements with class "blog-listing" */
.blog-listing .article-wrap .ipwt-title {
  order: 2;
}

/* Set the order of elements with class "ipwt-cta" inside elements with class "article-wrap" inside elements with class "blog-listing" */
.blog-listing .article-wrap .ipwt-cta {
  order: 3;
}

/* Set the border of elements with class "entry-meta" inside elements with class "blog-listing" */
.blog-listing .entry-meta {
  border: none;
}

/* Set the display of elements with class "hide-on-mobile" inside elements with class "blog-listing" to none */
.blog-listing .hide-on-mobile {
  display: none;
}

/* Set the position, bottom, z-index, margin, and padding of elements with class "archive-pagination" inside elements with class "blog-listing" */
.blog-listing .archive-pagination {
  bottom: 80px;
  z-index: 0;
  margin: 0px auto;
  padding: 0px 0 30px;
}

/* Set the width of elements with class "content" and "archive-pagination" inside elements with class "blog-listing" to 70% when the screen width is at least 768px */
@media only screen and (min-width: 768px) {
  .blog-listing .content,
  .blog-listing .archive-pagination {
    width: 70%;
  }
}

@media only screen and (min-width: 960px) {
  .blog-listing .article-wrap {
    padding: 30px;
  }

  .blog-listing .article-wrap .ipwt-image-wrap {
    order: 2;
  }

  .blog-listing .article-wrap .ipwt-title {
    order: 0;
  }

  .blog-listing .article-wrap .ipwt-cta .button {
    margin-bottom: 0px;
  }

  .blog-listing .hide-on-mobile {
    display: block;
  }

  .blog-listing .archive-pagination {
    padding: 30px 0 30px;
  }
}

@media only screen and (max-width: 959px) {
  .blog-listing .ipwt-row:nth-child(2n + 1) {
    width: auto;
    position: unset;
    margin: 0px auto 40px;
  }

  .blog-listing .ipwt-row {
    margin-bottom: 40px;
  }

  .blog-listing .archive-pagination {
    min-width: 290px;
    width: 56%;
    margin: 0 auto;
    max-width: 350px;
    float: none;
  }
}

/* Default styles for alternating rows */
.ipwt-row:nth-child(odd) {
  background-color: #f6f6f6;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  right: 50%;
  margin-right: -50vw;
}

/* Remove margin-bottom from last row */
.ipwt-row:last-child {
  margin-bottom: 0px;
}

/* Wrapper for each row */
.ipwt-row-wrap {
  padding: 30px 0px;
  min-width: 290px;
  width: 80%;
  margin: 0;
  max-width: 350px;
  height: inherit;
}

/* Wrapper for image in each row */
.ipwt-image-wrap {
  width: 100%;
  height: 310px;
  padding-bottom: 30px;
}

/* Image in each row */
.ipwt-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CTA button in each row */
.ipwt-cta {
  margin-bottom: 0px;
}

/* Media query for screens with minimum width of 960px */
@media only screen and (min-width: 960px) {
  /* Make image/text rows full width */
  .image-paired-with-text.full-width {
    width: 100%;
    position: unset;
    margin: 0;
  }

  /* Reset alternating row styles */
  .ipwt-row,
  .ipwt-row:nth-child(odd) {
    position: relative;
    width: 100%;
    background-color: #f6f6f6;
    margin-bottom: 30px;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-content: center;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
  }

  /* Adjust padding and max-width for row wrapper */
  .ipwt-row-wrap {
    padding: 30px;
    min-width: auto;
    max-width: 350px;
  }

  /* Reset max-width and margins for row wrapper and image wrapper */
  .ipwt-row-wrap,
  .ipwt-image-wrap {
    max-width: none;
    margin: 0px;
  }

  /* Position image wrapper */
  .ipwt-image-wrap {
    position: absolute;
    width: calc(50% + 15px);
    right: 0px;
    top: 0px;
    padding-bottom: 0px;
    padding-left: 30px;
    background-color: #fff;
    height: 100%;
  }

  /* Remove margin-bottom from CTA button */
  .ipwt-cta {
    margin-bottom: 0px;
  }

  /* Limit max-width for title and description in each row */
  .ipwt-title,
  .ipwt-description {
    max-width: 350px;
  }
}

/* Media query for screens with minimum width of 961px and maximum width of 1280px */
@media only screen and (min-width: 961px) and (max-width: 1280px) {
  /* Set minimum height for each row */
  .ipwt-row,
  .ipwt-row:nth-child(odd) {
    min-height: 350px;
  }
}

@media only screen and (min-width: 1281px) {
  /* Set the minimum height of rows in alternating order */
  .ipwt-row,
  .ipwt-row:nth-child(odd) {
    min-height: 380px;
  }
}

@media only screen and (max-width: 959px) {
  .ipwt-row {
    height: 320px !important;
    width: 48% !important;
  }

  .blog-listing .article-wrap {
    padding-top: 10%;
  }

  .content .care-genesis-content .banner-none {
    max-height: 300px;
    padding-top: 5%;
  }

  .article-wrap .ipwt-row-wrap {
    padding-top: 10%;
  }

  .article-wrap .ipwt-title h4 {
    font-size: 20px;
  }
}

.blog-listing .article-wrap .ipwt-row-wrap {
  margin: 0;
}

.article-wrap .ipwt-description p {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: inherit;
  text-align: center;
}

.ipwt-row-wrap {
  height: 500px !important;
}

.ipwt-row-wrap,
.artcile-wrap .ipwt-title,
.article-wrap .ipwt-description p {
  width: 90%;
}

#genesis-content {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 2%;
}

@media only screen and (max-width: 850px) {
  #genesis-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}
