:root {
  --bm-ink: #101418;
  --bm-ink-soft: #1a2128;
  --bm-night: #081019;
  --bm-night-soft: #111b26;
  --bm-paper: #fbf8f0;
  --bm-paper-deep: #f1eadc;
  --bm-card: rgba(255, 253, 247, 0.96);
  --bm-gold: #bd8122;
  --bm-gold-light: #e3bd69;
  --bm-gold-dark: #84530f;
  --bm-line: rgba(132, 83, 15, 0.19);
  --bm-muted: #6f685e;
  --bm-shadow-sm: 0 12px 28px rgba(17, 22, 27, 0.08);
  --bm-shadow-lg: 0 30px 80px rgba(17, 22, 27, 0.14);
  --bm-radius: 24px;
}

body.blog-page {
  background:
    radial-gradient(circle at 9% 4%, rgba(189, 129, 34, 0.09), transparent 29rem),
    radial-gradient(circle at 95% 24%, rgba(28, 49, 67, 0.08), transparent 34rem),
    var(--bm-paper);
  color: var(--bm-ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.74;
  text-rendering: optimizeLegibility;
}

body.blog-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.26;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

.blog-shell { overflow: clip; }

.blog-header {
  background: rgba(7, 13, 20, 0.93);
  border-bottom: 1px solid rgba(227, 189, 105, 0.22);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(130%);
}

.blog-header-inner,
.blog-main,
.blog-footer-inner {
  width: min(1240px, calc(100% - 40px));
}

.blog-header-inner { min-height: 86px; }

.blog-brand { color: #fff8e9; gap: 14px; }
.blog-brand-logo {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  border: 1px solid rgba(227, 189, 105, 0.42);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(189, 129, 34, 0.07);
}
.blog-brand strong {
  color: var(--bm-gold-light);
  font-size: 1.14rem;
  letter-spacing: 0.03em;
}
.blog-brand span { color: rgba(255, 248, 233, 0.66); }

.blog-nav { gap: 8px; }
.blog-nav a,
.blog-nav button,
.blog-button {
  border: 1px solid rgba(227, 189, 105, 0.23);
  background: rgba(255, 255, 255, 0.055);
  color: #fff8e9;
  border-radius: 999px;
  padding: 10px 17px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.blog-nav a:hover,
.blog-nav button:hover {
  color: #fff;
  border-color: rgba(227, 189, 105, 0.72);
  background: rgba(189, 129, 34, 0.16);
  transform: translateY(-1px);
}
.blog-nav .blog-donate-nav {
  background: linear-gradient(135deg, var(--bm-gold), var(--bm-gold-dark));
  border-color: var(--bm-gold-light);
  color: #fff;
  box-shadow: 0 8px 22px rgba(189, 129, 34, 0.2);
}

.blog-main { padding: 62px 0 92px; }

.blog-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(38px, 7vw, 78px);
  border: 1px solid rgba(227, 189, 105, 0.25);
  border-radius: 32px;
  color: #fff8e9;
  background:
    linear-gradient(108deg, rgba(4, 9, 15, 0.98) 0%, rgba(9, 18, 29, 0.9) 48%, rgba(58, 38, 14, 0.5) 100%),
    url('/assets/blog/da-desordem-ao-logos.svg') center 48% / cover no-repeat;
  box-shadow: 0 36px 90px rgba(7, 13, 20, 0.25);
  margin-bottom: 48px;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 76% 33%, rgba(239, 193, 93, 0.34), transparent 32%);
}
.blog-hero::after {
  content: "";
  position: absolute;
  left: clamp(38px, 7vw, 78px);
  bottom: 38px;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--bm-gold-light), transparent);
}
.blog-hero .eyebrow,
.blog-eyebrow {
  color: var(--bm-gold-light);
  letter-spacing: 0.19em;
  font-family: Arial, Helvetica, sans-serif;
}
.blog-hero h1 {
  max-width: 870px;
  color: #fff;
  font-size: clamp(2.65rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}
.blog-hero p {
  max-width: 750px;
  color: rgba(255, 248, 233, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.blog-card {
  position: relative;
  border: 1px solid var(--bm-line);
  border-radius: var(--bm-radius);
  background: var(--bm-card);
  box-shadow: var(--bm-shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.blog-card:hover {
  transform: translateY(-7px);
  border-color: rgba(189, 129, 34, 0.46);
  box-shadow: var(--bm-shadow-lg);
}
.blog-card-cover { aspect-ratio: 16 / 9.2; }
.blog-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 16, 25, 0.18), transparent 48%);
  pointer-events: none;
}
.blog-card-cover img { transition: transform 500ms ease; }
.blog-card:hover .blog-card-cover img { transform: scale(1.035); }
.blog-card-body { padding: 28px; gap: 13px; }
.blog-card h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.78rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
}
.blog-card h2 a:hover { color: var(--bm-gold-dark); }
.blog-card p { color: var(--bm-muted); font-size: 0.98rem; }
.blog-meta {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--bm-muted);
  letter-spacing: 0.015em;
}
.blog-tag {
  border-color: rgba(132, 83, 15, 0.18);
  background: rgba(189, 129, 34, 0.06);
  color: var(--bm-gold-dark);
  padding: 4px 10px;
}

