/* ==========================================================================
   LeadMinds — single blog post
   Source design: blog-post.html   (classes prefixed lm-p-)
   ========================================================================== */

.lm-p {
  width: 100%; flex: 0 0 100%; min-width: 0;
  --p-coral: #F37458; --p-coral-text: #B8441F; --p-ink: #0E2727; --p-ink-soft: #4C6161;
  --p-line: rgba(14, 39, 39, .08);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--p-ink);
  background: #fff;
}
.lm-p *, .lm-p *::before, .lm-p *::after { box-sizing: border-box; }
.lm-p a { color: inherit; text-decoration: none; }
.lm-p ul { list-style: none; margin: 0; padding: 0; }
.lm-p img { max-width: 100%; display: block; }
.lm-p h1, .lm-p h2, .lm-p h3 { margin: 0; padding: 0; font-family: inherit; }
.lm-p h1::before, .lm-p h1::after, .lm-p h2::before, .lm-p h2::after, .lm-p h3::before, .lm-p h3::after { content: none; }

/* ---------- reading progress ---------- */
.lm-p-progress { position: sticky; top: var(--lm-stick, 88px); z-index: 50; height: 3px; background: var(--p-line); }
.lm-p-progress-fill { height: 100%; width: 0%; background: var(--p-coral); transition: width .1s linear; }

/* ---------- column ---------- */
.lm-p-wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 40px; }
@media (min-width: 768px) { .lm-p-wrap { padding: 40px 32px 48px; } }
@media (min-width: 1025px) { .lm-p-wrap { padding: 56px 0 56px; } }

.lm-p-crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--p-ink-soft); min-width: 0; }
.lm-p-crumb .lm-p-cur { color: var(--p-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-p-cat { display: inline-block; margin: 16px 0 8px; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--p-coral-text); }

.lm-p-title { font-size: 26px; font-weight: 700; line-height: 1.4; text-wrap: pretty; }
@media (min-width: 768px) { .lm-p-title { font-size: 33px; max-width: 26ch; } }
@media (min-width: 1025px) { .lm-p-title { font-size: 38px; max-width: 24ch; } }

.lm-p-meta { margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--p-ink-soft); }
.lm-p-meta li + li::before { content: "·"; margin-inline-end: 10px; color: rgba(14, 39, 39, .3); }
.lm-p-divider { height: 1px; background: var(--p-line); margin-top: 24px; }

.lm-p-figure { margin: 24px 0 0; }
.lm-p-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.lm-p-figure .lm-p-ph { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #E6E9E8; display: flex; align-items: center; justify-content: center; color: #9AA6A6; font-size: 13px; font-weight: 600; }
.lm-p-cap { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--p-ink-soft); }

