/* Hotfix 097 — biblioteca de artigos integrada ao layout principal */

.af-articles-hero {
  position: relative;
  overflow: hidden;
  padding: 92px clamp(20px, 7vw, 96px) 56px;
  background:
    radial-gradient(circle at 10% 20%, rgba(201,151,82,.13), transparent 35%),
    linear-gradient(135deg, #07111f, #10243d);
  color: var(--text, #f5f2eb);
  border-bottom: 1px solid rgba(201,151,82,.16);
}

.af-articles-hero .af-shell,
.af-articles-section .af-shell {
  max-width: var(--max, 1180px);
  margin: 0 auto;
}

.af-articles-hero .af-eyebrow {
  margin: 0 0 18px;
  color: var(--gold2, #efc27d);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .26em;
  font-weight: 950;
}

.af-articles-hero h1 {
  margin: 0 0 22px;
  max-width: 1060px;
  color: #fff;
  font-size: clamp(2.45rem, 5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.af-articles-hero .af-lead {
  max-width: 980px;
  margin: 0 0 30px;
  color: #c8d1de;
  font-size: clamp(1.04rem, 1.8vw, 1.22rem);
  line-height: 1.82;
}

.af-article-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(210px, .75fr) minmax(140px, .42fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 32px;
  padding: 18px;
  border: 1px solid rgba(201,151,82,.32);
  border-radius: 22px;
  background: rgba(255,255,255,.045);
  box-shadow: 0 22px 56px rgba(0,0,0,.22);
}

.af-article-filters label {
  display: grid;
  gap: 7px;
  color: #c8d1de;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .04em;
}

.af-article-filters input,
.af-article-filters select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  padding: 0 14px;
  color: #fff;
  background: rgba(2,9,22,.72);
  outline: none;
  font: inherit;
}

.af-article-filters input::placeholder {
  color: rgba(200,209,222,.68);
}

.af-article-filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.af-article-filter-actions button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold2, #efc27d), var(--gold, #c99752));
  font-weight: 950;
  cursor: pointer;
  font: inherit;
}

.af-article-filter-actions a {
  color: var(--gold2, #efc27d);
  text-decoration: none;
  font-weight: 950;
  white-space: nowrap;
}

.af-articles-section {
  background: #06101b;
  color: #fff;
  border-top: 1px solid rgba(201,151,82,.14);
  padding: clamp(44px, 7vw, 74px) clamp(20px, 7vw, 96px);
}

.af-articles-section + .af-articles-section {
  padding-top: 24px;
}

.af-articles-section-head {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.af-articles-section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.035em;
}

.af-articles-section-head p {
  margin: 0;
  color: #c8d1de;
  max-width: 560px;
}

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

.af-article-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border: 1px solid rgba(201,151,82,.30);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(20,32,51,.95), rgba(8,15,26,.98));
  box-shadow: 0 18px 46px rgba(0,0,0,.22);
}

.af-article-card--featured {
  border-color: rgba(239,194,125,.48);
  background:
    radial-gradient(circle at top left, rgba(201,151,82,.11), transparent 18rem),
    linear-gradient(180deg, rgba(20,32,51,.97), rgba(8,15,26,.98));
}

.af-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #95a2b7;
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.af-article-card__meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #07111f;
  background: linear-gradient(135deg, var(--gold2, #efc27d), var(--gold, #c99752));
}

.af-article-card h2 {
  margin: 20px 0 14px;
  font-size: 1.32rem;
  line-height: 1.30;
  letter-spacing: -.025em;
}

.af-article-card h2 a {
  color: #fff;
  text-decoration: none;
}

.af-article-card h2 a:hover {
  color: var(--gold2, #efc27d);
}

.af-article-card p {
  margin: 0 0 14px;
  color: #c8d1de;
  line-height: 1.72;
  text-align: justify;
  hyphens: auto;
}

.af-article-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}

.af-article-card__foot small {
  color: #95a2b7;
}

.af-article-card__foot a {
  color: var(--gold2, #efc27d);
  text-decoration: none;
  font-weight: 950;
}

.af-article-pagination {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  color: #c8d1de;
}

.af-article-pagination a,
.af-article-pagination span {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201,151,82,.30);
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,.045);
}

.af-empty-card {
  padding: 30px;
  border: 1px dashed rgba(201,151,82,.32);
  border-radius: 22px;
  color: #c8d1de;
  background: rgba(255,255,255,.045);
}

.af-article-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.af-prose {
  max-width: 860px;
  color: #d6deea;
  font-size: 1.06rem;
  line-height: 1.9;
}

.af-prose h2 {
  font-size: 1.65rem;
  margin: 34px 0 12px;
  color: #fff;
}

.af-prose h3 {
  font-size: 1.25rem;
  margin: 26px 0 10px;
  color: #fff;
}

.af-prose p,
.af-prose li,
.af-prose h2,
.af-prose h3,
.af-article-card h2,
.af-article-card p,
.af-article-detail-hero h1,
.af-article-detail-hero .af-lead {
  text-align: justify;
  text-align-last: auto;
  hyphens: auto;
}

.af-sidebar-card {
  background: #fff;
  color: #132033;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(10,30,60,.06);
}

.af-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.af-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #132033;
  font-size: .84rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .af-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .af-article-filters {
    grid-template-columns: 1fr 1fr;
  }

  .af-article-filter-actions {
    grid-column: 1 / -1;
  }

  .af-article-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .af-articles-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .af-articles-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .af-article-grid,
  .af-article-filters {
    grid-template-columns: 1fr !important;
  }

  .af-article-filter-actions {
    display: grid;
  }

  .af-articles-section-head {
    display: block;
  }

  .af-article-card {
    min-height: auto;
  }

  .af-article-pagination {
    flex-direction: column;
  }

  .af-articles-hero h1 {
    font-size: 2.35rem;
  }

  .af-article-card h2,
  .af-article-card p,
  .af-prose p,
  .af-prose li,
  .af-prose h2,
  .af-prose h3 {
    text-align: justify !important;
  }
}
