/*
Theme Name: Primeira Guitarra
Theme URI: https://primeiraguitarra.com.br
Description: Tema profissional sob medida para o blog Primeira Guitarra — design moderno, leve, focado em conteúdo e recomendações. Child theme de hostinger-ai-theme.
Author: Primeira Guitarra
Version: 1.0.2
Template: hostinger-ai-theme
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: primeira-guitarra
*/

/* ============================================================
   1. BASE
   ============================================================ */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #FBE7D2; color: #1E1A15; }

:root {
	/* Paleta da marca — declarada aqui também para não depender da geração
	   de presets do theme.json (que pode ser afetada por cache/otimização). */
	--wp--preset--color--base: #FBF8F3;
	--wp--preset--color--surface: #FFFFFF;
	--wp--preset--color--ink: #1E1A15;
	--wp--preset--color--muted: #6B6157;
	--wp--preset--color--line: #E9E0D4;
	--wp--preset--color--accent: #E07A2D;
	--wp--preset--color--accent-strong: #BE5F18;
	--wp--preset--color--accent-soft: #FBE7D2;
	--wp--preset--color--contrast: #221C15;
	--wp--preset--color--contrast-line: #3C332A;

	--pg-shadow-sm: 0 1px 2px rgba(30,26,21,.05), 0 4px 14px rgba(30,26,21,.06);
	--pg-shadow-md: 0 6px 18px rgba(30,26,21,.08), 0 24px 48px rgba(30,26,21,.10);
	--pg-radius: 18px;
	--pg-radius-sm: 12px;
}

a { text-underline-offset: 0.18em; transition: color .18s ease; }
img { max-width: 100%; height: auto; }

/* ============================================================
   2. UTILIDADES
   ============================================================ */
.pg-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: "Sora", system-ui, sans-serif;
	font-weight: 600;
	font-size: .8rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-strong);
	margin: 0 0 .35rem;
}
.pg-eyebrow::before {
	content: "";
	width: 26px; height: 2px;
	background: var(--wp--preset--color--accent);
	border-radius: 2px;
}
.pg-eyebrow.is-centered { justify-content: center; }

.pg-section-head { max-width: 640px; }
.pg-section-head.is-centered { margin-inline: auto; text-align: center; }
.pg-section-head p { color: var(--wp--preset--color--muted); margin-top: .5rem; }

/* Diferenciais (front-page) */
.pg-feature {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--pg-radius);
	padding: 1.7rem 1.6rem;
	height: 100%;
	box-shadow: var(--pg-shadow-sm);
}
.pg-feature__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 14px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-strong);
	margin-bottom: 1rem;
}
.pg-feature h3 { margin: 0 0 .45rem; font-size: 1.18rem; }
.pg-feature p { margin: 0; color: var(--wp--preset--color--muted); font-size: .98rem; line-height: 1.6; }

/* ============================================================
   3. CABEÇALHO
   ============================================================ */
.pg-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(251, 248, 243, 0.88);
	backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.pg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 74px;
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Logo */
.pg-logo {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	text-decoration: none;
	line-height: 1;
}
.pg-logo__icon { flex: 0 0 auto; display: block; }
.pg-logo__text {
	font-family: "Sora", system-ui, sans-serif;
	font-weight: 700;
	font-size: 1.18rem;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--ink);
	white-space: nowrap;
}
.pg-logo__text b { color: var(--wp--preset--color--accent-strong); font-weight: 800; }
.pg-logo:hover .pg-logo__text { color: var(--wp--preset--color--ink); }

/* Navegação */
.pg-header .wp-block-navigation {
	font-family: "Sora", system-ui, sans-serif;
	font-weight: 500;
	font-size: .98rem;
}
.pg-header .wp-block-navigation a { color: var(--wp--preset--color--ink); text-decoration: none; }
.pg-header .wp-block-navigation a:hover,
.pg-header .wp-block-navigation .current-menu-item a { color: var(--wp--preset--color--accent-strong); }
.pg-header .wp-block-navigation-item__content { padding-block: .25rem; }
/* Botão/CTA dentro do menu */
.pg-header .wp-block-navigation .pg-navcta a,
.pg-header .pg-navcta .wp-block-navigation-item__content {
	background: var(--wp--preset--color--accent);
	color: #fff !important;
	border-radius: 999px;
	padding: .55rem 1.2rem;
	font-weight: 600;
}
.pg-header .wp-block-navigation .pg-navcta a:hover { background: var(--wp--preset--color--accent-strong); }

