body.blog,
.archive.category {
  background: var(--wp--preset--color--bg-color-1);

  & h1 {
    color: var(--wp--preset--color--background);

    @media (min-width: 75rem) {
      margin-top: 5rem;
    }
  }
}

.archive.category .cta-horizontal-with-html5-animation {
  @media (min-width: 75rem) {
    padding-bottom: 5rem;
  }
}

.archive .posts-listing .post-item .thumbnail {
  & img {
    width: 100%;
    height: 100%;
    max-height: unset;
    object-fit: cover;
    object-position: center;
  }

  & a {
    display: flex;

    @media (min-width: 62rem) {
      /*aspect-ratio: 1/0.558405918;*/
    }
  }
}

.archive .posts-listing .item-first .thumbnail a {
  max-width: 100%;
  min-height: 100%;
}

.post-category {
  & ul {
    list-style: none;
  }

  & li {
    line-height: 1;
  }
}

.blog-post-title {
  color: var(--wp--preset--color--body-text);
  font-weight: 700;
}

.posts-listing .post-item .post-time,
.posts-listing .post-item .card-text {
  color: var(--wp--preset--color--text-1);
  line-height: normal;
  font-size: max(16px, 1.063rem);
  font-weight: 400;
  font-style: normal;

  @media (min-width: 87.5rem) {
    font-size: 1.511rem;
  }
}

.posts-listing .post-item .post-time {
  opacity: 0.5;
}

.posts-listing .post-item .post-time > span:not(:last-child):after {
  content: "";
  display: inline-block;
  position: relative;
  top: -0.125rem;
  width: 0.25rem;
  height: 0.25rem;
  margin-right: 0.125rem;
  margin-left: 0.313rem;
  border-radius: 50%;
  background: var(--wp--preset--color--text-1);
}

.like-heart {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-width: 5.313rem;
  margin-right: 0.625rem;
  padding: 0.5rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 3rem;
  background: var(--wp--preset--color--background);
  color: var(--bs-pink);
  line-height: 1;
  font-family: var(--wp--preset--font-family--circle-rounded-extra-bold);
  font-size: min(var(--font-size--h6), 1.734rem);
  transition: all 0.75s;
  cursor: pointer;

  @media (min-width: 48rem) {
    padding: 0.63rem 0.8rem;
  }

  &:hover, /*updated*/
  &:focus,
  &:focus-visible {
    /*background-color: var(--bs-body-color);*/
  }

  .item-first & {
    box-shadow: 0 0 0.938rem rgb(0 60 107 / 30%);
  }

  & .heart {
    display: inline-block;
    width: 1.825rem;
    height: 1.438rem;
    margin-left: 0.375rem;
    background: url(../img/heart_icon.svg) no-repeat center;
    background-size: contain;
    cursor: pointer;
  }

  & .heart.is-active {
    background-image: url(../img/heart_icon_fill.svg);
    animation-name: like-heart-animation;
    animation-duration: 1000ms;
    animation-timing-function: ease-in-out;
  }

  & span.count {
    position: relative;
    top: 0.063rem;
    min-width: 1.438rem;
    text-align: center;
    opacity: 1 !important;
  }
}

@keyframes like-heart-animation {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  15% {
    opacity: 0.9;
    transform: scale(1.2);
  }

  30% {
    transform: scale(0.95);
  }

  45%,
  80% {
    opacity: 0.9;
    transform: scale(1);
  }
}

.post-item:not(.item-first) .post-info {
  height: 100%;
}

.wp-block-image figure,
[class*="wp-block"] .wp-block-image figure {
  margin-bottom: 0;
}

section.news-slider-block {
  & .post-item .post-info .info-inner {
    /* prevents the folllowing .blog styles from adversely affecting the news slider block */
    padding: var(--bs-gutter-x) calc(var(--bs-gutter-x)) !important;
  }
}

