/* ==========================================================================
   SPTECH — Notícias (listagem e detalhe)
   Depende de styles.css e course.css (hero, breadcrumb).
   ========================================================================== */

.news-hero { padding-bottom: clamp(24px, 4vw, 40px); }
.news-hero .c-hero__grid { grid-template-columns: 1fr; max-width: 820px; }

/* Ferramentas da listagem */
.news-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.news-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.news-cats button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
.news-cats button b { padding: 1px 7px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-size: 0.78rem; }
.news-cats button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.news-cats button[aria-pressed="true"] b { background: rgba(255, 255, 255, 0.15); color: #fff; }
.news-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.news-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 44px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font: inherit;
}
.news-search input:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.news-search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); }

/* Cards */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.news-grid li[hidden] { display: none; }
.ncard {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.ncard:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.ncard__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.ncard:hover .ncard__img img { transform: scale(1.04); }
.ncard__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.ncard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.ncat {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 10%, #fff);
  color: #c3004a;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ncard h3 { color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; }
.ncard p { font-size: 0.96rem; }
.ncard__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; }
.ncard__more svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.ncard:hover .ncard__more svg { transform: translateX(4px); }

/* Destaque (mais recente) */
.news-grid li.is-featured { grid-column: 1 / -1; }
.news-grid li.is-featured .ncard { display: grid; grid-template-columns: 1.15fr 0.85fr; }
.news-grid li.is-featured .ncard__img { aspect-ratio: auto; min-height: 320px; }
.news-grid li.is-featured .ncard__body { justify-content: center; padding: clamp(24px, 4vw, 44px); }
.news-grid li.is-featured h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.news-grid li.is-featured p { font-size: 1.05rem; }
@media (max-width: 960px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-grid li.is-featured .ncard { grid-template-columns: 1fr; }
  .news-grid li.is-featured .ncard__img { min-height: 0; aspect-ratio: 16 / 10; }
}
.news-empty { padding: 32px; border-radius: var(--radius-lg); background: var(--bg-soft); color: var(--muted); text-align: center; }
.news-empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; }

/* Paginação (usada no WordPress) */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager span {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-weight: 700;
}
.pager .current { background: var(--ink); color: #fff; box-shadow: none; }

/* --------------------------------------------------------------------------
   Detalhe da notícia
   -------------------------------------------------------------------------- */
.article-hero { padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 0; }
.article-head { max-width: 820px; margin-inline: auto; }
.article-head h1 {
  margin: 16px 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: 0.92rem; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 16px; height: 16px; }
.article-cover { max-width: 1040px; margin: clamp(24px, 4vw, 40px) auto 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.article-cover figcaption { padding: 10px 16px; background: var(--bg-soft); color: var(--muted); font-size: 0.85rem; }

.article-body { max-width: 720px; margin: clamp(32px, 5vw, 56px) auto 0; font-size: clamp(1.06rem, 1.3vw, 1.16rem); line-height: 1.8; color: #3d4659; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2, .article-body h3 { color: var(--ink); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 1.6em; }
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.article-body img { border-radius: var(--radius); }
.article-body blockquote { margin: 1.6em 0; padding-left: 22px; border-left: 5px solid var(--pink); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.35; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body > p:first-of-type::first-letter {
  float: left;
  margin: 0.06em 0.12em 0 0;
  color: var(--pink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.4em;
  line-height: 0.85;
}

.article-foot { max-width: 720px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.share { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.share a, .share button {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.share a:hover, .share button:hover { background: var(--ink); color: #fff; }
.share svg { width: 18px; height: 18px; }
.share .copied { width: auto; padding: 0 12px; font-size: 0.82rem; }

.related { margin-top: clamp(56px, 8vw, 88px); }
