/* Blog article consistency fixes */
.cta-box {
  background: #2c3a5a !important;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.cta-box h3 {
  color: #ffffff !important;
}

/* Force consistent CTA style across all legacy button variants in blog articles */
.cta-box .btn-cta,
.cta-box .btn-cta-red,
.cta-box .btn-cta-purple,
.cta-box .btn-cta-navy,
.cta-box .btn-cta-blue,
.cta-box .btn-cta-out,
.cta-box a[class*="btn-cta"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 56px !important;
  padding: 16px 34px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: #D32F2F !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 1.06rem !important;
  line-height: 1.2 !important;
  box-shadow: 0 10px 24px rgba(232, 57, 43, 0.35) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.cta-box .btn-cta:hover,
.cta-box .btn-cta-red:hover,
.cta-box .btn-cta-purple:hover,
.cta-box .btn-cta-navy:hover,
.cta-box .btn-cta-blue:hover,
.cta-box .btn-cta-out:hover,
.cta-box a[class*="btn-cta"]:hover {
  background: #d83225 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 30px rgba(232, 57, 43, 0.42) !important;
}

.cta-box .btn-cta:focus-visible,
.cta-box .btn-cta-red:focus-visible,
.cta-box .btn-cta-purple:focus-visible,
.cta-box .btn-cta-navy:focus-visible,
.cta-box .btn-cta-blue:focus-visible,
.cta-box .btn-cta-out:focus-visible,
.cta-box a[class*="btn-cta"]:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

.cta-box .btn-cta iconify-icon,
.cta-box .btn-cta-red iconify-icon,
.cta-box .btn-cta-purple iconify-icon,
.cta-box .btn-cta-navy iconify-icon,
.cta-box .btn-cta-blue iconify-icon,
.cta-box .btn-cta-out iconify-icon,
.cta-box a[class*="btn-cta"] iconify-icon,
.cta-box .btn-cta svg,
.cta-box .btn-cta-red svg,
.cta-box .btn-cta-purple svg,
.cta-box .btn-cta-navy svg,
.cta-box .btn-cta-blue svg,
.cta-box .btn-cta-out svg,
.cta-box a[class*="btn-cta"] svg {
  color: #ffffff !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

@media (max-width: 640px) {
  .cta-box .btn-cta,
  .cta-box .btn-cta-red,
  .cta-box .btn-cta-purple,
  .cta-box .btn-cta-navy,
  .cta-box .btn-cta-blue,
  .cta-box .btn-cta-out,
  .cta-box a[class*="btn-cta"] {
    width: 100% !important;
    max-width: 340px !important;
    padding: 14px 22px !important;
    font-size: 1rem !important;
  }
}

/* Replace legacy avatar icon variants with a single current brand mark */
.author-box .author-avatar {
  width: 230px !important;
  max-width: 38% !important;
  aspect-ratio: 367 / 282 !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.author-box .author-avatar img,
.author-box .author-avatar svg {
  display: none !important;
}

.author-box .author-avatar::before {
  content: "" !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  background: url("/logo-author.svg") center / contain no-repeat !important;
}

@media (max-width: 640px) {
  .author-box .author-avatar {
    width: 162px !important;
    max-width: 44% !important;
  }

  .author-box .author-avatar::before {
    width: 100% !important;
    height: 100% !important;
  }
}

/* Match LGPD banner desktop pattern used on the main site */
@media (min-width: 800px) {
  #lgpd-banner {
    left: 50% !important;
    right: auto !important;
    bottom: 28px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: min(660px, 90vw) !important;
    border-radius: 18px !important;
    padding: 14px 20px 14px 24px !important;
    background: #fff !important;
    border: 1px solid rgba(27, 36, 56, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  }

  #lgpd-banner > div {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 20px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #lgpd-banner p {
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #475569 !important;
  }

  #lgpd-banner p a {
    color: #1b2438 !important;
    font-weight: 700 !important;
  }

  #lgpd-banner > div > div {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }

  #lgpd-banner button {
    padding: 8px 18px !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    font-weight: 600 !important;
  }

  #lgpd-banner button:first-of-type {
    background: #1b2438 !important;
    color: #fff !important;
    border: none !important;
  }

  #lgpd-banner button:nth-of-type(2) {
    background: transparent !important;
    color: #1b2438 !important;
    border: 1px solid rgba(27, 36, 56, 0.35) !important;
  }

  #lgpd-banner > div > div > a {
    display: none !important;
  }
}

/* Mobile overflow guard for all blog pages */
/* NOTE: overflow-x on <html> breaks position:sticky on the header.
   Keep it only on <body>. Use clip instead of hidden to preserve sticky. */
body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

/* Keep core wrappers from growing beyond viewport
   NOTE: .w is intentionally excluded — it has its own max-width:1200px */
