/* ─── Post Hero ──────────────────────────────────────────────── */

.blog-hero {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.40) 100%),
    url('../../../img/blog/post-1-hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-bottom: 80px;
}

.blog-hero__breadcrumb-wrap {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding: 10px 20px;
}

.blog-hero__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
}

.blog-hero__crumb {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

a.blog-hero__crumb:hover {
  color: var(--color-white);
}

.blog-hero__crumb--active {
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.8);
}

.blog-hero__sep {
  color: rgba(255, 255, 255, 0.4);
}

.blog-hero__wrp {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 850px;
  margin-inline: auto;
}

.blog-hero__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

/* ─── Post Content ───────────────────────────────────────────── */

.post-content {
  padding: 60px 0 100px;
  background-color: var(--color-white);
}

.post-content__inner {
  max-width: 1020px;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.post-content__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 745px;
  text-align: center;
}

.post-content__title {
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  line-height: var(--lh-base);
}

.post-content__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-content__date {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-ultralight);
  color: var(--color-dark);
  line-height: var(--lh-base);
  white-space: nowrap;
}

.post-content__divider {
  width: 100%;
  max-width: 745px;
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: 0;
}

.post-content__body {
  width: 100%;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--color-gray);
  line-height: var(--lh-loose);
}

.post-content__body p {
  max-width: 745px;
  margin-inline: auto;
  margin-bottom: 15px;
}

.post-content__body p:last-of-type {
  margin-bottom: 0;
}

.post-content__body img {
  display: block;
  width: 100%;
  height: 375px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 15px 0;
}

/* ─── WYSIWYG rich text ──────────────────────────────────────────
   The global reset (global.css) zeroes margins, removes list markers,
   strips link styling and gives h1–h6 no font-size, so raw editor
   output renders as flat undifferentiated text. These rules restore
   rich-text formatting inside the article body. All flow elements share
   the same centred 745px column as <p> so headings/lists stay aligned. */

.post-content__body h1,
.post-content__body h2,
.post-content__body h3,
.post-content__body h4,
.post-content__body h5,
.post-content__body h6,
.post-content__body ul,
.post-content__body ol,
.post-content__body blockquote,
.post-content__body figure,
.post-content__body table,
.post-content__body pre {
  max-width: 745px;
  margin-inline: auto;
}

.post-content__body h1,
.post-content__body h2,
.post-content__body h3,
.post-content__body h4,
.post-content__body h5,
.post-content__body h6 {
  color: var(--color-dark);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  margin-top: 32px;
  margin-bottom: 15px;
}

.post-content__body h1 { font-size: var(--fs-2xl); }
.post-content__body h2 { font-size: var(--fs-xl); }
.post-content__body h3 { font-size: var(--fs-lg); }
.post-content__body h4 { font-size: var(--fs-md); }
.post-content__body h5 { font-size: var(--fs-base); }
.post-content__body h6 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.post-content__body > :first-child {
  margin-top: 0;
}

.post-content__body strong,
.post-content__body b {
  font-weight: var(--fw-bold);
}

.post-content__body em,
.post-content__body i {
  font-style: italic;
}

.post-content__body u {
  text-decoration: underline;
}

.post-content__body s,
.post-content__body del {
  text-decoration: line-through;
}

.post-content__body a {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.post-content__body a:hover {
  color: var(--color-red-dark);
}

.post-content__body ul,
.post-content__body ol {
  padding-left: 1.5em;
  margin-bottom: 15px;
}

.post-content__body ul { list-style: disc; }
.post-content__body ol { list-style: decimal; }

.post-content__body li {
  margin-bottom: 8px;
}

.post-content__body li::marker {
  color: var(--color-gray);
}

.post-content__body ul ul,
.post-content__body ul ol,
.post-content__body ol ul,
.post-content__body ol ol {
  margin-top: 8px;
  margin-bottom: 0;
}

.post-content__body blockquote {
  padding: 8px 0 8px 20px;
  border-left: 3px solid var(--color-red);
  color: var(--color-dark);
  font-style: italic;
  margin-bottom: 15px;
}

.post-content__body hr {
  max-width: 745px;
  margin: 30px auto;
  height: 1px;
  border: none;
  background-color: var(--color-border);
}

.post-content__body figure {
  margin-bottom: 15px;
}

.post-content__body figure img {
  margin: 0;
}

.post-content__body figcaption {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--color-gray);
  text-align: center;
}

.post-content__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background-color: var(--color-bg-fill);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.post-content__body pre {
  background-color: var(--color-bg-fill);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 15px;
}

.post-content__body pre code {
  background: none;
  padding: 0;
}

.post-content__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.post-content__body th,
.post-content__body td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
}

.post-content__body th {
  background-color: var(--color-bg-light);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
}

/* ─── Related Posts ──────────────────────────────────────────── */

.related-posts {
  padding: 60px 0 80px;
  background-color: var(--color-white);
}

.related-posts__divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin-bottom: 40px;
}

.related-posts__head {
  margin-bottom: 30px;
}

.related-posts__title {
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  line-height: var(--lh-base);
}

.related-posts__slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-posts__slider {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.related-posts__slide {
  padding: 0 10px;
  box-sizing: border-box;
}

.related-posts__arrow {
  position: absolute;
  top: 40%;
  z-index: 1;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.related-posts__arrow:hover {
  background-color: var(--color-bg-fill);
  box-shadow: var(--shadow-card);
}

.related-posts__arrow--prev {
  left: -52px;
  transform: translateY(-50%) rotate(180deg);
}

.related-posts__arrow--next {
  right: -52px;
  transform: translateY(-50%);
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card__img-wrap {
  display: block;
  height: 260px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card__img {
  width: 100%;
  height: 100%;
  /* contain (not cover) so related-post images of varying aspect ratios are
     shown in full inside the fixed 260px box instead of being cropped —
     matches the blog listing and catalog/product-card treatment. */
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.post-card__img-wrap:hover .post-card__img {
  transform: scale(1.04);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 16px;
}

.post-card__title {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(var(--fs-base) * var(--lh-snug) * 3);
}

.post-card__title a {
  color: inherit;
  transition: color var(--transition-fast);
}

.post-card__title a:hover {
  color: var(--color-red);
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.post-card__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-ultralight);
  color: var(--color-dark);
  line-height: var(--lh-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-card__read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-dark-1);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.post-card__read:hover {
  color: var(--color-red);
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (min-width: 1025px) and (max-width: 1440px) {
  .related-posts .container {
    padding-inline: 72px;
  }
}

@media (max-width: 1024px) {
  .blog-hero__title {
    font-size: var(--fs-2xl);
  }

  .post-content__body img {
    height: 280px;
  }

  .related-posts__arrow {
    position: static;
    transform: none;
    flex-shrink: 0;
  }

  .related-posts__arrow--prev {
    transform: rotate(180deg);
  }
}

@media (max-width: 767px) {
  .blog-hero {
    gap: 20px;
    padding-bottom: 40px;
  }

  .blog-hero__title {
    font-size: var(--fs-xl);
  }

  .post-content {
    padding: 40px 0 60px;
  }

  .post-content__body img {
    height: 220px;
  }

}
