/* ============================================================
   Blog DC Redes de Proteção - estilo compartilhado
   Mesmos tokens da home, em arquivo próprio para as 11 páginas
   do blog não repetirem CSS inline.
   ============================================================ */
:root {
  --brand: #e5cd35;
  --brand-strong: #d6bd21;
  --text: #111111;
  --muted: #5f5f5f;
  --line: #e5e5e5;
  --white: #ffffff;
  --light: #f4f4f4;
  --lighter: #fafafa;
  --dark: #080808;
  --shadow: 0 16px 34px rgba(0, 0, 0, .08);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, .06);
  --radius: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.65;
}

body.modal-aberto { overflow: hidden; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Foco visível (WCAG) */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand img { width: 150px; height: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 24px; }

.site-nav a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
}

.site-nav a:hover { border-bottom-color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}

.header-cta:hover { background: var(--brand-strong); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
}

/* Rótulo curto do CTA: só no mobile (ver media query) */
.cta-curto { display: none; }

/* ---------- Cabeçalho da página ---------- */
.page-head {
  background: var(--lighter);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 40px;
}

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-current] { color: var(--text); font-weight: 700; }

.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
}

.page-head p.subtitulo { margin: 0; font-size: 17px; color: var(--muted); max-width: 720px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Corpo do artigo ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding: 56px 0 72px;
  align-items: start;
}

.post-corpo { max-width: 760px; font-size: 17px; }
.post-corpo > *:first-child { margin-top: 0; }
.post-corpo p { margin: 0 0 20px; }

.post-corpo h2 {
  margin: 42px 0 16px;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.post-corpo h3 { margin: 30px 0 12px; font-size: 19px; font-weight: 700; }

.post-corpo ul, .post-corpo ol { margin: 0 0 22px; padding-left: 22px; }
.post-corpo li { margin-bottom: 10px; }

.post-corpo a {
  color: #7a6a00;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-corpo a:hover { color: var(--text); }

.post-corpo strong { font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }
.faq h2 { margin: 32px 0 20px; font-size: clamp(22px, 2.8vw, 28px); font-weight: 800; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--lighter);
}

.faq summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 800; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: #333; }

/* ---------- Sidebar ---------- */
.post-aside { position: sticky; top: 100px; }

.card-cta {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.card-cta h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }
.card-cta p { margin: 0 0 18px; font-size: 14px; color: #cfcfcf; }

.btn-bloco {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.btn-bloco:hover { background: var(--brand-strong); transform: translateY(-1px); }

.card-links {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.card-links h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.card-links ul { margin: 0; padding: 0; list-style: none; }
.card-links li { margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.card-links a { color: #333; }
.card-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hub ---------- */
.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
  padding: 52px 0 72px;
}

.card-post {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card-post:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-post h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; line-height: 1.35; }
.card-post p { margin: 0 0 18px; font-size: 15px; color: var(--muted); flex: 1 1 auto; }

.card-post .ler {
  font-size: 14px;
  font-weight: 800;
  border-bottom: 2px solid var(--brand);
  align-self: flex-start;
  padding-bottom: 2px;
}

/* ---------- CTA de rodapé do post ---------- */
.faixa-cta {
  background: var(--dark);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.faixa-cta h2 { margin: 0 0 12px; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.faixa-cta p { margin: 0 auto 24px; max-width: 620px; color: #cfcfcf; }

.faixa-cta .btn-bloco { display: inline-block; width: auto; padding: 15px 34px; }

/* ---------- Footer ---------- */
.site-footer { background: #111; color: #fff; padding: 52px 0 26px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.site-footer img { width: 170px; height: auto; }
.site-footer h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.site-footer p, .site-footer li { color: #c9c9c9; font-size: 14px; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #c9c9c9; }
.site-footer a:hover { color: var(--brand); }

.subfooter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 13px;
  color: #9d9d9d;
}

/* ---------- Botão flutuante ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .42);
  transition: transform .2s ease, box-shadow .2s ease, bottom .25s ease;
}

.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }
.whatsapp-float:hover { transform: translateY(-2px) scale(1.04); }
body.cookie-visivel .whatsapp-float { bottom: 120px; }

/* ---------- Modal de lead ---------- */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lead-modal.open { display: flex; }
.lead-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }

.lead-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 22px;
  padding: 30px 28px 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
  max-height: 92vh;
  overflow-y: auto;
}

.lead-modal-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.lead-modal-card > p { margin: 0 0 20px; font-size: 14px; color: var(--muted); }

.lead-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}

.lead-modal label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.lead-modal input,
.lead-modal select {
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  color: #111;
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  appearance: none;
}

.lead-modal input:focus,
.lead-modal select:focus {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 3px rgba(229, 205, 53, .3);
}

.lead-modal button[type="submit"] {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.lead-modal button[type="submit"]:disabled { opacity: .7; cursor: default; }

.lead-feedback, .lead-disclaimer {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #5f5f5f;
}

.lead-feedback { min-height: 20px; }
.lead-disclaimer a { text-decoration: underline; text-underline-offset: 3px; }

.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: rgba(17, 17, 17, .96);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
}

.cookie-banner.show { opacity: 1; visibility: visible; transform: translateY(0); }
.cookie-banner p { margin: 0; font-size: 13px; line-height: 1.6; color: #ddd; }
.cookie-banner a { color: var(--brand); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cookie-btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.cookie-btn-primary { background: var(--brand); color: var(--text); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .post-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 6px; }
  .menu-toggle { display: block; font-size: 22px; padding: 4px 6px; }

  /* Com o rótulo inteiro, logo + botão + hambúrguer estouram a largura do
     header e o hambúrguer sai da tela. Por isso o rótulo curto no mobile. */
  .header-cta { padding: 9px 14px; font-size: 13px; white-space: nowrap; }
  .cta-longo { display: none; }
  .cta-curto { display: inline; }

  .nav-wrap { position: relative; gap: 10px; min-height: 64px; }
  .header-actions { gap: 8px; }
  .brand img { width: 118px; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .whatsapp-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .whatsapp-float svg { width: 27px; height: 27px; }
  body.cookie-visivel .whatsapp-float { bottom: 210px; }
  .cookie-banner { left: 14px; right: 14px; bottom: 14px; flex-direction: column; align-items: stretch; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1 1 auto; }
  .post-corpo { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
