/**
 * bebarefoot.eu — blog article redesign
 * Responsive styling scoped to Shoptet article detail pages.
 */

body.type-post #content > .content-inner {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body.type-post .news-item-detail {
  width: min(calc(100% - 48px), var(--beb-content, 1800px));
  max-width: none;
  margin: 0 auto;
  padding: 28px 0 72px;
  color: #6b6762;
  font-family: "Rolen DT", sans-serif !important;
}

body.type-post .news-item-detail > h1 {
  max-width: 1280px;
  margin: 0 0 34px;
  color: #211f1d;
  font-family: "Rolen DT", sans-serif !important;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.06;
  text-align: left;
}

body.type-post .news-item-detail .text {
  color: #56524e !important;
  font-family: "Rolen DT", sans-serif !important;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  text-align: left;
}

/* Neutralise legacy article colours, fonts, rounded boxes and backgrounds. */
body.type-post .news-item-detail .text :where(
  article,
  section,
  div,
  header,
  footer,
  p,
  span,
  font,
  ul,
  ol,
  li
) {
  background-color: transparent !important;
  color: inherit !important;
  font-family: inherit !important;
}

body.type-post .news-item-detail .text > :where(div, section, article) {
  max-width: 100% !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* Shoptet already renders the canonical article title above the article body. */
body.type-post .news-item-detail .text h1 {
  display: none !important;
}

body.type-post .news-item-detail .text :where(h2, h3, h4) {
  max-width: 900px;
  color: #211f1d !important;
  font-family: "Rolen DT", sans-serif !important;
  text-align: left !important;
  text-transform: none !important;
}

body.type-post .news-item-detail .text h2 {
  margin: 62px 0 18px !important;
  font-size: clamp(29px, 3.4vw, 38px) !important;
  font-weight: 600 !important;
  letter-spacing: -.025em;
  line-height: 1.16 !important;
}

body.type-post .news-item-detail .text h3 {
  margin: 42px 0 14px !important;
  font-size: clamp(22px, 2.5vw, 27px) !important;
  font-weight: 600 !important;
  letter-spacing: -.015em;
  line-height: 1.25 !important;
}

body.type-post .news-item-detail .text h4 {
  margin: 32px 0 10px !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

body.type-post .news-item-detail .text p {
  max-width: 900px;
  margin: 0 0 20px !important;
}

/* Lead paragraph inside the old coloured intro block. */
body.type-post .news-item-detail .text :where(div, section, article) > h1:first-child + p {
  max-width: 980px;
  color: #211f1d !important;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
}

body.type-post .news-item-detail .text :where(strong, b) {
  color: #211f1d !important;
  font-weight: 600 !important;
}

body.type-post .news-item-detail .text a {
  color: #211f1d !important;
  font-weight: 500;
  text-decoration-line: underline !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: #8a857f !important;
  text-underline-offset: 4px;
  transition: color .16s ease, text-decoration-color .16s ease;
}

body.type-post .news-item-detail .text a:hover,
body.type-post .news-item-detail .text a:focus-visible {
  color: #c93622 !important;
  text-decoration-color: currentColor !important;
}

body.type-post .news-item-detail .text :where(ul, ol) {
  max-width: 900px;
  margin: 18px 0 30px !important;
  padding-left: 26px !important;
}

body.type-post .news-item-detail .text li {
  margin: 0 0 8px !important;
  padding-left: 5px;
}

/* Hero and content imagery: square, shadowless and editorial. */
body.type-post .news-item-detail .text img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 42px 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.type-post .news-item-detail .text > :where(div, section, article) > div:first-child > img:only-child,
body.type-post .news-item-detail .text > :where(div, section, article) > img:first-child {
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 50px !important;
}

body.type-post .news-item-detail .text :where(figure, picture) {
  display: block;
  max-width: 100%;
  margin: 42px 0;
}

body.type-post .news-item-detail .text figcaption {
  margin-top: 10px;
  color: #8a857f !important;
  font-size: 13px;
  line-height: 1.45;
}

/* Convert legacy green information boxes into simple editorial callouts. */
body.type-post .news-item-detail .text [style*="border-left"] {
  max-width: 900px !important;
  margin: 36px 0 !important;
  padding: 8px 0 8px 24px !important;
  border: 0 !important;
  border-left: 2px solid #211f1d !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #56524e !important;
}

/* Related-article block: remove the legacy green panel and borders. */
body.type-post .news-item-detail .text div[style*="margin-top: 50px"][style*="padding: 25px"] {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.type-post .news-item-detail .text div[style*="grid-template-columns"] > div[style*="border"] {
  padding: 24px !important;
  border: 1px solid #dedad4 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

body.type-post .news-item-detail .text div[style*="grid-template-columns"] > div[style*="border"]:hover {
  border-color: #211f1d !important;
}

body.type-post .news-item-detail .text blockquote {
  max-width: 900px;
  margin: 40px 0;
  padding: 8px 0 8px 24px;
  border: 0 !important;
  border-left: 2px solid #211f1d !important;
  background: transparent !important;
  color: #211f1d !important;
  font-size: 21px;
  line-height: 1.5;
}

/* Legacy CTA links become the same near-black pill used elsewhere in the shop. */
body.type-post .news-item-detail .text a[style*="display: inline-block"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px !important;
  border: 1px solid #211f1d !important;
  border-radius: 999px !important;
  background: #211f1d !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.type-post .news-item-detail .text a[style*="display: inline-block"]:hover {
  background: #fff !important;
  color: #211f1d !important;
}

body.type-post .news-item-detail .text table {
  width: 100% !important;
  margin: 38px 0 !important;
  border: 0 !important;
  border-collapse: collapse;
  background: #fff !important;
  color: #211f1d !important;
  font-family: inherit !important;
}

body.type-post .news-item-detail .text :where(th, td) {
  padding: 14px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #dedad4 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left !important;
}

body.type-post .news-item-detail .text th {
  font-weight: 600;
}

body.type-post .news-item-detail .text :where(iframe, video) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 42px 0;
  aspect-ratio: 16 / 9;
}

body.type-post .news-item-detail .text hr {
  height: 1px;
  margin: 54px 0;
  border: 0 !important;
  background: #dedad4 !important;
}

body.type-post .news-item-detail .next-prev {
  margin-top: 70px;
  padding-top: 28px;
  border-top: 1px solid #dedad4;
}

@media (min-width: 992px) {
  body.type-post .news-item-detail {
    padding-top: 46px;
    padding-bottom: 100px;
  }
}

@media (max-width: 767px) {
  body.type-post .news-item-detail {
    width: calc(100% - 32px);
    padding-top: 20px;
    padding-bottom: 64px;
  }

  body.type-post .news-item-detail > h1 {
    margin-bottom: 26px;
    font-size: clamp(34px, 10vw, 46px);
  }

  body.type-post .news-item-detail .text {
    font-size: 16px;
    line-height: 1.68;
  }

  body.type-post .news-item-detail .text h2 {
    margin-top: 48px !important;
  }

  body.type-post .news-item-detail .text h3 {
    margin-top: 36px !important;
  }

  body.type-post .news-item-detail .text img {
    margin: 30px 0 !important;
  }

  body.type-post .news-item-detail .text table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
