/* Single post header: title + author + date + socials (centered) */
.single-page .entry-header {
  text-align: center;
  margin-bottom: 2rem;
}

.single-page .entry-header .post__title {
  max-width: 1012px;
  margin: 0 auto 28px;
  overflow: visible;
  color: #000;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
  font-size: 54px !important;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -1.08px;
  line-height: 60px;
  white-space: normal;
}

.single-page .post__meta {
  text-align: center;
  margin: 0 auto;
  max-width: 100%;
}

.single-page .post__byline {
  margin: 0 0 4px;
  color: #000;
  font-family: DIN2014-Light, "DIN 2014", Arial, sans-serif;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.38px;
  line-height: 32px;
}

.single-page .post__time {
  display: block;
  margin: 0 0 20px;
  color: #aca3a0;
  font-family: DIN2014-Light, "DIN 2014", Arial, sans-serif;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 32px;
}

.single-page .entry-content {
  width: min(1320px, calc(100% - 192px));
  margin-right: auto;
  margin-left: auto;
}

.single-page .entry-content .wp-block-tapestry-video-section,
.single-page .entry-content .wp-block-tapestry-image-section {
  margin-right: 0;
  margin-left: 0;
}

/* Article body copy is a centered 800px measure. Images, video, and quotes keep the wider column. */
.single-page .entry-content > p,
.single-page .entry-content > .wp-block-paragraph,
.single-page .entry-content > ul,
.single-page .entry-content > ol,
.single-page .entry-content > h2,
.single-page .entry-content > h3,
.single-page .entry-content > h4,
.single-page .entry-content > .wp-block-heading,
.single-page .entry-content > .wp-block-list,
.single-page .entry-content .wp-block-tapestry-article-learn-more,
.single-page .entry-content .wp-block-group > p,
.single-page .entry-content .wp-block-group > ul,
.single-page .entry-content .wp-block-group > ol,
.single-page .entry-content .wp-block-group > h2,
.single-page .entry-content .wp-block-group > h3,
.single-page .entry-content .wp-block-group > h4 {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
}

.single-page .entry-content p:not(.tapestry-editorial-quote__text),
.single-page .post__subtitle {
  color: #000;
  font-family: DIN2014-Regular, "DIN 2014", Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 32px;
}

/* Every article paragraph shares the Figma body style (DIN Regular 22/32, 0.02em, black), even when an
   editor set a custom size or colour on it. The quote text keeps its own serif style. */
.single-page .entry-content .tapestry-editorial-quote__text,
.single-page .entry-content .post-quote__p1,
.single-page .entry-content .post-quote__p2 {
  margin-bottom: 0;
}

.single-page .entry-content p:not(.tapestry-editorial-quote__text),
.single-page .post__author-bio {
  color: #000 !important;
  font-family: DIN2014-Regular, "DIN 2014", Arial, sans-serif !important;
  font-size: 22px !important;
  letter-spacing: 0.02em !important;
  line-height: 32px !important;
}

/* "Learn more" row (Figma: label DIN Bold 22/32, links DIN Regular 22/32 underlined, #6A635E). */
.single-page .entry-content .wp-block-tapestry-article-learn-more.tapestry-article-learn-more {
  width: 100%;
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 32px;
}

.single-page .entry-content .wp-block-tapestry-article-learn-more .tapestry-article-learn-more__list a {
  color: #6a635e;
}

/* Subheading (BEST Hub): the article's opening paragraph is DIN Demi 22/32, black. It also applies
   to the Subtitle field when an editor fills it in. */
.single-page .post__subtitle,
.single-page .entry-content > p:first-child,
.single-page .entry-content > .wp-block-paragraph:first-child {
  color: #000;
  font-family: DIN2014-Regular, "DIN 2014", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 32px;
}

.single-page .post__subtitle + p,
.single-page .post__subtitle + .post__author-bio,
.single-page .entry-content > p:first-child + p {
  font-weight: 400;
}

