/* Blog listing and article layouts use the existing editorial shell. */
.blog-page .blog-section {
  padding-bottom: clamp(52px, 7vw, 96px);
}

.blog-page .blog-intro {
  max-width: 24ch;
  margin: 0 0 clamp(28px, 5vw, 64px);
  color: var(--light);
  font-size: clamp(36px, 5.7vw, 80px);
  font-weight: 550;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.blog-tools {
  display: grid;
  grid-template-columns: minmax(200px, .8fr) minmax(0, 1.5fr) auto;
  align-items: end;
  gap: 16px 24px;
  padding: clamp(18px, 3.2vw, 38px);
  border: 1px solid var(--rule-on-shell);
  border-radius: var(--radius-card);
  background: var(--surface-inset);
}

.blog-tools :is(label, #topic-label) {
  display: block;
  margin: 0 0 8px;
  color: var(--text-on-shell);
  font-size: 14px;
  font-weight: 650;
}

.blog-search {
  min-width: 0;
}

.blog-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #64847f;
  border-radius: var(--radius-field);
  font: inherit;
  font-size: 16px;
  color: var(--text-on-paper);
  background: #fcfef9;
}

.blog-search input:disabled {
  background: #e4efe5;
}

.blog-page :is(input, button) {
  scroll-margin-block: 84px;
}

.topic-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-buttons button,
.clear-filters {
  min-height: 44px;
  color: var(--light);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}

.topic-buttons button {
  padding: 8px 15px;
  border: 1px solid #c4eee172;
  border-radius: var(--radius-pill);
  background: none;
}

.topic-buttons button[aria-pressed="true"],
.topic-buttons button:enabled:is(:hover, :focus-visible) {
  border-color: var(--light);
  color: var(--text-on-paper);
  background: var(--light);
}

.topic-buttons button:disabled {
  cursor: default;
}

.clear-filters {
  padding: 8px 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.clear-filters:disabled {
  color: var(--text-soft);
  text-decoration: none;
  cursor: default;
}

.search-note {
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-size: 14px;
}

.result-count {
  margin: 20px 0 14px;
  font-size: 14px;
  font-weight: 650;
}

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

.mc-legacy-study .legacy-site .blog-card {
  min-width: 0;
  background: var(--surface-inset);
  border: 1px solid var(--rule-on-shell);
  border-radius: var(--radius-card);
}

.blog-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: inherit;
  color: var(--text-on-shell);
  text-decoration: none;
}

.blog-card-image,
.article-image {
  overflow: hidden;
  background: var(--surface-inset);
}

.blog-card-image {
  aspect-ratio: 1.6;
  border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
}

.blog-card-image img,
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-overlay {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 32px);
}

.blog-card-topic,
.article-topic {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin-bottom: 12px;
  color: var(--light);
  font-size: clamp(24px, 2.5vw, 35px);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 550;
  text-wrap: pretty;
}

.blog-card-excerpt {
  flex: 1;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.62;
}

.read-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--rule-on-shell);
  color: var(--light);
  font-size: 14px;
  font-weight: 650;
}

.blog-card a:is(:hover, :focus-visible) .read-example {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mc-legacy-study .legacy-site .blog-card:focus-within,
.mc-legacy-study .legacy-site .blog-card:hover {
  border-color: #d0e9e180;
}

.blog-card[hidden],
.empty-results[hidden] {
  display: none;
}

.empty-results {
  border-radius: var(--radius-card);
  padding: clamp(22px, 4vw, 42px);
  color: var(--text-on-paper);
  background: var(--surface-paper);
}

.empty-results h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3.1vw, 40px);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.empty-results .clear-filters {
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid var(--surface-inset);
  border-radius: var(--radius-pill);
  color: var(--light);
  background: var(--surface-inset);
  text-decoration: none;
}

.empty-results .clear-filters:is(:hover, :focus-visible) {
  color: var(--text-on-paper);
  background: var(--light);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: clamp(20px, 4vw, 54px);
  align-items: start;
}

.article-paper {
  min-width: 0;
  padding: clamp(22px, 4vw, 58px);
  border: 1px solid var(--rule-on-shell);
  border-radius: var(--radius-card);
  background: var(--surface-paper);
}

.article-breadcrumb {
  margin-bottom: clamp(20px, 4vw, 42px);
  font-size: 14px;
}

.article-breadcrumb a {
  display: inline-block;
  padding-block: 8px;
  text-underline-offset: 4px;
}

.article-paper .article-topic {
  color: #315f59;
}

.article-paper h1 {
  max-width: 22ch;
  margin-bottom: 20px;
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight: 550;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.article-paper .article-lead {
  max-width: 57ch;
  margin-bottom: clamp(24px, 3.5vw, 46px);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.6;
}

.article-image {
  aspect-ratio: 1.65;
  border-radius: var(--radius-media);
}

.article-image img {
  object-position: 50% 50%;
}

.article-paper[data-article-topic="pedagogico"] img {
  object-position: 50% 42%;
}

.article-paper[data-article-topic="incentivo"] img {
  object-position: 50% 54%;
}

.article-paper[data-article-topic="eventos"] img {
  object-position: 50% 48%;
}

.article-copy {
  max-width: 66ch;
  margin-top: clamp(25px, 4vw, 50px);
  font-size: 17px;
  line-height: 1.75;
}

.article-copy :is(section + section, h2:not(:first-child)) {
  margin-top: 1.6em;
}

.article-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.035em;
  text-wrap: pretty;
}

.article-copy p + p {
  margin-top: 14px;
}

.article-end {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #123e4330;
}

.article-end a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 650;
  text-underline-offset: 4px;
}

.blog-sidebar {
  min-width: 0;
}

.mc-legacy-study .legacy-site .blog-sidebar .blog-topic-links {
  padding: 20px;
  border: 1px solid var(--rule-on-shell);
  border-radius: var(--radius-card);
  color: var(--text-on-shell);
  background: var(--surface-inset);
}

.mc-legacy-study .legacy-site .blog-sidebar .blog-topic-links h2 {
  color: var(--light);
  font-size: 23px;
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 10px;
}

.blog-topic-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.4;
  text-underline-offset: 4px;
}

.blog-topic-links a + a {
  border-top: 1px solid var(--rule-on-shell);
}

.mc-legacy-study .legacy-site .blog-sidebar .blog-topic-links a:focus-visible {
  outline-color: var(--light);
}

.blog-sidebar .back-to-blog {
  margin-top: 16px;
}

@media (max-width: 1000px) {
  .blog-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .blog-search {
    grid-column: 1 / -1;
  }

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

@media (max-width: 790px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-tools,
  .blog-card-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-tools .clear-filters {
    justify-self: start;
  }

  .article-image {
    aspect-ratio: 1.35;
  }

  .article-copy {
    font-size: 16px;
  }
}
