/* =====================================================================
   LimpoSim — Blog Template (estilo LP Alergia)
   Reaproveita o design system das LPs sofa-alergias / colchao-alergias.
   Adiciona blocos editoriais: byline, sumário, prose, callouts,
   citação, related posts, share, reading-progress.
===================================================================== */

:root {
  --font-heading: "Montserrat", Arial, Helvetica, sans-serif;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
  --green-900: #123f2a;
  --green-800: #1f5d3a;
  --green-700: #2f8f4e;
  --green-100: #f1f8f3;
  --blue-700: #159bd3;
  --blue-100: #eaf7fc;
  --warm-100: #f8f3ea;
  --ink: #1f2933;
  --muted: #5c6b64;
  --line: #dde8e0;
  --white: #ffffff;
  --shadow: 0 16px 44px rgba(18, 63, 42, 0.16);
  --radius: 8px;
  --header-height: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

body.dialog-open { overflow: hidden; }

img { display: block; max-width: 100%; }

a { color: inherit; }

button, input, textarea { font: inherit; }

button { cursor: pointer; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--white);
  background: var(--green-900);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Reading progress bar (topo absoluto) ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--blue-700);
  z-index: 11;
  transition: width 0.08s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  border-bottom: 1px solid rgba(221, 232, 224, 0.82);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-900);
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
}

.brand span { font-size: 1.16rem; }

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

.site-nav a,
.nav-cta {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--green-900);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.nav-cta:hover { background: var(--green-100); }

.nav-cta {
  color: var(--white);
  background: var(--green-700);
}

.nav-cta:hover {
  color: var(--white);
  background: var(--green-800);
}

/* ---------- Article hero ---------- */
.article-hero {
  position: relative;
  min-height: 540px;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.article-hero-media,
.article-hero-overlay {
  position: absolute;
  inset: 0;
}

.article-hero-media {
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.article-hero-overlay {
  background:
    linear-gradient(0deg, rgba(18, 63, 42, 0.92) 0%, rgba(18, 63, 42, 0.74) 50%, rgba(18, 63, 42, 0.34) 100%),
    linear-gradient(90deg, rgba(18, 63, 42, 0.55), rgba(18, 63, 42, 0.18));
}

.article-hero-content {
  position: relative;
  z-index: 1;
  padding: 110px 0 56px;
  color: var(--white);
}

.article-hero-content > * { max-width: 800px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-700);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.article-hero .eyebrow,
.final-cta .eyebrow { color: #b7ecff; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: 0;
}

.article-hero h1 {
  max-width: 900px;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.06;
}

.article-hero .subtitle {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.18rem;
  max-width: 720px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 18px;
  font-weight: 600;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--white); }

/* ---------- Article meta (byline) ---------- */
.article-meta {
  background: var(--green-100);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.article-meta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

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

.byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.98rem;
}

.byline-text {
  font-size: 0.92rem;
  color: var(--green-900);
}

.byline-text strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
}

.byline-text span { color: var(--muted); }

.meta-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.meta-item strong {
  color: var(--green-900);
  font-family: var(--font-heading);
  font-weight: 800;
}

.share-row {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--green-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.share-button:hover {
  background: var(--green-100);
  border-color: var(--green-700);
}

.share-button svg { width: 16px; height: 16px; }

/* ---------- Layout do corpo do artigo ---------- */
.article-body {
  padding: 70px 0 88px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  align-items: start;
}

.article-layout-narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- Sumário (TOC) sticky ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.92rem;
}

.toc h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--blue-700);
  font-weight: 800;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.toc a:hover,
.toc a.is-active {
  color: var(--green-900);
  border-left-color: var(--green-700);
}

/* ---------- Prose (corpo editorial) ---------- */
.prose {
  font-size: 1.06rem;
  color: var(--ink);
  line-height: 1.78;
}

.prose > * + * { margin-top: 22px; }

.prose h2 {
  margin-top: 56px;
  font-size: 2rem;
  color: var(--green-900);
  font-weight: 800;
  line-height: 1.18;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.prose h3 {
  margin-top: 36px;
  font-size: 1.32rem;
  color: var(--green-900);
  font-weight: 800;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.prose p { margin: 0; }

.prose strong {
  color: var(--green-900);
  font-weight: 700;
}

.prose a {
  color: var(--green-800);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 24px;
}

.prose ul li,
.prose ol li { margin-bottom: 8px; }

.prose ul li::marker { color: var(--green-700); }

.prose figure {
  margin: 36px 0;
}

.prose figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

/* ---------- Callouts (.note, .tip, .warn) ---------- */
.note,
.tip,
.warn {
  margin: 32px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--blue-700);
  background: var(--blue-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--green-900);
  font-weight: 600;
}

.note strong,
.tip strong,
.warn strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.tip {
  border-left-color: var(--green-700);
  background: var(--green-100);
}

.warn {
  border-left-color: #c47a2c;
  background: var(--warm-100);
}

/* ---------- Pull quote ---------- */
.pull-quote {
  margin: 44px 0;
  padding: 32px 28px;
  border: 0;
  border-left: 6px solid var(--green-700);
  background: var(--green-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--green-900);
}

.pull-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  font-style: normal;
  color: var(--muted);
}

/* ---------- Cards / steps / pills (do design LP) ---------- */
.cards-grid,
.trust-grid,
.comparison-grid,
.steps {
  display: grid;
  gap: 18px;
  margin: 36px 0;
}

