/*
Theme Name: 8857bet Guia Brasil Grid MgOqlFNM
Theme URI: https://8857bet.bond/
Author: 8857bet Guia Brasil
Description: Tema editorial independente de alto contraste para o run MgOqlFNM.
Version: 1.0.2
Text Domain: guia8857
*/

:root {
  --paper: #f6f6f3;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #5c5c58;
  --reverse: #111111;
  --reverse-text: #fafaf7;
  --accent: #b62f28;
  --accent-dark: #86211d;
  --focus: #24547d;
  --line: #1e1e1e;
  --soft: #e8e8e3;
  --info: #e7eef3;
  --wide: 1240px;
  --reading: 760px;
  --gutter: clamp(1rem, 4vw, 4rem);
  --section: clamp(3rem, 7vw, 6rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, .3vw + .95rem, 1.125rem)/1.74 system-ui, -apple-system, "Segoe UI", "Noto Sans", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-dark); text-decoration-thickness: .11em; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; padding: .75rem 1rem; margin: .5rem; z-index: 10000; background: #fff; color: #111; }

.site-header { position: relative; z-index: 100; background: var(--reverse); color: var(--reverse-text); border-bottom: 3px solid var(--accent); }
.header-grid { max-width: var(--wide); min-height: 70px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(220px, 320px) 1fr; align-items: center; gap: 2rem; }
.site-branding a { display: inline-flex; align-items: center; min-height: 52px; color: #fff; text-decoration: none; }
.custom-logo { width: min(290px, 100%); max-height: 58px; object-fit: contain; object-position: left center; }
.site-name-fallback { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.menu-toggle { display: none; justify-self: end; width: 64px; min-width: 48px; min-height: 48px; padding: 0 .4rem; border: 1px solid #fff; border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: .82rem; font-weight: 700; }
.primary-menu { margin: 0; padding: 0; list-style: none; display: flex; justify-content: flex-end; align-items: stretch; }
.primary-menu li { display: flex; }
.primary-menu a { display: flex; align-items: center; min-height: 70px; padding: .55rem .72rem; color: #fff; font-size: .86rem; font-weight: 700; text-decoration: none; border-left: 1px solid #383838; }
.primary-menu a:hover, .primary-menu .current-menu-item a { background: #fff; color: #111; text-decoration: underline; }

.site-main { min-height: 60vh; }
.page-hero { background: var(--reverse); color: var(--reverse-text); border-bottom: 5px solid var(--line); }
.page-hero-inner { max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 7vw, 6.5rem) var(--gutter); }
.page-kicker { margin: 0 0 1rem; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #ff8a82; }
h1 { max-width: 1080px; margin: 0; font-size: clamp(2.35rem, 6.5vw, 5.4rem); line-height: .98; letter-spacing: -.055em; overflow-wrap: anywhere; }
.page-content { max-width: var(--wide); margin: 0 auto; padding: clamp(2.25rem, 5vw, 4.5rem) var(--gutter) var(--section); counter-reset: section; }
.entry-section { max-width: var(--reading); margin: 0 0 var(--section); scroll-margin-top: 1.5rem; }
.entry-section > h2 { counter-increment: section; position: relative; margin: 0 0 1.5rem; padding-top: 1.15rem; border-top: 3px solid var(--line); font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.entry-section > h2::before { content: counter(section, decimal-leading-zero); display: block; margin-bottom: .55rem; color: var(--accent); font-size: .78rem; letter-spacing: .17em; }
h3 { margin: 2rem 0 .8rem; font-size: clamp(1.3rem, 2.5vw, 1.75rem); line-height: 1.2; }
p { margin: 0 0 1.28rem; }
.lead-answer { max-width: 900px; font-size: 1.08em; }
.entry-section ul, .entry-section ol { padding-left: 1.4rem; }
.entry-section li { margin-bottom: .75rem; }
.entry-section blockquote { margin: 2rem 0; padding: 1.2rem 1.4rem; background: var(--info); border-left: 6px solid var(--focus); }
.asset-wide, .editorial-figure, .table-wrap { width: min(var(--wide), calc(100vw - 2 * var(--gutter))); max-width: 1100px; }
.editorial-figure { margin: 2.4rem 0 3rem; background: #111; border: 1px solid #111; }
.editorial-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.editorial-figure.hero-figure img { aspect-ratio: 16 / 9; }
.editorial-figure.portrait-source img { aspect-ratio: 4 / 3; object-position: center; }
.editorial-figure figcaption { padding: .75rem 1rem; background: #111; color: #f7f7f3; font-size: .86rem; line-height: 1.45; }
.table-wrap { margin: 2rem 0; overflow-x: auto; border: 2px solid var(--line); background: #fff; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .9rem; border: 1px solid #555; text-align: left; vertical-align: top; }
th { background: #111; color: #fff; }
.decision-flow { margin: 2rem 0; padding: 1.5rem; border: 3px solid var(--line); background: var(--soft); }
.decision-flow strong { color: var(--accent-dark); }
.source-links { max-width: var(--reading); margin: var(--section) 0 0; padding: 1.4rem; border: 2px solid var(--line); background: var(--info); }
.source-links h2 { font-size: 1.35rem; }

.faq-block { max-width: 920px; margin-top: var(--section); padding-top: 2rem; border-top: 5px solid var(--line); }
.faq-block > h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.faq-item { border-bottom: 2px solid var(--line); }
.faq-item h3 { margin: 0; padding: 1.2rem 0 .55rem; font-size: 1.18rem; }
.faq-item p { padding-bottom: 1rem; }

.site-footer { background: #111; color: #f7f7f3; border-top: 6px solid var(--accent); }
.footer-grid { max-width: var(--wide); margin: 0 auto; padding: 3rem var(--gutter); display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
.footer-title { font-size: 1.45rem; font-weight: 800; }
.footer-note { max-width: 650px; color: #d8d8d2; }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; }
.footer-links a, .site-footer a { color: #fff; }
.footer-meta { max-width: var(--wide); margin: 0 auto; padding: 1rem var(--gutter) 2rem; border-top: 1px solid #444; color: #bfbfba; font-size: .85rem; }

@media (max-width: 1100px) {
  .header-grid { grid-template-columns: 1fr auto; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { position: absolute; top: 70px; left: 0; right: 0; display: none; background: #111; border-bottom: 3px solid var(--accent); }
  .site-nav.is-open { display: block; }
  .primary-menu { display: block; padding: .5rem var(--gutter) 1rem; }
  .primary-menu li { display: block; }
  .primary-menu a { min-height: 48px; border: 0; border-bottom: 1px solid #3f3f3f; }
}

@media (max-width: 680px) {
  .header-grid { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .custom-logo { max-width: 220px; }
  .page-hero-inner, .page-content { padding-left: 1rem; padding-right: 1rem; }
  .page-hero-inner { padding-top: 3rem; padding-bottom: 3.25rem; }
  h1 { font-size: clamp(2.25rem, 12vw, 3.6rem); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-left: 1rem; padding-right: 1rem; }
  .footer-links { grid-template-columns: 1fr; }
  table { min-width: 640px; }
}

@media (max-width: 390px) {
  .header-grid { min-width: 0; }
  .site-branding { min-width: 0; max-width: calc(100vw - 112px); }
  .menu-toggle { flex: 0 0 auto; width: auto; max-width: 96px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
