/*
Theme Name: 8855bet Guia Editorial
Theme URI: https://8855bet.buzz/
Author: 8855bet Editorial
Description: Tema editorial independente em pt-BR para o guia 8855bet.
Version: 1.0.1
Text Domain: brand8855
*/

:root {
  --page: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #f0ebe2;
  --brand: #a83e32;
  --brand-dark: #8e332a;
  --amber: #d89a32;
  --ink: #242321;
  --muted: #68645e;
  --line: #ddd5c8;
  --info-bg: #eef4f1;
  --info: #2f7764;
  --warn-bg: #fff4d9;
  --warn: #9b6416;
  --danger: #b43b3b;
  --shadow: 0 12px 32px rgba(58,45,30,.09);
  --radius: 12px;
  --content: 1160px;
  --reading: 780px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-wrap: anywhere;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 3px;
}
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 12px; left: 12px; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; background: var(--surface); }
.site-shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  min-height: 68px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 32px; }
.site-logo { color: var(--ink); font-size: 24px; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
.site-logo span { color: var(--brand); }
.primary-menu { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { display: flex; min-height: 44px; align-items: center; padding: 8px 13px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; border-radius: 9px; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { background: var(--surface-soft); color: var(--brand-dark); }
.primary-menu .menu-item-cta > a { min-height: 48px; padding-inline: 18px; color: #fff; background: var(--brand); }
.primary-menu .menu-item-cta > a:hover { color: #fff; background: var(--brand-dark); }
.menu-toggle { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { width: 22px; height: 2px; background: currentColor; transition: transform .2s ease; }
.menu-toggle-lines { position: relative; display: block; }
.menu-toggle-lines::before, .menu-toggle-lines::after { position: absolute; left: 0; content: ""; }
.menu-toggle-lines::before { top: -7px; }
.menu-toggle-lines::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.hero { padding: 68px 0 64px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: center; gap: 54px; }
.eyebrow { margin: 0 0 12px; color: var(--brand-dark); font-size: 14px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.13; letter-spacing: -.035em; }
h1 { margin-bottom: 24px; font-size: clamp(2.35rem, 5.2vw, 3.65rem); }
h2 { position: relative; margin: 0 0 24px; padding-top: 8px; font-size: clamp(1.9rem, 3.4vw, 2.35rem); }
h2::before { position: absolute; top: 0; left: 0; width: 46px; height: 4px; content: ""; border-radius: 3px; background: var(--brand); }
h3 { margin: 32px 0 12px; font-size: clamp(1.38rem, 2.4vw, 1.62rem); }
.hero-copy p { margin: 0; font-size: 19px; line-height: 1.72; }
.hero-media img { width: 100%; border: 1px solid rgba(168,62,50,.12); border-radius: 16px; box-shadow: var(--shadow); }

.article-shell { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; padding: 64px 0 76px; }
.article-header { width: min(100%, var(--reading)); margin: 0 auto 42px; }
.article-header h1 { margin-bottom: 20px; }
.article-lead { margin: 0; font-size: 19px; line-height: 1.76; }
.updated { display: inline-flex; margin-top: 18px; color: var(--muted); font-size: 14px; }
.article-panel { width: min(100%, 940px); margin-inline: auto; padding: 48px min(7vw, 78px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.content-section { width: min(100%, var(--reading)); margin: 0 auto; padding: 60px 0; border-top: 1px solid var(--line); }
.content-section:first-child { padding-top: 0; border-top: 0; }
.content-section p:first-of-type { margin-top: 0; }
.content-section p:last-child { margin-bottom: 0; }
.content-section ul, .content-section ol { padding-left: 1.25em; }
.content-section li + li { margin-top: .55em; }
.content-section figure { margin: 32px 0; }
.editorial-image img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); box-shadow: var(--shadow); }
.editorial-image figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.section-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 18px; color: #fff; background: var(--brand); border: 2px solid var(--brand); border-radius: 10px; font-weight: 800; text-decoration: none; }
.button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.button.secondary { color: var(--brand-dark); background: var(--surface); }
.button.secondary:hover { color: #fff; background: var(--brand-dark); }

.toc { width: min(100%, var(--reading)); margin: 0 auto 52px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc summary { min-height: 52px; padding: 12px 18px; cursor: pointer; color: var(--ink); font-weight: 800; }
.toc ol { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 28px; margin: 0; padding: 2px 22px 20px 42px; }
.toc a { text-decoration: none; }

.table-wrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; line-height: 1.5; }
th, td { min-width: 150px; padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--ink); background: var(--surface-soft); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.timeline { margin: 28px 0; padding: 0; list-style: none; counter-reset: steps; }
.timeline li { position: relative; min-height: 56px; margin: 0; padding: 0 0 26px 58px; counter-increment: steps; }
.timeline li::before { position: absolute; top: 0; left: 0; display: grid; width: 38px; height: 38px; place-items: center; content: counter(steps); color: #fff; background: var(--brand); border-radius: 50%; font-size: 15px; font-weight: 900; }
.timeline li::after { position: absolute; top: 40px; bottom: 2px; left: 18px; width: 2px; content: ""; background: var(--line); }
.timeline li:last-child::after { display: none; }
.note { margin: 28px 0; padding: 18px 20px; color: #245c4f; background: var(--info-bg); border-left: 4px solid var(--info); border-radius: 8px; }
.note.warning { color: var(--warn); background: var(--warn-bg); border-left-color: var(--amber); }
.note.danger { color: #7e2828; background: #fff0f0; border-left-color: var(--danger); }

.faq-list { display: grid; gap: 12px; margin-top: 26px; }
.faq-list details { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-list details[open] { border-left: 4px solid var(--brand); }
.faq-list summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; cursor: pointer; font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--brand); font-size: 24px; font-weight: 500; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { padding: 0 18px 18px; }
.faq-answer p { margin: 0; }

.editorial-meta { width: min(100%, var(--reading)); margin: 48px auto 0; padding: 20px 22px; color: var(--muted); background: var(--surface-soft); border-radius: var(--radius); font-size: 14px; }
.editorial-meta p { margin: 0; }
.editorial-meta p + p { margin-top: 6px; }

.contact-form { display: grid; gap: 18px; margin-top: 28px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
label { font-weight: 800; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #bdb4a7; border-radius: 8px; font: inherit; }
textarea { min-height: 170px; resize: vertical; }
.checkbox { display: grid; grid-template-columns: 24px 1fr; align-items: start; gap: 10px; font-weight: 600; }
.checkbox input { width: 20px; min-height: 20px; margin-top: 5px; }
.form-message { margin: 0 0 24px; padding: 14px 16px; border-radius: 8px; }
.form-message.success { color: #245c4f; background: var(--info-bg); border: 1px solid #bcd6cd; }
.form-message.error { color: #7e2828; background: #fff0f0; border: 1px solid #efc2c2; }
.hp-field { position: absolute; left: -9999px; }

.site-footer { color: #fff; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 50px; padding: 54px 0 34px; }
.footer-brand { margin: 0 0 12px; font-size: 26px; font-weight: 900; }
.footer-copy { max-width: 540px; margin: 0; color: #e6e0d7; font-size: 15px; }
.footer-copy + .footer-copy { margin-top: 12px; }
.footer-heading { margin: 0 0 12px; color: #fff; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 7px; }
.footer-links a { color: #f4d7d2; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0 28px; color: #c9c1b6; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; }
.error-page { min-height: 58vh; padding: 90px 0; text-align: center; }

@media (max-width: 860px) {
  .site-shell, .article-shell { width: min(calc(100% - 32px), var(--content)); }
  .site-header, .header-inner { min-height: 58px; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { width: 100%; padding: 8px 0 14px; }
  .js .header-inner { flex-wrap: nowrap; }
  .js .menu-toggle { display: flex; }
  .js .site-nav { position: fixed; inset: 58px 0 auto; display: none; width: auto; max-height: calc(100vh - 58px); overflow-y: auto; padding: 14px 16px 22px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .js .site-nav.is-open { display: block; }
  .primary-menu { display: grid; gap: 6px; }
  .primary-menu a { min-height: 48px; padding-inline: 14px; }
  .hero { padding: 44px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-media { order: 2; }
  .article-shell { padding: 46px 0 56px; }
  .article-panel { padding: 34px 30px; }
  .content-section { padding: 48px 0; }
  .toc ol { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-shell, .article-shell { width: calc(100% - 32px); }
  .hero-copy p, .article-lead { font-size: 17px; }
  .hero-media img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 66% center; }
  .article-panel { padding: 28px 18px; border-radius: 12px; }
  .content-section { padding: 44px 0; }
  .section-links, .section-links .button { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap th, .table-wrap td, .table-wrap tr { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { min-width: 0; padding: 7px 0; border: 0; }
  .table-wrap td::before { display: block; margin-bottom: 2px; color: var(--muted); content: attr(data-label); font-size: 12px; font-weight: 800; text-transform: uppercase; }
}

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