/* ════════════════════════════════════════════
   NOTÍCIAS — miolo editorial + sidebar
   (baseado em design Noticias.html)
   ════════════════════════════════════════════ */

:root {
  --g950: #091f10;
  --g900: #0e3019;
  --g800: #174d2e;
  --g700: #1d6438;
  --g600: #237844;
  --g500: #2a8c50;
  --g400: #3aaa66;
  --g300: #5dc47e;
  --g100: #e4f4ec;
  --g50: #f2faf5;
  --border: #cce3d5;
  --text: #1a201c;
  --mid: #3a4f42;
  --muted: #6b8070;
  --bg: #f4f7f5;
  --white: #fff;
}

.news-page-body {
  background: var(--bg);
  color: var(--text);
}

/* ── SHELL (main + aside) ── */
.news-shell {
  max-width: var(--portal-container-public-xl, 1280px);
  margin: 0 auto;
  padding: 40px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: start;
}

/* ── SEARCH BAR (topo do miolo) ── */
.news-search {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.news-search-field {
  position: relative;
  flex: 1;
}

.news-search-field > svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.news-search-input {
  width: 100%;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: 12px;
  padding: 15px 18px 15px 46px;
  color: var(--text);
  font-family: var(--portal-font-sans);
  font-size: 15px;
  outline: none;
  transition: all 0.18s;
}

.news-search-input::placeholder {
  color: var(--muted);
}

.news-search-input:focus {
  border-color: var(--g400);
  box-shadow: 0 0 0 4px var(--g100);
}

.news-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 0 30px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: var(--g600);
  color: white;
  transition: all 0.18s;
  font-family: var(--portal-font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.news-search-btn:hover {
  background: var(--g700);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(35, 120, 68, 0.28);
}

.news-search-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* ── SECTION LABEL (editorial kicker) ── */
.news-sec {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}

.news-sec-title {
  font-family: var(--portal-font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--g700);
  white-space: nowrap;
}

.news-sec-title::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--g500);
  margin-right: 10px;
  transform: rotate(45deg);
  vertical-align: middle;
}

.news-sec-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.news-sec-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.news-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 22px;
}

.news-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--g700);
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.news-filter-chip span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

/* ════════════ FEED ════════════ */
.news-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 24px;
}

/* base article (atua como card e como row conforme o modificador) */
.news-article {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  min-width: 0;
}

.news-article:hover {
  border-color: var(--g300);
  box-shadow: 0 16px 40px -20px rgba(35, 120, 68, 0.3);
  transform: translateY(-3px);
}

.news-article-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--g100);
  aspect-ratio: 16/10;
  flex-shrink: 0;
  color: transparent;
}

.news-article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.news-article:hover .news-article-media img {
  transform: scale(1.05);
}

.news-article-category {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 7px;
  font-family: var(--portal-font-heading);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--g600);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.news-article-category.is-glass {
  background: rgba(9, 31, 16, 0.62);
  backdrop-filter: blur(6px);
}

.news-article-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px 20px;
  flex: 1;
  min-width: 0;
}

.news-article-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--portal-font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.news-article-kicker svg {
  width: 13px;
  height: 13px;
  stroke: var(--g500);
  fill: none;
  stroke-width: 2;
}

.news-article-kicker .news-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
}

.news-article-title {
  font-family: var(--portal-font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--g950);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
}

.news-article:hover .news-article-title {
  color: var(--g700);
}

.news-article-excerpt {
  font-size: 13.5px;
  color: var(--mid);
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.news-article-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--g50);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.news-article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.news-article-meta svg {
  width: 13px;
  height: 13px;
  stroke: var(--g500);
  fill: none;
  stroke-width: 2;
}

/* ── FEATURED (split: imagem + texto) ── */
.news-article--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  border-radius: 16px;
}

.news-article--featured .news-article-media {
  aspect-ratio: auto;
  width: 53%;
  min-height: 360px;
}

.news-article--featured .news-article-body {
  padding: 36px 38px;
  gap: 14px;
  justify-content: center;
}