.article-wrap,
.article-body,
.blog-hero,
.blog-section,
.related-section,
.cta-band,
.cta-box,
.author-box,
.ftr,
.ftr-grid,
.ftr-bot,
.ftr-bot-links,
.breadcrumb,
.breadcrumb-inner {
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Long strings and URLs should wrap instead of forcing horizontal scroll */
.article-body,
.article-body * {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Media should never exceed container width */
img,
svg,
video,
canvas,
iframe,
object,
embed {
  max-width: 100% !important;
  height: auto !important;
}

/* Exception: logos com altura declarada não devem ser redimensionados pelo rule acima */
.ftr-logo img,
.ftr-brand-logo img {
  height: 52px !important;
  width: auto !important;
  max-width: none !important;
}

.logo img {
  height: 68px !important;
  width: auto !important;
  max-width: none !important;
}

.author-box .author-avatar img {
  height: auto !important;
  max-width: 100% !important;
}

/* Allow wide content to scroll internally, not the whole page */
.article-body table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.article-body pre {
  display: block !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* Footer links can wrap on small screens */
@media (max-width: 900px) {
  .ftr-bot,
  .ftr-bot-links {
    flex-wrap: wrap !important;
  }

  .ftr-bot-links a {
    white-space: normal !important;
  }
}

/* Keep LGPD banner inside viewport on mobile */
@media (max-width: 799px) {
  #lgpd-banner {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
  }
}

/* ── Mobile form modal (opened by Cotar button in bottom-nav) ── */
.mob-form-overlay {
  position: fixed; inset: 0; z-index: 10003;
  background: rgba(27,36,56,.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.mob-form-modal {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 20px 20px 0 0; overflow: hidden;
  animation: slideUp .35s cubic-bezier(0.165,.84,.44,1);
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(27,36,56,.15);
}
.mob-form-head {
  background: #1b2438; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: #fff;
  letter-spacing: -.01em; position: relative;
}
.mob-form-head span, .mob-form-head button { position: relative; z-index: 1; }
.mob-form-body { padding: 28px; }
.qf-field { margin-bottom: 16px; }
.qf-label { display: block; font-size: .78rem; font-weight: 700; color: #3d507c; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; font-family: 'Plus Jakarta Sans', sans-serif; }
.qf-select, .qf-input {
  width: 100%; padding: 14px 16px;
  border: 1px solid rgba(27,36,56,.12); border-radius: 10px;
  font-size: .95rem; color: #1b2438; font-family: 'Inter', system-ui, sans-serif;
  background: #f5f5f7; outline: none; transition: all .2s;
  appearance: none; -webkit-appearance: none; box-sizing: border-box;
}
.qf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232C3A5A' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer;
}
.qf-select:focus, .qf-input:focus { border-color: #2c3a5a; background: #fff; box-shadow: 0 0 0 4px rgba(44,58,90,.08); }
.qf-submit {
  width: 100%; background: #1b2438; color: #fff; border: none;
  border-radius: 10px; padding: 16px; font-size: .95rem; font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px;
  transition: all .25s cubic-bezier(0.165,.84,.44,1);
}
.qf-submit:hover { background: #2c3a5a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,36,56,.15); }
.qf-submit:disabled, .qf-submit.loading { opacity: .7; cursor: not-allowed; transform: none; pointer-events: none; }
.qf-submit.success { background: #15803D; }
.qf-err { font-size: .75rem; color: #1b2438; margin-top: 6px; display: none; font-weight: 500; }
.qf-field.has-error .qf-input, .qf-field.has-error .qf-select { border-color: #1b2438; box-shadow: 0 0 0 4px rgba(27,36,56,.12); }
.qf-field.has-error .qf-err { display: block; }
.qf-note { text-align: center; font-size: .75rem; color: #3d507c; margin-top: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* mob-menu sections (PF/PJ accordion inside mobile drawer) */
.mob-section { border-bottom: 1px solid #e0e0e0; }
.mob-section-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 14px 0; font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .95rem; font-weight: 600; color: #1b2438;
  background: none; border: none; cursor: pointer; text-align: left;
}
.mob-section-btn .mob-chev { margin-left: auto; transition: transform .25s; flex-shrink: 0; }
.mob-section-btn.open .mob-chev { transform: rotate(180deg); }
.mob-section-links {
  padding: 4px 0 12px 12px; margin-left: 4px;
  border-left: 3px solid #EBF3FF;
}
.mob-section-links a {
  display: flex; align-items: center; padding: 10px 8px;
  min-height: 44px; font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .875rem; font-weight: 500; color: #475569;
  border-radius: 6px; text-decoration: none;
}
.mob-section-links a:hover,
.mob-section-links a:active { color: #2c3a5a; background: #EBF3FF; }

/* Normalize blog header on mobile to avoid legacy menu variants */
@media (max-width: 1020px) {
  .hdr .nav-links,
  .hdr .nav-right,
  .hdr .btn-nav,
  .hdr .btn-nav-wa,
  .hdr .nav-phone {
    display: none !important;
  }

  .hdr .hamburger {
    display: block !important;
    margin-left: auto !important;
  }
}

/* ── BLOG CTA MOBILE: remove bottom-nav legado, usa só mob-sticky-cta ── */

/* Esconde o bottom-nav (menu antigo com 4 ícones) em todas as páginas de blog */
.bottom-nav {
  display: none !important;
}

/* No mobile: padding para o conteúdo não ficar atrás do mob-sticky-cta fixo */
@media (max-width: 1020px) {
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Garante que o mob-sticky-cta apareça — sobrescreve JS inline style='none' */
  .mob-sticky-cta,
  #mobStickyCta {
    display: block !important;
  }
}

/* No desktop: sem padding extra de bottom-nav */
@media (min-width: 1021px) {
  body {
    padding-bottom: 0 !important;
  }
}

/* Botão CTA da cta-band no /blog — fundo escuro, botão precisa ser vermelho */
.cta-band .btn-cta {
  background: #D32F2F !important;
  color: #fff !important;
}
.cta-band .btn-cta:hover {
  background: #D32F2F !important;
}

/* Padroniza o botão do mob-sticky-cta para vermelho (igual ao oficial da home) */
.mob-sticky-btn,
a.mob-sticky-btn,
button.mob-sticky-btn {
  background: #D32F2F !important;
  color: #fff !important;
  border-radius: 100px !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(232, 57, 43, 0.35) !important;
}

.mob-sticky-btn:hover,
a.mob-sticky-btn:hover,
button.mob-sticky-btn:hover {
  background: #D32F2F !important;
  box-shadow: 0 6px 20px rgba(232, 57, 43, 0.45) !important;
  transform: translateY(-2px) !important;
}