#id-for-specificity,
.blog .posts-listing {

  /* ---- card base */

  & .post-item .card {
    display: flex;
    overflow: hidden;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: start;
    height: unset;
  }

  & .post-item.item-first .card {
    display: flex;
    overflow: hidden;

    & > .row {
      flex-direction: row-reverse;
      margin: 0;

      @media (min-width: 62rem) {
        flex-direction: row;
      }

      > * {
        padding: 0 !important;
      }
    }

    @media (min-width: 62rem) {
      display: block;
    }
  }

  & .post-item:not(.item-first) .card {
    @media (min-width: 62rem) {
      flex-direction: column;
      flex-wrap: nowrap;
      height: 100%;
    }
  }

  /* ---- layout */

  & .post-item .card {
    & .thumbnail,
    & .post-info {
      flex: 0 0 auto;
      width: 50%;
      height: unset;
      transition: none; /* stops any transition affecting the width on page resize */
    }
  }

  & .post-item:not(.item-first) {
    & .thumbnail {
      @media (min-width: 36rem) {
        width: 41.66666667%;
      }
      @media (min-width: 62rem) {
        width: 100%;
      }
    }
    & .post-info {
      @media (min-width: 36rem) {
        width: 58.33333333%;
      }
      @media (min-width: 62rem) {
        width: 100%;
      }
    }
  }

  & .post-item.item-first .card {
    & .thumbnail {
      @media (min-width: 36rem) {
        width: 41.66666667%;
      }
      @media (min-width: 62rem) {
        width: 50%;
      }
      @media (min-width: 75rem) {
        width: 58.33333333%;
      }
    }
    & .post-info {
      @media (min-width: 36rem) {
        width: 58.33333333%;
      }
      @media (min-width: 62rem) {
        width: 50%;
      }
      @media (min-width: 75rem) {
        width: 41.66666667%;
      }
    }
  }

  /* ---- thumbnail styling */

  & .post-item .card .thumbnail {
    &,
    & a {
      display: flex;
      align-items: stretch;
    }

    & a {
      flex: 0 0 100%;
    }

    & img {
      display: block;
      flex: 0 0 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
  }

  & .post-item.item-first .card .thumbnail {
    & a {
      align-items: start;

      @media (min-width: 62rem) {
        min-height: max(25rem, 20vw);
        max-height: max(30rem, 25vw);
      }
    }

    & img {
      aspect-ratio: 4 / 3 !important;

      @media (min-width: 62rem) {
        aspect-ratio: auto !important;
      }
    }
  }

  & .post-item:not(.item-first) .card .thumbnail {
    & img {
      /*aspect-ratio: 4 / 3;*/

      @media (min-width: 62rem) {
        /*aspect-ratio: 1000/1776;*/
      }
    }
  }

  /* ---- content */

  & .post-item .card {
    & .post-info {
      height: auto;

      @media (min-width: 62rem) {
        flex: 1;
      }
    }
  }

  & .post-item:not(.item-first) .card .post-info {
    background: var(--wp--preset--color--background, #e9eff6);

    @media (min-width: 62rem) {
      background: var(--wp--preset--color--mist-100, #e9eff6);
    }
  }

  /* ---- other */

  & .blog-action .learn-more {
    --size: 2.25rem;

    @media (min-width: 48rem) {
      --size: 3rem;
    }
  }

  & .like-heart {
    font-size: 1rem;
    @media (min-width: 48rem) {
      font-size: min(var(--font-size--h6), 1.734rem);
    }

    & .heart {
      height: min(1.125em, 1.438rem);
    }
  }


  & .post-item .card {
    & .blog-action,
    & .post-info__actions {
      position: absolute;
      right: 1rem;
      bottom: 1rem;

      @media (min-width: 62rem) {
        position: static;
      }

      & > * {
        box-shadow: var(--wp--preset--shadow--natural);
      }
    }

    & .blog-post-title {
      font-size: var(--font-size--body) !important;

      @media (min-width: 36rem) {
        font-size: var(--font-size--h5-small) !important;
      }
      @media (min-width: 48rem) {
        font-size: var(--font-size--h4) !important;
      }
      @media (min-width: 62rem) {
        font-size: var(--font-size--h6) !important;
      }
    }

    & .card-text {
      display: none;

      @media (min-width: 62rem) {
        display: block;
      }
    }
  }

  & span[title*="Posted"],
  & .span-reading-time {
    display: inline-flex;
    gap: 0.25em;
    font-size: var(--wp--preset--font-size--small);

    @media (min-width: 36rem) {
      font-size: max(16px, 1.063rem);
    }

    & > span:empty {
      display: none;
    }
  }
}

.blog-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.blog-action .learn-more svg {
  width: 0.688rem;
}

.blog-action .learn-more {
  --size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--bs-body-bg);
  box-shadow: 0 0 0.938rem rgb(0 60 107 / 30%);
  line-height: normal;
  transition: all .3s;

  @media (min-width: 48rem) {
    --size: 2.922rem;
  }
}

.blog-action .learn-more:hover path, /*updated*/
.blog-action .learn-more:focus path,
.blog-action .learn-more:focus-visible path {
  /*stroke: var(--wp--preset--color--background);*/
}

/*.blog-action .learn-more:hover, /*updated*/
/*.blog-action .learn-more:focus,
/*.blog-action .learn-more:focus-visible {
   box-shadow: 0px 0px 35px rgb(0 60 107 / 30%);
}
*/

.blog .pagination .next.page-numbers,
.blog .pagination .prev.page-numbers {
  position: relative;
  top: -0.1rem;
}

.blog .cta-horizontal-with-html5-animation {
  @media (min-width: 48rem) {
    padding-bottom: 2rem;
  }

  @media (min-width: 75rem) {
    padding-bottom: 5rem;
  }

  @media (min-width: 87.5rem) {
    padding-bottom: 3rem;
  }
}

.post-item .post-info {
  display: flex;
  flex-direction: column;

  & .info-inner {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-content: space-between;
    justify-content: flex-start;
    height: auto;
    margin-left: -0.125rem;

    @media (min-width: 62rem) {
      justify-content: flex-end;
    }
  }
}

.post-item .card-text .text-body {
  display: -webkit-box;
  overflow: hidden;
  /*noinspection CssInvalidPropertyValue*/
  text-overflow: -o-ellipsis-lastline;
  text-overflow: ellipsis;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.post-item .card-body,
.post-item .info-top {
  width: 100%;
  padding: 0;
}

.post-item .thumbnail-o {
  width: 100%;
  height: 100%;
}

.posts-listing {
  .pagination {
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--wp--preset--color--background);
    text-align: center;
    font-size: min(max(1.5rem, calc(1.5rem + (2.0394 - 1.5) * ((100vw - 48rem) / (100 - 48)))), 2.0394rem);
    cursor: pointer;

    & a {
      color: var(--wp--preset--color--background);
      line-height: 1;
      text-decoration: none;
    }

    & > * {
      margin: 0 0.625rem;
    }
  }

  & .load-more,
  & .count-post *,
  & .no-post {
    color: var(--wp--preset--color--background);
  }

  & .no-post {
    margin-bottom: 2.5rem;
  }

  & .page-numbers.current {
    line-height: 1;
    font-family: var(--wp--preset--font-family--circle-rounded-extra-bold);
  }

}

.pagination .next.page-numbers,
.pagination .prev.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.922rem;
  height: 2.922rem;
  outline: 0;
  border: 1px solid var(--wp--preset--color--background);
  border-radius: 50%;
  background: var(--wp--preset--color--background);
  background-image: url(../img/next.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.688rem;
  box-shadow: 0px 0px 0.938rem rgb(0 60 107 / 30%);
  line-height: normal;
  font-size: 0;
  transition: background-color .3s;
}

.pagination .prev.page-numbers {
  transform: scale(-1, 1);
}

/*.pagination .prev.page-numbers:hover, /*updated*/
/*.pagination .prev.page-numbers:focus,
/*.pagination .prev.page-numbers:focus-visible,
/*.pagination .next.page-numbers:hover, /*updated*/
/*.pagination .next.page-numbers:focus,*/
/*.pagination .next.page-numbers:focus-visible {*/
/*   opacity: 0.8;*/
/*}*/


/*=====================================================================*/

body.single-post {
  background: var(--wp--preset--color--mist-100, #e9eff6);
}

.single-post .site-content .entry-content {
  overflow: visible;
}

.single-post header.entry-header {
  background: var(--wp--preset--color--bg-color-1, #003c6b);
  color: var(--wp--preset--color--background, #fefefe);

  @media (min-width: 75rem) {
    padding-bottom: 9.9rem !important;
  }
}

.single-post .entry-header h1 {
  font-weight: 300;

  @media (min-width: 75rem) {
    max-width: 52rem;
  }

  @media (min-width: 87.5rem) {
    max-width: 62.5rem;
  }
}

body.single-post .breadcrumb-scroller {
  display: none;
}

/* Post content */
.single-post .content-inner {
  margin-top: -3rem;
  border-radius: 1.25rem;
  background: var(--wp--preset--color--background, #fefefe);
  font-family: var(--wp--preset--font-family--circle-rounded-light);
  font-weight: normal;

  @media (min-width: 75rem) {
    margin-top: -6.6rem;
    line-height: 1.35304934;
    font-size: 2.039rem;
  }

  & > * {
    @media (min-width: 75rem) {
      margin-top: 3rem;
      margin-bottom: 3rem;
      padding: 0 5rem !important;
    }

    @media (min-width: 87.5rem) {
      padding: 0 7rem !important;
    }
  }

  & h2,
  & h3,
  & h4,
  & h5,
  & h6 {
    &:not(:first-child) {
      /* a little extra margin to sub heading sections a bit better */
      margin-top: 2rem;
    }
  }
}

.single-post .content-inner strong {
  font-family: var(--wp--preset--font-family--circle-rounded-alt-bold);
  font-weight: normal;
}

/* Images and Figures */
.single-post .content-inner {
  --figure-margin: 2rem;

  @media (min-width: 75rem) {
    --figure-margin: 2.5rem;
  }

  & p > img,
  & .wp-block-image {
    position: relative;
    /*    overflow: hidden;*/
    /*aspect-ratio: 1/0.562933598;*/
    margin-top: var(--figure-margin, 2rem);
    margin-bottom: var(--figure-margin, 2rem);
    border-radius: 0.625rem;
  }

  & .figure img,
  & .wp-block-image img {
    position: relative;
    z-index: 1;
    width: 100% !important;
    max-width: 100%;
    height: 100%;
    border-radius: 0.625rem;
    object-fit: cover;
  }

  & p > img,
  & .wp-block-image,
  & figure {
    @media (min-width: 75rem) {
      width: calc(100% + (var(--bs-gutter-x, 1rem) * 4.4));
      max-width: none;
      margin-right: calc(-2.2 * (var(--bs-gutter-x, 1rem)));
      margin-left: calc(-2.2 * (var(--bs-gutter-x, 1rem)));
      border-radius: 0.625rem;
    }
  }

  & .wp-block-image::after {
    /* Drop-shadow effect */
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 0;
    left: 4%;
    width: 92%;
    height: 70%;
    background: var(--wp--preset--color--grey-40);
    filter: blur(1.5rem);
    -webkit-filter: blur(1.5rem);

    @media (min-width: 48rem) {
      filter: blur(2.5rem);
      -webkit-filter: blur(2.5rem);
    }
  }

  & figure figcaption,
  & .wp-block-image figcaption {
    --gradient-padding-top: 1em;
    display: block;
    position: relative;
    z-index: 2;
    margin: 0;
    padding: var(--gradient-padding-top, 1em) 0 0.5em; /* deliberate em use - needs to take spacing from parent */
    color: var(--wp--preset--color--grey-100);
    font-size: var(--font-size--body-small, 1rem);

    &::after {
      /* covers up any extra unneeded shadow */
      /* deliberate em use - needs to take spacing from parent */
      content: "";
      display: block;
      position: absolute;
      z-index: -1;
      top: 25%;
      width: 100%;
      height: 100%;
      min-height: calc(var(--figure-margin) * 2);
      background: linear-gradient(#ffffff01 calc(var(--gradient-padding-top, 1em) * -1), var(--wp--preset--color--background) 2em); /* deliberate em use - needs to take spacing from parent */
      background-color: var(--wp--preset--color--background);
      filter: blur(0.5em);
    }
  }
}

.single-post .content-inner span.rt-reading-time {
  display: none !important;
}

.single-post .entry-meta-wrap {
  background: var(--wp--preset--color--bg-color-1, #003c6b);
}

.single-post .entry-meta {
  display: flex;
  /*   font-size: 1.766rem;*/
  flex-wrap: wrap;
  margin-bottom: -0.063rem;
  color: var(--wp--preset--color--text-2);
  line-height: normal;
  font-weight: 400;
  font-style: normal;

  @media (min-width: 75rem) {
    padding-top: 10rem;
  }

  & a {
    color: var(--wp--preset--color--text-2);
    /*   text-decoration: none;*/
  }

  & > span:not(:last-child):after {
    content: "";
    display: inline-block;
    position: relative;
    top: -0.125rem;
    width: 0.313rem;
    height: 0.313rem;
    margin: 0 0.4rem 0 0.4rem;
    border-radius: 0.313rem;
    background: var(--wp--preset--color--text-2);
  }
}

.entry-meta-wrap ~ section.wysiwyg-content:last-child {
  margin-bottom: 5rem;
}

.masonry-layout-2-1 .masonry-tile__type-quote:last-child .card-title {
  @media (min-width: 75rem) {
    padding: 0 1rem;
  }

  @media (min-width: 87.5rem) {
    padding: 0 2rem;
  }
}

.single-case-study .masonry-layout-2-1 .masonry-tile__type-image:first-child .card-title {
  @media (min-width: 48rem) {
    max-width: min(max(9rem, calc(9rem + (17 - 9) * ((100vw - 48rem) / (100 - 48)))), 17rem)
  }
}

.single-case-study .masonry-layout-2-1 .masonry-tile__type-quote:last-child .card-title {
  text-align: center;
}