.news-article--featured .news-article-category {
  background: var(--g600);
}

.news-article--featured .news-article-title {
  font-size: 33px;
  line-height: 1.1;
}

.news-article--featured .news-article-excerpt {
  font-size: 15px;
  -webkit-line-clamp: 4;
}

.news-article--featured .news-article-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--portal-font-heading);
  font-size: 13px;
  font-weight: 800;
  color: var(--g700);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.news-article--featured .news-article-readmore svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  transition: transform 0.2s;
}

.news-article--featured:hover .news-article-readmore svg {
  transform: translateX(4px);
}

/* ── SECONDARY (cards) ── ficam no padrão de coluna */
.news-article--secondary {
  grid-column: span 1;
}

.news-article--secondary .news-article-title {
  font-size: 16px;
}

.news-article--secondary .news-article-excerpt {
  display: none;
}

/* ── ROW (lista densa horizontal) ── */
.news-article--row {
  grid-column: 1 / -1;
  flex-direction: row;
  border-radius: 12px;
  align-items: stretch;
}

.news-article--row .news-article-media {
  aspect-ratio: auto;
  width: 232px;
  min-height: 150px;
}

.news-article--row .news-article-body {
  padding: 18px 24px;
  gap: 8px;
}

.news-article--row .news-article-title {
  font-size: 16px;
}

.news-article--row .news-article-excerpt {
  display: none;
}

.news-article--row .news-article-category {
  font-size: 9px;
  padding: 4px 9px;
}

/* divisor sutil entre o bloco "secundárias" e a lista */
.news-feed-separator {
  grid-column: 1 / -1;
  height: 4px;
}

/* ── PAGINAÇÃO ── */
.news-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
}

.news-pagination-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--mid);
  font-family: var(--portal-font-heading);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  transition: all 0.15s;
}

.news-pagination-btn:hover {
  border-color: var(--g400);
  color: var(--g700);
  background: var(--g50);
}

.news-pagination-btn.is-active {
  background: var(--g600);
  border-color: var(--g600);
  color: white;
  box-shadow: 0 5px 14px rgba(35, 120, 68, 0.28);
}

.news-pagination-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.news-pagination-btn.is-disabled:hover {
  border-color: var(--border);
  color: var(--mid);
  background: white;
}

.news-pagination-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.news-pagination-ellipsis {
  color: var(--muted);
  padding: 0 4px;
  font-weight: 700;
}

/* ════════════ SIDEBAR ════════════ */
.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 18px;
}

.news-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none;
}

.news-sidebar .news-card:hover,
.news-sidebar .news-category-item:hover,
.news-sidebar .news-weekly-item:hover,
.news-sidebar .news-archive-year-head:hover,
.news-sidebar .news-archive-month:hover,
.news-sidebar .news-archive-all:hover {
  box-shadow: none;
  transform: none;
}

.news-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--g100);
  background: var(--g50);
}

.news-card-head svg {
  width: 17px;
  height: 17px;
  stroke: var(--g600);
  fill: none;
  stroke-width: 2;
}

.news-card-head h3 {
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--g950);
  letter-spacing: 0;
  margin: 0;
}

/* Categorias */
.news-categories {
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
}

.news-categories::-webkit-scrollbar {
  width: 8px;
}

.news-categories::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}

.news-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  border: none;
  background: none;
  font-family: 'Inter', var(--portal-font-sans);
  color: var(--mid);
  text-decoration: none;
  font-size: 13px;
  border-radius: 8px;
  box-shadow: none;
}

.news-category-item:hover {
  color: var(--mid);
  background: transparent;
  box-shadow: none;
}

.news-page-body .news-category-mark {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  border: 1.25px solid var(--border);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.15s;
}

.news-page-body .news-category-mark::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 1.8px solid white;
  border-bottom: 1.8px solid white;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.news-category-item.is-active .news-category-mark {
  background: var(--g500);
  border-color: var(--g500);
}

.news-category-item.is-active .news-category-mark::after {
  opacity: 1;
}

