/**
 * Rachunkowy CRM — czytelna typografia artykułów (skala Tailwind / prose).
 * Nadpisuje landingowe rozmiary z Elementor Kit oraz stare hacki H2.
 */

:root {
  --rcrm-ink: #0b081d;
  --rcrm-muted: #5b6178;
  --rcrm-accent: #4f46e5;
  --rcrm-border: #e4e8f2;
  --rcrm-prose-max: 42rem;
}

/* Layout: pełna szerokość kontenera Elementora, bez sztucznych 75% */
body.single-post #content.site-main,
body.single #content.site-main {
  width: 100% !important;
  max-width: none !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.single-post .page-header,
body.single .page-header {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.25rem 0.5rem;
  text-align: left;
}

/* Tytuł wpisu — text-4xl / md:text-5xl */
body.single-post .entry-title,
body.single .entry-title,
body.single-post h1.entry-title,
body.single h1.entry-title {
  font-size: 2.25rem !important; /* text-4xl */
  line-height: 1.15 !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
  color: var(--rcrm-ink) !important;
  text-align: left !important;
  margin: 0 0 1.5rem !important;
  max-width: 48rem;
}

@media (min-width: 768px) {
  body.single-post .entry-title,
  body.single .entry-title,
  body.single-post h1.entry-title,
  body.single h1.entry-title {
    font-size: 3rem !important; /* text-5xl */
  }
}

/* Prose container */
.elementor-widget-theme-post-content .elementor-widget-container,
body.single-post .page-content .elementor-widget-theme-post-content,
.rcrm-prose {
  color: var(--rcrm-ink);
  font-size: 1.125rem; /* text-lg */
  line-height: 1.75; /* leading-relaxed */
  max-width: 48rem;
}

.elementor-widget-theme-post-content p,
.rcrm-prose p {
  margin: 0 0 1.25rem !important;
  font-size: 1.125rem !important;
  line-height: 1.75 !important;
  color: var(--rcrm-ink) !important;
  font-weight: 400 !important;
}

.elementor-widget-theme-post-content p:last-child,
.rcrm-prose p:last-child {
  margin-bottom: 0 !important;
}

/* H2 — text-2xl / md:text-3xl (WIĘKSZE niż H3) */
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h2.wp-block-heading,
body.single-post .page-content .elementor-widget-theme-post-content h2 {
  font-size: 1.5rem !important; /* text-2xl */
  line-height: 1.3 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--rcrm-ink) !important;
  margin: 2.75rem 0 1rem !important;
  padding-top: 0 !important;
}

@media (min-width: 768px) {
  .elementor-widget-theme-post-content h2,
  .elementor-widget-theme-post-content h2.wp-block-heading,
  body.single-post .page-content .elementor-widget-theme-post-content h2 {
    font-size: 1.875rem !important; /* text-3xl */
  }
}

/* H3 — text-xl / md:text-2xl (MNIEJSZE niż H2) */
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h3.wp-block-heading,
body.single-post .page-content h3,
body.single .page-content h3 {
  font-size: 1.25rem !important; /* text-xl */
  line-height: 1.35 !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em;
  color: var(--rcrm-ink) !important;
  margin: 2rem 0 0.75rem !important;
  padding-top: 0 !important;
}

@media (min-width: 768px) {
  .elementor-widget-theme-post-content h3,
  .elementor-widget-theme-post-content h3.wp-block-heading,
  body.single-post .page-content h3,
  body.single .page-content h3 {
    font-size: 1.5rem !important; /* text-2xl */
  }
}

/* H4 — text-lg */
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h4.wp-block-heading,
body.single-post .page-content h4,
body.single .page-content h4 {
  font-size: 1.125rem !important;
  line-height: 1.4 !important;
  font-weight: 650 !important;
  color: var(--rcrm-ink) !important;
  margin: 1.75rem 0 0.5rem !important;
}

