/**
 * Blog article + listing overrides
 * Loaded LAST so Gutenberg lists, tables and boxes always show.
 */

/* ---------- Layout ---------- */
.blog-single-section {
  padding-top: 48px;
  padding-bottom: 24px;
}
.blog-single-wrap {
  max-width: 860px !important;
  margin: 0 auto;
  overflow: visible !important;
}
.blog-single-content,
.blog-single-content.entry-content,
.single-post .entry-content {
  font-size: 1.06rem;
  line-height: 1.8;
  color: #0f172a;
  overflow: visible !important;
}

.blog-single-content > *:first-child {
  margin-top: 0 !important;
}

.blog-single-content h1 {
  font-size: 1.7rem;
  margin: 1.5em 0 0.5em;
  color: #0f172a;
}
.blog-single-content h2 {
  font-size: 1.42rem;
  margin: 1.75em 0 0.55em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.blog-single-content h3 {
  font-size: 1.16rem;
  margin: 1.35em 0 0.4em;
  color: #1e293b;
}
.blog-single-content h4 {
  font-size: 1.05rem;
  margin: 1.15em 0 0.35em;
}
.blog-single-content p {
  margin: 0 0 1em;
  color: #0f172a;
}
.blog-single-content strong,
.blog-single-content b {
  color: #0f172a;
  font-weight: 700;
}
.blog-single-content a {
  color: #f97316 !important;
  font-weight: 600;
  text-decoration: none;
}
.blog-single-content a:hover {
  color: #ea580c !important;
  text-decoration: underline;
}
.blog-single-content hr,
.blog-single-content .wp-block-separator {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

/* ---------- Lists: real orange dots / numbers ----------
   Theme used to set `ul { list-style: none }` globally, which hid
   Gutenberg & classic lists. We draw markers with ::before so they
   cannot be clipped by overflow-x:hidden on body. */
.blog-single-content ul,
.blog-single-content ul.wp-block-list,
.single-post .entry-content ul,
.single-post .entry-content ul.wp-block-list {
  list-style: none !important;
  padding-left: 0 !important;
  padding-inline-start: 0 !important;
  margin: 0.45em 0 1.3em 0.15em !important;
}

.blog-single-content ul > li,
.blog-single-content ul.wp-block-list > li,
.single-post .entry-content ul > li {
  position: relative !important;
  display: block !important;
  list-style: none !important;
  padding-left: 1.35rem !important;
  margin: 0 0 0.5em !important;
  line-height: 1.65;
  color: #0f172a;
}

.blog-single-content ul > li::before,
.blog-single-content ul.wp-block-list > li::before,
.single-post .entry-content ul > li::before {
  content: "" !important;
  position: absolute !important;
  left: 0.1rem !important;
  top: 0.62em !important;
  width: 7px !important;
  height: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #f97316 !important;
  box-shadow: none !important;
}

.blog-single-content ul ul > li::before {
  width: 6px !important;
  height: 6px !important;
  background: transparent !important;
  border: 2px solid #f97316 !important;
  top: 0.64em !important;
}

.blog-single-content ol,
.blog-single-content ol.wp-block-list,
.single-post .entry-content ol {
  list-style: none !important;
  counter-reset: mustang-ol;
  padding-left: 0 !important;
  padding-inline-start: 0 !important;
  margin: 0.45em 0 1.3em 0.15em !important;
}

.blog-single-content ol > li,
.single-post .entry-content ol > li {
  position: relative !important;
  display: block !important;
  list-style: none !important;
  counter-increment: mustang-ol;
  padding-left: 1.7rem !important;
  margin: 0 0 0.5em !important;
  color: #0f172a;
}

.blog-single-content ol > li::before,
.single-post .entry-content ol > li::before {
  content: counter(mustang-ol) "." !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0 !important;
  color: #f97316 !important;
  font-weight: 700 !important;
  font-size: 0.95em;
}

/* Square / boxed list style (Gutenberg “square”) */
.blog-single-content ul.is-style-square > li::before,
.blog-single-content .wp-block-list.is-style-square > li::before {
  border-radius: 2px !important;
  width: 8px !important;
  height: 8px !important;
}

/* Checkmark list */
.blog-single-content ul.is-style-checkmark-list > li::before,
.blog-single-content .wp-block-list.is-style-checkmark-list > li::before {
  content: "✓" !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0 !important;
  top: 0.05em !important;
  font-size: 0.95em;
  font-weight: 700;
  color: #f97316 !important;
}

.blog-single-content li > ul,
.blog-single-content li > ol {
  margin: 0.35em 0 0.2em !important;
}

.blog-single-content input[type="checkbox"] {
  accent-color: #f97316;
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

/* Don’t paint dots on FAQ accordion */
.blog-post-faq li::before,
.faq-list li::before,
.faq-list ul > li::before {
  content: none !important;
  display: none !important;
}

/* ---------- Tables as boxed grids ---------- */
.blog-table-wrap,
.blog-single-content .wp-block-table,
.single-post .entry-content .wp-block-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.5em 0 1.7em;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.blog-single-content table,
.single-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.95rem;
  background: #fff;
}

.blog-table-wrap table,
.wp-block-table table {
  margin: 0 !important;
  min-width: 100%;
}

.blog-single-content th,
.blog-single-content td,
.single-post .entry-content th,
.single-post .entry-content td {
  border: 1px solid #e2e8f0 !important;
  padding: 12px 14px !important;
  text-align: left;
  vertical-align: top;
  color: #0f172a;
}

.blog-single-content thead th,
.single-post .entry-content thead th,
.blog-single-content tr:first-child th {
  background: #fff7ed !important;
  color: #9a3412 !important;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.blog-single-content tbody tr:nth-child(even),
.single-post .entry-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Markdown leftover table (preformatted) */
.blog-single-content pre.blog-md-table {
  display: none;
}

/* ---------- Gutenberg / editor boxes ---------- */
.blog-single-content .wp-block-group,
.blog-single-content .wp-block-quote,
.blog-single-content blockquote,
.blog-single-content .wp-block-pullquote,
.blog-single-content .wp-block-cover,
.blog-single-content .wp-block-media-text,
.single-post .entry-content .wp-block-group,
.single-post .entry-content blockquote {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 18px 20px !important;
  margin: 1.3em 0 1.55em;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.08);
}

.blog-single-content .wp-block-group.has-background,
.blog-single-content .has-background {
  border-radius: 14px;
  padding: 18px 20px !important;
  margin: 1.3em 0 1.55em;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.blog-single-content .wp-block-group > p:last-child,
.blog-single-content blockquote > p:last-child {
  margin-bottom: 0;
}

.blog-single-content blockquote,
.blog-single-content .wp-block-quote {
  border-left: 4px solid #f97316 !important;
  font-style: italic;
  background: #fff7ed;
}

.blog-single-content .wp-block-quote p,
.blog-single-content blockquote p {
  margin-bottom: 0.4em;
}

.blog-single-content .wp-block-pullquote {
  text-align: center;
  border-left: 0 !important;
  border-top: 3px solid #f97316;
  border-bottom: 3px solid #f97316;
  background: #fff;
}

.blog-single-content figure,
.blog-single-content .wp-block-image {
  margin: 1.5em 0;
}

.blog-single-content img,
.blog-single-content .wp-block-image img {
  border-radius: 14px;
  max-width: 100%;
  height: auto;
}

.blog-single-content figcaption {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
}

.blog-single-content .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 1.4em 0;
}

.blog-single-content .wp-block-column {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  padding: 16px 18px !important;
}

.blog-single-content .wp-block-details,
.blog-single-content details {
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 16px !important;
  margin: 0.8em 0;
  background: #fff7ed;
}

.blog-single-content summary {
  cursor: pointer;
  font-weight: 700;
  color: #f97316;
}

.blog-single-content pre,
.blog-single-content .wp-block-code,
.blog-single-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.blog-single-content pre,
.blog-single-content .wp-block-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px !important;
  overflow-x: auto;
  font-size: 0.88rem;
}

.blog-single-content :not(pre) > code {
  background: #fff7ed;
  color: #9a3412;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Info / callout helper if used as class */
.blog-single-content .is-style-info,
.blog-box,
.blog-callout {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 16px 18px !important;
  margin: 1.25em 0;
}

/* ---------- Related posts ---------- */
.blog-related-section {
  background: #f8fafc;
  padding-top: 56px;
  padding-bottom: 64px;
}
.blog-related-header {
  margin-bottom: 28px;
  text-align: left;
}
.blog-related-header .section-label {
  color: #f97316;
  display: block;
  margin-bottom: 6px;
  text-align: left;
}
.blog-related-header .section-title {
  margin: 0;
  font-size: 1.6rem;
  text-align: left;
}
.blog-related-all {
  text-align: center;
  margin: 36px 0 0;
}

.blog-listing-section .blog-grid,
.blog-related-section .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .blog-listing-section .blog-grid,
  .blog-related-section .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .blog-listing-section .blog-grid,
  .blog-related-section .blog-grid {
    grid-template-columns: 1fr;
  }
}
