/**
 * Restore native HTML element styles within Elementor styledContent.
 *
 * Tailwind Preflight resets list-style, margins, padding, color, font, etc.
 * Pages are unaffected because every element is an Elementor widget with its own classes.
 * Blog posts use WordPress post_content (native HTML) rendered inside the Elementor
 * template via {post_content} dynamic tag — these need default browser styles restored.
 *
 * Scoped to .elementor-optimized (the wrapper class added by the mu-plugin).
 *
 * Typography values from Elementor Kit (post-11.css / .elementor-kit-11):
 *   Body:    Poppins, 18px, 400, 1.7em line-height, #313131
 *   Links:   #75C12D, Poppins, no underline
 *   H1-H6:  Poppins Sans-serif
 */

/* ── Base typography (override Tailwind's body font/color) ── */
.elementor-optimized {
  font-family: "Poppins", sans-serif;
  color: #313131;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7em;
}

/* ── Lists ── */
.elementor-optimized ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.elementor-optimized ol {
  list-style: decimal;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.elementor-optimized li {
  margin-bottom: 0.25em;
}

.elementor-optimized ul ul {
  list-style: circle;
}

.elementor-optimized ul ul ul {
  list-style: square;
}

/* ── Headings (font/color only — margins handled by .toppro-post-content) ── */
.elementor-optimized h1,
.elementor-optimized h2,
.elementor-optimized h3,
.elementor-optimized h4,
.elementor-optimized h5,
.elementor-optimized h6 {
  font-family: "Poppins", sans-serif;
  color: #363D4F;
  line-height: 1.3;
}

/* ── Paragraphs (only inside post content, not Elementor widgets) ── */
.toppro-post-content p {
  margin-bottom: 1em;
}

/* ── Blockquotes ── */
.elementor-optimized blockquote {
  border-left: 4px solid #ccc;
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
}

/* ── Tables ── */
.elementor-optimized table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

.elementor-optimized th,
.elementor-optimized td {
  border: 1px solid #ddd;
  padding: 0.5em 0.75em;
  text-align: left;
}

.elementor-optimized th {
  font-weight: 600;
}

/* ── Horizontal rules ── */
.elementor-optimized hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 1.5em 0;
}

/* ── Images within content ── */
.elementor-optimized img {
  max-width: 100%;
  height: auto;
}

/* ── Links (match Elementor kit: green, no underline) ── */
.elementor-optimized a {
  color: #75C12D;
  text-decoration: none;
}

.elementor-optimized a:hover {
  text-decoration: underline;
}

/* ── CTA buttons: never show underline on hover ── */
.elementor-button-wrapper a,
.elementor-button-wrapper a:hover,
.elementor-button-wrapper a:focus,
a.elementor-button,
a.elementor-button:hover,
a.elementor-button:focus {
  text-decoration: none !important;
}

/* ── WordPress alignment classes ── */
.elementor-optimized .alignright {
  float: right;
  margin-left: 1rem;
}

.elementor-optimized .alignleft {
  float: left;
  margin-right: 1rem;
}

.elementor-optimized .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ── WordPress caption ── */
.elementor-optimized .wp-caption {
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.elementor-optimized .wp-caption img {
  display: block;
  margin: 0 auto;
}

/* ── Pre/Code ── */
.elementor-optimized pre {
  background: #f5f5f5;
  padding: 1em;
  overflow-x: auto;
  margin-bottom: 1em;
  border-radius: 4px;
}

.elementor-optimized code {
  background: #f5f5f5;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.elementor-optimized pre code {
  background: none;
  padding: 0;
}

/* ==========================================================================
   WordPress Theme CSS (toppro)
   Extracted from production inline <style> tag — applies to all blog posts.
   These are NOT in Elementor's CSS system; they come from the WP theme.
   ========================================================================== */

/* ── Post content typography (Bitter headings) ── */
.toppro-post-content {
  color: #373D4F;
}

.toppro-post-content h2,
.toppro-post-content h3,
.toppro-post-content h4,
.toppro-post-content h5,
.toppro-post-content h6 {
  font-family: var(--font-bitter), "Bitter", serif;
  color: #373D4F;
}

.toppro-post-content h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}

