/**
 * NuovoCamgirl — Master Global Typography & Readability Stylesheet
 * Documento unico di gestione globale per la tipografia, titoli e corpo testo del sito.
 */

:root {
  /* Font Families */
  --cd-font-heading: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cd-font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cd-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Typography Scale */
  --cd-fs-h1: clamp(2.65rem, 5.8vw, 4.6rem);
  --cd-fs-h2: clamp(1.8rem, 3.4vw, 2.5rem);
  --cd-fs-h3: clamp(1.45rem, 2.4vw, 1.85rem);
  --cd-fs-h4: clamp(1.25rem, 1.8vw, 1.5rem);
  --cd-fs-h5: 1.2rem;
  --cd-fs-h6: 1rem;

  --cd-fs-lead: clamp(1.3rem, 1.7vw, 1.45rem);
  --cd-fs-body: 1.25rem; /* 20px esatti per massima leggibilità */
  --cd-fs-small: 0.95rem;

  /* Line Heights */
  --cd-lh-heading: 1.16;
  --cd-lh-subheading: 1.28;
  --cd-lh-body: 1.75;
  --cd-lh-tight: 1.25;

  /* Spacing */
  --cd-space-paragraph: 1.45rem;
  --cd-space-heading-top: 1.85em;
  --cd-space-heading-bottom: 0.75em;

  /* Text Colors & Contrast */
  --cd-text-primary: #eae4eb;
  --cd-text-secondary: #d3d3d8;
  --cd-text-muted: #a39ca8;
  --cd-text-accent: #ff6584;
  --cd-text-accent-hover: #ff85a1;
}

/* ==========================================================================
   1. REGOLAZIONE GLOBALE BODY E TESTO CORPO
   ========================================================================== */

body {
  color: var(--cd-text-primary);
  font-family: var(--cd-font-body);
  font-size: var(--cd-fs-body);
  font-weight: 400;
  line-height: var(--cd-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p {
  color: var(--cd-text-primary);
  font-size: var(--cd-fs-body);
  line-height: var(--cd-lh-body);
  margin-block: 0 var(--cd-space-paragraph);
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  color: #ffffff;
  font-size: 1.125rem !important;
  line-height: 1.75 !important;
}

strong, b {
  color: #ffffff;
  font-weight: 750;
}

em, i {
  color: #f3ebf5;
  font-style: italic;
}

small, .text-small {
  color: var(--cd-text-secondary);
  font-size: var(--cd-fs-small);
  line-height: 1.55;
}

/* ==========================================================================
   2. GERARCHIA GLOBALE DEI TITOLI (H1 - H6)
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
  color: #ffffff;
  font-family: var(--cd-font-heading);
  letter-spacing: -0.035em;
  line-height: var(--cd-lh-heading);
  margin-block: var(--cd-space-heading-top) var(--cd-space-heading-bottom);
  scroll-margin-top: 5rem;
  text-wrap: balance;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child {
  margin-top: 0 !important;
}

h1, .h1 {
  font-size: var(--cd-fs-h1);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h2, .h2 {
  align-items: center;
  border-left: 4px solid var(--cd-text-accent);
  color: #ffffff;
  font-size: var(--cd-fs-h2);
  font-weight: 750;
  gap: 0.6rem;
  line-height: var(--cd-lh-subheading);
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-left: 0.85rem;
}

h3, .h3 {
  color: #ffffff;
  font-size: var(--cd-fs-h3);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

h4, .h4 {
  color: #ffffff;
  font-size: var(--cd-fs-h4);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

h5, .h5 {
  color: #ffffff;
  font-size: var(--cd-fs-h5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h6, .h6 {
  color: var(--cd-text-secondary);
  font-size: var(--cd-fs-h6);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   3. COLLEGAMENTI (LINKS)
   ========================================================================== */

a {
  color: var(--cd-text-accent);
  text-decoration: underline;
  text-decoration-color: rgba(255, 101, 132, 0.35);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--cd-text-accent-hover);
  text-decoration-color: var(--cd-text-accent-hover);
}

.entry-content a {
  font-weight: 600;
}

/* ==========================================================================
   4. LISTE E PUNTATI (UL, OL) EDITORIALI
   ========================================================================== */

.entry-content :where(ul, ol),
.editorial-article :where(ul, ol),
.post-content :where(ul, ol),
.page-content :where(ul, ol) {
  display: grid;
  gap: 0.65rem;
  margin-block: 0 var(--cd-space-paragraph);
  padding-left: 1.25rem;
}

.entry-content ul,
.editorial-article ul,
.post-content ul,
.page-content ul {
  list-style: none;
  padding-left: 0;
}

.entry-content ul > li,
.editorial-article ul > li,
.post-content ul > li,
.page-content ul > li {
  padding-left: 1.5rem;
  position: relative;
}

.entry-content ul > li::before,
.editorial-article ul > li::before,
.post-content ul > li::before,
.page-content ul > li::before {
  background: var(--cd-text-accent);
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 0.35rem;
  position: absolute;
  top: 0.68em;
  width: 6px;
}

.entry-content ol,
.editorial-article ol,
.post-content ol,
.page-content ol {
  counter-reset: custom-ol-counter;
  list-style: none;
  padding-left: 0;
}

.entry-content ol > li,
.editorial-article ol > li,
.post-content ol > li,
.page-content ol > li {
  counter-increment: custom-ol-counter;
  padding-left: 1.8rem;
  position: relative;
}

.entry-content ol > li::before,
.editorial-article ol > li::before,
.post-content ol > li::before,
.page-content ol > li::before {
  align-items: center;
  background: rgba(37, 26, 41, 0.06);
  border-radius: 50%;
  color: var(--cd-text-accent-hover);
  content: counter(custom-ol-counter);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0.25em;
  width: 20px;
}

/* Reset per tutti i menu di navigazione, header, footer e widget */
nav li::before,
header li::before,
footer li::before,
[class*="menu"] li::before,
[class*="nav"] li::before,
.editorial-widget li::before {
  content: none !important;
  display: none !important;
}

li + li {
  margin-top: 0;
}

/* ==========================================================================
   5. CITAZIONI, CODE E ELEMENTI SPECIALI
   ========================================================================== */

blockquote,
.wp-block-quote {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 244, 247, 0.95));
  border-left: 4px solid var(--cd-text-accent);
  border-radius: 0 var(--cd-radius-s) var(--cd-radius-s) 0;
  box-shadow: 0 8px 24px rgba(37, 26, 41, 0.03);
  color: var(--cd-text-secondary);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  margin-block: 1.75rem;
  padding: 1.25rem 1.6rem;
}

