/*
Theme Name: GeneratePress Child - Segunda Via Contas
Theme URI: https://segundavia.com
Description: Child theme do GeneratePress personalizado para o portal Segunda Via Contas (layout tipo blog/portal com cards, sidebar e rodapé).
Author: Você
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-child
*/

/* ==========================================================================
   1. VARIÁVEIS DE COR / ESPAÇAMENTO
   Mude só aqui se quiser trocar as cores do site inteiro.
   ========================================================================== */
:root {
	--pc-black: #0d0f12;
	--pc-white: #ffffff;
	--pc-bg-soft: #f6f7f9;
	--pc-border: #e7e9ec;
	--pc-pill-bg: #eef0f3;
	--pc-text-muted: #6b7280;
	--pc-radius: 14px;
	--pc-radius-sm: 8px;
	--pc-shadow: 0 2px 10px rgba(15, 15, 20, 0.06);
	--pc-gap: 28px;
}

body {
	background: var(--pc-bg-soft);
	color: var(--pc-black);
}

a {
	color: var(--pc-black);
}

/* ==========================================================================
   2. HEADER / TOPO
   ========================================================================== */
.site-header,
.inside-header {
	background: var(--pc-white);
}

.inside-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	padding-top: 18px;
	padding-bottom: 18px;
	gap: 20px;
}

/* Logo (imagem enviada em Aparência > Personalizar > Identidade do Site) */
.site-logo,
.custom-logo-link {
	display: flex;
	align-items: center;
}

.custom-logo {
	max-height: 56px;
	width: auto;
}

/* Caso use só texto (sem logo em imagem) empilhado tipo "SEGUNDA VIA / CONTAS" */
.main-title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.site-description {
	font-size: 13px;
	color: var(--pc-text-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Menu principal */
.main-navigation {
	background: transparent;
}

.main-navigation .main-nav ul li a {
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--pc-black);
	padding: 10px 16px;
}

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li a:hover {
	color: var(--pc-black);
	box-shadow: inset 0 -3px 0 0 var(--pc-black);
}

/* Caixa de busca no cabeçalho (Personalizar > Layout > Cabeçalho > Widget do cabeçalho) */
.header-widget .search-form {
	display: flex;
	align-items: center;
	background: var(--pc-pill-bg);
	border-radius: 999px;
	padding: 4px 4px 4px 18px;
	border: 1px solid var(--pc-border);
}

.header-widget .search-form .search-field {
	background: transparent;
	border: none;
	box-shadow: none;
	font-size: 14px;
	min-width: 160px;
}

.header-widget .search-form .search-submit {
	background: var(--pc-black);
	color: var(--pc-white);
	border-radius: 999px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
}

/* ==========================================================================
   3. GRID DE POSTS (estilo cards) — só na home / blog / arquivos
   ========================================================================== */
body.home .site-main,
body.blog .site-main,
body.archive .site-main,
body.search .site-main {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--pc-gap);
}

body.home article.type-post,
body.blog article.type-post,
body.archive article.type-post,
body.search article.type-post {
	background: var(--pc-white);
	border-radius: var(--pc-radius);
	overflow: hidden;
	box-shadow: var(--pc-shadow);
	border: 1px solid var(--pc-border);
	padding: 0 !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
}

body.home article.type-post .inside-article,
body.blog article.type-post .inside-article,
body.archive article.type-post .inside-article,
body.search article.type-post .inside-article {
	padding: 0;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Imagem de destaque no topo do card */
article.type-post .featured-image,
article.type-post .post-image {
	margin: 0;
}

article.type-post .featured-image img,
article.type-post .post-image img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}

article.type-post .entry-header {
	padding: 20px 22px 0;
}

article.type-post .entry-title {
	font-size: 21px;
	line-height: 1.3;
	font-weight: 800;
	margin-bottom: 0;
}

article.type-post .entry-title a {
	color: var(--pc-black);
}

article.type-post .entry-summary {
	padding: 10px 22px 0;
	color: var(--pc-text-muted);
	font-size: 15px;
}

