/* ===================== BLOG — HERO ===================== */

.blog-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  padding-block: calc(var(--header-height) + clamp(2rem, 5vw, 3.5rem)) clamp(3.5rem, 7vw, 5.5rem);
}

.blog-hero-decor {
  position: absolute;
  inset: 0;
  background-image: url("./assets/pattern-corrente.png");
  background-size: 380px;
  background-repeat: repeat;
  opacity: 0.08;
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.blog-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--blue-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.blog-hero-text h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 2.4vw + 1rem, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.blog-hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 48ch;
}

.blog-hero-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.blog-pill {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.blog-pill:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); }

/* ----- Cartão em destaque ----- */

.blog-featured-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: block;
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.blog-featured-card:hover { transform: translateY(-4px); box-shadow: 0 36px 70px -18px rgba(0, 0, 0, 0.5); }

.blog-featured-cover {
  height: clamp(140px, 20vw, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-featured-cover svg { width: 56px; height: 56px; color: rgba(255, 255, 255, 0.85); }

.blog-featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-featured-body { padding: clamp(1.5rem, 3vw, 2rem); }

.blog-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(81, 109, 244, 0.12);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.blog-tag--reforma { background: rgba(81, 109, 244, 0.12); color: var(--navy); }
.blog-tag--dp { background: rgba(20, 184, 138, 0.12); color: #0F8F6B; }

.blog-meta {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: #8991A3;
}

.blog-featured-body h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.32;
  color: var(--navy-deep);
}

.blog-excerpt {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #5B6478;
}

.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
}

.blog-readmore svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.blog-card:hover .blog-readmore svg,
.blog-featured-card:hover .blog-readmore svg { transform: translateX(4px); }

.blog-hero.is-visible [data-animate] { opacity: 1; transform: translateY(0); }
.blog-hero.is-visible .blog-badge { transition-delay: 0.02s; }
.blog-hero.is-visible h1 { transition-delay: 0.08s; }
.blog-hero.is-visible .blog-hero-lead { transition-delay: 0.14s; }
.blog-hero.is-visible .blog-hero-pills { transition-delay: 0.2s; }
.blog-hero.is-visible .blog-featured-card { transition-delay: 0.16s; }

/* ===================== BLOG — FILTROS ===================== */

.blog-filters {
  background: var(--white);
  border-bottom: 1px solid rgba(11, 17, 86, 0.08);
  padding-block: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.blog-filters-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-filter-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.blog-chip {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(11, 17, 86, 0.14);
  background: var(--white);
  color: var(--navy-deep);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.blog-chip:hover { border-color: var(--blue); }

.blog-chip.is-active {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: var(--white);
}

.blog-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.blog-search svg {
  position: absolute;
  left: 0.9rem;
  width: 18px;
  height: 18px;
  color: #9AA1B4;
  pointer-events: none;
}

.blog-search input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 999px;
  border: 1.5px solid rgba(11, 17, 86, 0.14);
  font: inherit;
  font-size: 0.9rem;
  color: var(--navy-deep);
}

.blog-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(81, 109, 244, 0.14);
}

/* ===================== BLOG — GRADE ===================== */

.blog-grid-section {
  background: var(--white);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.blog-grid-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.blog-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: block;
  background: var(--white);
  border: 1px solid rgba(11, 17, 86, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 40px -30px rgba(11, 17, 86, 0.25);
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.4s var(--ease), display 0.4s allow-discrete;
}

.blog-card:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -24px rgba(11, 17, 86, 0.3); }

.blog-card.is-filtered-out { display: none; }

.blog-card-cover {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-card-cover svg { width: 44px; height: 44px; color: rgba(255, 255, 255, 0.85); }

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-cover--reforma { background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 100%); }
.blog-cover--dp { background: linear-gradient(150deg, var(--navy-deep) 0%, #16607A 100%); }

.blog-card-body { padding: 1.5rem; }

.blog-card-body h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--navy-deep);
}

.blog-empty-state {
  text-align: center;
  padding-block: 3rem;
  color: #7A8194;
  font-size: 0.95rem;
}

.blog-grid-fallback {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.blog-grid-fallback a {
  display: block;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(11, 17, 86, 0.12);
  color: var(--navy-deep);
  font-weight: 600;
  text-decoration: none;
}

.blog-grid-section.is-visible [data-animate] { opacity: 1; transform: translateY(0); }
.blog-grid-section.is-visible .blog-card:nth-child(1) { transition-delay: 0.04s; }
.blog-grid-section.is-visible .blog-card:nth-child(2) { transition-delay: 0.1s; }
.blog-grid-section.is-visible .blog-card:nth-child(3) { transition-delay: 0.16s; }

@media (max-width: 900px) {
  .blog-hero-inner { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-filters { position: static; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filters-inner { flex-direction: column; align-items: stretch; }
  .blog-search { min-width: 0; }
}

/* ===================== ARTIGO DO BLOG ===================== */

.post-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  padding-block: calc(var(--header-height) + clamp(2rem, 5vw, 3.5rem)) clamp(2.5rem, 5vw, 3.5rem);
}

.post-hero-decor {
  position: absolute;
  inset: 0;
  background-image: url("./assets/pattern-corrente.png");
  background-size: 380px;
  background-repeat: repeat;
  opacity: 0.07;
  pointer-events: none;
}

.post-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.post-hero-inner > * { max-width: 760px; }

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.post-breadcrumb a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--white); }

.post-hero-inner .blog-tag {
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.post-hero-inner .blog-tag--reforma { color: var(--blue-light); }
.post-hero-inner .blog-tag--dp { color: #FFFFFF; }

.post-hero-inner h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 2.4vw + 1rem, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--white);
}

.post-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
}

