/* ==========================================================================
   QuickConvertPDF — Blog (public)
   Loaded on /blog/ pages and inside the CKEditor content frame, so what an
   author types is what a reader gets (`bodyClass: "post-body"` in settings).
   ========================================================================== */

.blog {
  --pink: #e91e63;
  --pink-dark: #b0134c;
  --pink-soft: #fff2f7;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e8eaf0;
  --surface: #fff;
  --surface-2: #f8f9fc;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06);
  --shadow: 0 12px 34px rgba(16, 24, 40, .1);
}

/* --------------------------------------------------------------------------
   Index — hero & filters
   -------------------------------------------------------------------------- */
.blog-hero { padding: 8px 0 26px; }
.blog-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--pink); background: var(--pink-soft);
  padding: 6px 14px; border-radius: 999px;
}
.blog-hero__title {
  font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: -.03em;
  color: var(--ink); margin: 14px 0 10px; line-height: 1.15;
}
.blog-hero__lede { color: var(--muted); font-size: clamp(15px, 2vw, 17px); max-width: 60ch; margin: 0; }

.blog-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.blog-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.blog-search input {
  width: 100%; padding: 10px 14px 10px 38px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
}
.blog-search input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(233, 30, 99, .12); }
.blog-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.blog-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: all .18s ease; text-decoration: none;
}
.blog-chip:hover { border-color: var(--pink); color: var(--pink); }
.blog-chip.is-active { background: var(--pink); border-color: var(--pink); color: #fff; }
.blog-chip__n { font-size: 11.5px; opacity: .7; }

/* --------------------------------------------------------------------------
   Index — featured + cards
   -------------------------------------------------------------------------- */
.blog-featured {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 34px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.blog-featured:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-featured__media { position: relative; min-height: 260px; background: var(--surface-2); }
.blog-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured__placeholder {
  width: 100%; height: 100%; min-height: 260px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ffe3ee 0%, #f0e9ff 100%); color: var(--pink); font-size: 42px;
}
.blog-featured__body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; }
.blog-featured__title {
  font-size: clamp(21px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em;
  line-height: 1.25; margin: 12px 0 12px;
}
.blog-featured__title a { color: var(--ink); text-decoration: none; }
.blog-featured__title a:hover { color: var(--pink); }
.blog-featured__excerpt { color: var(--muted); font-size: 15px; line-height: 1.65; margin-bottom: 18px; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.blog-card {
  display: flex; flex-direction: column; overflow: hidden; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e2c6d4; }
.blog-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-card:hover .blog-card__media img { transform: scale(1.04); }
.blog-card__placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 30px; color: var(--pink);
  background: linear-gradient(135deg, #ffe9f1 0%, #eee9ff 100%);
}
.blog-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1 1 auto; }
.blog-card__title { font-size: 17.5px; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; margin: 10px 0 8px; }
.blog-card__title a { color: var(--ink); text-decoration: none; }
.blog-card__title a:hover { color: var(--pink); }
.blog-card__excerpt { color: var(--muted); font-size: 14px; line-height: 1.6; flex: 1 1 auto; margin: 0 0 16px; }
.blog-card__foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
}

.blog-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
  background: var(--pink-soft); color: var(--pink-dark); text-decoration: none;
}
.blog-badge:hover { background: var(--pink); color: #fff; }
.blog-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.blog-meta span { display: inline-flex; align-items: center; gap: 6px; }

.blog-empty { text-align: center; padding: 60px 20px; }
.blog-empty i { font-size: 40px; color: var(--pink); }

.blog-pager { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 42px 0 10px; }
.blog-pager a, .blog-pager span {
  min-width: 40px; height: 40px; padding: 0 13px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); text-decoration: none;
}
.blog-pager a:hover { border-color: var(--pink); color: var(--pink); }
.blog-pager .is-current { background: var(--pink); border-color: var(--pink); color: #fff; }
.blog-pager .is-disabled { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */
.post-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), #ff8fb3); z-index: 1080;
  transition: width .1s linear;
}

.post-shell { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 46px; align-items: start; }

.post-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.post-crumbs a { color: var(--muted); text-decoration: none; }
.post-crumbs a:hover { color: var(--pink); }

.post-title {
  font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; letter-spacing: -.03em;
  line-height: 1.15; color: var(--ink); margin: 12px 0 16px;
}
.post-lede { font-size: clamp(16px, 2vw, 18.5px); color: var(--ink-2); line-height: 1.6; margin: 0 0 20px; }

.post-byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 28px; font-size: 13.5px; color: var(--muted);
}
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), #ff7fa6); color: #fff; font-weight: 650; font-size: 14px;
}
.post-byline strong { color: var(--ink); font-weight: 600; display: block; font-size: 14px; }

.post-cover {
  width: 100%; aspect-ratio: 16 / 8; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 30px; box-shadow: var(--shadow-sm);
}
.post-cover-caption { font-size: 12.5px; color: var(--muted); text-align: center; margin: -20px 0 30px; }

.post-preview-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 24px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 14px;
}

