/* Neurosynapsis Blog — editorial system */
:root {
  --blog-ink: #241b31;
  --blog-muted: #746b7d;
  --blog-plum: #5a2c78;
  --blog-plum-deep: #3d1d55;
  --blog-lilac: #eee8f5;
  --blog-mint: #dff3eb;
  --blog-paper: #fbfaf8;
  --blog-line: rgba(61, 29, 85, .12);
  --blog-shadow: 0 20px 60px rgba(48, 27, 63, .09);
  --blog-ease: cubic-bezier(.23, 1, .32, 1);
}

.blog-page {
  background: var(--blog-paper);
  color: var(--blog-ink);
}

/* Acessibilidade: invisível no uso normal, disponível para teclado. */
.blog-page .skip-link,
.article-page .skip-link {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 100;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--blog-plum-deep);
  color: #fff;
  clip-path: inset(50%);
  white-space: nowrap;
}

.blog-page .skip-link:focus,
.article-page .skip-link:focus {
  width: auto;
  height: auto;
  padding: 10px 14px;
  overflow: visible;
  clip-path: none;
  box-shadow: 0 10px 24px rgba(61, 29, 85, .18);
}

.blog-page .hero-background {
  min-height: 0 !important;
  background: transparent;
}

.blog-page .main-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--blog-line);
  background: rgba(251, 250, 248, .88);
}

.blog-page .navbar {
  max-width: 1240px;
  min-height: 78px;
  padding: 0 28px;
}

.blog-page .nav-logo {
  color: var(--blog-ink);
}

.blog-page .brand-name {
  color: var(--blog-plum-deep);
  letter-spacing: -.03em;
}

.blog-page .brand-sub {
  color: var(--blog-muted);
}

.blog-page .nav-item {
  color: var(--blog-muted);
  font-size: .84rem;
  font-weight: 700;
}

.blog-page .nav-item:hover,
.blog-page .nav-item.active {
  color: var(--blog-plum);
}

.blog-page .btn-appointment {
  background: var(--blog-plum);
  box-shadow: 0 10px 24px rgba(90, 44, 120, .18);
}

.blog-page .btn-appointment:hover {
  background: var(--blog-plum-deep);
}

.blog-main {
  overflow: hidden;
}

.blog-hero {
  position: relative;
  padding: clamp(68px, 10vw, 128px) 24px 78px;
  background:
    radial-gradient(circle at 84% 18%, rgba(221, 243, 235, .9) 0, rgba(221, 243, 235, 0) 29%),
    radial-gradient(circle at 11% 56%, rgba(235, 224, 247, .9) 0, rgba(235, 224, 247, 0) 30%),
    var(--blog-paper);
}

.blog-hero::before {
  position: absolute;
  top: 34px;
  left: calc(50% + 310px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b58bd0;
  box-shadow: -42px 16px 0 #b7dfd0, 54px 68px 0 #e2bfcc;
  content: "";
}

.blog-hero-content {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.blog-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blog-plum);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.blog-eyebrow::before,
.section-eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.blog-title {
  max-width: 880px;
  margin: 20px auto 20px;
  color: var(--blog-ink);
  font-size: clamp(2.65rem, 6vw, 5.55rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .98;
}

.blog-title .highlight {
  color: var(--blog-plum);
}

.blog-subtitle {
  max-width: 610px;
  margin: 0 auto;
  color: var(--blog-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
}

.blog-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 17px;
  margin-top: 30px;
  color: var(--blog-muted);
  font-size: .82rem;
}

.blog-hero-meta strong {
  color: var(--blog-plum-deep);
  font-size: 1.05rem;
}

.meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bba6c7;
}

.blog-section {
  padding: 22px 24px 106px;
}

.blog-section .container {
  max-width: 1170px;
  margin: 0 auto;
}

.blog-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.blog-section-heading h2 {
  margin-top: 11px;
  color: var(--blog-ink);
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  letter-spacing: -.055em;
}

.blog-search {
  display: flex;
  align-items: center;
  width: min(100%, 290px);
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: var(--blog-plum);
  box-shadow: 0 8px 24px rgba(61, 29, 85, .04);
}

.blog-search:focus-within {
  border-color: rgba(90, 44, 120, .45);
  box-shadow: 0 0 0 4px rgba(90, 44, 120, .08);
}

.blog-search-icon {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0;
}

.blog-search-icon::after {
  width: 6px;
  height: 1.5px;
  margin: 10px 0 0 10px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.blog-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--blog-ink);
  font: inherit;
  font-size: .84rem;
}

