/* ============================================================================
   TTP Blog Post Styles
   Scope: single posts rendered through Elementor's Theme Post Content widget
   (which wraps content in .elementor-widget-theme-post-content .elementor-widget-container)
   Palette: TTP red #b4141e, near-black #1a1a1a, mid-grey #555, light-grey #e8e8e8
   ============================================================================ */

body.single-post {
  --ttp-red: #b4141e;
  --ttp-red-dark: #8a0e16;
  --ttp-black: #1a1a1a;
  --ttp-grey: #555;
  --ttp-grey-light: #e8e8e8;
  --ttp-grey-bg: #f7f7f8;
  --ttp-radius: 8px;
}

/* Content scope — both Elementor template and classic .entry-content */
.ttp-post-scope,
body.single-post .elementor-widget-theme-post-content .elementor-widget-container,
body.single-post .entry-content {
  color: var(--ttp-black);
  font-size: 17px;
  line-height: 1.7;
}

/* ---- Headings ---- */
body.single-post .elementor-widget-theme-post-content h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--ttp-black);
  margin: 2.2em 0 0.65em;
  padding-bottom: 0.4em;
  border-bottom: 3px solid var(--ttp-red);
  display: inline-block;
}

body.single-post .elementor-widget-theme-post-content h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--ttp-black);
  margin: 1.8em 0 0.5em;
}

body.single-post .elementor-widget-theme-post-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ttp-red);
  margin: 1.5em 0 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Body paragraphs ---- */
body.single-post .elementor-widget-theme-post-content p {
  margin: 0 0 1.15em;
  color: var(--ttp-black);
  font-size: 17px;
  line-height: 1.7;
}

body.single-post .elementor-widget-theme-post-content > .elementor-widget-container > p:first-of-type {
  font-size: 1.18em;
  line-height: 1.6;
  color: var(--ttp-grey);
}

/* ---- Links ---- */
body.single-post .elementor-widget-theme-post-content a {
  color: var(--ttp-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
body.single-post .elementor-widget-theme-post-content a:hover {
  color: var(--ttp-red-dark);
}

/* ---- Strong ---- */
body.single-post .elementor-widget-theme-post-content strong {
  font-weight: 700;
  color: var(--ttp-black);
}

/* ---- Custom check-mark bullets (unicode-based for max compat) ---- */
body.single-post .elementor-widget-theme-post-content ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 0 1.5em !important;
}
body.single-post .elementor-widget-theme-post-content ul li {
  position: relative;
  padding: 0.15em 0 0.15em 1.85em !important;
  margin-bottom: 0.45em;
  list-style: none !important;
}
body.single-post .elementor-widget-theme-post-content ul li::before {
  content: "\2714"; /* heavy check ✔ */
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--ttp-red);
  font-weight: 900;
  font-size: 1.05em;
  line-height: 1.7;
  display: inline-block;
  width: 1.4em;
}

