:root {
  --border: #e5e5e5;
  --primary: var(--primary-600);

  /* Brand Shades */
  --primary-50: #f2fbfa;
  --primary-100: #e6f7f6;
  --primary-200: #b3e9e6;
  --primary-300: #80dbd6;
  --primary-400: #4dcdc6;
  --primary-500: #1abfb6;
  --primary-600: #00a7a1; /* Base Brand Color */
  --primary-700: #008c87;
  --primary-800: #00706c;
  --primary-900: #005552;
  --primary-950: #003937;

  /* Neutral Shades */
  --neutral-50: #fcfdfd;
  --neutral-100: #f8fafa;
  --neutral-200: #eef2f2;
  --neutral-300: #d9e2e2;
  --neutral-400: #b8c7c7;
  --neutral-500: #8fa3a3;
  --neutral-600: #6c8585;
  --neutral-700: #4e6666;
  --neutral-800: #334747;
  --neutral-900: #1f2f2f;
  --neutral-950: #0f1919;
}

* {
  text-box-trim: both;
  text-box-edge: cap alphabetic; /* Trims top to cap-height and bottom to alphabetic baseline */
}

/* Hide the Blog Header if on a post page - '.btn-view all' was the only element to determine if user was on post page */
.inner-page:has(.btn-view-all) .blog-header {
  display: none;
}


.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  margin: 0 -1rem 3rem -1rem;
  .blog-list-item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    transition: all 0.3s ease-in-out;
    &:hover {
      box-shadow: 0px 0px 20px rgba(0, 0, 0, 10%);
    }

    article {
      display: flex;
      flex-direction: column;
      flex-grow: 1;

      img {
        width: 100%;
        height: auto;
      }

      .blog-item-content {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        gap: 0.25rem;
        h2 {
          font-size: 26px;
          text-wrap: pretty;
          margin: 0;
        }

        .blog-categories-list {
          li {
            margin: 0;
            padding: 0;
            margin-right: 0.25rem;
            line-height: 1.1;
          }

          a {
            font-size: 0.7rem;
            color: #737373 !important;
            text-transform: uppercase;
          }
        }
        .blog-post-date {
          font-size: 0.7rem;
          color: #737373 !important;
          text-transform: uppercase;
        }
        .blog-excerpt {
          display: flex;
          flex-direction: column;
          flex-grow: 1;
          p {
            font-size: 0.9rem;
            line-height: 1.3;
            margin: 0;
            text-align: left !important;
          }
        }
        .read-more {
          display: flex;
          width: 100%;
          justify-content: end;
          margin-top: 0.25rem;
          a {
            background-color: var(--primary);
            color: white !important;
            padding: 0.25rem 1rem;
            display: flex;
            gap: 0.5rem;
            align-items: center;
            text-decoration: none;
            transition: all 0.3s ease-in-out;
            text-box-trim: both;
            text-box-edge: cap alphabetic;
            &:after {
              font-family: "Font Awesome 6 Free";
              font-weight: 900;
              font-size: 0.75rem;
              text-box-trim: both;
              text-box-edge: cap;
              content: "\f054";
            }
            &:hover {
              background-color: #000;
            }
          }
        }
      }
    }
    /* First Post - Featured Layout */
    &:first-child {
      grid-column: 1 / -1;
      margin-bottom: 1rem;
      article {
        flex-direction: row;
        .featured-image {
          flex-basis: 60%;
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }
        .blog-item-content {
          flex-basis: 40%;
        }
      }

      @media screen and (max-width: 1024px) {
        grid-column: auto;
margin-bottom: 0;
        article {
          flex-direction: column;
          .featured-image {
            flex-basis: auto;
            img {
              width: 100%;
              height: auto;
              object-fit: scale-down;
            }
          }
          .blog-item-content {
            flex-basis: auto;
          }
        }
      }
    }
  }
  @media screen and (max-width: 1024px) {
    grid-template-columns: repeat(2, 1fr);
  }
  @media screen and (max-width: 640px) {
    grid-template-columns: 1fr;
  }
}

.categories.mod {
  margin: 0;

  h3 {
    font-family: corporate-s, sans-serif !important;
    font-size: 1.2rem;
    &:after {
      display: none;
    }
  }

  ul {
    li {
      border: none;
      line-height: normal;
      padding: 0;
      margin-bottom: 0.5rem;
      a {
        font-family: corporate-s, sans-serif !important;
        display: inline-block;
        line-height: 1.1;
        margin-bottom: 0;
        color: black !important;
        text-decoration: underline;
        transition: color 0.25s ease-in-out;
        &:hover {
          color: var(--primary) !important;
        }
      }
    }
  }
}

/* Post CSS */

.blog-post-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  h1 {
    color: var(--primary);
    margin: 0;
  }
  .blog-post-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    align-self: stretch;
    padding-bottom: 1rem;

     @media screen and (max-width: 1024px) {
      flex-direction: column;
    }

    .blog-post-date-categories {
      display: flex;
      flex-direction: column;
      align-items: start;
      flex: 1 0 0;
      align-self: stretch;
    }
    .blog-post-date {
      font-size: 0.75rem;
      text-transform: uppercase;
      color: var(--neutral-600);
    }
    .blog-post-meta {
      display: flex;
      align-items:center;
      gap: 0.75rem;
      .blog-post-views {
        display:flex;
        align-items: center;
        gap:.25rem;
        flex-wrap:no-wrap;
        color: var(--neutral-600) !important;
      }
      .separator {
        color: var(--neutral-600) !important;
      }
      .blog-categories-list {
        a:not(.btn) {
          font-size: 0.85rem;
          text-transform: uppercase;
          color: var(--neutral-600) !important;
        }
      }
    }
    .blog-post-utility {
      display: flex;
      align-items: center;
      justify-content: stretch;
      align-self: flex-end;
       @media screen and (max-width: 1024px) {
        align-self: flex-start;
      }
    }
  }
}
.postInner-image {
  img {
    width:100%;
    height: auto;
    margin-bottom: 2rem;
  }
}
::part(share-button) {
  border-radius: 0px;
  text-transform: uppercase;
  --color-button-bg: var(--primary);
  transition: all 0.3s ease-in-out;
  height: auto;
  font-size: 1rem;
}
::part(share-button):hover {
  background-color: var(--primary-800);
  filter: none !important;
}
@media (max-width: 767.98px) {
.post.blog-single-post p {
  text-align:left !important;
}
}


/* Categories Widget Styling */
.categories.mod {
  margin: 1rem 0;

  h3{
    font-family: corporate-s, sans-serif !important;
    font-size: 1.2rem;
    &:after {
      display: none;
    }
  }

  ul {
    
    li {
      border: none;
      line-height:normal;
      padding: 0;
      margin-bottom: .5rem;
      a { 
        font-family: corporate-s, sans-serif !important;
        display: inline-block;
         line-height: 1.1;
         margin-bottom: 0;
         color: black !important;
         text-decoration: underline;
         transition: color .25s ease-in-out;
         &:hover {
          color: var(--primary) !important;
         }
      }
      
    }
  }
}