/* ==========================================================================
   RedTeam Blog — single post styles
   Matched to the wp-redteam-main theme tokens.
   NOTE: this theme's type scale uses 1rem ≈ 1px (body text is 18rem),
   so every rem value below is effectively a px value.
   Scope: post body only (.single-post .elementor-widget-theme-post-content)
   ========================================================================== */

.single-post {
  --rt-text: #091717;        /* body — theme token: --color-black-400 */
  --rt-heading: #212E3E;     /* H2–H3 — --color-bluewood-200-base */
  --rt-subheading: #212E3E;  /* H4–H5 — --color-bluewood-200-base */
  --rt-link: #A61319;        /* links — --color-red-400 */
  --rt-link-hover: #770E12;  /* --color-red-500 */
  --rt-ol-marker: #091717;   /* ordered list numbers */
  --rt-ul-marker: #A61319;   /* unordered list bullets */
  --rt-faq-icon: #A61319;    /* FAQ plus/minus */
  --rt-faq-hover: #A8A5A0;   /* FAQ question hover */
  --rt-faq-rule: #A8A5A0;    /* FAQ divider lines */
  --rt-tip-bg: #F0EBE5;      /* Bonus / Pro Tip box — --color-pearl-200-base */
  --rt-callout-border: #770E12; /* callout left border — --color-red-500 */
  --rt-quote-bg: #F2F2F2;    /* pull quote box */
  --rt-quote-label-bg: #E2F5B5; /* "From the customer" label */
  --rt-accent: var(--color-accent, #ED1B24);
  --rt-accent-dark: var(--color-red-300, #C9171F);
  --rt-muted: var(--color-black-300, #555555);
  --rt-rule: var(--color-pearl-300, #CCC8C3);
  --rt-surface: var(--color-pearl-100, #F5F2EE);
  --rt-dark: var(--color-bluewood-200-base, #212E3E);
  --rt-font: "Archivo", sans-serif;
  --rt-heading-font: "Archivo", sans-serif;
  --rt-body-size: var(--font-body-size, 18rem);
  --rt-body-lh: var(--font-body-line-height, 1.7);
}

@media (max-width: 960px) {
  .single-post {
    --rt-body-size: var(--font-body-size-tablet, 16rem);
    --rt-body-lh: var(--font-body-line-height-tablet, 1.6);
  }
}


/* ==========================================================================
   Container + migrated Elementor sections
   ========================================================================== */

.single-post .elementor-widget-theme-post-content {
  color: var(--rt-text);
  font-family: var(--rt-font);
  font-size: var(--rt-body-size);
  line-height: var(--rt-body-lh);
  overflow-wrap: break-word;
}

/* Each migrated post is a stack of boxed Elementor sections — flatten them */
.single-post .elementor-widget-theme-post-content .elementor-section > .elementor-container {
  max-width: none;
}

.single-post .elementor-widget-theme-post-content .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
  padding: 0;
}

.single-post .elementor-widget-theme-post-content .elementor-widget:not(:last-child) {
  margin-block-end: 0;
}


/* ==========================================================================
   Strip inline formatting pasted from Google Docs / the old blog
   (Arial 11pt, #000, pre-wrap, etc.)
   ========================================================================== */

.single-post .elementor-widget-theme-post-content :is(span, b, strong, em, i)[style] {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  background-color: transparent !important;
  white-space: normal !important;
  vertical-align: baseline !important;
}

/* Inside headings, inline font-weight:400 spans fight the heading weight */
.single-post .elementor-widget-theme-post-content :is(h2, h3, h4, h5, h6) :is(span, b, strong) {
  font-weight: inherit !important;
}

.single-post .elementor-widget-theme-post-content p:empty {
  display: none;
}


/* ==========================================================================
   H2–H5
   ========================================================================== */

.single-post .elementor-widget-theme-post-content :is(h2, h3, h4, h5) {
  font-family: var(--rt-heading-font) !important;
  color: var(--rt-heading) !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
  margin: 1.75em 0 0.5em !important;
  padding: 0 !important;
  scroll-margin-top: 120rem; /* clears sticky header for jump links */
}

.single-post .elementor-widget-theme-post-content h2 { font-size: 35px !important; font-weight: 700 !important; }
.single-post .elementor-widget-theme-post-content h3 { font-size: 26px !important; font-weight: 600 !important; }
.single-post .elementor-widget-theme-post-content h4 { font-size: 20px !important; font-weight: 600 !important; }
.single-post .elementor-widget-theme-post-content h5 { font-size: 18rem !important; font-weight: 600 !important; }

/* H4–H5 use the lighter subheading color */
.single-post .elementor-widget-theme-post-content :is(h4, h5) {
  color: var(--rt-subheading) !important;
}

/* Heading directly under another heading sits closer */
.single-post .elementor-widget-theme-post-content :is(h2, h3, h4) + :is(h3, h4, h5) {
  margin-top: 0.5em !important;
}

@media (max-width: 960px) {
  .single-post .elementor-widget-theme-post-content h2 { font-size: 28px !important; }
  .single-post .elementor-widget-theme-post-content h3 { font-size: 23px !important; }
  .single-post .elementor-widget-theme-post-content h4 { font-size: 19px !important; }
  .single-post .elementor-widget-theme-post-content h5 { font-size: 18rem !important; }
}


/* ==========================================================================
   P
   ========================================================================== */

.single-post .elementor-widget-theme-post-content p {
  font-family: var(--rt-font) !important;
  font-size: var(--rt-body-size) !important;
  line-height: var(--rt-body-lh) !important;
  color: var(--rt-text);
  margin: 0 0 1.25em !important;
}

/* ---------- Bonus / Pro Tip box ----------
   Wrap the whole section, heading included:
   <aside class="rt-tip"><h3>Bonus: …</h3> … </aside> */
.single-post .elementor-widget-theme-post-content .rt-tip {
  background: var(--rt-tip-bg);
  border-radius: 4px;
  padding: 40px 44px;
  margin: 2.5em 0;
}

.single-post .elementor-widget-theme-post-content .rt-tip > :first-child {
  margin-top: 0 !important;
}

.single-post .elementor-widget-theme-post-content .rt-tip > :last-child {
  margin-bottom: 0 !important;
}

/* ---------- Callouts (e.g. the AI prompt) ----------
   <div class="rt-callout"><p>…</p><p>…</p></div> */
.single-post .elementor-widget-theme-post-content .rt-callout {
  border-left: 5px solid var(--rt-callout-border);
  padding: 4px 0 4px 24px;
  margin: 1.75em 0;
}

/* Inside a Pro Tip box, give the callout a white card so it stands out */
.single-post .elementor-widget-theme-post-content .rt-tip .rt-callout {
  background: #FFFFFF;
  border-radius: 0 4px 4px 0;
  padding: 22px 26px;
}

.single-post .elementor-widget-theme-post-content .rt-callout p {
  font-size: 17px !important;
  margin: 0 0 0.8em !important;
}

.single-post .elementor-widget-theme-post-content .rt-callout p:last-child {
  margin-bottom: 0 !important;
}

/* Fallback for posts not cleaned yet: consecutive indented paragraphs */
.single-post .elementor-widget-theme-post-content p[style*="padding-left"] {
  font-size: 17px !important;
  border-left: 5px solid var(--rt-callout-border);
  background: none;
  padding: 0.4em 0 0.4em 24px !important;
  margin: 0 !important;
}

.single-post .elementor-widget-theme-post-content :not(p[style*="padding-left"]) + p[style*="padding-left"] {
  margin-top: 1.75em !important;
}

.single-post .elementor-widget-theme-post-content p[style*="padding-left"]:not(:has(+ p[style*="padding-left"])) {
  margin-bottom: 1.75em !important;
}

@media (max-width: 767px) {
  .single-post .elementor-widget-theme-post-content .rt-tip {
    padding: 28px 22px;
  }

  .single-post .elementor-widget-theme-post-content .rt-tip .rt-callout {
    padding: 18px 20px;
  }
}


/* ==========================================================================
   Links (in-text only — skips buttons and accordion titles)
   ========================================================================== */

.single-post .elementor-widget-theme-post-content :is(p, li, td, th, blockquote, figcaption) a {
  color: var(--rt-link) !important;
  font-weight: inherit;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

.single-post .elementor-widget-theme-post-content :is(p, li, td, th, blockquote, figcaption) a:hover {
  color: var(--rt-link-hover) !important;
  text-decoration-thickness: 2px !important;
}

/* Spans inside migrated links carry their own blue/black + underline */
.single-post .elementor-widget-theme-post-content :is(p, li, td, th, blockquote, figcaption) a * {
  color: inherit !important;
  text-decoration: none !important;
}

.single-post .elementor-widget-theme-post-content a:focus-visible {
  outline: 2px solid var(--rt-link);
  outline-offset: 2px;
  border-radius: 2px;
}


/* ==========================================================================
   Lists (ordered + unordered)
   ========================================================================== */

.single-post .elementor-widget-theme-post-content :is(ul, ol) {
  font-size: var(--rt-body-size);
  line-height: var(--rt-body-lh);
  color: var(--rt-text);
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.single-post .elementor-widget-theme-post-content li {
  margin: 0 0 0.6em;
  padding-left: 0.4em;
}

.single-post .elementor-widget-theme-post-content li:last-child { margin-bottom: 0; }

.single-post .elementor-widget-theme-post-content ul { list-style-type: square; }
.single-post .elementor-widget-theme-post-content ol { list-style-type: decimal; }
.single-post .elementor-widget-theme-post-content ul ul { list-style-type: circle; }
.single-post .elementor-widget-theme-post-content ol ol { list-style-type: lower-alpha; }

.single-post .elementor-widget-theme-post-content ul > li::marker {
  color: var(--rt-ul-marker);
}

.single-post .elementor-widget-theme-post-content ol > li::marker {
  color: var(--rt-ol-marker);
  font-family: var(--rt-heading-font);
  font-weight: 700;
}

.single-post .elementor-widget-theme-post-content li > :is(ul, ol) {
  margin: 0.6em 0 0;
}

.single-post .elementor-widget-theme-post-content li > p {
  margin: 0 !important;
}

/* Bold lead-in ("Weather.") reads as a label */
.single-post .elementor-widget-theme-post-content li > :is(b, strong):first-child {
  color: var(--rt-heading);
  font-weight: 700;
}


/* ==========================================================================
   Pull quote — matches the customer quote on success story pages

   Full version:
   <figure class="rt-pullquote">
     <div class="rt-pullquote__body">
       <span class="rt-pullquote__label">From the customer</span>
       <blockquote><p>“Quote text.”</p></blockquote>
       <figcaption>
         <span class="rt-pullquote__name">Scott Karrle</span>
         <span class="rt-pullquote__title">VP of Operations @ Conseco Group</span>
       </figcaption>
     </div>
   </figure>

   A plain <blockquote> gets the same box, without the label.
   ========================================================================== */

.single-post .elementor-widget-theme-post-content .rt-pullquote,
.single-post .elementor-widget-theme-post-content blockquote:not(.rt-pullquote blockquote),
.single-post .wp-block-pullquote,
.single-post .elementor-blockquote {
  background: var(--rt-quote-bg);
  border: 0;
  border-left: 5px solid var(--rt-callout-border);
  border-radius: 3px;
  padding: 48px;
  margin: 2.5em 0;
  text-align: left;
}

/* Text only, full width — any image left in the markup is hidden */
.single-post .elementor-widget-theme-post-content .rt-pullquote {
  display: block;
}

.single-post .elementor-widget-theme-post-content .rt-pullquote > img {
  display: none;
}

/* "From the customer" label */
.single-post .elementor-widget-theme-post-content .rt-pullquote__label {
  display: inline-block;
  background: var(--rt-quote-label-bg);
  color: var(--rt-heading);
  font-family: "Archivo Narrow", "Archivo", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 28px;
}

/* Reset the inner blockquote so it doesn't get a second box */
.single-post .elementor-widget-theme-post-content .rt-pullquote blockquote,
.single-post .wp-block-pullquote blockquote {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

/* Quote text */
.single-post .elementor-widget-theme-post-content :is(.rt-pullquote, blockquote) p,
.single-post .wp-block-pullquote p,
.single-post .elementor-blockquote__content {
  font-family: var(--rt-font) !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  font-style: normal;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: var(--rt-text) !important;
  margin: 0 !important;
}

/* Attribution */
.single-post .elementor-widget-theme-post-content .rt-pullquote figcaption,
.single-post .elementor-widget-theme-post-content blockquote :is(cite, footer),
.single-post .wp-block-pullquote cite,
.single-post .elementor-blockquote__author {
  display: block;
  margin-top: 28px;
  font-family: var(--rt-font);
  font-size: 16px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.5;
  color: var(--rt-heading);
}

.single-post .elementor-widget-theme-post-content :is(.rt-pullquote__name, blockquote cite) {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.single-post .elementor-widget-theme-post-content .rt-pullquote__title {
  display: block;
}

.single-post .elementor-blockquote__tweet-button { display: none; }

@media (max-width: 960px) {
  .single-post .elementor-widget-theme-post-content .rt-pullquote,
  .single-post .elementor-widget-theme-post-content blockquote:not(.rt-pullquote blockquote),
  .single-post .wp-block-pullquote,
  .single-post .elementor-blockquote {
    padding: 36px;
  }

  .single-post .elementor-widget-theme-post-content :is(.rt-pullquote, blockquote) p,
  .single-post .wp-block-pullquote p,
  .single-post .elementor-blockquote__content {
    font-size: 24px !important;
  }
}

@media (max-width: 767px) {
  .single-post .elementor-widget-theme-post-content .rt-pullquote,
  .single-post .elementor-widget-theme-post-content blockquote:not(.rt-pullquote blockquote),
  .single-post .wp-block-pullquote,
  .single-post .elementor-blockquote {
    padding: 28px 24px;
  }

  .single-post .elementor-widget-theme-post-content :is(.rt-pullquote, blockquote) p,
  .single-post .wp-block-pullquote p,
  .single-post .elementor-blockquote__content {
    font-size: 22px !important;
  }
}


/* ==========================================================================
   Table
   ========================================================================== */

.single-post .elementor-widget-theme-post-content table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  border: 0;
  margin: 2em 0;
  font-size: 16rem;
  line-height: 1.5;
}

.single-post .elementor-widget-theme-post-content :is(th, td) {
  border: 0 !important;
  border-bottom: 1px solid var(--rt-rule) !important;
  padding: 0.85em 1em !important;
  text-align: left;
  vertical-align: top;
  width: auto !important;
  min-width: 140rem;
  background: none !important;
  color: var(--rt-text) !important;
}

.single-post .elementor-widget-theme-post-content :is(th, thead td) {
  background: var(--rt-dark) !important;
  color: #fff !important;
  font-weight: 600;
  border-bottom: 0 !important;
}

.single-post .elementor-widget-theme-post-content tbody tr:nth-child(even) td {
  background: var(--rt-surface) !important;
}

.single-post .elementor-widget-theme-post-content :is(th, td) p {
  font-size: inherit !important;
  line-height: inherit !important;
  margin: 0 !important;
}


/* ==========================================================================
   FAQs accordion
   Legacy Elementor Accordion (used in migrated posts) + Nested Accordion
   ========================================================================== */

.single-post .elementor-widget-theme-post-content :is(.elementor-accordion, .e-n-accordion) {
  border-top: 1px solid var(--rt-faq-rule);
  margin: 0 0 2em;
}

/* Item */
.single-post .elementor-widget-theme-post-content :is(.elementor-accordion-item, .e-n-accordion-item) {
  border: 0 !important;
  border-bottom: 1px solid var(--rt-faq-rule) !important;
  background: none !important;
  margin: 0 !important;
}

/* Question row */
.single-post .elementor-widget-theme-post-content :is(.elementor-tab-title, .e-n-accordion-item-title) {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20rem;
  padding: 22rem 0 !important;
  border: 0 !important;
  background: none !important;
  cursor: pointer;
  list-style: none;
}

.single-post .elementor-widget-theme-post-content .e-n-accordion-item-title::-webkit-details-marker {
  display: none;
}

/* Question text */
.single-post .elementor-widget-theme-post-content :is(.elementor-accordion-title, .e-n-accordion-item-title-text) {
  font-family: var(--rt-heading-font) !important;
  font-size: 20rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--rt-heading) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

/* Hover */
.single-post .elementor-widget-theme-post-content .elementor-tab-title:hover .elementor-accordion-title,
.single-post .elementor-widget-theme-post-content .e-n-accordion-item-title:hover .e-n-accordion-item-title-text {
  color: var(--rt-faq-hover) !important;
}

/* Keyboard focus */
.single-post .elementor-widget-theme-post-content :is(.elementor-accordion-title, .e-n-accordion-item-title):focus-visible {
  outline: 2px solid var(--rt-accent);
  outline-offset: 4px;
}

/* Plus/minus icon: move to the right */
.single-post .elementor-widget-theme-post-content :is(.elementor-accordion-icon, .e-n-accordion-item-title-icon) {
  order: 2;
  float: none !important;
  width: auto !important;
  flex-shrink: 0;
  margin: 0 !important;
  line-height: 1;
}

.single-post .elementor-widget-theme-post-content :is(.elementor-accordion-icon, .e-n-accordion-item-title-icon) svg {
  width: 16rem !important;
  height: 16rem !important;
  fill: var(--rt-faq-icon) !important;
}

/* Answer */
.single-post .elementor-widget-theme-post-content :is(.elementor-tab-content, .e-n-accordion-item > [role="region"]) {
  padding: 0 40rem 24rem 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--rt-text);
}

.single-post .elementor-widget-theme-post-content :is(.elementor-tab-content, .e-n-accordion-item > [role="region"]) p {
  margin: 0 0 0.9em !important;
}

.single-post .elementor-widget-theme-post-content :is(.elementor-tab-content, .e-n-accordion-item > [role="region"]) p:last-child {
  margin-bottom: 0 !important;
}

.single-post .elementor-widget-theme-post-content .e-n-accordion-item > [role="region"] .e-con {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
}

@media (max-width: 767px) {
  .single-post .elementor-widget-theme-post-content :is(.elementor-accordion-title, .e-n-accordion-item-title-text) {
    font-size: 18rem !important;
  }

  .single-post .elementor-widget-theme-post-content :is(.elementor-tab-content, .e-n-accordion-item > [role="region"]) {
    padding-right: 0 !important;
  }
}


/* ==========================================================================
   FAQs as plain HTML (cleaned posts)
   <details><summary>Question</summary><p>Answer</p></details>
   ========================================================================== */

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) {
  border-bottom: 1px solid var(--rt-faq-rule);
  margin: 0;
}

/* Top line on the first FAQ in a group */
.single-post .elementor-widget-theme-post-content :not(details) + details:not(.e-n-accordion-item),
.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item):first-child {
  border-top: 1px solid var(--rt-faq-rule);
}

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--rt-heading-font);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rt-heading);
  transition: color 0.15s ease;
}

.single-post .elementor-widget-theme-post-content details > summary::-webkit-details-marker {
  display: none;
}

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > summary:hover {
  color: var(--rt-faq-hover);
}

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > summary:focus-visible {
  outline: 2px solid var(--rt-link);
  outline-offset: 4px;
}

/* Plus / minus */
.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: var(--rt-faq-icon);
}

.single-post .elementor-widget-theme-post-content details[open]:not(.e-n-accordion-item) > summary::after {
  content: "–";
}

/* Answer */
.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > :not(summary) {
  padding-right: 40px;
}

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > p {
  margin: 0 0 0.9em !important;
}

.single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > :last-child {
  margin-bottom: 0 !important;
  padding-bottom: 24px;
}

@media (max-width: 767px) {
  .single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > summary {
    font-size: 18px;
  }

  .single-post .elementor-widget-theme-post-content details:not(.e-n-accordion-item) > :not(summary) {
    padding-right: 0;
  }
}
