/*
Theme Name: Rafa Base
Theme URI: https://example.invalid/rafa-studio
Author: Equipe Rafa Studio
Description: Tema-base leve do Rafa Studio. Estilos mínimos, HTML5 semântico e pontos de integração para o editor visual e os cabeçalhos/rodapés globais do Rafa Builder. Funciona sozinho com um cabeçalho e rodapé simples.
Version: 0.3.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rafa-base
Tags: one-column, custom-logo, custom-menu, featured-images, accessibility-ready, translation-ready
*/

/* Base mínima — usa as variáveis do Design System do Rafa Builder quando disponíveis. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--rb-color-background, #fff);
	color: var(--rb-color-text, #1f2937);
	font-family: var(--rb-font-body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
	font-size: var(--rb-fs-base, 1rem);
	line-height: var(--rb-line-height, 1.6);
}
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--rb-link-color, #1d4ed8); }
a:where(:hover) { color: var(--rb-link-hover, #0f172a); }
:focus-visible { outline: var(--rb-focus-width, 3px) solid var(--rb-focus-color, #2563eb); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--rb-font-heading, inherit);
	font-weight: var(--rb-heading-weight, 700);
	line-height: var(--rb-heading-line-height, 1.2);
}

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; clip: auto;
	padding: 12px 16px; background: #fff; color: #111; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* Contêiner padrão (conteúdo que não é do builder). */
.rbt-container {
	width: 100%;
	max-width: calc(var(--rb-content-width, 1200px) + 2 * var(--rb-gutter, 24px));
	margin-inline: auto;
	padding-inline: var(--rb-gutter, 24px);
}
.site-main { display: block; padding-block: var(--rb-space-xl, 48px); }
.rafa-builder-page .site-main,
.page-template-canvas .site-main { padding-block: 0; }

/* Cabeçalho e rodapé padrão (quando não há modelo ativo do Rafa Builder). */
.site-header { border-bottom: 1px solid var(--rb-color-border, #e5e7eb); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; flex-wrap: wrap; }
.site-title { margin: 0; font-size: var(--rb-fs-xl, 1.4rem); font-weight: 800; }
.site-title a { color: inherit; text-decoration: none; }
.site-description { margin: 0; color: var(--rb-color-muted, #5b6472); font-size: var(--rb-fs-sm, .875rem); }
.custom-logo { max-height: 64px; width: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.primary-nav a { color: inherit; text-decoration: none; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--rb-color-primary, #1d4ed8); }
.primary-nav .sub-menu { display: none; }
.site-footer { border-top: 1px solid var(--rb-color-border, #e5e7eb); padding-block: 32px; color: var(--rb-color-muted, #5b6472); font-size: var(--rb-fs-sm, .875rem); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }

/* Conteúdo. */
.entry-header { margin-bottom: var(--rb-space-lg, 32px); }
.entry-title { margin: 0 0 8px; font-size: var(--rb-fs-3xl, 2.4rem); }
.entry-meta { color: var(--rb-color-muted, #5b6472); font-size: var(--rb-fs-sm, .875rem); }
.entry-content { max-width: 760px; }
.entry-content > * { margin-block: 0 1em; }
.entry-content .alignwide { max-width: var(--rb-wide-width, 1440px); }
.entry-content .alignfull { max-width: none; }
.post-thumbnail img { border-radius: var(--rb-radius-md, 8px); margin-bottom: 24px; }
.archive-list { display: grid; gap: var(--rb-space-lg, 32px); }
.archive-list article { padding-bottom: var(--rb-space-lg, 32px); border-bottom: 1px solid var(--rb-color-border, #e5e7eb); }
.archive-list .entry-title { font-size: var(--rb-fs-2xl, 1.9rem); }
.archive-list .entry-title a { color: inherit; text-decoration: none; }
.page-header { margin-bottom: var(--rb-space-lg, 32px); }
.navigation.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.navigation.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--rb-color-border, #e5e7eb); border-radius: 4px; text-decoration: none; }
.navigation.pagination .current { background: var(--rb-color-primary, #1d4ed8); color: #fff; border-color: transparent; }
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form input[type="search"] { flex: 1; padding: 10px 12px; font: inherit; border: 1px solid var(--rb-color-border, #d1d5db); border-radius: 4px; }
.search-form input[type="submit"], .search-submit { padding: 10px 16px; font: inherit; border: 0; border-radius: 4px; background: var(--rb-color-primary, #1d4ed8); color: #fff; cursor: pointer; }
.wp-caption-text, figcaption { font-size: var(--rb-fs-sm, .875rem); color: var(--rb-color-muted, #5b6472); }
.comments-area { margin-top: 48px; max-width: 760px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; }

@media (max-width: 767px) {
	.site-header__inner { flex-direction: column; align-items: flex-start; }
	.entry-title { font-size: var(--rb-fs-2xl, 1.8rem); }
}
