/* ==========================================================================
   Keyply Blog — folha de estilo padrão
   Base visual herdada de /educ (cores, fontes, header, CTA, WhatsApp float).
   Usar este arquivo em TODOS os artigos e no index do blog (/blog/default.html).
   ========================================================================== */

:root {
  --blue-dark: #004e82;
  --blue-brand: #1f299c;
  --blue-primary: #526ad8;
  --blue-bg: #d9e9f8;
  --gray: #6F6F6F;
  --green: #22a559;
  --border: #eef1f6;
  --text: #1a1a2e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Onest', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  color: var(--blue-dark);
  line-height: 1.25;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

ul, ol {
  padding-left: 1.25em;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400;
}

/* --------------------------------------------------------------------
   Header (idêntico ao usado em /educ, para reconhecimento de marca)
   -------------------------------------------------------------------- */
header:not(.article-header) {
  position: sticky;
  top: 0;
  background: #fffb;
  backdrop-filter: blur(6px);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

header .logo img {
  height: 44px;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .header-cta {
    display: inline-flex;
  }
}

.header-cta .material-symbols-outlined {
  font-size: 18px;
}

/* --------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------- */
.breadcrumb {
  padding-top: 14px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  font-size: 13px;
  color: var(--gray);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: #c7cbd8;
}

.breadcrumb a {
  color: var(--blue-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------
   Hero do blog (index /blog/default.html)
   -------------------------------------------------------------------- */
.blog-hero {
  background: linear-gradient(180deg, var(--blue-bg) 0%, #fff 100%);
  padding: 44px 0 36px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  background: #fff;
  color: var(--blue-brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
  border: 1px solid #c7d7f2;
}

.blog-hero h1 {
  font-size: clamp(26px, 4.5vw, 36px);
  font-weight: 800;
  max-width: 760px;
  margin: 0 auto;
}

.blog-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--gray);
  max-width: 620px;
  margin: 14px auto 0;
}

/* --------------------------------------------------------------------
   Categorias / tags (chips)
   -------------------------------------------------------------------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 18px;
  justify-content: center;
}

.tag {
  display: inline-block;
  background: var(--blue-bg);
  color: var(--blue-brand);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.tag:hover {
  background: #c7d7f2;
}

/* --------------------------------------------------------------------
   Grid de artigos (index e "posts relacionados")
   -------------------------------------------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 40px 0 56px;
}

@media (min-width: 720px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -18px rgba(31, 41, 156, 0.3);
}

.post-card .thumb {
  aspect-ratio: 16/9;
  background: var(--blue-bg) center / cover no-repeat;
}

.post-card .body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card .post-meta {
  font-size: 12px;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.post-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.post-card p {
  font-size: 14px;
  color: var(--gray);
  flex: 1;
}

.post-card .read-more {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-brand);
}

/* --------------------------------------------------------------------
   Artigo — tipografia e componentes
   -------------------------------------------------------------------- */
.article-header {
  padding: 28px 20px 8px;
  max-width: 760px;
  margin: 0 auto;
}

.article-header .post-meta {
  font-size: 13px;
  color: var(--gray);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 14px;
}

.article-header .post-meta .dot {
  color: #c7cbd8;
}

.article-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
}

.article-header .deck {
  font-size: 17px;
  color: var(--gray);
  margin-top: 12px;
}

.article-cover {
  max-width: 760px;
  margin: 24px auto;
  padding: 0 20px;
}

.article-cover img {
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 25%;
}

article.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 8px;
  font-size: 17px;
  color: #292940;
}

article.content h2 {
  font-size: 24px;
  margin: 40px 0 14px;
}

article.content h3 {
  font-size: 19px;
  margin: 28px 0 10px;
  color: var(--text);
}

article.content p {
  margin-bottom: 18px;
}

article.content ul,
article.content ol {
  margin: 0 0 18px 0;
  padding-left: 1.4em;
}

article.content li {
  margin-bottom: 8px;
}

article.content a {
  color: var(--blue-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

article.content strong {
  color: var(--text);
}

article.content blockquote {
  border-left: 4px solid var(--blue-primary);
  background: #f7f9fd;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  color: var(--blue-dark);
  font-style: italic;
}

article.content figure {
  margin: 28px 0;
}

article.content figure img {
  border-radius: 12px;
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}

article.content figcaption {
  font-size: 13px;
  color: var(--gray);
  text-align: center;
  margin-top: 8px;
}

.related-posts {
  max-width: 760px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.related-posts h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.related-posts .post-grid {
  padding: 0 0 8px;
}

@media (min-width: 1000px) {
  .related-posts .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

article.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

article.content th, article.content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

article.content th {
  background: #f7f9fd;
  color: var(--blue-dark);
}

/* Resumo rápido / key takeaways — bom para leitores apressados e para
   mecanismos de IA generativa (GEO) extraírem a resposta direta. */
.key-takeaways {
  max-width: 760px;
  margin: 24px auto;
  padding: 22px 24px;
  background: var(--blue-bg);
  border-radius: 16px;
}

.key-takeaways h2 {
  font-size: 16px;
  color: var(--blue-brand);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-takeaways h2 .material-symbols-outlined {
  font-size: 20px;
}

.key-takeaways ul {
  margin: 0;
  padding-left: 1.2em;
}

.key-takeaways li {
  font-size: 15px;
  margin-bottom: 6px;
}

.key-takeaways li:last-child {
  margin-bottom: 0;
}

/* Índice do artigo (table of contents) */
.toc {
  max-width: 760px;
  margin: 20px auto;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 14px;
}

.toc summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--blue-dark);
  font-family: 'Sora', sans-serif;
}

.toc ol {
  margin-top: 12px;
  padding-left: 1.2em;
}

.toc a {
  color: var(--blue-primary);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Em telas bem largas, flutua na margem esquerda vazia sem afetar o
   posicionamento do texto do artigo (o .toc some do fluxo normal). */
@media (min-width: 1400px) {
  .toc {
    position: fixed;
    top: 120px;
    left: calc(50% - 664px);
    width: 260px;
    max-width: 260px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    margin: 0;
  }
}

/* FAQ (usar junto com o schema FAQPage no JSON-LD) */
.faq {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 20px;
}

.faq h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  font-size: 15.5px;
}

.faq details p {
  margin-top: 10px;
  color: var(--gray);
  font-size: 15px;
}

/* CTA embutido no meio/fim do artigo */
.inline-cta {
  max-width: 760px;
  margin: 36px auto;
  padding: 28px;
  border-radius: 20px;
  background: var(--blue-brand);
  color: #fff;
  text-align: center;
}

.inline-cta h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 8px;
}

.inline-cta p {
  color: #cfd6f7;
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s, background 0.15s;
}

.btn-primary {
  background: #fff;
  color: var(--blue-brand);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
}

.btn-secondary:hover {
  background: #ffffff1a;
  transform: translateY(-1px);
}

/* Autor / revisão editorial (sinal de E-E-A-T para SEO) */
.author-box {
  max-width: 760px;
  margin: 32px auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-box img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box .name {
  font-weight: 700;
  color: var(--text);
  font-size: 14.5px;
}

.author-box .role {
  font-size: 13px;
  color: var(--gray);
}

/* Posts relacionados */
.related {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.related h2 {
  font-size: 22px;
  margin-bottom: 18px;
  text-align: center;
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

footer p {
  font-size: 13px;
  color: #9ca3af;
}

footer a {
  color: var(--blue-primary);
  text-decoration: none;
  font-size: 13px;
}

footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-about p {
  margin-bottom: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --------------------------------------------------------------------
   WhatsApp floating button (igual ao /educ)
   -------------------------------------------------------------------- */
.wpp-float {
  position: fixed;
  bottom: 21px;
  right: 21px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(34, 165, 89, 0.5);
  }
  50% {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 0 10px rgba(34, 165, 89, 0);
  }
}

.wpp-float img {
  height: 48px;
}

@media (prefers-reduced-motion: reduce) {
  .wpp-float {
    animation: none !important;
  }
}