/* First heading after title — mniej pustki u góry */
.elementor-widget-theme-post-content > *:first-child,
.elementor-widget-theme-post-content .elementor-widget-container > *:first-child {
  margin-top: 0 !important;
}

/* Lists — Tailwind space-y + pl-6 */
.elementor-widget-theme-post-content ul,
.elementor-widget-theme-post-content ol,
.rcrm-prose ul,
.rcrm-prose ol {
  margin: 0 0 1.5rem !important;
  padding-left: 1.5rem !important;
  list-style-position: outside;
}

.elementor-widget-theme-post-content ul {
  list-style-type: disc !important;
}

.elementor-widget-theme-post-content ol {
  list-style-type: decimal !important;
}

.elementor-widget-theme-post-content li,
.rcrm-prose li {
  margin: 0 0 0.625rem !important;
  padding-left: 0.25rem;
  line-height: 1.7 !important;
  font-size: 1.125rem !important;
  color: var(--rcrm-ink) !important;
}

.elementor-widget-theme-post-content li:last-child,
.rcrm-prose li:last-child {
  margin-bottom: 0 !important;
}

.elementor-widget-theme-post-content li > ul,
.elementor-widget-theme-post-content li > ol {
  margin-top: 0.5rem !important;
  margin-bottom: 0.25rem !important;
}

/* Links */
.elementor-widget-theme-post-content a,
.rcrm-prose a {
  color: var(--rcrm-accent) !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  font-weight: 500;
}

.elementor-widget-theme-post-content a:hover,
.rcrm-prose a:hover {
  color: #3730a3 !important;
}

/* Inline emphasis */
.elementor-widget-theme-post-content strong,
.elementor-widget-theme-post-content b {
  font-weight: 650 !important;
  color: var(--rcrm-ink);
}

.elementor-widget-theme-post-content em {
  font-style: italic;
}

/* Images / figures */
.elementor-widget-theme-post-content figure,
.elementor-widget-theme-post-content .wp-block-image {
  margin: 2rem 0 !important;
}

.elementor-widget-theme-post-content img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
}

.elementor-widget-theme-post-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--rcrm-muted);
  text-align: center;
}

/* Blockquote */
.elementor-widget-theme-post-content blockquote {
  margin: 1.75rem 0 !important;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--rcrm-accent);
  color: var(--rcrm-muted);
  font-style: italic;
}

.elementor-widget-theme-post-content blockquote p {
  color: var(--rcrm-muted) !important;
}

/* HR */
.elementor-widget-theme-post-content hr {
  margin: 2.5rem 0 !important;
  border: 0;
  border-top: 1px solid var(--rcrm-border);
}

/* Code */
.elementor-widget-theme-post-content code {
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* TOC+ (jeśli włączony) */
#toc_container {
  background: #fff !important;
  border: 1px solid var(--rcrm-border) !important;
  border-radius: 0.75rem !important;
  padding: 1rem 1.25rem !important;
  margin: 0 0 2rem !important;
  font-size: 1rem !important;
}

#toc_container .toc_title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.75rem !important;
}

#toc_container li {
  font-size: 0.95rem !important;
  margin-bottom: 0.35rem !important;
}

/* Mobile breathing room */
@media (max-width: 767px) {
  body.single-post .page-header,
  body.single .page-header {
    padding: 1.25rem 1rem 0.25rem;
  }

  body.single-post .entry-title,
  body.single .entry-title {
    font-size: 1.875rem !important; /* text-3xl */
  }

  .elementor-widget-theme-post-content h2,
  .elementor-widget-theme-post-content h2.wp-block-heading {
    font-size: 1.375rem !important;
    margin-top: 2.25rem !important;
  }

  .elementor-widget-theme-post-content h3,
  .elementor-widget-theme-post-content h3.wp-block-heading {
    font-size: 1.125rem !important;
    margin-top: 1.75rem !important;
  }

  .elementor-widget-theme-post-content p,
  .elementor-widget-theme-post-content li {
    font-size: 1.0625rem !important;
  }
}