/* Overlay mobile */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--contrast);
	padding-top: 3rem;
}
.wp-block-navigation__responsive-container.is-menu-open a { color: #fff; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.4rem; }

/* ============================================================
   4. BOTÕES (complemento ao theme.json)
   ============================================================ */
.wp-block-button__link {
	box-shadow: 0 6px 16px rgba(224,122,45,.28);
	transition: transform .16s ease, box-shadow .16s ease, background-color .18s ease;
}
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(224,122,45,.34); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	box-shadow: none !important;
	background: transparent !important;
	color: var(--wp--preset--color--ink) !important;
	border: 1.6px solid var(--wp--preset--color--ink) !important;
	border-radius: 999px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink) !important;
	color: #fff !important;
	transform: translateY(-2px);
}
/* Botão claro sobre fundo escuro */
.pg-btn-light .wp-block-button__link {
	background: #fff; color: var(--wp--preset--color--ink);
	box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.pg-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--ink); }

/* ============================================================
   5. HERÓI (front-page)
   ============================================================ */
.pg-hero { min-height: clamp(460px, 76vh, 680px); }
.pg-hero .wp-block-cover__background { opacity: 1 !important; }
.pg-hero .wp-block-cover__inner-container { width: 100%; max-width: 1180px; margin-inline: auto; }
.pg-hero .pg-eyebrow { color: #F6C79A; }
.pg-hero .pg-eyebrow::before { background: #F6C79A; }
.pg-hero h1 {
	color: #fff;
	font-size: clamp(2.6rem, 6vw, 4.2rem);
	line-height: 1.04;
	max-width: 16ch;
	margin: 0;
}
.pg-hero p.pg-hero__sub {
	color: rgba(255,255,255,.86);
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	max-width: 46ch;
	line-height: 1.6;
}
.pg-hero .pg-hero__stats { color: rgba(255,255,255,.7); }
.pg-hero__stats strong { color: #fff; font-family: "Sora", sans-serif; }

/* ============================================================
   6. CARDS / GRADE DE POSTS
   ============================================================ */
.pg-posts ul.wp-block-post-template,
.pg-posts.wp-block-post-template { gap: 1.75rem !important; }

.pg-posts li.wp-block-post,
.pg-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--pg-radius);
	overflow: hidden;
	box-shadow: var(--pg-shadow-sm);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	display: flex;
	flex-direction: column;
}
.pg-posts li.wp-block-post:hover,
.pg-card:hover { transform: translateY(-4px); box-shadow: var(--pg-shadow-md); border-color: #E0D4C2; }

/* Imagem do card */
.pg-posts .wp-block-post-featured-image { margin: 0; }
.pg-posts .wp-block-post-featured-image a,
.pg-posts .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.pg-posts .wp-block-post-featured-image img { transition: transform .4s ease; }
.pg-posts li.wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.05); }

/* Corpo do card */
.pg-card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.pg-posts .wp-block-post-title { margin: 0; font-size: 1.3rem; line-height: 1.22; }
.pg-posts .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.pg-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-strong); }
.pg-posts .wp-block-post-excerpt__excerpt { color: var(--wp--preset--color--muted); font-size: .98rem; line-height: 1.6; margin: 0; }
.pg-posts .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: .85rem; }

/* Selo de categoria */
.pg-badge,
.pg-posts .wp-block-post-terms {
	display: inline-block;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-strong);
	font-family: "Sora", sans-serif;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .3rem .65rem;
	border-radius: 999px;
	text-decoration: none;
	width: fit-content;
}
.pg-posts .wp-block-post-terms a { text-decoration: none; color: inherit; }

