/*
Theme Name: Grupo Open
Theme URI: https://grupomelvor.com.br
Author: Grupo Melvor
Author URI: https://grupomelvor.com.br
Description: Tema do blog do Grupo Open — preto e dourado, Montserrat + Inter, no mesmo padrão visual do site institucional (open.grupopen.com.br). Barra de confiança, CTA de WhatsApp e caixa de autoridade aparecem automaticamente em todo post.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: grupo-open
*/

/* ==========================================================
   1 · Tokens de marca
   ========================================================== */
:root {
  --go-ink: #171717;
  --go-ink-2: #1C1C1C;
  --go-gold: #B8976E;
  --go-gold-light: #C9AB84;
  --go-gold-dark: #9E7D58;
  --go-graphite: #2D3436;
  --go-white: #FFFFFF;
  --go-line: #E4E2DD;
  --go-bg-soft: #F7F5F1;
  --go-muted: #8A919B;
  --go-display: 'Montserrat', system-ui, -apple-system, sans-serif;
  --go-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================
   2 · Reset básico
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--go-bg-soft);
  color: var(--go-graphite);
  font-family: var(--go-body);
  font-size: 1rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--go-ink); text-decoration-color: var(--go-gold); }
a:hover, a:focus { color: var(--go-gold-dark); }
ul, ol { padding-left: 1.2em; }
figure { margin: 0; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
  position: absolute; top: -60px; left: 6px; z-index: 999999;
  background: var(--go-ink); color: var(--go-white); padding: 10px 18px;
  border-radius: 0 0 8px 8px; text-decoration: none;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--go-gold); outline-offset: 2px; }

/* ==========================================================
   3 · Layout
   ========================================================== */
.layout-row { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-content { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 34px; padding-bottom: 60px; align-items: flex-start; }
.site-main { flex: 1 1 620px; min-width: 0; }
.site-main--page { flex: 1 1 100%; max-width: 760px; margin: 0 auto; }

/* ==========================================================
   4 · Cabeçalho
   ========================================================== */
.site-header {
  background: var(--go-ink);
  border-bottom: 3px solid var(--go-gold);
  padding: 18px 0;
}
.site-header .layout-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.custom-logo-link img { display: block; max-height: 46px; width: auto; }
.site-title { margin: 0; font-family: var(--go-display); font-weight: 800; font-size: 1.35rem; }
.site-title a { color: var(--go-white); text-decoration: none; }
.site-title a:hover { color: var(--go-gold-light); }
.site-description { margin: 2px 0 0; color: rgba(255,255,255,.6); font-size: .82rem; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--go-white); display: block; }

.main-navigation ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap;
}
.main-navigation ul ul { display: none; }
.main-navigation a {
  display: inline-block; color: rgba(255,255,255,.85); text-decoration: none;
  font-weight: 500; font-size: .94rem; padding: 6px 0;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a { color: var(--go-gold-light); }

/* ==========================================================
   5 · Post — card (listagem) e single
   ========================================================== */
.article {
  background: var(--go-white);
  border: 1px solid var(--go-line);
  border-radius: 14px;
  box-shadow: 0 20px 45px -32px rgba(23,23,23,.35);
  padding: clamp(20px, 4vw, 34px);
  margin-bottom: 28px;
}
.article__body { margin-top: 18px; }
.article .post-thumbnail { display: block; border-radius: 10px; overflow: hidden; }
.article .post-thumbnail img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article--single .post-thumbnail { margin: 20px 0; border-radius: 12px; }
.article--single .post-thumbnail img { border-radius: 12px; }

.entry-eyebrow {
  font-family: var(--go-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--go-gold-dark);
  margin-bottom: 10px;
}
.entry-eyebrow a { color: inherit; text-decoration: none; }

.entry-title {
  font-family: var(--go-display); font-weight: 900; color: var(--go-ink);
  line-height: 1.22; margin: 0 0 10px; text-wrap: balance;
}
.article--single .entry-title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.article:not(.article--single) .entry-title { font-size: 1.3rem; }
.entry-title a { color: var(--go-ink); text-decoration: none; }
.entry-title a:hover { color: var(--go-gold-dark); }

.entry-meta, .posted-on, .byline {
  font-family: var(--go-body); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--go-muted);
}
.entry-meta > span:not(:last-child)::after { content: '·'; margin: 0 8px; }
.entry-meta a { color: var(--go-muted); text-decoration: none; }