.blog-search input::placeholder {
  color: #a39aa9;
}

.blog-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-btn {
  flex: 0 0 auto;
  padding: 9px 17px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  background: transparent;
  color: var(--blog-muted);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  transition: background 180ms var(--blog-ease), color 180ms var(--blog-ease), border-color 180ms var(--blog-ease), transform 180ms var(--blog-ease);
}

.filter-btn:hover {
  border-color: rgba(90, 44, 120, .4);
  color: var(--blog-plum);
  transform: translateY(-1px);
}

.filter-btn.active {
  border-color: var(--blog-plum);
  background: var(--blog-plum);
  color: #fff;
  box-shadow: 0 8px 18px rgba(90, 44, 120, .15);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 22px;
}

.blog-card {
  position: relative;
  display: flex;
  min-width: 0;
  grid-column: auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(61, 29, 85, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 7px 24px rgba(61, 29, 85, .045);
  transition: transform 220ms var(--blog-ease), box-shadow 220ms var(--blog-ease), border-color 220ms var(--blog-ease);
}

.blog-card:hover,
.blog-card:focus-visible {
  border-color: rgba(90, 44, 120, .26);
  box-shadow: var(--blog-shadow);
  outline: 0;
  transform: translateY(-5px);
}

.blog-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(130deg, #e0f3eb, #eee5f7);
}

.blog-card-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(32, 19, 40, .14));
  content: "";
  pointer-events: none;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--blog-ease);
}

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

.image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(90, 44, 120, .66);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.image-placeholder::before {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(90, 44, 120, .2);
  border-radius: 50%;
  content: "";
}

.blog-card-content {
  display: flex;
  flex: 1;
  min-height: 248px;
  flex-direction: column;
  padding: 22px 22px 20px;
}

.blog-card-category,
.article-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--blog-plum);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.blog-card-category::before,
.article-kicker::before {
  width: 18px;
  height: 1px;
  margin-right: 8px;
  background: currentColor;
  content: "";
}

.blog-card-title {
  margin: 12px 0 10px;
  color: var(--blog-ink);
  font-size: 1.17rem;
  letter-spacing: -.035em;
  line-height: 1.22;
}

.blog-card-excerpt {
  display: -webkit-box;
  flex: 1;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--blog-muted);
  font-size: .86rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--blog-line);
  color: #978c9d;
  font-size: .72rem;
}

.blog-card-author {
  overflow: hidden;
  color: var(--blog-plum);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--blog-plum);
  font-size: .76rem;
  font-weight: 800;
}

.blog-card-link span {
  font-size: 1.05rem;
  transition: transform 180ms var(--blog-ease);
}

.blog-card:hover .blog-card-link span {
  transform: translateX(4px);
}

.blog-empty {
  padding: 75px 24px;
  border: 1px dashed rgba(90, 44, 120, .25);
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
  color: var(--blog-muted);
  text-align: center;
}

.blog-empty h3 {
  margin: 14px 0 7px;
  color: var(--blog-ink);
  font-size: 1.3rem;
}

.empty-icon {
  color: var(--blog-plum);
  font-size: 1.5rem;
}

.blog-footer {
  border-top: 1px solid var(--blog-line);
  background: #f5f1f6;
}

.blog-footer .container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 48px 24px 22px;
}

.blog-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.blog-footer h3,
.blog-footer h4 {
  color: var(--blog-ink);
}

.blog-footer h3 {
  font-size: 1.1rem;
  letter-spacing: -.03em;
}