body.is-article .blog-main { padding-top: 42px; }
.blog-article-wrap { max-width: 1160px; }
.blog-article-header {
  max-width: 980px;
  margin: 0 auto 34px;
  text-align: center;
  padding: 36px 24px 10px;
}
.blog-article-header h1 {
  max-width: 1050px;
  margin: 14px auto 18px;
  color: var(--bm-ink);
  font-size: clamp(2.65rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.blog-article-subtitle {
  max-width: 820px;
  margin: 0 auto 20px;
  color: var(--bm-gold-dark);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.45;
  font-style: italic;
}
.blog-article-header .blog-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--bm-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}
.blog-article-header .blog-tags { justify-content: center; margin-top: 16px; }

.blog-article-cover {
  position: relative;
  margin: 34px 0 26px;
  border: 1px solid rgba(189, 129, 34, 0.3);
  border-radius: 30px;
  background: var(--bm-night);
  box-shadow: 0 34px 90px rgba(8, 16, 25, 0.25);
}
.blog-article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 233, 0.13);
  border-radius: inherit;
}
.blog-article-cover img { aspect-ratio: 16 / 9; object-fit: cover; }

.blog-share-panel {
  position: relative;
  overflow: hidden;
  margin: 24px 0;
  padding: 22px 24px;
  border: 1px solid rgba(189, 129, 34, 0.23);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(243, 234, 216, 0.9));
  box-shadow: var(--bm-shadow-sm);
}
.blog-share-panel::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(189, 129, 34, 0.13);
  border-radius: 50%;
}
.blog-share-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.blog-share-heading h2,
.blog-share-heading h3 { margin: 0; font-size: 1.25rem; }
.blog-share-heading p { margin: 3px 0 0; color: var(--bm-muted); font-size: 0.92rem; }
.blog-share-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.blog-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(17, 27, 38, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--bm-ink-soft);
  font: 700 0.78rem/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}