.news-category-name {
  flex: 1;
  color: var(--mid);
  line-height: 1.3;
  min-width: 0;
}

.news-category-item.is-active .news-category-name {
  color: var(--text);
  font-weight: 600;
}

.news-category-count {
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--g50);
  border-radius: 20px;
  padding: 2px 9px;
  margin-left: auto;
  flex-shrink: 0;
}

.news-category-item.is-active .news-category-count {
  background: var(--g100);
  color: var(--g700);
}

/* Mais lidas */
.news-popular {
  padding: 6px 0;
}

.news-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 18px;
  transition: background 0.14s;
  text-decoration: none;
  color: inherit;
}

.news-popular-item:hover {
  background: transparent;
}

.news-popular-item + .news-popular-item {
  border-top: 1px solid var(--g50);
}

.news-popular-rank {
  font-family: var(--portal-font-heading);
  font-size: 26px;
  font-weight: 600;
  color: var(--g300);
  line-height: 1;
  flex-shrink: 0;
  width: 26px;
  font-variant-numeric: tabular-nums;
}

.news-popular-body {
  min-width: 0;
}

.news-popular-title {
  font-family: var(--portal-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-popular-item:hover .news-popular-title {
  color: var(--text);
}

.news-weekly-list {
  display: flex;
  flex-direction: column;
}

.news-weekly-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 18px;
  color: inherit;
  text-decoration: none;
}

.news-weekly-item + .news-weekly-item {
  border-top: 1px solid var(--g100);
}

.news-weekly-item:hover,
.news-weekly-item:focus-visible {
  background: transparent;
  color: inherit;
}

.news-weekly-rank {
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--g300);
  font-variant-numeric: tabular-nums;
}

.news-weekly-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.news-weekly-title {
  color: var(--text);
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.news-weekly-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 12px;
  font-weight: 500;
}

.news-weekly-meta svg {
  width: 13px;
  height: 13px;
  stroke: var(--g500);
  fill: none;
  stroke-width: 2;
}

.news-popular-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}

.news-popular-meta svg {
  width: 12px;
  height: 12px;
  stroke: var(--g500);
  fill: none;
  stroke-width: 2;
}

/* Arquivo */
.news-archive {
  padding: 6px 0;
}

.news-archive-year {
  border-bottom: 1px solid var(--g50);
}

.news-archive-year:last-child {
  border-bottom: none;
}

.news-archive-year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--portal-font-sans);
}

.news-archive-year-head:hover {
  background: transparent;
}

.news-archive-year-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Inter', var(--portal-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--g950);
}

.news-archive-year-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.news-archive-chevron {
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2.5;
  transition: transform 0.2s;
}

.news-archive-year.is-open .news-archive-chevron {
  transform: rotate(180deg);
}

.news-archive-months {
  display: none;
  padding: 2px 0 10px;
}

.news-archive-year.is-open .news-archive-months {
  display: block;
}

.news-archive-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 18px 7px 39px;
  font-size: 13px;
  color: var(--mid);
  text-decoration: none;
}

.news-archive-month .news-archive-month-count {
  font-family: var(--portal-font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.news-archive-all {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  margin-top: 2px;
  border-top: 1px solid var(--g100);
  font-family: var(--portal-font-heading);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--g700);
  letter-spacing: 0.02em;
  transition: gap 0.18s;
  text-decoration: none;
}

.news-archive-all:hover {
  gap: 7px;
}

.news-archive-all svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1248px) {
  .news-shell {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 1000px) {
  .news-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .news-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .news-feed {
    grid-template-columns: 1fr !important;
  }

  .news-article--featured,
  .news-article--row {
    flex-direction: column !important;
  }

  .news-article--featured .news-article-media,
  .news-article--row .news-article-media {
    width: 100% !important;
    aspect-ratio: 16/10 !important;
    min-height: 0 !important;
  }

  .news-article--featured .news-article-title {
    font-size: 26px !important;
  }

  .news-search {
    flex-direction: column;
  }
}