.blog-footer h4 {
  margin-bottom: 12px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.blog-footer p,
.blog-footer a {
  color: var(--blog-muted);
  font-size: .8rem;
  line-height: 1.7;
  text-decoration: none;
}

.blog-footer a {
  display: block;
  margin-bottom: 5px;
}

.blog-footer a:hover {
  color: var(--blog-plum);
}

.blog-footer-bottom {
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid var(--blog-line);
}

.blog-footer-bottom p {
  font-size: .72rem;
}

.skeleton-card {
  height: 385px;
  border-radius: 18px;
  background: linear-gradient(90deg, #f0edf1 25%, #faf9f8 37%, #f0edf1 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

/* Article page */
.article-page {
  background: var(--blog-paper);
  color: var(--blog-ink);
}

.article-page .main-header {
  border-bottom: 1px solid var(--blog-line);
  background: rgba(251, 250, 248, .92);
}

.article-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 38px 24px 105px;
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 54px;
  color: #958b9d;
  font-size: .76rem;
}

.article-breadcrumbs a {
  color: var(--blog-plum);
  font-weight: 800;
  text-decoration: none;
}

.article-breadcrumbs a:hover {
  text-decoration: underline;
}

.article-header {
  max-width: 870px;
  margin: 0 auto 38px;
  text-align: center;
}

.article-title {
  margin: 17px 0 21px;
  color: var(--blog-ink);
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .99;
}

.article-excerpt {
  max-width: 680px;
  margin: 0 auto;
  color: var(--blog-muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 24px;
  color: #958b9d;
  font-size: .78rem;
}

.article-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c7b9ce;
}

.article-cover {
  position: relative;
  max-width: 1020px;
  height: clamp(260px, 48vw, 510px);
  margin: 0 auto 58px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(130deg, #e0f3eb, #eee5f7);
  box-shadow: 0 20px 55px rgba(61, 29, 85, .1);
}

.article-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(32, 19, 40, .14));
  content: "";
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover .image-placeholder {
  font-size: .78rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 700px) 220px;
  justify-content: center;
  gap: 68px;
}

.article-content {
  color: #403747;
  font-size: 1.06rem;
  line-height: 1.92;
}

.article-content p {
  margin: 0 0 1.45em;
}

.article-content strong,
.article-content b {
  color: var(--blog-plum-deep);
  font-weight: 800;
}

.article-content em,
.article-content i {
  color: #624f6c;
}

.article-content a {
  color: var(--blog-plum);
  font-weight: 700;
}

.article-content code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0eaf4;
  color: var(--blog-plum-deep);
  font-size: .88em;
}

.article-aside {
  align-self: start;
  padding-top: 5px;
}

.article-aside-card {
  padding: 19px 0;
  border-top: 1px solid var(--blog-line);
}

.article-aside-card:last-child {
  border-bottom: 1px solid var(--blog-line);
}

.article-aside-label {
  display: block;
  margin-bottom: 6px;
  color: #a092a6;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.article-aside-value {
  color: var(--blog-ink);
  font-size: .82rem;
  font-weight: 800;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  color: var(--blog-plum);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.article-back:hover {
  color: var(--blog-plum-deep);
}

.article-error {
  max-width: 620px;
  margin: 80px auto;
  padding: 50px 28px;
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.article-error h1 {
  margin-bottom: 12px;
  color: var(--blog-ink);
  font-size: 2rem;
  letter-spacing: -.05em;
}

.article-error p {
  margin-bottom: 24px;
  color: var(--blog-muted);
}

.article-error a {
  color: var(--blog-plum);
  font-weight: 800;
  text-decoration: none;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-card { grid-column: auto; }
  .blog-card-image { aspect-ratio: 16 / 9; height: auto; }
  .article-layout { grid-template-columns: minmax(0, 700px); }
  .article-aside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 680px) {
  .blog-page .navbar,
  .article-page .navbar { padding: 0 18px; }
  .blog-hero { padding: 70px 18px 60px; }
  .blog-title { font-size: clamp(2.45rem, 13vw, 4rem); }
  .blog-hero-meta { flex-direction: column; gap: 8px; }
  .meta-divider { display: none; }
  .blog-section { padding: 12px 18px 72px; }
  .blog-section-heading { align-items: stretch; flex-direction: column; }
  .blog-search { width: 100%; }
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-card { grid-column: auto; }
  .blog-card-image { aspect-ratio: 16 / 9; height: auto; }
  .blog-card-content { min-height: 230px; }
  .blog-footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-footer-brand { grid-column: 1 / -1; }
  .article-shell { padding: 25px 18px 75px; }
  .article-breadcrumbs { margin-bottom: 37px; }
  .article-title { font-size: clamp(2.35rem, 13vw, 3.6rem); }
  .article-cover { height: 230px; margin-bottom: 38px; border-radius: 16px; }
  .article-content { font-size: 1rem; line-height: 1.82; }
  .article-aside { grid-template-columns: 1fr 1fr; gap: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card-image img,
  .filter-btn,
  .blog-card-link span { transition: none; }
  .skeleton-card { animation: none; }
}
