/* Quick News Publisher — front-end article layout */
.qnp-article {
  --qnp-font: 'Poppins', sans-serif;
  --qnp-weight: 400;
  --qnp-heading-weight: 700;
  --qnp-accent: #c8102e;
  --qnp-ink: #14181f;
  --qnp-muted: #6b7280;
  --qnp-line: #e7e9ee;
  max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px;
  font-family: var(--qnp-font) !important; color: var(--qnp-ink);
}
.qnp-article * { box-sizing: border-box; }
/* Override theme typography inside the article.
   :where() keeps this broad rule at 0 specificity so the per-field rules below always win. */
:where(.qnp-article, .qnp-article p, .qnp-article li, .qnp-article a,
.qnp-pullquote p, .qnp-card-title, .qnp-section-title, .qnp-byline) {
  font-family: var(--qnp-font) !important;
}
.qnp-title {
  font-family: var(--qnp-title-font, var(--qnp-font)) !important;
  font-weight: var(--qnp-title-weight, var(--qnp-heading-weight)) !important;
  text-transform: var(--qnp-title-transform, none) !important;
}
.qnp-intro {
  font-family: var(--qnp-intro-font, var(--qnp-font)) !important;
  font-weight: var(--qnp-intro-weight, 500) !important;
  text-transform: var(--qnp-intro-transform, none) !important;
}
.qnp-body, .qnp-body p, .qnp-body li,
.qnp-body h1, .qnp-body h2, .qnp-body h3, .qnp-body h4 {
  font-family: var(--qnp-body-font, var(--qnp-font)) !important;
}
.qnp-body, .qnp-body p, .qnp-body li {
  font-weight: var(--qnp-body-weight, var(--qnp-weight)) !important;
}
.qnp-body { text-transform: var(--qnp-body-transform, none); }

.qnp-layout { display: grid; gap: 40px; }
.qnp-3col { grid-template-columns: 200px minmax(0,1fr) 320px; }
/* Ads must stay visible at every width — sidebars just move, they never disappear.
   Below 1200px the left rail moves to the end of the article (after the right rail);
   below 900px both rails stack, full-width, under the article body. */
@media (max-width: 1200px) {
  .qnp-3col { grid-template-columns: minmax(0,1fr) 300px; }
  .qnp-rail-left { grid-column: 2; order: 3; }
  .qnp-main { grid-column: 1; grid-row: 1 / span 2; }
  .qnp-rail-right { order: 2; }
}
@media (max-width: 900px) {
  .qnp-3col { grid-template-columns: 1fr; }
  .qnp-main { grid-column: 1; grid-row: auto; }
  .qnp-rail-left, .qnp-rail-right { grid-column: 1; }
  .qnp-rail .qnp-sticky { position: static; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
}

.qnp-masthead { display: flex; justify-content: center; padding: 8px 0 20px; border-bottom: 1px solid var(--qnp-line); margin-bottom: 20px; }
.qnp-logo { height: 84px; width: auto; display: block; }
.qnp-logo-link { display: inline-block; transition: transform .2s ease; }
.qnp-logo-link:hover { transform: scale(1.03); }

.qnp-progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--qnp-accent); z-index: 9999; transition: width .1s linear; }

.qnp-rail { min-width: 0; }
.qnp-rail .qnp-sticky { position: sticky; top: 24px; }

.qnp-advertorial-badge {
  position: absolute; top: 0; right: 0; background: var(--qnp-quote-mark-color, #ffce00); color: #111;
  font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 4px; z-index: 2;
}
.qnp-main { min-width: 0; position: relative; }
.qnp-header { border-bottom: 3px solid var(--qnp-ink); padding-bottom: 18px; margin-bottom: 22px; }
.qnp-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  font-weight: 700; color: var(--qnp-accent); text-decoration: none; margin-bottom: 10px;
}
.qnp-title {
  /* font-family/font-weight/text-transform for .qnp-title are already set with !important
     near the top of this file (and reinforced by the plugin's own inline <style> printed
     late in wp_head/wp_footer) — not repeated here to avoid two competing declarations. */
  font-size: clamp(28px, 4.5vw, 46px); line-height: 1.1; margin: 0 0 14px;
}
.qnp-byline { color: var(--qnp-muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.qnp-author { font-weight: 600; color: var(--qnp-ink); }
.qnp-dot { opacity: .5; }

.qnp-intro {
  font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; font-weight: calc(var(--qnp-weight) + 100);
  color: #2a2f38; margin: 0 0 24px;
}
.qnp-pullquote {
  position: relative; border-left: 5px solid var(--qnp-quote-mark-color, #ffce00);
  margin: 28px 0; padding: 18px 0 6px 28px;
}
.qnp-pullquote::before {
  content: "\201C"; position: absolute; left: 10px; top: -10px;
  font-family: Georgia, serif; font-size: 64px; line-height: 1; color: var(--qnp-quote-mark-color, #ffce00);
}
.qnp-pullquote p { font-size: clamp(20px, 3vw, 28px); line-height: 1.35; font-weight: var(--qnp-heading-weight); margin: 0 0 8px; font-style: italic; color: var(--qnp-quote-color, inherit); }
.qnp-pullquote cite { color: var(--qnp-muted); font-style: normal; font-weight: 600; }

/* Shared "soft box" treatment — Quick Take, References and Author bio all use it. */
.qnp-synopsis, .qnp-references, .qnp-author-bio {
  border: 1px solid #e7e2d8; border-radius: 15px; background: #faf9f6;
  padding: 18px 22px; margin: 26px 0;
}

.qnp-synopsis-label, .qnp-references-label, .qnp-author-bio-label {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--qnp-accent); margin: 0 0 12px;
}
.qnp-synopsis-label::before { content: "⚡"; margin-right: 6px; }

.qnp-synopsis ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qnp-synopsis li {
  position: relative; padding-left: 22px; font-size: 17px; font-weight: 700;
  line-height: 1.45; color: var(--qnp-ink);
}
.qnp-synopsis li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--qnp-accent);
}

.qnp-references ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.qnp-references li { font-size: 14px; color: var(--qnp-muted); line-height: 1.5; }
.qnp-references a { color: var(--qnp-accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }

.qnp-author-bio { display: flex; gap: 16px; align-items: flex-start; }
.qnp-author-bio img { border-radius: 50%; flex-shrink: 0; display: block; }
.qnp-author-bio-body { min-width: 0; }
.qnp-author-bio-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--qnp-ink); }
.qnp-author-bio-text { font-size: 14px; line-height: 1.6; color: var(--qnp-muted); margin: 0; }