blockquote p {
  color: inherit;
  font-size: inherit;
  margin: 0;
}

code, kbd, pre, samp {
  font-family: var(--cd-font-mono);
}

code {
  background: rgba(37, 26, 41, 0.07);
  border: 1px solid rgba(37, 26, 41, 0.1);
  border-radius: 6px;
  color: var(--cd-text-accent-hover);
  font-size: 0.88em;
  padding: 0.15em 0.45em;
}

mark, .highlight {
  background: rgba(255, 143, 167, 0.22);
  border-radius: 4px;
  color: var(--cd-text-primary);
  padding: 0.1em 0.35em;
}

/* ==========================================================================
   6. CONTENITORI EDITORIALI E CONTENUTO 800PX GLOBALE
   ========================================================================== */

.entry-content,
.editorial-article > .entry-content,
.page-content,
.post-content {
  font-size: var(--cd-fs-body, 1.25rem) !important;
  line-height: var(--cd-lh-body, 1.75) !important;
  max-width: 800px !important;
  width: 100% !important;
}

.entry-content :where(p, li, blockquote, dt, dd, figcaption),
.editorial-article > .entry-content :where(p, li, blockquote, dt, dd, figcaption),
.page-content :where(p, li, blockquote, dt, dd, figcaption),
.post-content :where(p, li, blockquote, dt, dd, figcaption) {
  font-size: var(--cd-fs-body, 1.25rem) !important; /* 20px esatti */
  line-height: var(--cd-lh-body, 1.75) !important;
}

.entry-content > *,
.editorial-article > .entry-content > *,
.page-content > *,
.post-content > * {
  max-width: 800px !important;
  width: 100% !important;
}

.entry-content > :first-child,
.editorial-article > .entry-content > :first-child {
  margin-top: 0 !important;
}
