/* PropFirm.pl — long-form content: post body, review body, page body.
   Wrap any editor output in .pf-content. Styles target plain HTML and core Gutenberg
   block markup (wp-block-*), so existing posts render correctly without editing them. */

/* Width (#73, owner 31.10.2026): text, cover, images, blocks and tables use the full main column (850 px next to the sidebar;
   theme.json contentSize = wideSize = 850px). Narrow elements (quote, formula) are sized by their component. */
.pf-content {
  max-width: var(--pf-main);
  color: var(--pf-text);
  font-size: var(--pf-fs-reading);
  line-height: var(--pf-lh-reading);
  overflow-wrap: break-word;
}
.pf-content--wide { max-width: none; }
/* Huby (treść szeroka): sekcje oddzielone linią i odstępem 48 px (STYLE_REFERENCE: separator = linia --pf-line, 48 px odstępu) */
.pf-content--wide .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--pf-space-3); margin: var(--pf-space-5) 0; }
.pf-content--wide > h2:not(:first-child) { margin-top: var(--pf-space-7); padding-top: var(--pf-space-7); border-top: 1px solid var(--pf-line); }
.pf-content > * { margin-top: 0; margin-bottom: var(--pf-space-5); }
/* The content box contains floats (aligned images from the editor). */
.pf-content { display: flow-root; }
.pf-content > :last-child { margin-bottom: 0; }

/* Headings inside content */
.pf-content h2:not(:where(.pf-rank-embed *)) { margin: var(--pf-space-7) 0 var(--pf-space-4); font-size: var(--pf-fs-h2); line-height: 1.25; }
.pf-content h3:not(:where(.pf-rank-embed *)) { margin: var(--pf-space-6) 0 var(--pf-space-3); font-size: var(--pf-fs-h3); line-height: 1.35; }
.pf-content h4:not(:where(.pf-rank-embed *)) { margin: var(--pf-space-5) 0 var(--pf-space-2); font-size: var(--pf-fs-h4); }
.pf-content > h2:first-child, .pf-content > h3:first-child { margin-top: 0; }
.pf-content hr + h2, .pf-content .wp-block-separator + h2 { margin-top: 0; }

/* Text */
.pf-content p:not(:where(.pf-rank-embed *)) { margin: 0 0 var(--pf-space-5); }
.pf-content :where(a:not([class])) { color: var(--pf-action); text-decoration: underline; } /* classed links (buttons, cards) keep their component style */
.pf-content strong { font-weight: var(--pf-fw-semibold); }
.pf-content .has-text-align-center { text-align: center; }
.pf-content .has-small-font-size { font-size: var(--pf-fs-meta); }
.pf-content code { padding: 1px 6px; border-radius: var(--pf-radius-sm); background: var(--pf-surface); font-family: var(--pf-font-mono); font-size: .88em; }

/* Lists — wp-block-list or plain */
.pf-content ul:not(:where(.pf-rank-embed *)), .pf-content ol:not(:where(.pf-rank-embed *)) { padding-left: 1.4em; margin: 0 0 var(--pf-space-5); }
.pf-content li:not(:where(.pf-rank-embed *)) { margin: 0 0 var(--pf-space-2); padding-left: 4px; }
.pf-content li::marker { color: var(--pf-action); }
.pf-content ol li::marker { font-weight: var(--pf-fw-semibold); }
.pf-content li > ul, .pf-content li > ol { margin: var(--pf-space-2) 0 0; }

/* Images — wp-block-image */
.pf-content img { border-radius: var(--pf-radius-card); }
.pf-content figure, .pf-content .wp-block-image { margin: var(--pf-space-6) 0; }
.pf-content .wp-block-image img { width: auto; max-width: 100%; margin-inline: auto; border: 1px solid var(--pf-line); }
.pf-content figcaption, .pf-content .wp-element-caption {
  margin-top: var(--pf-space-2); color: var(--pf-text-3); font-size: var(--pf-fs-meta); line-height: var(--pf-lh-snug); text-align: center;
}

/* Separator — wp-block-separator */
.pf-content hr, .pf-content .wp-block-separator { margin: var(--pf-space-7) 0; border: 0; border-top: 1px solid var(--pf-line); opacity: 1; }

/* Quote — wp-block-quote / blockquote */
.pf-content blockquote, .pf-content .wp-block-quote {
  margin: var(--pf-space-6) 0; padding: var(--pf-space-1) 0 var(--pf-space-1) var(--pf-space-5);
  border-left: 3px solid var(--pf-action); color: var(--pf-text);
  font-size: var(--pf-fs-lead); line-height: var(--pf-lh-body);
}
.pf-content blockquote p { margin-bottom: var(--pf-space-3); }
.pf-content blockquote cite { display: block; color: var(--pf-text-3); font-size: var(--pf-fs-meta); font-style: normal; }