.qnp-featured {
  margin: 0 auto 26px; width: 100%; max-width: calc(var(--qnp-img-w) * 1px);
  aspect-ratio: var(--qnp-img-ratio); overflow: hidden; border-radius: 10px; background: #f2f3f5;
}
.qnp-featured img {
  width: 100%; height: 100%; object-fit: var(--qnp-img-fit); display: block;
}

.qnp-body { font-size: 18px; line-height: 1.75; font-weight: var(--qnp-weight); }
.qnp-body p { margin: 0 0 20px; }
.qnp-body h1, .qnp-body h2, .qnp-body h3, .qnp-body h4, .qnp-body h5 { font-weight: var(--qnp-heading-weight); line-height: 1.25; margin: 32px 0 12px; }
.qnp-body h1 { font-size: 1.7em; }
.qnp-body h2 { font-size: 14px; }
.qnp-body h3 { font-size: 1.2em; }
.qnp-body h4 { font-size: 1.05em; }
.qnp-body h5 { font-size: 1em; text-transform: uppercase; letter-spacing: .04em; }
.qnp-body a { color: var(--qnp-accent); text-decoration: underline; text-underline-offset: 3px; }
.qnp-body img { max-width: 100%; height: auto; border-radius: 8px; }

.qnp-gallery { display: grid; grid-template-columns: repeat(var(--qnp-gallery-cols, 2), 1fr); gap: 12px; margin: 24px 0; }
.qnp-gallery img { width: 100%; aspect-ratio: var(--qnp-img-ratio); object-fit: var(--qnp-img-fit); border-radius: 8px; }

.qnp-ad { margin: 26px 0; text-align: center; }
.qnp-ad-label { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #9aa1ab; margin-bottom: 6px; }
.qnp-ad-ad_sidebar_left, .qnp-ad-ad_sidebar_1, .qnp-ad-ad_sidebar_2 { margin: 0 0 24px; }

/* Ad automatically inserted into post lists (home / category / tag / search) — appears
   as its own full-width block after the Nth post's content/excerpt. */
.qnp-list-ad { clear: both; margin: 20px 0; padding: 16px 0; text-align: center; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.qnp-list-ad .qnp-ad-label { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #9aa1ab; margin-bottom: 6px; }

.qnp-top {
  position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%;
  border: none; background: var(--qnp-ink); color: #fff; font-size: 20px; cursor: pointer; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.qnp-top.qnp-show { opacity: 1; pointer-events: auto; }
.qnp-top:hover { background: var(--qnp-accent); transform: translateY(-3px); }

.qnp-readmore-wrap { text-align: center; margin: 34px 0 10px; }
.qnp-readmore {
  cursor: pointer; border: none; background: var(--qnp-ink); color: #fff; font-family: var(--qnp-font);
  font-weight: 600; font-size: 15px; padding: 12px 28px; border-radius: 999px;
  transition: transform .18s ease, background-color .18s ease;
}
.qnp-readmore:hover { transform: translateY(-2px); background: var(--qnp-accent); }

.qnp-section-title {
  font-family: var(--qnp-font); font-weight: var(--qnp-heading-weight); font-size: 22px;
  margin: 40px 0 18px; padding-bottom: 8px; border-bottom: 2px solid var(--qnp-line);
}
.qnp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.qnp-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border: 1px solid var(--qnp-line); border-radius: 10px; overflow: hidden; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.qnp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20,24,31,.12); }
.qnp-card-thumb { aspect-ratio: var(--qnp-img-ratio, 16/9); background: #f2f3f5; overflow: hidden; }
.qnp-card-thumb img { width: 100%; height: 100%; object-fit: var(--qnp-img-fit, cover); display: block; }
.qnp-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#e9ebef,#d7dae0); }
.qnp-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.qnp-card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--qnp-accent); font-weight: 700; }
.qnp-card-title { font-family: var(--qnp-font); font-weight: var(--qnp-heading-weight); font-size: 16px; line-height: 1.3; margin: 0; }
.qnp-card-date { font-size: 12px; color: var(--qnp-muted); margin-top: auto; }

.qnp-sidebar .qnp-sticky { position: sticky; top: 24px; }

.qnp-loader { display: flex; justify-content: center; gap: 8px; padding: 26px 0; }
.qnp-loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--qnp-accent); animation: qnp-bounce .8s infinite alternate; }
.qnp-loader span:nth-child(2) { animation-delay: .2s; }
.qnp-loader span:nth-child(3) { animation-delay: .4s; }
@keyframes qnp-bounce { to { transform: translateY(-12px); opacity: .4; } }
.qnp-end { text-align: center; color: var(--qnp-muted); padding: 24px 0; font-size: 14px; }