.post-hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.post-hero-meta svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ----- Corpo do artigo ----- */

.post-body-section {
  background: var(--white);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.post-layout {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.post-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.post-cover {
  margin: 0 0 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 50px -28px rgba(11, 17, 86, 0.35);
}

.post-cover img {
  width: 100%;
  height: clamp(200px, 30vw, 360px);
  object-fit: cover;
  display: block;
}

/* ----- Sidebar "Leia também" ----- */

.post-sidebar { position: sticky; top: calc(var(--header-height) + 2rem); }

.post-sidebar-card {
  background: var(--white);
  border: 1px solid rgba(11, 17, 86, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px -32px rgba(11, 17, 86, 0.25);
}

.post-sidebar-title {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.post-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.post-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-decoration: none;
}

.post-sidebar-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
}

.post-sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-sidebar-item-body { min-width: 0; }

.post-sidebar-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.3rem;
}

.post-sidebar-item-body h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--navy-deep);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s var(--ease);
}

.post-sidebar-item:hover h4 { color: var(--blue); }

.post-sidebar-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(11, 17, 86, 0.08);
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-deep);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.post-sidebar-more svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.post-sidebar-more:hover { color: var(--blue); }
.post-sidebar-more:hover svg { transform: translateX(3px); }

@media (max-width: 1000px) {
  .post-page-grid { grid-template-columns: minmax(0, 1fr); }
  .post-sidebar { position: static; max-width: 480px; }
}

.post-content p {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: #3D4457;
}

.post-content > p:first-of-type {
  font-size: 1.12rem;
  color: var(--navy-deep);
}

.post-content h2 {
  margin: 2.5rem 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--navy-deep);
  scroll-margin-top: 90px;
}

.post-content h3 {
  margin: 2rem 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--navy-deep);
  scroll-margin-top: 90px;
}

.post-content h4 {
  margin: 1.5rem 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-deep);
}

.post-content strong { color: var(--navy-deep); font-weight: 700; }

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-content li {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #3D4457;
}

.post-content a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.post-table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
  border: 1px solid rgba(11, 17, 86, 0.1);
  border-radius: 14px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}

.post-content th {
  text-align: left;
  padding: 0.85rem 1.1rem;
  background: rgba(11, 17, 86, 0.04);
  color: var(--navy-deep);
  font-weight: 700;
  border-bottom: 1px solid rgba(11, 17, 86, 0.1);
  white-space: nowrap;
}

.post-content td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(11, 17, 86, 0.06);
  color: #3D4457;
  vertical-align: top;
}

.post-content tr:last-child td { border-bottom: none; }

.post-lead-card {
  background: linear-gradient(180deg, #EEF2FA 0%, #E7ECF6 100%);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin: 0 0 2rem;
}

.post-lead-card p { margin: 0; font-size: 1rem; color: var(--navy-deep); }
.post-lead-card p + p { margin-top: 0.75rem; }

.post-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
}

.post-inline-cta p {
  margin: 0;
  color: var(--white);
  font-weight: 600;
  font-size: 1.02rem;
  max-width: 46ch;
}

.post-inline-cta .btn { flex-shrink: 0; }

/* ----- FAQ ----- */

.post-faq {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-faq-item {
  border: 1px solid rgba(11, 17, 86, 0.1);
  border-radius: 14px;
  overflow: hidden;
}

.post-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--white);
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy-deep);
  cursor: pointer;
}

.post-faq-question svg { flex-shrink: 0; width: 18px; height: 18px; transition: transform 0.3s var(--ease); color: var(--blue); }
.post-faq-item.is-open .post-faq-question svg { transform: rotate(180deg); }

.post-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}

.post-faq-item.is-open .post-faq-answer { grid-template-rows: 1fr; }

.post-faq-answer-inner { overflow: hidden; }

.post-faq-answer p {
  margin: 0;
  padding: 0 1.4rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #5B6478;
}

/* ----- Fontes / links internos ----- */

.post-sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(11, 17, 86, 0.1);
}

.post-sources h2 { margin-top: 0; }

.post-sources ul { padding-left: 1.1rem; }
.post-sources li { font-size: 0.9rem; word-break: break-word; }

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-deep);
  text-decoration: none;
}

.post-back-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.post-back-link:hover { color: var(--blue); }

/* ----- Outros posts ----- */

.post-related {
  background: linear-gradient(180deg, #EEF2FA 0%, #E7ECF6 100%);
  padding-block: clamp(3rem, 6vw, 4rem);
}

.post-related-inner {
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.post-related-inner h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy-deep);
}

@media (max-width: 640px) {
  .post-inline-cta { flex-direction: column; align-items: flex-start; }
  .post-inline-cta .btn { width: 100%; text-align: center; }
}

/* ----- Modelo de documento (ex.: advertência) dentro do artigo ----- */

.post-doc-model {
  background: #FAFBFF;
  border: 1.5px dashed rgba(11, 17, 86, 0.2);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin: 0 0 1.5rem;
}

.post-doc-model p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.post-doc-model p:last-child { margin-bottom: 0; }

.post-doc-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--navy-deep);
  margin-bottom: 1.25rem !important;
}

.post-doc-sign { color: #5B6478; }