/* Linha: avatar + autor + data + compartilhar */
article.type-post .entry-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 22px;
	margin-top: auto;
	font-size: 13px;
	color: var(--pc-text-muted);
}

.entry-meta-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.entry-author-avatar img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: block;
}

.entry-meta-share {
	display: flex;
	gap: 6px;
}

.entry-meta-share a {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--pc-black);
	color: var(--pc-white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	text-decoration: none;
}

/* Botão "LEIA MAIS" */
article.type-post .read-more,
a.read-more {
	display: inline-block;
	background: var(--pc-black);
	color: var(--pc-white) !important;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 10px 20px;
	border-radius: 999px;
	text-decoration: none;
	margin: 0 22px 20px;
	align-self: flex-start;
}

/* Tags/categorias no rodapé do card */
article.type-post footer.entry-footer,
article.type-post .entry-footer {
	padding: 0 22px 22px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.entry-footer a,
.entry-meta a {
	color: inherit;
}

.entry-footer .cat-links a,
.entry-footer .tags-links a {
	background: var(--pc-pill-bg);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	color: var(--pc-black);
}

/* ==========================================================================
   4. SIDEBAR
   ========================================================================== */
#right-sidebar .widget,
.sidebar .widget {
	background: var(--pc-white);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	box-shadow: var(--pc-shadow);
	padding: 24px;
	margin-bottom: var(--pc-gap);
}

#right-sidebar .widget-title,
.sidebar .widget-title {
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 16px;
}

/* Categorias como pills */
.widget_categories ul,
.wp-block-categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget_categories li,
.wp-block-categories-list li {
	display: inline-block;
}

.widget_categories li a,
.wp-block-categories-list li a {
	background: var(--pc-pill-bg);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--pc-black);
}

/* Widget "Últimos Posts" (bloco nativo Latest Posts) com foto */
.wp-block-latest-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-latest-posts li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.wp-block-latest-posts li:last-child {
	margin-bottom: 0;
}

.wp-block-latest-posts__featured-image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--pc-radius-sm);
}

.wp-block-latest-posts a {
	font-weight: 700;
	font-size: 14px;
	color: var(--pc-black);
	text-decoration: none;
}

.wp-block-latest-posts time {
	display: block;
	font-size: 12px;
	color: var(--pc-text-muted);
	margin-top: 2px;
}

/* Ícones sociais (bloco nativo Social Icons) na sidebar e rodapé */
.wp-block-social-links .wp-social-link a,
.wp-block-social-links .wp-social-link {
	background: var(--pc-black) !important;
}

.wp-block-social-links .wp-social-link svg {
	fill: var(--pc-white);
}

/* Formulário de newsletter (visual apenas, ver README) */
.pc-newsletter-box input[type="text"],
.pc-newsletter-box input[type="email"] {
	width: 100%;
	padding: 12px 16px;
	border-radius: 999px;
	border: 1px solid var(--pc-border);
	margin-bottom: 12px;
	font-size: 14px;
	box-sizing: border-box;
}

.pc-newsletter-box button,
.pc-newsletter-box .pc-btn {
	width: 100%;
	background: var(--pc-black);
	color: var(--pc-white);
	border: none;
	padding: 13px 16px;
	border-radius: 999px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 13px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: block;
}

/* ==========================================================================
   5. RODAPÉ
   ========================================================================== */
.site-footer {
	background: var(--pc-white);
	border-top: 1px solid var(--pc-border);
	margin-top: 40px;
}

.footer-widgets {
	padding-top: 30px;
}

.footer-widgets .widget-title {
	display: none; /* footer no mockup é só uma lista de links, sem título */
}

.footer-widgets ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
}

.footer-widgets ul li a {
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	color: var(--pc-black);
}

.copyright-bar,
.footer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 18px 0;
	font-size: 13px;
	color: var(--pc-text-muted);
}

/* ==========================================================================
   6. RESPONSIVO
   ========================================================================== */
@media (max-width: 768px) {
	body.home .site-main,
	body.blog .site-main,
	body.archive .site-main,
	body.search .site-main {
		grid-template-columns: 1fr;
	}

	.inside-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
