.articles-widget-news {
  --articles-news-surface: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 3%, var(--bs-body-bg, #101317));
  --articles-news-surface-hover: color-mix(in srgb, var(--bs-primary, #fe821d) 8%, var(--bs-body-bg, #101317));
  --articles-news-card: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 4%, var(--bs-body-bg, #101317));
  --articles-news-border: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 14%, transparent);
  --articles-news-muted: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 68%, var(--bs-body-bg, #101317));
  --articles-news-radius: calc(var(--nxm-radius, 6px) + 4px);

  overflow: hidden;
  width: min(100% - clamp(1.25rem, 4vw, 3rem), 1120px);
  margin-inline: auto;
  border: 1px solid var(--articles-news-border);
  border-radius: var(--articles-news-radius);
  background:
    radial-gradient(circle at 12% 0, color-mix(in srgb, var(--bs-primary, #fe821d) 18%, transparent), transparent 16rem),
    linear-gradient(180deg, color-mix(in srgb, var(--bs-body-color, #f4f7fb) 4%, transparent), transparent 55%),
    var(--articles-news-surface);
  color: var(--bs-body-color, #f4f7fb);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
}

.articles-widget-news::before {
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--bs-primary, #fe821d), color-mix(in srgb, var(--bs-primary, #fe821d) 10%, transparent));
  content: "";
}

.articles-widget-news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1rem, 2.8vw, 1.5rem) .85rem;
}

.articles-widget-news__kicker {
  color: var(--bs-primary, #fe821d);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.articles-widget-news__title {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--bs-heading-color, var(--bs-body-color, #f4f7fb));
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.articles-widget-news__title .bi {
  color: var(--bs-primary, #fe821d);
  font-size: 1rem;
}

.articles-widget-news__count {
  flex: 0 0 auto;
  padding: .38rem .7rem;
  border: 1px solid var(--articles-news-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary, #fe821d) 12%, transparent);
  color: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 86%, var(--bs-primary, #fe821d) 14%);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
}

.articles-widget-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  padding: 0 clamp(1rem, 2.8vw, 1.5rem) clamp(1rem, 2.8vw, 1.5rem);
}

.articles-widget-news__card {
  display: flex;
  min-height: 16rem;
  padding: 1rem;
  border: 1px solid var(--articles-news-border);
  border-radius: var(--nxm-radius, 6px);
  background: var(--articles-news-card);
  color: inherit;
  flex-direction: column;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.articles-widget-news__card:hover,
.articles-widget-news__card:focus {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--bs-primary, #fe821d) 34%, var(--articles-news-border) 66%);
  background: var(--articles-news-surface-hover);
  color: inherit;
  text-decoration: none;
  outline: none;
}

.articles-widget-news__card:focus-visible {
  box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--bs-primary, #fe821d) 30%, transparent);
}

.articles-widget-news__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.articles-widget-news__card-title {
  overflow: hidden;
  margin: 0;
  color: var(--bs-heading-color, var(--bs-body-color, #f4f7fb));
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.articles-widget-news__card:hover .articles-widget-news__card-title,
.articles-widget-news__card:focus .articles-widget-news__card-title {
  color: var(--bs-link-hover-color, var(--bs-primary, #fe821d));
}

.articles-widget-news__badge {
  flex: 0 0 auto;
  padding: .32rem .55rem;
  border-radius: var(--nxm-radius, 6px);
  background: var(--bs-danger, #dc3545);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.articles-widget-news__date {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  margin-bottom: .85rem;
  color: var(--articles-news-muted);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
}

.articles-widget-news__date .bi {
  color: var(--bs-primary, #fe821d);
  font-size: .9rem;
}

.articles-widget-news__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 1rem;
  color: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 80%, var(--bs-body-bg, #101317));
  font-size: .92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.articles-widget-news__read {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: auto;
  color: var(--bs-primary, #fe821d);
  font-size: .86rem;
  font-weight: 800;
}

.articles-widget-news__read .bi {
  font-size: 1.05rem;
  transition: transform .2s ease;
}

.articles-widget-news__card:hover .articles-widget-news__read .bi,
.articles-widget-news__card:focus .articles-widget-news__read .bi {
  transform: translateX(2px);
}

@media (max-width: 991.98px) {
  .articles-widget-news__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .articles-widget-news {
    width: min(100% - 1rem, 1120px);
  }

  .articles-widget-news__head {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem;
  }

  .articles-widget-news__grid {
    grid-template-columns: 1fr;
  }
}

/* Nexpell Builder surface alignment */
.articles-widget-news {
  --articles-news-surface: var(--nx-color-surface, var(--bs-body-bg, #fff));
  --articles-news-surface-hover: color-mix(in srgb, var(--nx-color-primary, var(--bs-primary, #0d6efd)) 7%, var(--articles-news-card));
  --articles-news-card: var(--nx-color-card-bg, var(--bs-card-bg, #fff));
  --articles-news-border: color-mix(in srgb, var(--nx-color-card-border, var(--bs-border-color, #d8dee8)) 78%, transparent);
  --articles-news-muted: var(--nx-color-muted, var(--bs-secondary-color, #64748b));

  background: var(--articles-news-surface);
  color: var(--nx-color-on-surface, var(--bs-body-color, #1f2937));
  box-shadow: none;
}

.articles-widget-news::before {
  display: none;
}

.articles-widget-news__kicker,
.articles-widget-news__title .bi,
.articles-widget-news__date .bi,
.articles-widget-news__read {
  color: var(--nx-color-primary, var(--bs-primary, #0d6efd));
}

.articles-widget-news__title,
.articles-widget-news__card-title {
  color: var(--bs-heading-color, var(--nx-color-on-surface, var(--bs-body-color, #1f2937)));
}

.articles-widget-news__title {
  font-size: 1.35rem;
}

.articles-widget-news__count {
  background: color-mix(in srgb, var(--nx-color-primary, var(--bs-primary, #0d6efd)) 10%, var(--articles-news-card));
  color: color-mix(in srgb, var(--nx-color-on-surface, var(--bs-body-color, #1f2937)) 84%, var(--nx-color-primary, var(--bs-primary, #0d6efd)) 16%);
}

.articles-widget-news__excerpt {
  color: var(--articles-news-muted);
}

.articles-widget-news__card {
  box-shadow: none;
}

.articles-widget-news__card:focus-visible {
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--nx-color-primary, var(--bs-primary, #0d6efd)) 45%, transparent);
  outline-offset: 2px;
}