.toppro-post-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.toppro-post-content p {
  margin-top: 20px;
  margin-bottom: 10px;
}

.toppro-post-content h2 *,
.toppro-post-content h3 *,
.toppro-post-content h4 *,
.toppro-post-content h5 *,
.toppro-post-content h6 * {
  font-family: inherit;
  color: inherit;
}

/* Left-align Elementor templates embedded inside blog post content */
.toppro-post-content .elementor .e-con-inner {
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.toppro-post-content .elementor {
  text-align: left;
}

/* ── Author avatar circle ── */
/* Higher specificity to survive cascade from Elementor kit/widget resets */
.elementor .toppro-avatar-circle {
  width: 140px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  background: #dcdcdc;
  padding: 8px;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
}

.elementor .toppro-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  max-width: none;
}

/* ── Breadcrumb (top-breadcrumb in blog post template) ── */
.top-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-breadcrumb a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

.top-breadcrumb .sep {
  color: #999;
  font-size: 16px;
}

.top-breadcrumb .current {
  color: #9aa0a6;
}

/* ── Sub-menu (category nav in blog posts) ── */
.toppro-sub-menu .elementor-nav-menu .elementor-item {
  padding: 10px 18px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.toppro-sub-menu .elementor-nav-menu .elementor-item.elementor-item-active {
  background-color: #E6E3DB;
}

.toppro-sub-menu .elementor-nav-menu .elementor-item:hover {
  background-color: #E6E3DB;
}

/* ── Key insights box ── */
.top-key-insights-box {
  background-color: #f3faf5;
  padding: 24px 40px 24px 28px;
  border-radius: 8px;
  margin: 24px 0;
}

.top-key-insights-box h2,
.top-key-insights-box h3,
.top-key-insights-box h4 {
  margin-top: 0;
}

.top-key-insights-box ul {
  margin-left: 1.2em;
}

/* ── Info table (shortcode) ── */
.toppro-info-table-wrap {
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
  background: #fff;
}

.toppro-info-table-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  padding: 22px 24px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.toppro-info-table-row {
  display: grid;
  grid-template-columns: 34% 66%;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  align-items: stretch;
}

.toppro-info-table-row:nth-child(even) {
  background: rgba(0,0,0,0.03);
}

.toppro-info-table-cell {
  padding: 22px 24px;
}

.toppro-info-table-left {
  font-weight: 700;
  border-right: 1px solid rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
}

.toppro-info-table-right {
  line-height: 1.55;
}

.toppro-info-table-right p {
  margin: 0;
}

.toppro-info-table-right p + p {
  margin-top: 10px;
}

.toppro-info-table-row:last-child {
  border-bottom: 0;
}

@media (max-width: 768px) {
  .toppro-info-table-title {
    font-size: 22px;
    padding: 18px 18px;
  }
  .toppro-info-table-row {
    grid-template-columns: 1fr;
  }
  .toppro-info-table-cell {
    padding: 18px 18px;
  }
  .toppro-info-table-left {
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.10);
    align-items: flex-start;
  }
}

/* ── Missing theme CSS from parity analysis ──
   These inline styles exist on production but are not captured by the mu-plugin. */

/* Blog card title wrapping (prevents overflow in post cards) */
.top-card-title .elementor-heading-title {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Carousel images (partner logos) — grayscale with hover */
.carousel-img img {
  filter: grayscale(1) contrast(1.2);
  transition: filter 0.3s ease;
}

.carousel-img img:hover {
  filter: grayscale(0) contrast(1);
}

/* List styling in .lst containers */
.lst ul {
  margin-left: -20px;
  padding-bottom: 20px;
  padding-top: 20px;
}

.lst ul li {
  padding-bottom: 10px;
}

/* Icon box full-coverage click area */
.elementor-icon-box-wrapper a::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* Text link colors */
.txt-link a {
  color: #363D4F !important;
  text-decoration: none;
}

.txt-link a:hover {
  color: #7ABF2F !important;
}

/* Icon box icon spacing */
.icn .elementor-icon-box-icon {
  margin-top: 5px;
}

.icn-1 .elementor-icon-box-icon {
  margin-top: 0;
}