.pg-readmore { margin-top: auto; }
.pg-readmore a, a.pg-readmore {
	font-family: "Sora", sans-serif;
	font-weight: 600;
	font-size: .92rem;
	color: var(--wp--preset--color--accent-strong);
	text-decoration: none;
	display: inline-flex; align-items: center; gap: .35rem;
}
.pg-readmore a::after, a.pg-readmore::after { content: "→"; transition: transform .18s ease; }
.pg-readmore a:hover::after, a.pg-readmore:hover::after { transform: translateX(4px); }

/* ============================================================
   7. ARTIGO (single)
   ============================================================ */
.pg-article__header { text-align: center; }
.pg-article__header .wp-block-post-title { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1; max-width: 18ch; margin-inline: auto; }
.pg-meta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: .3rem 0; color: var(--wp--preset--color--muted);
	font-size: .92rem; font-family: "Sora", sans-serif; margin-top: 1rem;
}
.pg-meta > * { margin: 0; }
.pg-meta > *:not(:last-child)::after { content: "·"; margin: 0 .8rem; color: var(--wp--preset--color--line); }
.pg-meta a { color: var(--wp--preset--color--muted); text-decoration: none; }
.pg-meta a:hover { color: var(--wp--preset--color--accent-strong); }

.pg-author__badge {
	flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft);
	display: flex; align-items: center; justify-content: center;
}

.pg-article__hero img { width: 100%; border-radius: var(--pg-radius); box-shadow: var(--pg-shadow-md); aspect-ratio: 16/9; object-fit: cover; }

/* Tipografia do conteúdo */
.pg-content { font-size: 1.12rem; line-height: 1.78; color: #2C261F; }
.pg-content > * { margin-block: 1.35rem; }
.pg-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.6rem; margin-bottom: .8rem; }
.pg-content h3 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: .6rem; }
.pg-content h2 + p, .pg-content h3 + p { margin-top: .4rem; }
.pg-content a { color: var(--wp--preset--color--accent-strong); text-decoration: underline; text-decoration-thickness: 1px; }
.pg-content a:hover { color: var(--wp--preset--color--ink); }
.pg-content img, .pg-content .wp-block-image img { border-radius: var(--pg-radius-sm); }
.pg-content ul, .pg-content ol { padding-left: 1.3rem; }
.pg-content li { margin-block: .5rem; }
.pg-content ul li::marker { color: var(--wp--preset--color--accent); }
.pg-content blockquote {
	background: #fff; border-left: 4px solid var(--wp--preset--color--accent);
	border-radius: var(--pg-radius-sm); padding: 1.2rem 1.4rem; margin-inline: 0;
	box-shadow: var(--pg-shadow-sm); font-size: 1.15rem; color: var(--wp--preset--color--ink);
}
.pg-content blockquote p { margin: 0; }
/* Primeiro parágrafo em destaque */
.pg-content > p:first-of-type, .pg-lead { font-size: 1.22rem; line-height: 1.65; color: var(--wp--preset--color--ink); }
.pg-lead { font-weight: 400; }

/* ============================================================
   8. CAIXAS DE AFILIADO (plugin Hostinger) — refinamento
   ============================================================ */
.pg-content .hostinger-affiliate-product,
.pg-content [class*="affiliate"] .product,
.pg-content .wp-block-hostinger-affiliate-product {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--pg-radius);
	background: #fff;
	box-shadow: var(--pg-shadow-sm);
	overflow: hidden;
}
.pg-content a[href*="amazon"],
.pg-content a[href*="mercadolivre"],
.pg-content a[href*="shopee"] { font-weight: 600; }

/* ============================================================
   9. CAIXA DO AUTOR / RELACIONADOS / CTA NO POST
   ============================================================ */
.pg-author {
	display: flex; gap: 1.1rem; align-items: flex-start;
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--pg-radius); padding: 1.4rem 1.5rem; box-shadow: var(--pg-shadow-sm);
}
.pg-author .avatar, .pg-author img { border-radius: 50%; width: 60px; height: 60px; object-fit: cover; }
.pg-author__name { font-family: "Sora", sans-serif; font-weight: 700; color: var(--wp--preset--color--ink); }
.pg-author p { margin: .25rem 0 0; color: var(--wp--preset--color--muted); font-size: .98rem; }