.blog-share-button:hover {
  transform: translateY(-2px);
  border-color: var(--share-color, var(--bm-gold));
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 22, 27, 0.1);
}
.blog-share-button svg { width: 18px; height: 18px; fill: currentColor; }
.blog-share-button[data-bm-share="whatsapp"] { --share-color: #1ca75b; color: #167d46; }
.blog-share-button[data-bm-share="facebook"] { --share-color: #1877f2; color: #145db9; }
.blog-share-button[data-bm-share="x"] { --share-color: #111; color: #111; }
.blog-share-button[data-bm-share="linkedin"] { --share-color: #0a66c2; color: #075398; }
.blog-share-button[data-bm-share="telegram"] { --share-color: #229ed9; color: #137cad; }
.blog-share-button[data-bm-share="instagram"] { --share-color: #c13584; color: #9d276d; }
.blog-share-button[data-bm-share="email"] { --share-color: #7c5a22; color: #694817; }
.blog-share-button[data-bm-share="copy"] { --share-color: var(--bm-gold); color: var(--bm-gold-dark); }
.blog-share-button[data-bm-share="native"] {
  background: linear-gradient(135deg, var(--bm-gold), var(--bm-gold-dark));
  border-color: var(--bm-gold);
  color: white;
}

.blog-audio,
.blog-reactions,
.blog-donate,
.blog-auth-box,
.blog-comments,
.blog-ad {
  border-color: var(--bm-line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--bm-shadow-sm);
}
.blog-audio { padding: 24px; }
.blog-audio h3 { margin: 4px 0 14px; }
.blog-audio .blog-button,
.blog-reactions .blog-button,
.blog-donate .blog-button,
.blog-comments .blog-button {
  color: var(--bm-ink);
  background: #fff;
  border-color: var(--bm-line);
}
.blog-audio .blog-button.primary,
.blog-donate .blog-button.primary,
.blog-comments .blog-button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bm-gold), var(--bm-gold-dark));
  border-color: var(--bm-gold);
}

.blog-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) 260px;
  align-items: start;
  justify-content: center;
  gap: 34px;
  margin-top: 26px;
}
.blog-article {
  min-width: 0;
  border: 1px solid rgba(132, 83, 15, 0.16);
  border-radius: 28px;
  padding: clamp(30px, 5vw, 68px);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 24px 70px rgba(17, 22, 27, 0.1);
  font-size: clamp(1.08rem, 1.4vw, 1.18rem);
  line-height: 1.82;
}
.blog-article > p:first-child::first-letter {
  float: left;
  margin: 0.12em 0.12em 0 0;
  color: var(--bm-gold-dark);
  font-size: 4.2em;
  line-height: 0.72;
  font-weight: 700;
}
.blog-article h2 {
  scroll-margin-top: 116px;
  margin: 2.55em 0 0.8em;
  padding-top: 0.45em;
  border-top: 1px solid rgba(189, 129, 34, 0.23);
  color: var(--bm-ink);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.blog-article h2:first-child { margin-top: 0; }
.blog-article h3 { color: var(--bm-gold-dark); }
.blog-article p { margin: 1.15em 0; }
.blog-article blockquote {
  position: relative;
  margin: 2em 0;
  padding: 1.25em 1.45em 1.25em 1.7em;
  border-left: 4px solid var(--bm-gold);
  border-radius: 0 16px 16px 0;
  background: rgba(189, 129, 34, 0.07);
  color: #4f473e;
  font-size: 1.06em;
  font-style: italic;
}
.blog-article a { color: var(--bm-gold-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-article code { padding: 0.12em 0.35em; border-radius: 5px; background: var(--bm-paper-deep); }

.blog-toc {
  position: sticky;
  top: 112px;
  padding: 22px;
  border: 1px solid var(--bm-line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: var(--bm-shadow-sm);
  backdrop-filter: blur(12px);
}
.blog-toc-title {
  display: block;
  margin-bottom: 12px;
  color: var(--bm-gold-dark);
  font: 800 0.72rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.blog-toc ol { margin: 0; padding: 0; list-style: none; }
.blog-toc li + li { margin-top: 5px; }
.blog-toc a {
  display: block;
  padding: 7px 9px;
  border-left: 2px solid transparent;
  color: var(--bm-muted);
  text-decoration: none;
  font: 0.84rem/1.35 Arial, Helvetica, sans-serif;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.blog-toc a:hover,
.blog-toc a.active {
  border-left-color: var(--bm-gold);
  color: var(--bm-ink);
  background: rgba(189, 129, 34, 0.07);
}

.blog-author-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 25px;
  padding: 22px 24px;
  border: 1px solid var(--bm-line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(8, 16, 25, 0.98), rgba(21, 31, 42, 0.96));
  color: #fff8e9;
  box-shadow: var(--bm-shadow-sm);
}
.blog-author-monogram {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 189, 105, 0.55);
  border-radius: 50%;
  color: var(--bm-gold-light);
  font-size: 1.05rem;
  font-weight: 700;
}
.blog-author-card strong { color: var(--bm-gold-light); font-size: 1.08rem; }
.blog-author-card p { margin: 3px 0 0; color: rgba(255, 248, 233, 0.7); font-size: 0.9rem; }

#bmReadingProgress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.05);
}
#bmReadingProgress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--bm-gold-dark), var(--bm-gold-light));
  box-shadow: 0 0 15px rgba(227, 189, 105, 0.6);
}

#bmBackToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 189, 105, 0.42);
  border-radius: 50%;
  background: rgba(8, 16, 25, 0.92);
  color: var(--bm-gold-light);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
#bmBackToTop.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.bm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: min(92vw, 520px);
  padding: 13px 18px;
  border: 1px solid rgba(227, 189, 105, 0.35);
  border-radius: 999px;
  background: rgba(8, 16, 25, 0.96);
  color: #fff8e9;
  font: 700 0.82rem/1.4 Arial, Helvetica, sans-serif;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.bm-toast.visible { opacity: 1; transform: translate(-50%, 0); }

.blog-footer {
  border-top: 1px solid rgba(227, 189, 105, 0.2);
  background: var(--bm-night);
  color: rgba(255, 248, 233, 0.62);
  padding: 34px 0 52px;
}
.blog-footer-inner span:first-child { color: var(--bm-gold-light); font-weight: 700; }

@media (max-width: 1040px) {
  .blog-reading-layout { grid-template-columns: minmax(0, 820px); }
  .blog-toc {
    position: relative;
    top: auto;
    order: -1;
  }
  .blog-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
}

@media (max-width: 880px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-header-inner { min-height: auto; padding: 12px 0; }
  .blog-hero { min-height: 370px; }
}

@media (max-width: 680px) {
  .blog-header-inner,
  .blog-main,
  .blog-footer-inner { width: min(100% - 24px, 1240px); }
  .blog-header-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .blog-brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .blog-brand strong { font-size: 1rem; }
  .blog-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .blog-nav a,
  .blog-nav button { padding: 8px 13px; font-size: 0.76rem; }
  .blog-main { padding: 28px 0 58px; }
  .blog-hero { min-height: 410px; padding: 30px 24px 44px; border-radius: 22px; }
  .blog-hero::after { left: 24px; bottom: 25px; }
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-card-body { padding: 23px; }
  .blog-article-header { padding: 18px 4px 6px; }
  .blog-article-header h1 { font-size: clamp(2.35rem, 13vw, 4rem); }
  .blog-article-cover { border-radius: 18px; margin-top: 24px; }
  .blog-share-panel { padding: 18px; }
  .blog-share-heading { display: block; }
  .blog-share-heading p { margin-bottom: 12px; }
  .blog-share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-share-button { width: 100%; }
  .blog-reading-layout { gap: 18px; }
  .blog-toc { padding: 18px; }
  .blog-toc ol { grid-template-columns: 1fr; }
  .blog-article { padding: 30px 22px; border-radius: 18px; font-size: 1.05rem; line-height: 1.78; }
  .blog-article > p:first-child::first-letter { font-size: 3.6em; }
  .blog-author-card { grid-template-columns: 48px 1fr; padding: 18px; }
  .blog-author-monogram { width: 48px; height: 48px; }
  #bmBackToTop { right: 14px; bottom: 14px; }
}

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