.blog-article {
  padding-block: calc(var(--pt, 3) * var(--base-section-pd, 1rem)) calc(var(--pb, 3) * var(--base-section-pd, 1rem));

  @media (max-width: 749px) {
    padding-block: calc(var(--pt-m, var(--pt, 2)) * var(--base-section-pd, 1rem)) calc(var(--pb-m, var(--pb, 2)) * var(--base-section-pd, 1rem));
    padding-inline: calc(var(--site-padding) + 16px);
  }
}

[data-template="article-learn"] .blog-article {
  @media (max-width: 749px) {
    padding-inline: var(--site-padding);
  }
}

.blog-article__main {
  flex: 1 1 0;
  min-width: 0;

  .breadcrumbs {
    margin-bottom: 1.5rem;

    ol {
      text-transform: none;
      font-weight: 300;
      font-size: inherit;
    }

    a {
      color: var(--color-primary);
      text-decoration: none;
    }
  }
}

.blog-article__title {
  margin-bottom: 1rem;

  @media screen and (max-width: 749px) {
    font-size: 1.5rem;
  }
}

/* Featured image */
.blog-article__featured-image {
  width: 100%;
  aspect-ratio: 25 / 12;
  margin-bottom: 1.5rem;
  overflow: hidden;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Meta bar */
.blog-article__meta {
  margin-bottom: 1.5rem;
  color: var(--color-mid-dark-grey, #555);
}

.blog-article__meta-author {
  padding-right: 1rem;
  border-right: 1px solid var(--color-mid-grey, #ccc);
}

.blog-article__meta-author-name {
  color: var(--color-darker-grey, #333);
}

.blog-article__meta-date {
  color: var(--color-darker-grey, #333);
}

.blog-article__meta-sharethis {
  position: relative;
  z-index: 0 !important;

  /* ShareThis overrides */
  .st-btn {
    display: inline-block !important;
  }

  #st-1 .st-btn {
    border-radius: 50%;
    height: 32px;
    padding: 0;
    width: 32px;
  }

  #st-1 .st-btn[data-network="email"] {
    padding: 0 6px;
  }

  #st-1 .st-btn > img {
    height: 24px;
    top: 5px;
    width: 24px;
  }
}

/* Mini hero */
.learn-mini-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 185px;
  margin-bottom: 1.25rem;
  border-radius: 6px;
  overflow: hidden;

  @media (min-width: 750px) {
    min-height: 205px;
  }

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.4);
  }
}

.learn-mini-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.learn-mini-hero__title {
  position: relative;
  z-index: 1;
  color: #fff;
  text-transform: uppercase;
  font-size: 2.1875rem;
  line-height: 1.1;
  text-align: center;
  padding: 0.25rem 1rem;

  @media (min-width: 750px) {
    font-size: 2.5rem;
  }
}

/* Article content */
.blog-article__content.blog-article__content--compact {
  p {
    font-size: 1rem;
  }

  ul,
  ol:not(#contents):not(.contents) {
    font-size: 1rem;
    margin-left: 0;
  }

  h1,
  h2 {
    font-size: 1.5625rem;

    @media (min-width: 750px) {
      font-size: 2.3125rem;
    }
  }

  h3 {
    font-size: 1.1875rem;

    @media (min-width: 750px) {
      font-size: 1.8125rem;
    }
  }

  h4 {
    font-size: 1.1875rem;

    @media (min-width: 750px) {
      font-size: 1.3125rem;
    }
  }
}