.single-page .post__socials {
  display: flex;
  justify-content: center;
}

.single-page .post__socials-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.single-page .post__socials-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #000;
  line-height: 0;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.single-page .post__socials-link:hover,
.single-page .post__socials-link:focus {
  opacity: 0.55;
}

.single-page .post__socials-link svg,
.single-page .post__socials-link img {
  display: block;
  width: 16px;
  height: 16px;
}

.single-page .related-articles {
  width: calc(100% - 100px);
  max-width: 1412px;
  margin: 72px auto 88px;
}

.single-page .related-articles__header {
  margin-bottom: 34px;
  border-bottom: 1px solid #000;
}

.single-page .related-articles__title {
  margin: 0;
  padding: 0 0 16px;
  color: #000;
  font-family: DIN2014-Regular, "DIN 2014", Arial, sans-serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 38px;
  text-align: left;
  text-transform: uppercase;
}

.single-page .related-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.single-page .related-article-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.single-page .related-article-card__image-link {
  display: block;
  overflow: hidden;
  background: #eeeae4;
}

.single-page .related-article-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.single-page .related-article-card:hover .related-article-card__image {
  transform: scale(1.015);
}

.single-page .related-article-card__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
}

.single-page .related-article-card__title {
  margin: 0;
  color: #000;
  font-family: DIN2014-Bold, "DIN 2014", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: uppercase;
}

.single-page .related-article-card:has(.related-article-card__read-more:focus-visible) {
  outline: 2px solid #221d3e;
  outline-offset: 3px;
}