/* Tables — wp-block-table (and .propfirm-table) */
.pf-content .wp-block-table, .pf-table-wrap {
  margin: var(--pf-space-6) 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius-card);
}
.pf-content table, .pf-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: var(--pf-fs-meta); line-height: var(--pf-lh-snug); }
.pf-content th, .pf-content td, .pf-table th, .pf-table td { padding: 12px 14px; border-bottom: 1px solid var(--pf-line); text-align: left; vertical-align: top; }
.pf-content th, .pf-table thead th { background: var(--pf-surface); color: var(--pf-text); font-weight: var(--pf-fw-semibold); white-space: nowrap; }
.pf-content tbody tr:last-child > *, .pf-table tbody tr:last-child > * { border-bottom: 0; }
.pf-content .pf-price-table tbody th { background: transparent; white-space: normal; } /* cennik w treści = cennik w recenzji: komórka „Program” bez tła nagłówka */
.pf-content tbody th, .pf-content td:first-child, .pf-table td:first-child { font-weight: var(--pf-fw-semibold); }
.pf-content .wp-block-table figcaption { padding: 0 14px 12px; text-align: left; }

/* Details / FAQ — wp-block-details, plain details */
.pf-content details { margin: 0; border-bottom: 1px solid var(--pf-line); }
.pf-content details + details { margin-top: 0; }
.pf-content details:first-of-type { border-top: 1px solid var(--pf-line); }

/* Buttons — wp-block-buttons */
.pf-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--pf-space-3); }
.pf-content .wp-block-button__link { /* same look as .pf-btn */
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--pf-control-h);
  padding: 0 22px; border-radius: var(--pf-radius); background: var(--pf-action); color: var(--pf-action-text);
  font-size: var(--pf-fs-control); font-weight: var(--pf-fw-semibold); text-decoration: none;
}
.pf-content .is-style-outline .wp-block-button__link { background: transparent; color: var(--pf-action); border: 1px solid var(--pf-line-strong); }

/* Embeds — wp-block-embed (YouTube etc.) */
.pf-content .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.pf-content .wp-block-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--pf-radius-card); }

/* Columns — wp-block-columns */
.pf-content .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--pf-space-5); }

/* Editorial blocks used inside content (see components: pf-callout, pf-company-card). */
.pf-content .pf-callout, .pf-content .pf-company-card { margin: var(--pf-space-6) 0; }

@media (max-width: 640px) {
  .pf-content { font-size: var(--pf-fs-reading); line-height: 1.7; }
  .pf-content blockquote, .pf-content .wp-block-quote { font-size: var(--pf-fs-reading); padding-left: var(--pf-space-4); }
  .pf-content h2 { margin-top: var(--pf-space-6); }
}
/* Formula / key line inside editor content (glossary terms): one emphasised line, accent rule on the left */
.pf-content .pf-formula { padding: var(--pf-space-4) var(--pf-space-5); border-left: 3px solid var(--pf-accent); border-radius: 0 var(--pf-radius) var(--pf-radius) 0; background: var(--pf-surface); color: var(--pf-text); font-weight: var(--pf-fw-semibold); }
.pf-form-note { margin-top: var(--pf-space-3); max-width: 62ch; }
.pf-content--wide > :last-child { margin-bottom: 0; } /* odstęp do stopki/sekcji niżej daje layout, nie ostatni blok (np. przyciski „Zobacz całe FAQ”) */
.pf-content > .wp-block-spacer:first-child { display: none; } /* pusty spacer edytora na początku treści nie dodaje odstępu pod nagłówkiem strony */
/* Lista firm w treści ([prop_firm_table]) jest komponentem: izolacja od typografii treści (nagłówki, akapity, listy — wyżej :not(:where(.pf-rank-embed *))), ta sama skala co w rankingu */
.pf-rank-embed { font-size: var(--pf-fs-body); line-height: var(--pf-lh-body); }
.pf-rank-embed .pf-firm__toggle:focus:not(:focus-visible) { outline: 0; }
/* Separator „kropki” (blok Gutenberga is-style-dots, treść wpisu) — wspólny wygląd separatora kitu (linia), bez „···” ze stylów core */
:root .pf-content hr.wp-block-separator.is-style-dots { background: none !important; border: 0 !important; border-top: 1px solid var(--pf-line) !important; height: 1px; line-height: 0; }
:root .pf-content hr.wp-block-separator.is-style-dots::before { content: none; }