/* Typography shared by the live article and the editor body -------------- */
:is(.post-content, .post-body) {
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink-2, #344054);
  word-wrap: break-word;
}
:is(.post-content, .post-body) > *:first-child { margin-top: 0; }
:is(.post-content, .post-body) p { margin: 0 0 1.35em; }
:is(.post-content, .post-body) h2 {
  font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.02em;
  color: var(--ink, #101828); margin: 2em 0 .7em; line-height: 1.3; scroll-margin-top: 90px;
}
:is(.post-content, .post-body) h3 {
  font-size: clamp(18px, 2.2vw, 21px); font-weight: 650;
  color: var(--ink, #101828); margin: 1.7em 0 .6em; line-height: 1.35; scroll-margin-top: 90px;
}
:is(.post-content, .post-body) h4 { font-size: 17px; font-weight: 650; color: var(--ink, #101828); margin: 1.5em 0 .5em; }
:is(.post-content, .post-body) a { color: #e91e63; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:is(.post-content, .post-body) a:hover { color: #b0134c; }
:is(.post-content, .post-body) strong { color: var(--ink, #101828); font-weight: 650; }
:is(.post-content, .post-body) ul,
:is(.post-content, .post-body) ol { margin: 0 0 1.35em; padding-left: 1.4em; }
:is(.post-content, .post-body) li { margin-bottom: .5em; }
:is(.post-content, .post-body) li::marker { color: #e91e63; }
:is(.post-content, .post-body) img {
  max-width: 100%; height: auto; border-radius: 12px; margin: 1.6em 0;
  box-shadow: 0 6px 22px rgba(16, 24, 40, .1);
}
:is(.post-content, .post-body) figure { margin: 1.8em 0; }
:is(.post-content, .post-body) figcaption { font-size: 13px; color: #667085; text-align: center; margin-top: 8px; }
:is(.post-content, .post-body) blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 22px;
  border-left: 3px solid #e91e63;
  font-size: 18px; font-style: italic; color: #101828;
}
:is(.post-content, .post-body) blockquote p:last-child { margin-bottom: 0; }
:is(.post-content, .post-body) pre {
  background: #0f172a; color: #e2e8f0; padding: 18px 20px; border-radius: 12px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.65; margin: 1.6em 0;
}
:is(.post-content, .post-body) code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; background: #f1f3f9; color: #b0134c; padding: 2px 6px; border-radius: 5px;
}
:is(.post-content, .post-body) pre code { background: none; color: inherit; padding: 0; }
:is(.post-content, .post-body) hr { border: 0; border-top: 1px solid #e8eaf0; margin: 2.4em 0; }
:is(.post-content, .post-body) table {
  width: 100%; border-collapse: collapse; margin: 1.7em 0; font-size: 15px;
  display: block; overflow-x: auto;
}
:is(.post-content, .post-body) th,
:is(.post-content, .post-body) td { border: 1px solid #e8eaf0; padding: 11px 14px; text-align: left; }
:is(.post-content, .post-body) th { background: #f8f9fc; font-weight: 650; color: #101828; }
:is(.post-content, .post-body) tbody tr:nth-child(even) { background: #fbfbfd; }

/* Table of contents ------------------------------------------------------ */
.post-aside { position: sticky; top: 90px; display: grid; gap: 22px; }
.post-toc { border-left: 2px solid var(--line); padding-left: 18px; }
.post-toc__title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.post-toc a {
  display: block; font-size: 13.5px; line-height: 1.5; color: var(--muted);
  padding: 6px 0; text-decoration: none; transition: color .16s ease;
}
.post-toc a:hover { color: var(--pink); }
.post-toc a.is-active { color: var(--pink); font-weight: 600; }
.post-toc a.is-sub { padding-left: 14px; font-size: 13px; }

.post-share { display: flex; gap: 8px; flex-wrap: wrap; }
.post-share a, .post-share button {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; font-size: 15px; text-decoration: none;
  transition: all .18s ease;
}
.post-share a:hover, .post-share button:hover { border-color: var(--pink); color: var(--pink); transform: translateY(-2px); }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 34px 0; }
.post-tag {
  font-size: 13px; padding: 6px 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
}
.post-tag:hover { border-color: var(--pink); color: var(--pink); }

.post-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: var(--radius); margin: 40px 0;
  background: linear-gradient(135deg, #fff2f7 0%, #f2efff 100%);
  border: 1px solid #f6d9e6;
}
.post-cta h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.post-cta p { color: var(--muted); font-size: 14.5px; margin: 0; }
.post-cta .btn-cta {
  margin-left: auto; background: var(--pink); color: #fff; border: 0;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 14.5px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(233, 30, 99, .28); white-space: nowrap;
}
.post-cta .btn-cta:hover { background: var(--pink-dark); color: #fff; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
.post-nav a {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); text-decoration: none; transition: all .2s ease;
}
.post-nav a:hover { border-color: var(--pink); box-shadow: var(--shadow-sm); }
.post-nav small { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.post-nav strong { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.post-nav .is-next { text-align: right; }

.post-related { margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); }
.post-related h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-bottom: 22px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .post-shell { grid-template-columns: 1fr; gap: 0; }
  .post-aside { position: static; margin-top: 34px; }
  .post-toc { display: none; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured__media { min-height: 200px; }
}

@media (max-width: 576px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .is-next { text-align: left; }
  .post-cta { padding: 22px; }
  .post-cta .btn-cta { margin-left: 0; width: 100%; text-align: center; }
  :is(.post-content, .post-body) { font-size: 16px; }
}

@media print {
  .post-aside, .post-share, .post-cta, .post-nav, .post-related, .post-progress { display: none !important; }
  .post-shell { display: block; }
}