.cards-grid-3,
.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.step {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.info-card h3,
.step h3 {
  font-size: 1.02rem;
  margin: 0;
  color: var(--green-900);
}

.info-card p,
.step p {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.accent-card {
  border-color: rgba(47, 143, 78, 0.35);
  background: #f9fffb;
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue-700);
  font-family: var(--font-heading);
  font-weight: 800;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.pill-list span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-900);
  font-size: 0.88rem;
  font-weight: 700;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-700);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Tabela editorial ---------- */
.prose .data-table {
  width: 100%;
  margin: 32px 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

.prose .data-table th,
.prose .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose .data-table th {
  background: var(--green-900);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prose .data-table tr:last-child td { border-bottom: 0; }

.prose .data-table tbody tr:nth-child(even) td { background: var(--green-100); }

/* ---------- FAQ section ---------- */
.faq-section {
  padding: 80px 0;
  background: var(--green-100);
}

.faq-section .section-heading {
  width: min(760px, 100%);
  margin-bottom: 30px;
}

.faq-section h2 {
  font-size: 2.2rem;
  color: var(--green-900);
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.faq-list summary {
  min-height: 58px;
  padding: 17px 20px;
  color: var(--green-900);
  font-family: var(--font-heading);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--blue-700);
  font-weight: 800;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list p {
  padding: 18px 20px 20px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ---------- Author bio ---------- */
.author-bio {
  margin-top: 64px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green-100);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
}

.author-bio .byline-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.4rem;
}

.author-bio h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--green-900);
}

.author-bio p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- Related posts ---------- */
.related-section {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.related-section .section-heading {
  margin-bottom: 30px;
}

.related-section h2 {
  font-size: 2rem;
  color: var(--green-900);
  font-weight: 800;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.related-card-media {
  aspect-ratio: 16 / 9;
  background: var(--green-100);
  background-size: cover;
  background-position: center;
}

.related-card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.related-card-tag {
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--blue-700);
  text-transform: uppercase;
}

.related-card-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.04rem;
  color: var(--green-900);
  line-height: 1.28;
}

.related-card-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 82px 0;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(18, 63, 42, 0.94), rgba(31, 93, 58, 0.88)),
    var(--green-900);
}

.final-cta h2 {
  color: var(--white);
  font-size: 2.4rem;
  font-weight: 800;
}

.final-cta-inner {
  display: grid;
  justify-items: start;
  gap: 18px;
  width: min(780px, calc(100% - 40px));
}

.final-cta-inner p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  color: var(--white);
  background: var(--green-700);
  box-shadow: 0 12px 26px rgba(47, 143, 78, 0.28);
}

.button-primary:hover { background: var(--green-800); }

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.button-secondary:hover { background: rgba(255, 255, 255, 0.18); }

.text-link {
  display: inline-flex;
  margin-top: 6px;
  padding: 0;
  color: var(--green-800);
  border: 0;
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  color: rgba(255, 255, 255, 0.86);
  background: var(--green-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  gap: 38px;
  padding: 54px 0 34px;
}

.footer-brand,
.site-footer h2 { color: var(--white); }

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p + p { margin-top: 8px; }

.site-footer a:hover { color: #b7ecff; }

.footer-bottom {
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
}

/* ---------- Mobile CTA fixo ---------- */
.mobile-cta { display: none; }

/* ---------- Dialog ---------- */
dialog {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(18, 63, 42, 0.64); }

.lead-form,
.privacy-content {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 30px;
  background: var(--white);
}

.lead-form h2,
.privacy-content h2 {
  padding-right: 42px;
  font-size: 1.7rem;
  color: var(--green-900);
}

.lead-form > p,
.privacy-content p { color: var(--muted); }

.lead-form label {
  display: grid;
  gap: 7px;
  color: var(--green-900);
  font-weight: 800;
}

.lead-form small {
  color: var(--muted);
  font-weight: 600;
}

.lead-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
}

.lead-form input:focus {
  outline: 3px solid rgba(21, 155, 211, 0.2);
  border-color: var(--blue-700);
}

.dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green-900);
  background: var(--white);
  font-size: 1.4rem;
  line-height: 1;
}

.privacy-note,
.form-status { font-size: 0.9rem; }

.privacy-note a {
  color: var(--green-800);
  font-weight: 800;
}

.form-status:empty { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .toc {
    position: static;
  }
  .cards-grid-3,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-hero h1 { font-size: 2.6rem; }
}

@media (max-width: 760px) {
  :root { --header-height: 68px; }

  .container { width: min(100% - 28px, 1120px); }

  .site-nav a { display: none; }

  .article-hero {
    min-height: auto;
  }
  .article-hero-content {
    padding: 90px 0 40px;
  }
  .article-hero h1 { font-size: 2.1rem; }
  .article-hero .subtitle { font-size: 1rem; }

  .article-meta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .meta-divider { display: none; }
  .share-row { margin-left: 0; }

  .article-body { padding: 50px 0 64px; }
  .prose { font-size: 1rem; }
  .prose h2 { font-size: 1.6rem; margin-top: 44px; }
  .prose h3 { font-size: 1.18rem; margin-top: 30px; }

  .cards-grid-3,
  .trust-grid,
  .comparison-grid,
  .steps,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .author-bio {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-grid { grid-template-columns: 1fr; }

  .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    display: block;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }
  .mobile-cta .button { width: 100%; }

  .site-footer { padding-bottom: 76px; }
}

@media (max-width: 430px) {
  .article-hero h1 { font-size: 1.78rem; }
  .pull-quote { font-size: 1.18rem; padding: 24px 20px; }
  .final-cta h2 { font-size: 1.7rem; }
  .lead-form,
  .privacy-content { padding: 24px 18px; }
}