/* Ordered lists: branded red numbered circles */
body.single-post .elementor-widget-theme-post-content ol {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 0 1.5em !important;
  counter-reset: ttp-ol;
}
body.single-post .elementor-widget-theme-post-content ol li {
  position: relative;
  padding: 0.25em 0 0.25em 2.5em !important;
  margin-bottom: 0.5em;
  counter-increment: ttp-ol;
}
body.single-post .elementor-widget-theme-post-content ol li::before {
  content: counter(ttp-ol);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.65em;
  height: 1.65em;
  background: var(--ttp-red);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Tables ---- */
body.single-post .elementor-widget-theme-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0 2em;
  font-size: 0.97em;
  border: 1px solid var(--ttp-grey-light);
  border-radius: var(--ttp-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

body.single-post .elementor-widget-theme-post-content table thead th {
  background: var(--ttp-red) !important;
  color: #fff !important;
  font-weight: 700;
  text-align: left;
  padding: 0.85em 1em;
  font-size: 0.92em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
}

body.single-post .elementor-widget-theme-post-content table tbody td {
  padding: 0.85em 1em;
  border-bottom: 1px solid var(--ttp-grey-light);
  color: var(--ttp-black);
  vertical-align: top;
  background: #fff;
}

body.single-post .elementor-widget-theme-post-content table tbody tr:nth-child(even) td {
  background: var(--ttp-grey-bg);
}

body.single-post .elementor-widget-theme-post-content table tbody tr:last-child td {
  border-bottom: none;
}

body.single-post .elementor-widget-theme-post-content table tbody td:first-child {
  font-weight: 600;
}

/* Highlight price column (last column) when 2-col table */
body.single-post .elementor-widget-theme-post-content table tbody td:last-child:not(:first-child) {
  font-weight: 700;
  color: var(--ttp-red);
  white-space: nowrap;
}

/* Mobile table: horizontal scroll wrap */
@media (max-width: 640px) {
  body.single-post .elementor-widget-theme-post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---- Callout boxes ---- */
.ttp-callout {
  background: var(--ttp-grey-bg);
  border-left: 4px solid var(--ttp-red);
  border-radius: 0 var(--ttp-radius) var(--ttp-radius) 0;
  padding: 1.25em 1.5em;
  margin: 1.5em 0 2em;
}
.ttp-callout-title {
  font-weight: 800;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ttp-red);
  margin-bottom: 0.35em;
}
.ttp-callout-body p:last-child { margin-bottom: 0; }
.ttp-callout-warning { border-left-color: #d97706; }
.ttp-callout-warning .ttp-callout-title { color: #d97706; }
.ttp-callout-takeaway { border-left-color: var(--ttp-black); }
.ttp-callout-takeaway .ttp-callout-title { color: var(--ttp-black); }

/* ---- FAQ section ---- */
.ttp-faq {
  margin: 3em 0 2em;
  padding: 2em 0 0;
  border-top: 1px solid var(--ttp-grey-light);
}
.ttp-faq-heading {
  font-size: clamp(1.5rem, 2.8vw, 2rem) !important;
  font-weight: 800 !important;
  border-bottom: 3px solid var(--ttp-red) !important;
  display: inline-block !important;
  padding-bottom: 0.4em !important;
  margin: 0 0 1em !important;
  color: var(--ttp-black) !important;
}
.ttp-faq-list { display: flex; flex-direction: column; gap: 0.5em; }
.ttp-faq-item {
  border: 1px solid var(--ttp-grey-light);
  border-radius: var(--ttp-radius);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.ttp-faq-item[open] {
  box-shadow: 0 4px 16px rgba(180,20,30,0.08);
  border-color: rgba(180,20,30,0.2);
}
.ttp-faq-q {
  cursor: pointer;
  list-style: none;
  padding: 1.1em 1.4em;
  font-weight: 700;
  font-size: 1.05em;
  color: var(--ttp-black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  transition: background 0.15s ease;
}
.ttp-faq-q::-webkit-details-marker { display: none; }
.ttp-faq-q::marker { display: none; content: ''; }
.ttp-faq-q:hover { background: var(--ttp-grey-bg); }
.ttp-faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ttp-red);
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}
.ttp-faq-icon::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  transition: transform 0.2s ease;
}
.ttp-faq-item[open] .ttp-faq-icon { transform: rotate(45deg); }
.ttp-faq-a {
  padding: 0 1.4em 1.2em;
  color: var(--ttp-grey);
  line-height: 1.65;
}
.ttp-faq-a p { margin: 0 0 0.8em; color: var(--ttp-grey); }
.ttp-faq-a p:last-child { margin-bottom: 0; }
.ttp-faq-a strong { color: var(--ttp-black); }

/* ---- Inline CTA block ---- */
.ttp-cta-inline {
  background: var(--ttp-grey-bg);
  border: 1px solid var(--ttp-grey-light);
  border-radius: var(--ttp-radius);
  padding: 1.5em 1.75em;
  margin: 2em 0;
}
.ttp-cta-inline .ttp-cta-lead {
  font-weight: 700;
  color: var(--ttp-black);
  margin: 0 0 0.75em;
  font-size: 1.1em;
}
.ttp-cta-inline .ttp-cta-row {
  display: flex;
  gap: 0.65em;
  align-items: center;
  flex-wrap: nowrap;
}
.ttp-cta-inline .ttp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em 1.5em;
  background: var(--ttp-red);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95em;
  transition: background 0.15s ease;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.ttp-cta-inline .ttp-btn-primary:hover { background: var(--ttp-red-dark); }
.ttp-cta-inline .ttp-btn-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid var(--ttp-grey-light);
  border-radius: 6px;
  color: var(--ttp-red);
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.ttp-cta-inline .ttp-btn-icon:hover {
  background: var(--ttp-red);
  color: #fff;
  border-color: var(--ttp-red);
}
.ttp-cta-inline .ttp-btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Mobile CTA: tighter padding/font so primary text doesn't truncate */
@media (max-width: 480px) {
  .ttp-cta-inline {
    padding: 1.25em 1em;
  }
  .ttp-cta-inline .ttp-btn-primary {
    font-size: 0.82em;
    padding: 0.7em 0.9em;
  }
  .ttp-cta-inline .ttp-btn-icon {
    width: 40px;
    height: 40px;
  }
  .ttp-cta-inline .ttp-cta-row {
    gap: 0.45em;
  }
}

/* ---- Blockquote ---- */
body.single-post .elementor-widget-theme-post-content blockquote {
  border-left: 4px solid var(--ttp-red);
  padding: 0.5em 0 0.5em 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  font-size: 1.1em;
  color: var(--ttp-grey);
}

/* ---- Images ---- */
body.single-post .elementor-widget-theme-post-content img {
  border-radius: var(--ttp-radius);
  margin: 1em 0;
  max-width: 100%;
  height: auto;
}

/* ---- HR ---- */
body.single-post .elementor-widget-theme-post-content hr {
  border: none;
  border-top: 1px solid var(--ttp-grey-light);
  margin: 2.5em 0;
}