.entry-summary, .entry-content {
  font-size: 1.06rem; line-height: 1.75; margin-top: 16px;
}
.entry-content > p:first-of-type,
.grupoopen-lead {
  font-size: 1.22rem; font-weight: 500; color: var(--go-ink); line-height: 1.6;
  border-left: 3px solid var(--go-gold); padding-left: 1rem; margin: 0 0 1.6em;
}
.entry-content h2 {
  font-family: var(--go-display); font-weight: 800; color: var(--go-ink);
  font-size: 1.5rem; margin: 1.8em 0 .6em; text-wrap: balance;
}
.entry-content h3 { font-family: var(--go-display); font-weight: 700; color: var(--go-ink); font-size: 1.2rem; margin: 1.6em 0 .5em; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--go-gold); text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin: 1em 0; padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote,
.grupoopen-quote {
  border: none; border-left: 3px solid var(--go-gold); background: var(--go-bg-soft);
  border-radius: 0 10px 10px 0; padding: 1.3rem 1.5rem; margin: 1.8em 0;
  font-family: var(--go-display); font-weight: 700; font-size: 1.12rem; color: var(--go-ink); line-height: 1.5;
}
.entry-content img { border-radius: 10px; }
.page-links { clear: both; margin: 1.5em 0 0; font-size: .9rem; }

