/* Gruppo "documentazione": pagine /come-funziona/ (prefisso .cr-doc) */

/* Ancore sotto l'header sticky */
.cr-doc h2[id], .cr-doc h3[id], .cr-doc-area[id] { scroll-margin-top: 96px; }
.cr-doc h2 { margin-top: var(--wp--preset--spacing--60); }
.cr-doc h3 { margin-top: var(--wp--preset--spacing--40); }
.cr-doc .cr-card h3, .cr-doc-guides .cr-card h3, .cr-doc-area + p + .wp-block-group .cr-card h3 { margin-top: 0; }

/* Screenshot */
.cr-doc-shot img { border: 1px solid var(--wp--preset--color--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,51,.08); }
.cr-doc-shot a { display: block; cursor: zoom-in; }
.cr-doc-shot figcaption { font-size: 15px; color: var(--wp--preset--color--muted); text-align: center; margin-top: .6em; }
.cr-doc .cr-doc-shot:not(.alignleft):not(.alignright) { margin-top: var(--wp--preset--spacing--30); margin-bottom: var(--wp--preset--spacing--30); }
.cr-doc .cr-doc-shot.aligncenter { text-align: center; }
.cr-doc .cr-doc-shot.aligncenter img { margin-inline: auto; }
.cr-doc .wp-block-image.alignright, .cr-doc .wp-block-image.alignleft { width: 45%; max-width: 45%; margin-top: .4em; margin-bottom: 1.25em; }
.cr-doc .wp-block-image.alignright { float: right; margin-left: 2em; margin-right: 0; }
.cr-doc .wp-block-image.alignleft { float: left; margin-right: 2em; margin-left: 0; }
.cr-doc .wp-block-image.alignright img, .cr-doc .wp-block-image.alignleft img { width: 100%; height: auto; }
@media (max-width: 781px) {
  .cr-doc .wp-block-image.alignright, .cr-doc .wp-block-image.alignleft { float: none; width: 100%; max-width: 100%; margin: var(--wp--preset--spacing--30) 0; }
}

/* Indice "In questa pagina" */
.cr-doc-toc { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 20px 28px; margin-top: var(--wp--preset--spacing--40); margin-bottom: var(--wp--preset--spacing--40); }
.cr-doc-toc .cr-doc-toc__title { font-size: 15px; font-weight: 700; color: var(--wp--preset--color--ink); margin: 0 0 .5rem; }
.cr-doc .cr-doc-toc ul, .cr-doc .cr-doc-toc ol { margin: 0; padding-left: 1.25em; columns: 2; column-gap: 2.5rem; }
.cr-doc-toc li { margin: 0 0 .35rem; break-inside: avoid; font-size: 16px; }
.cr-doc-toc a { text-decoration: none; }
.cr-doc-toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .cr-doc .cr-doc-toc ul, .cr-doc .cr-doc-toc ol { columns: 1; } .cr-doc-toc { padding: 18px 20px; } }

/* Nota */
.cr-doc-note { clear: both; border-left: 4px solid var(--wp--preset--color--primary); background: var(--wp--preset--color--surface); border-radius: 0 8px 8px 0; padding: 16px 20px; margin-top: var(--wp--preset--spacing--30); }
.cr-doc-note p { margin: 0; }

/* Tabelle */
.cr-doc-table { clear: both; }
.cr-doc-table table { font-size: 16px; }
.cr-doc-table thead th { background: var(--wp--preset--color--surface); text-align: left; }
.cr-doc-table td:first-child { font-weight: 600; white-space: nowrap; }
.cr-doc-table thead { border-bottom: 0; }
@media (max-width: 600px) { .cr-doc-table td:first-child { white-space: normal; } .cr-doc-table td, .cr-doc-table th { padding: 8px 10px; } }

/* Card nelle pagine di documentazione */
.cr-doc .wp-block-group.is-layout-grid { clear: both; }
.cr-doc-card--compact h3 { font-size: 20px; }
.cr-doc-card__more { margin-top: auto !important; padding-top: .25rem; font-weight: 600; }
.cr-doc-card__more a { text-decoration: none; }
.cr-doc .cr-card p, .cr-doc-guides .cr-card p, .cr-doc-split .cr-card p { margin: 0; }
.cr-doc-guides .cr-card .wp-block-heading { font-size: 20px; }
.cr-card .cr-check-list { margin: 0; }
.cr-card .cr-check-list li { margin-bottom: .45em; font-size: 16px; }
.cr-card .cr-check-list.cr-doc-cols { columns: 2; column-gap: 1.5rem; }
.cr-card .cr-check-list.cr-doc-cols li { break-inside: avoid; }
@media (min-width: 1024px) { .cr-doc-span2 { grid-column: span 2; } }
@media (max-width: 1023px) { .cr-doc-span2 { grid-column: 1 / -1; } }
@media (max-width: 640px) { .cr-doc-span2 { grid-column: auto; } .cr-card .cr-check-list.cr-doc-cols { columns: 1; } }

/* Pagina Funzionalità */
.cr-doc-head { margin-top: var(--wp--preset--spacing--60) !important; }
.cr-prose > .cr-doc-head:first-child { margin-top: 0 !important; }
.cr-doc-head .cr-doc-area { margin-top: var(--wp--preset--spacing--40); }
.cr-doc-head > .cr-doc-area:first-child { margin-top: 0; }

/* Indice Come funziona */
.cr-doc-intro .wp-block-heading { margin-top: 0; }

/* Box "Pagina successiva" */
.cr-doc-next { clear: both; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: #fff; padding: 24px 28px; margin-top: var(--wp--preset--spacing--60) !important; gap: 1rem 2rem; }
.cr-doc-next .cr-eyebrow { margin: 0; }
.cr-doc-next__main { flex: 1 1 100%; }
.cr-doc-next__main p { margin: 0; }
.cr-doc-next__link a { font-family: var(--wp--preset--font-family--heading, inherit); font-size: 1.375rem; font-weight: 700; text-decoration: none; }
.cr-doc-next__link a:hover { text-decoration: underline; }
.cr-doc-next__demo { margin: 0; color: var(--wp--preset--color--muted); flex: 1 1 100%; border-top: 1px solid var(--wp--preset--color--line); padding-top: 14px; }
.cr-doc-next__demo a { font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) { .cr-doc-next { padding: 20px; } }
.cr-doc-table td { vertical-align: top; }
.cr-doc-head > :first-child { margin-top: 0; }
.cr-doc-head .cr-doc-area { margin-bottom: .5rem; }
.cr-doc-head p { max-width: 720px; }
