.hero-news .hero-bg {
  background: url("../images/news-hero.jpg") center / cover no-repeat;
}

.hero-news {
  min-height: 280px;
  padding: 72px 8px 64px;
}

.hero-news .hero-lead {
  font-size: 20px;
  font-weight: 500;
  margin-top: 8px;
}

.news-main {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  padding: 80px 16px 96px;
}

.news-watermark {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translate(-50%, -30%);
  font-size: 8vw;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgb(229 231 235 / 0.3);
  z-index: 0;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.news-intro {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--gray-600);
  font-size: 16px;
  line-height: 1.75;
  max-width: 48rem;
  margin: 0 auto 40px;
}

/* ========== List ========== */
.news-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.04);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.news-card:hover,
.news-card:focus-visible {
  border-color: var(--brand-primary);
  box-shadow: 0 10px 24px rgb(17 24 39 / 0.08);
  transform: translateY(-2px);
}

.news-card:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.news-date {
  display: inline-flex;
  align-items: center;
  color: var(--gray-500);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  background: var(--gray-50);
  padding: 5px 12px;
  border-radius: 9999px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 9999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-600);
  white-space: nowrap;
}

/* Category palette. Unknown categories fall back to `.tag-default` above. */
.tag-company {
  background: #fdf2f8;
  color: #8b2555;
  border-color: #f3c4dd;
}

.tag-business {
  background: #eef2ff;
  color: #1e40af;
  border-color: #c7d2fe;
}

.tag-gov {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.tag-admin {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.tag-legal {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.news-details {
  display: flex;
  align-items: center;
  color: var(--brand-primary);
  opacity: 0;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.3s;
}

.news-card:hover .news-details,
.news-card:focus-visible .news-details {
  opacity: 1;
}

/* Touch devices cannot hover, so the link affordance stays visible there. */
@media (hover: none) {
  .news-details {
    opacity: 1;
  }
}

.news-details span {
  margin-right: 8px;
}

.news-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.6;
  transition: color 0.3s;
}

.news-card:hover h3 {
  color: var(--brand-primary);
}

.news-bar {
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--brand-primary), var(--brand-navy-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.news-card:hover .news-bar {
  transform: scaleX(1);
}

/* ========== Pagination ========== */
.news-pager {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.news-pager-status {
  color: var(--gray-500);
  font-size: 14px;
}

.news-pager-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

a.news-pager-link:hover,
a.news-pager-link:focus-visible {
  border-color: var(--brand-primary);
  background: #fdf2f8;
  color: var(--brand-primary);
}

.news-pager-link.is-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #fff;
}

.news-pager-link.is-disabled {
  background: var(--gray-50);
  color: var(--gray-300);
  cursor: not-allowed;
}

.news-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 40px;
  color: var(--gray-400);
}

@media (max-width: 767.98px) {
  .hero-news {
    min-height: 220px;
    padding: 48px 8px 40px;
  }

  .hero-news .hero-lead {
    font-size: 16px;
  }

  .news-main {
    padding: 48px 16px 64px;
  }

  .news-watermark {
    font-size: 18vw;
    top: 24px;
  }

  .news-card {
    padding: 20px;
    border-radius: 10px;
  }

  .news-card h3 {
    font-size: 16px;
  }

  .news-pager {
    justify-content: center;
  }

  .news-pager-status {
    width: 100%;
    text-align: center;
  }
}
