/*
 * Conteúdo do post do blog: o mesmo CSS vale no corpo do post publicado (.rc-blog__corpo) e no editor de
 * blocos (.editor-styles-wrapper), para o que se formata no editor sair igual no site.
 * Só formatação de texto e blocos; capa, cards, galeria e tamanho das imagens ficam no blog.css.
 */

/* Editor: base do texto igual à do corpo do post. */
.editor-styles-wrapper.editor-styles-wrapper {
    color: var(--rc-color-text-muted, #6b6b6b);
    font-family: var(--rc-font-body, "Inter", system-ui, sans-serif);
    font-size: var(--rc-font-size-body, 1rem);
    line-height: var(--rc-line-height-body, 1.5);
}

.editor-styles-wrapper.editor-styles-wrapper .editor-post-title,
.editor-styles-wrapper.editor-styles-wrapper .wp-block-post-title {
    color: var(--rc-color-text, #1a1a1a);
    font-family: var(--rc-font-heading, "Montserrat", system-ui, sans-serif);
    font-weight: var(--rc-font-weight-semibold, 600);
    letter-spacing: var(--rc-letter-spacing-heading, -0.0625rem);
}

/* Títulos com hierarquia: H2 > H3 > H4. */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(h2, h3, h4, h5, h6) {
    color: var(--rc-color-text, #1a1a1a);
    font-family: var(--rc-font-heading, "Montserrat", system-ui, sans-serif);
    font-weight: var(--rc-font-weight-semibold, 600);
    line-height: var(--rc-line-height-heading, 1.3);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h2 {
    font-size: 1.625rem;
    letter-spacing: -0.03125rem;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h3 {
    font-size: 1.3125rem;
    letter-spacing: -0.015625rem;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h4 {
    font-size: 1.125rem;
    letter-spacing: 0;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(h5, h6) {
    font-size: 1rem;
    letter-spacing: 0;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h6 {
    text-transform: uppercase;
}

/* Espaço entre parágrafos (o "p { margin: 0 }" do blog.css anulava o espaço entre blocos). */
.rc-blog__corpo > * + p {
    margin-top: var(--rc-space-6, 1.5rem);
}

/* No post publicado, o título encosta no parágrafo que ele abre. */
.rc-blog__corpo > :is(h2, h3, h4, h5, h6) + * {
    margin-top: var(--rc-space-4, 1rem);
}

/* Texto. */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(strong, b) {
    color: var(--rc-color-text-body, #404040);
    font-weight: var(--rc-font-weight-bold, 700);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(em, i) {
    font-style: italic;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) a:not(.wp-block-button__link) {
    color: var(--rc-color-primary, #1d4ed8);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) mark {
    padding-inline: 0.1em;
}

/* Listas: marcador visível, recuo e listas dentro de listas. */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(ul, ol):not(.wp-block-gallery, .blocks-gallery-grid, .wp-block-social-links) {
    padding-left: var(--rc-space-6, 1.5rem);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) ul:not(.wp-block-gallery, .blocks-gallery-grid, .wp-block-social-links) {
    list-style: disc;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) ol {
    list-style: decimal;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) li > :is(ul, ol) {
    margin-top: var(--rc-space-2, 0.5rem);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) li::marker {
    color: var(--rc-color-text-body, #404040);
}

/* Citação e citação em destaque. */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) blockquote:not(.wp-block-pullquote blockquote) {
    margin-inline: 0;
    padding-left: var(--rc-space-6, 1.5rem);
    border-left: 4px solid var(--rc-color-action, #f7941d);
    color: var(--rc-color-text-body, #404040);
    font-size: 1.0625rem;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) :is(blockquote, .wp-block-pullquote) cite {
    display: block;
    margin-top: var(--rc-space-2, 0.5rem);
    color: var(--rc-color-text-muted, #6b6b6b);
    font-size: 0.875rem;
    font-style: normal;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-pullquote {
    padding: var(--rc-space-8, 2rem) var(--rc-space-4, 1rem);
    border-block: 2px solid var(--rc-color-action, #f7941d);
    color: var(--rc-color-text, #1a1a1a);
    text-align: center;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-pullquote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-pullquote p {
    font-family: var(--rc-font-heading, "Montserrat", system-ui, sans-serif);
    font-size: 1.375rem;
    line-height: 1.4;
}

/* Botões: o visual do botão do site (o WordPress padrão não carrega no front). */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-buttons {
    gap: var(--rc-space-3, 0.75rem);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--rc-control-height, 3rem);
    padding: var(--rc-space-3, 0.75rem) var(--rc-space-6, 1.5rem);
    border-radius: var(--rc-radius-pill, 999px);
    background-color: var(--rc-color-action, #f7941d);
    color: var(--rc-color-on-action, #fff);
    font-family: var(--rc-font-body, "Inter", system-ui, sans-serif);
    font-size: var(--rc-font-size-body, 1rem);
    font-weight: var(--rc-font-weight-bold, 700);
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.rc-blog__corpo .wp-block-button__link:hover {
    background-color: var(--rc-color-action-hover, #e8850f);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-button.is-style-outline > .wp-block-button__link {
    border: 2px solid currentColor;
    background-color: transparent;
    color: var(--rc-color-primary, #1d4ed8);
}

/* Separador, tabela, detalhes. */
:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) hr.wp-block-separator {
    border: 0;
    border-top: 1px solid var(--rc-color-border, #e5e5e5);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-table :is(th, td) {
    padding: var(--rc-space-2, 0.5rem) var(--rc-space-3, 0.75rem);
    border: 1px solid var(--rc-color-border, #e5e5e5);
    text-align: left;
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-table th {
    color: var(--rc-color-text, #1a1a1a);
    font-weight: var(--rc-font-weight-semibold, 600);
}

:is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) .wp-block-details summary {
    color: var(--rc-color-text, #1a1a1a);
    font-weight: var(--rc-font-weight-semibold, 600);
    cursor: pointer;
}

/* Colunas e grupos: espaço entre parágrafos também lá dentro. */
.rc-blog__corpo :is(.wp-block-column, .wp-block-group, .wp-block-media-text__content) > * + * {
    margin-top: var(--rc-space-4, 1rem);
}

.rc-blog__corpo :is(.wp-block-column, .wp-block-group, .wp-block-media-text__content) > * {
    margin-bottom: 0;
}

/* Alinhamento de imagem à esquerda/direita (texto ao lado) e centralizada. */
.rc-blog__corpo > :is(.alignleft, .wp-block-image.alignleft) {
    float: left;
    max-width: 50%;
    margin: var(--rc-space-1, 0.25rem) var(--rc-space-6, 1.5rem) var(--rc-space-4, 1rem) 0;
}

.rc-blog__corpo > :is(.alignright, .wp-block-image.alignright) {
    float: right;
    max-width: 50%;
    margin: var(--rc-space-1, 0.25rem) 0 var(--rc-space-4, 1rem) var(--rc-space-6, 1.5rem);
}

.rc-blog__corpo > :is(.aligncenter, .wp-block-image.aligncenter) {
    margin-inline: auto;
}

.rc-blog__corpo::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 767px) {
    :is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h2 {
        font-size: 1.375rem;
    }

    :is(.rc-blog__corpo, .editor-styles-wrapper.editor-styles-wrapper) h3 {
        font-size: 1.1875rem;
    }

    .rc-blog__corpo > :is(.alignleft, .alignright) {
        float: none;
        max-width: none;
        margin-inline: 0;
    }
}
