/* ===== BLOG Codedbylarac =====
   Base (cores, fontes, header, ícones, botões) vem do style.css do site principal. */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.cbl-blog {
  background: var(--white);
}

/* Header: link "Blog" ativo */
.nav-links a.is-active {
  position: relative;
  color: #9670ee;
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: #b9a3ef;
}

/* ===== Hero do blog ===== */
.blog-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #1e1636 0%, #261a45 60%, #2c1d52 100%);
  color: #fff;
  padding: 56px 24px 18px;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 24px 48px;
}

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b9a3ef;
}

.blog-eyebrow::after {
  content: "";
  width: 56px;
  height: 1px;
  background: rgba(185, 163, 239, 0.7);
}

.blog-hero h1 {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 18px;
}

.blog-hero h1 span {
  display: block;
  color: #b9a3ef;
}

.blog-hero p {
  max-width: 540px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

/* Busca */
.blog-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.blog-search:focus-within {
  border-color: #b9a3ef;
  background: rgba(255, 255, 255, 0.08);
}

.blog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
}

.blog-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.blog-search input::-webkit-search-cancel-button {
  filter: invert(1);
}

/* Filtros de categoria */
.blog-filters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-pill:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.blog-pill.is-active {
  background: #9b7fe6;
  border-color: #9b7fe6;
  color: #fff;
}

/* ===== Lista de artigos ===== */
.blog-list {
  max-width: 1128px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.blog-results {
  margin-bottom: 18px;
  font-size: 16px;
  color: var(--muted);
}

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

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(59, 42, 138, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: #cdbdf0;
  box-shadow: 0 18px 40px rgba(59, 42, 138, 0.1);
}

.blog-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.blog-card-img {
  aspect-ratio: 340 / 128;
  overflow: hidden;
  background: #ece4fb;
}

.blog-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.04);
}

.blog-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ece4fb 0%, #d9cdf3 100%);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 16px 16px;
}

.blog-badge {
  align-self: flex-start;
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #ede7fb;
  color: #6b4fc7;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.blog-badge--dark {
  background: rgba(185, 163, 239, 0.18);
  color: #d4c6f7;
}

.blog-card-title {
  margin: 10px 0 6px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 14px;
}

.blog-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b6680;
}

.blog-card-arrow {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--violet-ink);
  border-radius: 50%;
  color: var(--violet-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover .blog-card-arrow {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Paginação */
.blog-pagination {
  margin-top: 40px;
}

.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.blog-pagination .page-numbers.current,
.blog-pagination a.page-numbers:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.blog-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

.blog-empty h2 {
  margin-bottom: 8px;
  font-size: 26px;
  color: var(--ink);
}

.blog-empty a {
  color: var(--violet-ink);
  font-weight: 700;
}

/* ===== Artigo aberto ===== */
.post-hero {
  background: linear-gradient(120deg, #1e1636 0%, #261a45 60%, #2c1d52 100%);
  color: #fff;
  padding: 50px 24px 110px;
}

.post-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.post-back {
  display: inline-block;
  margin-bottom: 22px;
  color: #b9a3ef;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.post-back:hover {
  color: #fff;
}

.post-hero .blog-badge {
  display: table;
  margin-bottom: 14px;
}

.post-hero h1 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

.post-article {
  max-width: 820px;
  margin: -80px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.post-cover {
  margin: 0 0 36px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(16, 10, 31, 0.18);
  background: #ece4fb;
}

.post-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* Texto do artigo */
.post-content {
  font-size: 18px;
  line-height: 1.75;
  color: #3a3448;
}

.post-content > * + * {
  margin-top: 1.1em;
}

.post-content h2 {
  margin-top: 1.8em;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.post-content h3 {
  margin-top: 1.5em;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.post-content a {
  color: var(--violet-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--accent);
}

.post-content ul,
.post-content ol {
  padding-left: 1.3em;
}

.post-content li + li {
  margin-top: 0.4em;
}

.post-content li::marker {
  color: #9670ee;
}

.post-content blockquote {
  margin-left: 0;
  padding: 18px 24px;
  border-left: 3px solid #9670ee;
  border-radius: 0 12px 12px 0;
  background: #f4f0fc;
  color: var(--ink);
  font-style: italic;
}

.post-content img,
.post-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-content figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: #6b6680;
  text-align: center;
}

.post-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1edf9;
  font-size: 0.9em;
}

.post-content pre {
  overflow-x: auto;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #f1edf9;
  font-size: 15px;
}

.post-content pre code {
  padding: 0;
  background: none;
}

/* Convite no fim do artigo */
.post-cta {
  margin: 56px 0 10px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(135deg, #f8f6fd 0%, #efe9fb 100%);
}

.post-cta h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.post-cta p {
  color: var(--muted);
  font-size: 15.5px;
}

.post-cta .about-btn {
  margin-top: 0;
  flex-shrink: 0;
  font-size: 16px;
  padding: 12px 26px;
}

.blog-related {
  padding-top: 56px;
}

.blog-related-title {
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ===== Rodapé do blog ===== */
.blog-footer {
  background: #f4f1fb;
  border-top: 1px solid #e0d6f6;
}

.blog-footer-inner {
  max-width: 1128px;
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.blog-footer .logo-text {
  font-size: 24px;
}

.blog-footer .social {
  margin-top: 0;
}

.blog-footer .social a {
  border-color: var(--violet-ink);
  color: var(--violet-ink);
}

.blog-footer .social a:hover {
  background-color: var(--violet-ink);
  border-color: var(--violet-ink);
  color: #fff;
}

.blog-footer .footer-bottom {
  background: var(--ink);
  padding: 16px 12px;
  text-align: center;
}

.blog-footer .footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Responsivo ===== */
@media (max-width: 1000px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .blog-hero-inner {
    grid-template-columns: 1fr;
  }

  .blog-search {
    max-width: 520px;
  }
}

@media (max-width: 680px) {
  .blog-hero {
    padding: 40px 18px 22px;
  }

  .blog-hero p {
    font-size: 16px;
  }

  .blog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 4px -18px 0;
    padding: 0 18px 6px;
    scrollbar-width: none;
  }

  .blog-filters::-webkit-scrollbar {
    display: none;
  }

  .blog-pill {
    flex-shrink: 0;
    font-size: 14px;
    padding: 8px 18px;
  }

  .blog-list {
    padding: 22px 16px 60px;
  }

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

  .post-hero {
    padding: 36px 18px 90px;
  }

  .post-article {
    padding: 0 16px;
  }

  .post-content {
    font-size: 17px;
  }

  .post-content h2 {
    font-size: 24px;
  }

  .post-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px;
  }

  .blog-footer-inner {
    flex-direction: column;
  }
}

/* Ícone da lupa (o site principal não usa, então fica só aqui) */
.fa-magnifying-glass { --fa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E"); --fa-w: 1em; }