.entry-footer {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--go-line);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.entry-footer .cat-links a {
  display: inline-block; font-family: var(--go-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase; color: var(--go-gold-dark) !important;
  background: #FBF3EA; border: 1px solid #EFDCC5; border-radius: 100px;
  padding: 3px 12px; text-decoration: none !important; margin-right: 4px;
}
.entry-footer .tags-links, .entry-footer .tags-links a { color: var(--go-muted); font-size: .82rem; }

/* — Barra de confiança — */
.grupoopen-trust-bar {
  display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: space-between;
  background: var(--go-ink); border-radius: 14px; padding: 1.5rem 1.6rem; margin: 2em 0;
}
.grupoopen-trust-item { flex: 1 1 160px; text-align: center; color: var(--go-white); }
.grupoopen-trust-item strong { display: block; font-family: var(--go-display); font-weight: 900; font-size: 1.25rem; color: var(--go-gold-light); margin-bottom: .25rem; }
.grupoopen-trust-item span { display: block; font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.4; }

/* — CTA WhatsApp — */
.grupoopen-cta {
  background: linear-gradient(135deg, var(--go-ink) 0%, var(--go-ink-2) 100%);
  border-radius: 16px; padding: 1.9rem 1.7rem; text-align: center; margin: 2.2em 0;
}
.grupoopen-cta p { color: var(--go-white); font-family: var(--go-display); font-weight: 700; font-size: 1.1rem; margin: 0 0 1rem; }
.grupoopen-btn, .grupoopen-cta a.grupoopen-btn {
  display: inline-block; background: var(--go-gold); color: var(--go-ink) !important;
  font-family: var(--go-display); font-weight: 800; font-size: .92rem;
  text-decoration: none !important; padding: .85rem 1.8rem; border-radius: 100px;
  border: none; cursor: pointer; transition: background .2s;
}
.grupoopen-btn:hover, .grupoopen-cta a.grupoopen-btn:hover { background: var(--go-gold-light); }

.grupoopen-link-btn {
  display: inline-block; background: var(--go-ink); color: var(--go-white) !important;
  font-family: var(--go-display); font-weight: 700; text-decoration: none;
  padding: .7rem 1.5rem; border-radius: 100px;
}

/* — Caixa de autoridade — */
.grupoopen-author-box {
  display: flex; align-items: center; gap: 14px; background: var(--go-bg-soft);
  border-radius: 12px; padding: 1.1rem 1.3rem; margin: 2em 0 0;
}
.grupoopen-author-box img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.grupoopen-author-box strong { display: block; font-family: var(--go-display); color: var(--go-ink); font-size: .92rem; }
.grupoopen-author-box span { display: block; font-size: .8rem; color: var(--go-muted); }

/* ==========================================================
   6 · Navegação entre posts / paginação
   ========================================================== */
.post-navigation {
  display: flex; justify-content: space-between; gap: 16px; margin: 30px 0; flex-wrap: wrap;
}
.post-navigation a {
  font-family: var(--go-display); font-weight: 700; font-size: .88rem; color: var(--go-ink);
  text-decoration: none; max-width: 45%;
}
.post-navigation a:hover { color: var(--go-gold-dark); }

.grupoopen-pagination { text-align: center; margin: 30px 0; }
.grupoopen-pagination .page-numbers {
  display: inline-block; font-family: var(--go-display); font-weight: 700; font-size: .85rem;
  color: var(--go-ink); background: var(--go-white); border: 1px solid var(--go-line);
  border-radius: 100px; padding: 8px 16px; margin: 0 3px; text-decoration: none;
}
.grupoopen-pagination .page-numbers.current,
.grupoopen-pagination .page-numbers:hover { background: var(--go-gold); border-color: var(--go-gold); color: var(--go-ink); }

/* ==========================================================
   7 · Sidebar
   ========================================================== */
.widget-area { flex: 0 1 300px; }
.widget {
  background: var(--go-white); border: 1px solid var(--go-line); border-radius: 14px;
  padding: 22px; margin-bottom: 24px;
}
.widget-title {
  font-family: var(--go-display); font-weight: 800; color: var(--go-ink);
  text-transform: uppercase; font-size: .85rem; letter-spacing: .04em;
  border-bottom: 2px solid var(--go-gold); padding-bottom: 8px; margin: 0 0 14px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 10px; font-size: .9rem; }
.widget a { color: var(--go-graphite); text-decoration: none; }
.widget a:hover { color: var(--go-gold-dark); }

/* ==========================================================
   8 · Formulário de busca
   ========================================================== */
.search-form { display: flex; gap: 8px; }
.search-field {
  flex: 1; padding: 10px 14px; border: 1px solid var(--go-line); border-radius: 100px;
  font-family: var(--go-body); font-size: .92rem;
}
.search-submit {
  font-family: var(--go-display); font-weight: 700; background: var(--go-ink); color: var(--go-white);
  border: none; border-radius: 100px; padding: 10px 20px; cursor: pointer;
}
.search-submit:hover { background: var(--go-gold-dark); }

/* ==========================================================
   9 · Comentários
   ========================================================== */
.comments-area { margin-top: 40px; }
.comments-title { font-family: var(--go-display); font-weight: 800; color: var(--go-ink); }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; margin-left: 24px; padding: 0; }
.comment-body {
  background: var(--go-white); border: 1px solid var(--go-line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--go-line); border-radius: 8px;
  font-family: var(--go-body); margin-bottom: 12px;
}

/* ==========================================================
   10 · Rodapé
   ========================================================== */
.site-footer { background: var(--go-ink); padding: 26px 0; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-info { color: rgba(255,255,255,.6); font-size: .82rem; }
.footer-navigation ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.footer-navigation a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .82rem; }
.footer-navigation a:hover { color: var(--go-gold-light); }

/* ==========================================================
   11 · Página de erro / título de arquivo
   ========================================================== */
.page-header { margin-bottom: 24px; }
.page-title { font-family: var(--go-display); font-weight: 900; color: var(--go-ink); font-size: 1.8rem; }
.error-404 { text-align: center; padding: 40px 20px; }

/* ==========================================================
   12 · Responsivo
   ========================================================== */
@media (max-width: 780px) {
  .menu-toggle { display: flex; }
  .main-navigation { width: 100%; order: 3; display: none; }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 4px; }
  .site-content { flex-direction: column; }
  .widget-area { flex-basis: auto; width: 100%; }
  .grupoopen-trust-bar, .grupoopen-author-box { flex-direction: column; text-align: center; }
  .post-navigation { flex-direction: column; }
  .post-navigation a { max-width: 100%; }
}