.blog-article__content {
  font-family: "Brown Light";
  min-width: 0;
  padding-bottom: 1.375rem;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--primary-font-family);
  }

  [class^="klaviyo-form-"],
  [class^="klaviyo-form-"] * {
    all: revert;
  }

  ol#contents,
  .contents {
    background-color: var(--color-grey-soft, #f8f9fb);
    border: 1px solid var(--color-mid-grey, #ccc);
    margin: 0 0 1.875rem;
    max-width: 350px;
    padding: 1.25rem 1.875rem;
    list-style: decimal;
    list-style-position: inside;

    li {
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.8;
      padding: 0;
      margin: 0;

      &:hover a {
        text-decoration: underline;
      }

      a {
        text-decoration: inherit;
      }
    }
  }

  .btn-block {
    font-weight: 600;
    text-transform: initial;
  }
}

.klaviyo-form--after-featured {
  margin: -0.5rem 0 1.5rem;
}

/* CTA block */
.blog-article__cta {
  background: var(--color-grey-soft, #f8f9fb);
  border-left: 12px solid var(--color-primary);
  margin-bottom: 1.8125rem;
  padding: 1.5rem;

  @media (min-width: 768px) {
    padding: 1.5rem 2rem;
  }
}

.blog-article__cta-heading {
  font-size: 1.3125rem;
  line-height: 1.38;
  margin-bottom: 0.9375rem;
}

.blog-article__cta-desc {
  margin-bottom: 1.25rem;
}

/* Sidebar */
.blog-article__sidebar {
  flex: 0 0 335px;
  width: 335px;
  position: sticky;
  top: calc(var(--full-header-height, var(--header-height, 0px)) + 1.5rem);

  @media (max-width: 1024px) {
    flex: none;
    width: 100%;
    margin-top: 2.5rem;
  }

  @media (max-width: 900px) {
    position: static;
  }
}

.side-panel__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;

  .btn {
    width: 100%;
  }
}

/* Side panels */
.side-panel--alt {
  .side-panel__heading--small {
    background: none;
    padding-inline: 0;
    font-size: 1.125rem;

    @media (min-width: 750px) {
      font-size: 1.375rem;
    }
  }

  .side-panel__list {
    gap: 0.5rem;
  }

  .side-panel__item {
    font-size: 0.875rem;
    padding: 0;
    border-bottom: none;
  }

  .side-panel__title {
    line-height: 1.4;
  }

  .side-panel__cta-buttons {
    .btn {
      font-size: 0.8125rem;
      width: auto;

      @media (min-width: 750px) {
        width: 100%;
      }
    }
  }
}

.side-panel {
  & + & {
    margin-top: 2.5rem;
  }
}

.side-panel__heading--small {
  background-color: var(--color-grey-soft, #f8f9fb);
  padding: 0.75rem 1rem;
}

.side-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.side-panel__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 4px solid var(--color-grey-soft, #f8f9fb);
  padding: 0.875rem 0;
}

.side-panel__thumb {
  flex-shrink: 0;
  width: 67px;
  height: 61px;
  border-radius: 4px;
  overflow: hidden;
  display: block;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.side-panel__title {
  text-decoration: none;

  &:hover {
    text-decoration: underline;
    color: var(--color-primary);
  }
}

.side-panel__category-item {
  padding: 1rem 0;
  border-bottom: 4px solid var(--color-grey-soft, #f8f9fb);

  a {
    text-decoration: none;

    &:hover {
      color: var(--color-primary);
      text-decoration: underline;
    }
  }
}

.article-featured-products {
  --bg: var(--color-grey-soft, #f8f9fb);

  background-color: var(--bg);
  padding: 1.5rem 1rem;

  .embla__slide {
    padding-inline: 24px;
  }

  .embla__controls {
    margin-top: 3rem;
  }

  .embla__navigation .btn {
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    width: auto;
    height: auto;
    min-width: unset;
    max-height: unset;
    aspect-ratio: unset;
    --btn-bg: transparent;
    --btn-bg-hover: transparent;
    --btn-fg-hover: currentColor;
    --btn-bd: transparent;
    --btn-bd-hover: transparent;
  }

  .embla__navigation svg {
    width: 30px;
    height: 36px;
    display: block;
  }
}

.article-best-product__image {
  display: block;
  width: 100%;
  max-width: 180px;

  margin-bottom: 0.75rem;

  & img {
    width: 100%;
    height: auto;
  }
}

.article-best-product__title {
  text-decoration: none;
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--color-body-text, #333);

  &:hover {
    text-decoration: underline;
  }
}