/* ---------- article body ---------- */
.lm-p-prose { margin-top: 32px; font-size: 17px; line-height: 1.9; color: #1C3434; text-align: start; }
@media (min-width: 768px) { .lm-p-prose { font-size: 17.5px; } }
@media (min-width: 1025px) { .lm-p-prose { margin-top: 36px; font-size: 18px; } }
.lm-p-prose p { margin: 0 0 24px; }
.lm-p-prose h2 { margin: 48px 0 16px; font-size: 23px; font-weight: 700; line-height: 1.45; color: var(--p-ink); }
@media (min-width: 768px) { .lm-p-prose h2 { font-size: 25px; } }
@media (min-width: 1025px) { .lm-p-prose h2 { font-size: 26px; } }
.lm-p-prose h3 { margin: 32px 0 12px; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--p-ink); }
@media (min-width: 768px) { .lm-p-prose h3 { font-size: 20px; } }
@media (min-width: 1025px) { .lm-p-prose h3 { font-size: 21px; } }
.lm-p-prose a { color: var(--p-coral-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lm-p-prose bdi { direction: ltr; unicode-bidi: isolate; font-weight: 500; }
.lm-p-prose ul, .lm-p-prose ol { margin: 0 0 24px; padding: 0; list-style: none; }
.lm-p-prose ul li, .lm-p-prose ol li { position: relative; margin-bottom: 12px; padding-inline-start: 24px; }
.lm-p-prose ul li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .75em; width: 7px; height: 7px; border-radius: 50%; background: var(--p-coral); }
.lm-p-prose ol { counter-reset: lm-ol; }
.lm-p-prose ol li { counter-increment: lm-ol; }
.lm-p-prose ol li::before { content: counter(lm-ol); position: absolute; inset-inline-start: 0; top: 0; font-weight: 700; color: var(--p-coral-text); }
.lm-p-prose blockquote { margin: 32px 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--p-coral); font-size: 19px; font-weight: 500; line-height: 1.8; color: var(--p-ink); }
@media (min-width: 1025px) { .lm-p-prose blockquote { font-size: 20px; } }
.lm-p-prose blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; font-style: normal; color: var(--p-ink-soft); }
.lm-p-prose img { border-radius: 12px; margin: 0 0 24px; }
.lm-p-prose figure { margin: 32px 0; }
.lm-p-prose figcaption { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--p-ink-soft); }
.lm-p-prose table { width: 100%; border-collapse: collapse; }
.lm-p-prose .lm-p-table-wrap, .lm-p-prose figure.wp-block-table { margin: 32px 0; overflow-x: auto; }
.lm-p-prose th, .lm-p-prose td { padding: 11px 14px; text-align: start; vertical-align: top; font-size: 15px; font-weight: 500; line-height: 1.75; color: var(--p-ink-soft); border: 1px solid var(--p-line); white-space: nowrap; }
.lm-p-prose thead th { background: #F8FAFC; font-weight: 700; color: var(--p-ink); }

/* ---------- footer block ---------- */
.lm-p-tags { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lm-p-tags li { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; background: #F8FAFC; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--p-ink-soft); }
.lm-p-share { display: flex; gap: 8px; margin: 0 0 28px; }
.lm-p-share button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid rgba(14, 39, 39, .16); border-radius: 12px; color: var(--p-ink); cursor: pointer; }
.lm-p-author { display: flex; gap: 14px; align-items: flex-start; }
.lm-p-author .lm-p-av { flex: none; width: 56px; height: 56px; border-radius: 50%; background: #E9E2D6; overflow: hidden; }
.lm-p-author .lm-p-av img { width: 100%; height: 100%; object-fit: cover; }
.lm-p-author h2 { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.lm-p-author p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--p-ink-soft); }
.lm-p-footer-block { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--p-line); }

/* ---------- related ---------- */
.lm-p-related { margin-top: 48px; }
.lm-p-related h2 { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.lm-p-related-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.lm-p-rc { flex: 1 1 100%; display: flex; gap: 12px; background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: 12px; align-items: flex-start; }
@media (min-width: 768px) { .lm-p-related-grid { gap: 20px; } .lm-p-rc { flex: 1 1 calc(50% - 10px); } }
@media (min-width: 1025px) { .lm-p-related-grid { gap: 22px; } .lm-p-rc { flex: 1 1 calc(33.333% - 15px); } }
.lm-p-rc .lm-p-th { width: 88px; height: 88px; flex: none; border-radius: 10px; overflow: hidden; background: #E6E9E8; }
.lm-p-rc .lm-p-th img { width: 100%; height: 100%; object-fit: cover; }
.lm-p-rc .lm-p-c { font-size: 12px; font-weight: 700; color: var(--p-coral-text); }
.lm-p-rc h3 { margin: 4px 0 6px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.lm-p-rc .lm-p-d { font-size: 12.5px; color: var(--p-ink-soft); }

.lm-p-close { margin-top: 48px; padding: 20px 0 8px; border-top: 1px solid var(--p-line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 15.5px; font-weight: 500; line-height: 1.7; color: var(--p-ink-soft); }
.lm-p-close a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; color: var(--p-coral-text); }

/* ---------- dark mode ---------- */
[data-theme="dark"] .lm-p { background: #0b1220; color: #e2e8f0; }
[data-theme="dark"] .lm-p-prose { color: #cbd5e1; }
[data-theme="dark"] .lm-p-title,
[data-theme="dark"] .lm-p-prose h2,
[data-theme="dark"] .lm-p-prose h3,
[data-theme="dark"] .lm-p-author h2 { color: #f1f5f9; }
[data-theme="dark"] .lm-p-tags li,
[data-theme="dark"] .lm-p-prose thead th { background: #111a2e; color: #cbd5e1; }
[data-theme="dark"] .lm-p-rc,
[data-theme="dark"] .lm-p-share button { background: #111a2e; border-color: #1f2a44; color: #e2e8f0; }
