/* ==========================================================================
   Blog Post Template
   ========================================================================== */

.share-popup__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--atlas-text-primary, #111827);
  text-decoration: none;
  border-bottom: 1px solid var(--atlas-border, #e5e7eb);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;

  svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: currentColor;
  }

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    color: var(--atlas-primary);
  }
}

.blog-post {
  position: relative;
  padding-top: var(--banner-pt-mobile, 48px);
  padding-bottom: var(--banner-pb-mobile, 48px);

  .blog-post__wrapper {
    gap: 40px;
    display: block;
  }
}

.blog-post__back-btn {
  position: absolute;
  left: 90%;
  top: var(--banner-pt-mobile, 48px);
}

@media screen and (max-width: 768px) {
  .blog-post__back-btn {
    position: static;
    display: block;
    margin-bottom: 1rem;
  }
}

.blog-post__content-row {
  display: flex;
  align-items: flex-start;
  gap: 2rem;

  .blog-links-module {
    width: fit-content;
  }
}

@media screen and (min-width: 768px) {
  .blog-post {
    padding-top: var(--banner-pt-tablet, 72px);
    padding-bottom: var(--banner-pb-tablet, 72px);
  }
}


.blog-post__meta {
  flex-direction: column;
  display: flex;
  align-items: left;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--atlas-text-secondary, #6b7280);
}

.blog-post__timestamp {
  display: block;
}

.blog-post__body {
  width: 100%;
}

.blog-post__body h1,
.blog-post__body h2,
.blog-post__body h3,
.blog-post__body h4,
.blog-post__body h5,
.blog-post__body h6 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--atlas-radius-md, 8px);
}

.blog-post__body ul,
.blog-post__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.blog-post__body li {
  margin-bottom: 0.25rem;
}

.blog-post__body blockquote {
  border-left: 3px solid var(--atlas-border, #e5e7eb);
  padding-left: 1.25rem;
  margin-left: 0;
  color: var(--atlas-text-secondary, #6b7280);
  font-style: italic;
}

.blog-links-module {
  position: absolute;
  right: 90%;
  @media screen and (max-width: 1609.98px) {
    margin-bottom: 20px;
    position: static;
  }
}

.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--atlas-border, #e5e7eb);
}

.blog-post__tags svg {
  width: 15px;
  height: auto;
  margin-right: 0.25rem;
  flex-shrink: 0;
}


/* ==========================================================================
   Blog Comments
   ========================================================================== */

.blog-comments {
  margin: 3rem auto 0;
  max-width: 680px;
}

.blog-comments .hs-submit {
  text-align: center;
}

.blog-comments .comment-reply-to {
  border: 0 none;
}


/* ==========================================================================
   Related Posts
   ========================================================================== */

.blog-related-posts {
  margin-top: 4rem;
  padding-top: var(--atlas-section-padding-block, 72px);
  padding-bottom: var(--atlas-section-padding-block, 72px);
  background-color: var(--atlas-surface, #f8fafc);
}

.blog-related-posts h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.blog-related-posts__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 30px;
  padding-right: 30px;
}

@media screen and (min-width: 768px) {
  .blog-related-posts__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1000px) {
  .blog-related-posts__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-related-posts__post {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-related-posts__post-image-wrapper {
  display: block;
  overflow: hidden;
  border-radius: var(--atlas-card-border-radius, 12px);
}

.blog-related-posts__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-related-posts__post-image-wrapper:hover .blog-related-posts__image {
  transform: scale(1.03);
}

.blog-related-posts__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-related-posts__title {
  margin: 0;
}