.single-page .related-article-card__date {
  display: block;
  margin: 0;
  color: #aca3a0;
  font-family: DIN2014-Light, "DIN 2014", Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.single-page .related-article-card__excerpt {
  margin: 0;
  color: #000;
  font-family: DIN2014-Light, "DIN 2014", Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.36;
}

.single-page .related-article-card__read-more {
  color: #000;
  font-family: DIN2014-Light, "DIN 2014", Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.36;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.single-page .related-article-card__read-more::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}

.single-page .related-article-card__read-more:hover {
  color: #221d3e;
}

/* Article desktop, BEST Hub frame (1512). Spacing follows the frame. Images keep the
   alignment an editor set: centered only with aligncenter, otherwise the content edge.
   Standalone quotes sit in the 1112px band; a quote beside an image stays in its column. */
@media (min-width: 1200px) {
  .single-page .entry-header {
    margin-bottom: 80px;
  }

  .single-page .entry-header .post__title {
    margin-bottom: 25px;
  }

  .single-page .post__byline {
    margin-bottom: 5px;
  }

  .single-page .post__time {
    margin-bottom: 25px;
  }

  .single-page .entry-content > p,
  .single-page .entry-content > .wp-block-paragraph {
    margin-top: 0;
    margin-bottom: 32px;
  }

  .single-page .entry-content > .wp-block-image,
  .single-page .entry-content > .wp-block-tapestry-image-section,
  .single-page .entry-content > figure.wp-caption {
    margin-top: 56px;
    margin-bottom: 56px;
  }

  .single-page .entry-content .wp-block-image:not(.aligncenter):not(.alignright),
  .single-page .entry-content figure.wp-caption:not(.aligncenter):not(.alignright),
  .single-page .entry-content .post-image__src {
    margin-right: auto;
    margin-left: 0;
    text-align: left;
  }

  .single-page .entry-content .wp-block-image:not(.aligncenter) img,
  .single-page .entry-content figure.wp-caption:not(.aligncenter) img,
  .single-page .entry-content .post-image__src img {
    width: auto;
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: 0;
    object-fit: contain;
  }

  .single-page .wp-block-column .wp-block-image,
  .single-page .wp-block-column .post-image__src {
    margin-top: 0;
    margin-bottom: 0;
    text-align: left;
  }

  .single-page .wp-block-column .wp-block-image img,
  .single-page .wp-block-column .post-image__src img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }

  .single-page .wp-block-tapestry-quote-section {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .single-page .entry-content > .wp-block-tapestry-quote-section,
  .single-page .entry-content > .wp-block-tapestry-editorial-quote {
    width: min(1112px, 100%);
    margin-right: auto !important;
    margin-left: auto !important;
  }

  .single-page .wp-block-column > .wp-block-tapestry-quote-section,
  .single-page .wp-block-column > .wp-block-tapestry-editorial-quote {
    width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .single-page .wp-block-quote cite::before,
  .single-page .wp-block-quote__citation::before,
  .single-page .wp-block-pullquote cite::before,
  .single-page .wp-block-pullquote__citation::before,
  .single-page .blockquote-footer::before,
  .single-page .post-quote__p1::before,
  .single-page .tapestry-editorial-quote__author::before,
  .single-page .tapestry-editorial-quote__affiliation::before {
    content: none;
  }

  .single-page .related-articles {
    margin-top: 100px;
  }

  .single-page .related-articles__header {
    margin-bottom: 50px;
  }

  .single-page .related-articles__title {
    padding-bottom: 10px;
  }

  .single-page .related-articles__grid {
    gap: 69px;
  }
}

@media (max-width: 991.98px) {
  .single-page .related-articles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 28px;
  }
}

@media (max-width: 767.98px) {
  .single-page .entry-header .post__title {
    max-width: none;
    margin: 0 25px 20px;
    font-size: 32px !important;
    letter-spacing: -0.64px;
    line-height: 38px;
  }

  .single-page .post__byline {
    font-size: 16px;
    letter-spacing: 0.32px;
    line-height: 24px;
  }

  .single-page .post__time {
    font-size: 14px;
    line-height: 20px;
  }

  .single-page .entry-content {
    width: calc(100% - 50px);
    overflow-wrap: anywhere;
  }

  .single-page .entry-content p:not(.tapestry-editorial-quote__text),
  .single-page .post__subtitle,
  .single-page .post__author-bio {
    font-size: 16px !important;
    letter-spacing: 0.03em !important;
    line-height: 24px !important;
  }

  .single-page .entry-content .wp-block-tapestry-article-learn-more.tapestry-article-learn-more {
    width: 100%;
    font-size: 16px;
    letter-spacing: 0.03em;
    line-height: 24px;
  }

  .single-page .post__subtitle,
  .single-page .entry-content > p:first-child,
  .single-page .entry-content > .wp-block-paragraph:first-child {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 24px;
  }

  .single-page .related-articles {
    width: calc(100% - 50px);
    margin-top: 52px;
    margin-bottom: 64px;
  }

  .single-page .related-articles__header {
    margin-bottom: 24px;
  }

  .single-page .related-articles__title {
    font-size: 20px;
    line-height: 24px;
  }

  .single-page .related-articles__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .single-page .related-article-card {
    display: grid;
    grid-template-columns: 44.62% minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .single-page .related-article-card__image-link {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
  }

  .single-page .related-article-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .single-page .related-article-card__image--placeholder {
    min-height: 100%;
    background: #eeeae4;
  }

  .single-page .related-article-card__content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 0;
  }

  .single-page .related-article-card__title,
  .single-page .related-article-card__date,
  .single-page .related-article-card__excerpt,
  .single-page .related-article-card__read-more {
    margin-top: 0;
    padding-top: 0;
  }

  .single-page .related-article-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: -4px 0 0;
    font-size: 14px;
    line-height: 15px;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }

  .single-page .related-article-card__date {
    margin: 0;
    font-size: 8px;
    letter-spacing: 0.16px;
    line-height: 10px;
  }

  .single-page .related-article-card__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #000;
    font-size: 10px;
    letter-spacing: 0.2px;
    line-height: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .single-page .related-article-card__read-more {
    align-self: flex-start;
    font-size: 10px;
    letter-spacing: 0.2px;
    line-height: 13px;
  }
}
