.articles-widget-content {
  --articles-content-surface: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 3%, var(--bs-body-bg, #101317));
  --articles-content-surface-hover: color-mix(in srgb, var(--bs-primary, #fe821d) 8%, var(--bs-body-bg, #101317));
  --articles-content-card: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 4%, var(--bs-body-bg, #101317));
  --articles-content-border: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 14%, transparent);
  --articles-content-muted: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 68%, var(--bs-body-bg, #101317));
  --articles-content-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-content-border);
  border-radius: var(--articles-content-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-content-surface);
  color: var(--bs-body-color, #f4f7fb);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
}

.articles-widget-content::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-content__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-content__kicker {
  color: var(--bs-primary, #fe821d);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.articles-widget-content__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-content__title .bi {
  color: var(--bs-primary, #fe821d);
  font-size: 1rem;
}

.articles-widget-content__count {
  flex: 0 0 auto;
  padding: .38rem .7rem;
  border: 1px solid var(--articles-content-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-content__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-content__card {
  display: flex;
  overflow: hidden;
  min-height: 19rem;
  border: 1px solid var(--articles-content-border);
  border-radius: var(--nxm-radius, 6px);
  background: var(--articles-content-card);
  color: inherit;
  flex-direction: column;
  text-decoration: none !important;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.articles-widget-content__card *,
.articles-widget-content__card:hover *,
.articles-widget-content__card:focus * {
  text-decoration: none !important;
}

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

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

.articles-widget-content__media {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--articles-content-border);
  background: color-mix(in srgb, var(--bs-primary, #fe821d) 10%, var(--bs-body-bg, #101317));
}

.articles-widget-content__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.articles-widget-content__card:hover .articles-widget-content__media img,
.articles-widget-content__card:focus .articles-widget-content__media img {
  transform: scale(1.04);
  filter: saturate(1.2);
}

.articles-widget-content__category {
  position: absolute;
  left: .7rem;
  top: .7rem;
  max-width: calc(100% - 1.4rem);
  overflow: hidden;
  padding: .32rem .55rem;
  border: 1px solid color-mix(in srgb, var(--bs-primary, #fe821d) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg, #101317) 72%, transparent);
  color: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 84%, var(--bs-primary, #fe821d) 16%);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.articles-widget-content__body {
  display: flex;
  min-width: 0;
  padding: .95rem;
  flex: 1 1 auto;
  flex-direction: column;
}

.articles-widget-content__date {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-bottom: .55rem;
  color: var(--articles-content-muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.2;
}

.articles-widget-content__date strong {
  color: var(--bs-primary, #fe821d);
  font-size: 1.25rem;
  line-height: 1;
}

.articles-widget-content__card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 .55rem;
  color: var(--bs-heading-color, var(--bs-body-color, #f4f7fb));
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.articles-widget-content__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 1rem;
  color: color-mix(in srgb, var(--bs-body-color, #f4f7fb) 78%, var(--bs-body-bg, #101317));
  font-size: .86rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.articles-widget-content__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: auto;
  color: var(--articles-content-muted);
  font-size: .78rem;
  font-weight: 700;
}

.articles-widget-content__author {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: .4rem;
}

.articles-widget-content__author img {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  object-fit: cover;
}

.articles-widget-content__read {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .2rem;
  color: var(--bs-primary, #fe821d);
}

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

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

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

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

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

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

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

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

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

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

.articles-widget-content__kicker,
.articles-widget-content__title .bi,
.articles-widget-content__date strong,
.articles-widget-content__read {
  color: var(--nx-color-primary, var(--bs-primary, #0d6efd));
}

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

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

.articles-widget-content__count,
.articles-widget-content__category {
  background: color-mix(in srgb, var(--nx-color-primary, var(--bs-primary, #0d6efd)) 10%, var(--articles-content-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-content__excerpt {
  color: var(--articles-content-muted);
}

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

.articles-widget-content__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;
}