.pg-cta-box {
	background: linear-gradient(160deg, #2A2218 0%, #1A140E 100%);
	border-radius: var(--pg-radius);
	padding: clamp(1.8rem, 4vw, 2.8rem);
	text-align: center;
	box-shadow: var(--pg-shadow-md);
}
.pg-cta-box h2, .pg-cta-box h3 { color: #fff; margin-top: 0; }
.pg-cta-box p { color: rgba(255,255,255,.82); }

.pg-related .wp-block-post-title { font-size: 1.12rem; }

/* ============================================================
   10. CABEÇALHO DE PÁGINA / ARQUIVO
   ============================================================ */
.pg-pagehead { text-align: center; }
.pg-pagehead h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: .3rem 0 .5rem; }
.pg-pagehead p { color: var(--wp--preset--color--muted); max-width: 52ch; margin-inline: auto; }

/* ============================================================
   11. FAIXA NEWSLETTER / CTA
   ============================================================ */
.pg-cta {
	background: linear-gradient(160deg, #2A2218 0%, #1A140E 100%);
	border-radius: var(--pg-radius);
	overflow: hidden;
	position: relative;
}
.pg-cta h2 { color: #fff; }
.pg-cta p { color: rgba(255,255,255,.82); }
.pg-cta .pg-eyebrow { color: #F6C79A; }
.pg-cta .pg-eyebrow::before { background: #F6C79A; }

/* ============================================================
   12. RODAPÉ
   ============================================================ */
.pg-footer { background: #221C15; color: rgba(255,255,255,.72); }
.pg-footer h2, .pg-footer h3, .pg-foot-title {
	color: #fff; font-family: "Sora", sans-serif; font-size: .8rem;
	letter-spacing: .09em; text-transform: uppercase; margin: 0 0 1.2rem;
}
.pg-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.pg-footer a:hover { color: #fff; }
.pg-footer .pg-footer__brand .pg-logo__text { color: #fff; }
.pg-footer__brand p { color: rgba(255,255,255,.6); font-size: .95rem; line-height: 1.65; margin: 1.1rem 0 1.4rem; }
.pg-footer__cols { row-gap: 2.5rem; }
.pg-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .85rem; line-height: 1.4; }
.pg-foot-contact:hover { background: #BE5F18 !important; }
.pg-footer .wp-block-navigation { display: block; }
.pg-footer .wp-block-navigation ul { gap: .6rem; }

.pg-social { display: flex; gap: .6rem; }
.pg-social a {
	width: 40px; height: 40px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #3C332A;
	color: #fff; transition: background .18s ease, transform .18s ease;
}
.pg-social a:hover { background: var(--wp--preset--color--accent); transform: translateY(-2px); }
.pg-social svg { width: 18px; height: 18px; }

.pg-footer__bottom {
	border-top: 1px solid #3C332A;
	color: rgba(255,255,255,.5); font-size: .88rem;
}
.pg-footer__bottom a { color: rgba(255,255,255,.7); }

/* ============================================================
   13. FORMULÁRIOS
   ============================================================ */
input[type="email"], input[type="text"], input[type="search"], textarea {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: .8rem 1.1rem;
	background: #fff;
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
}
textarea { border-radius: var(--pg-radius-sm); }
input:focus, textarea:focus { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 1px; border-color: transparent; }
.pg-cta input[type="email"] { min-width: min(360px, 70vw); }

/* ============================================================
   14. PAGINAÇÃO
   ============================================================ */
.wp-block-query-pagination { gap: .4rem; justify-content: center; margin-top: 3rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .current {
	font-family: "Sora", sans-serif; font-weight: 600;
	padding: .5rem .9rem; border-radius: 999px; text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.wp-block-query-pagination a:hover { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent-strong); }
.wp-block-query-pagination .current { background: var(--wp--preset--color--accent); color: #fff; }

/* ============================================================
   15. RESPONSIVO
   ============================================================ */
@media (max-width: 781px) {
	.pg-header__inner { min-height: 64px; }
	.pg-logo__text { font-size: 1.05rem; }
	.pg-content { font-size: 1.06rem; }
	.pg-footer ul { margin-bottom: 1.5rem; }
}
@media (max-width: 480px) {
	.pg-hero { min-height: 70vh; }
	.pg-logo__icon { width: 30px; height: 35px; }
}
