:root{
  --news-gap: 28px;
  --news-bg: #ffffff;
  --news-text: #0f1724;
  --news-muted: #6b7280;
  --news-primary: #0b5fff;
  --news-label-bg: #e7f3ff;
  --news-label-color: var(--news-primary);
  --news-thumb-large-h: 420px;
  --news-thumb-large-h-sm: 260px;
  --news-thumb-small-w: 140px;
  --news-thumb-small-h: 98px;
  --news-radius: 12px;
  --news-shadow: 0 8px 30px rgba(16,24,40,0.06);
  --news-shadow-hover: 0 18px 40px rgba(16,24,40,0.08);
}

/* Container / Header */
.featured-news { padding: 48px 0; }
.featured-news .section-header { text-align: center; margin-bottom: 28px; }
.featured-news .section-title { font-size: 1.4rem; color: var(--news-text); margin-bottom: 6px; }
.featured-news .section-lead  { color: var(--news-muted); margin-top: 6px; }

/* Grid layout and equal-height rows */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 24px; grid-auto-rows: 1fr; }
.news-grid.news-grid--equal-rows { grid-auto-rows: 1fr; }
@media (min-width: 900px) {
  .news-grid { grid-template-columns: 1fr 480px; align-items: start; gap: var(--news-gap); grid-auto-rows: 1fr; }
}

/* Base card */
.news-card {
  background: var(--news-bg);
  border-radius: var(--news-radius);
  box-shadow: var(--news-shadow);
  overflow: visible;
  transition: transform 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
}

/* Media */
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card__thumb--large, .news-card__thumb--small, .news-card__link, .button { transition: none !important; }
}

/* Left large card */
.news-card--large {
  border-radius: var(--news-radius);
  overflow: hidden;
  background: var(--news-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Large image */
.news-card__thumb--large {
  width: 100%;
  height: var(--news-thumb-large-h);
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}

/* Large card body */
.news-card--large .news-card__body {
  padding: 20px;
  padding-left: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Category pills */
/* Base pill */
.news-label {
  display: inline-block;
  padding: 2px 10px;     
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--news-label-bg);
  color: var(--news-label-color);
  box-sizing: border-box;
  line-height: 1;
}

/* Small-card pill: short, single line, ellipsis */
.news-label--small {
  padding: 2px 8px;       /* compact */
  font-size: 0.75rem;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Large-card pill */
.news-card--large .news-label {
  max-width: 120px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.news-label[style] { /* keep colors from inline style */ }

/* Titles / Excerpt */
.news-card__title { margin: 0 0 12px 0; font-size: 1.125rem; color: var(--news-text); line-height: 1.2; }
.news-card__excerpt { color: #4b5563; margin-bottom: 14px; }

/* Small excerpt clamp */
.news-card__excerpt--small,
.news-card__excerpt--small p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  line-height: 1.35;
}

/* Meta (date + reading time) */
.news-card__meta {
  color: var(--news-muted);
  font-size: 0.78rem;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.news-meta__date, .news-meta__reading { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.meta-icon { width: 14px; height: 14px; display: inline-block; vertical-align: middle; opacity: 0.9; }

/* CTA large card */
.news-card__cta { margin-top: auto; }
.news-card--large .button.button--ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(11,95,255,0.12);
  background: #fff;
  color: var(--news-primary);
  font-weight: 600;
}
.news-card--large .button.button--ghost:hover,
.news-card--large .button.button--ghost:focus {
  background: var(--news-primary);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11,95,255,0.12);
  transform: translateY(-2px);
}

/* Right column / Small cards */
.news-grid__right { display: flex; flex-direction: column; gap: 18px; height: 100%; justify-content: space-between; }

.news-card--small { padding: 0; background: transparent; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; flex: 1; }

.news-card__link {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: var(--news-bg);
  box-shadow: var(--news-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  height: 100%;
  overflow: hidden;
}
.news-card__link:hover, .news-card__link:focus {
  transform: translateY(-4px);
  box-shadow: var(--news-shadow-hover);
  background: #fff;
  text-decoration: none;
}

/* Absolute media flush left/top/bottom */
.news-card__media {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--news-thumb-small-w);
  border-top-left-radius: var(--news-radius);
  border-bottom-left-radius: var(--news-radius);
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.news-card__thumb--small {
  display: block;
  width: auto;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  vertical-align: middle;
}

/* Body reserves space for image */
.news-card__body {
  position: relative;
  z-index: 2;
  padding: 18px 20px 18px calc(var(--news-thumb-small-w) + 24px);
  flex: 1;
  box-sizing: border-box;
}

.news-card__excerpt--small { margin: 6px 0 10px 0; }

.news-card__link:hover .news-card__thumb--small,
.news-card:hover .news-card__thumb--large { transform: scale(1.03); }

/* Media Responsive */
@media (max-width: 899px) {
  .news-card__thumb--large { height: var(--news-thumb-large-h-sm); }
  .news-card__media { position: relative; width: 100%; height: var(--news-thumb-small-h); border-radius: 10px; }
  .news-card__thumb--small { width: 100%; height: 100%; }
  .news-card__body { padding: 12px; margin: 0; }
  .news-card__link { padding: 0; }
  .news-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .news-grid__right { height: auto; justify-content: flex-start; }
}

/* Button view all */
.featured-grid__more { margin-top: 24px; text-align: center; }
.featured-grid__more .button, .featured-grid__more .featured-more-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(11,95,255,0.12);
  background: #fff;
  color: var(--news-primary);
}
.featured-grid__more .button:hover, .featured-grid__more .button:focus,
.featured-grid__more .featured-more-button:hover, .featured-grid__more .featured-more-button:focus {
  background: var(--news-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11,95,255,0.12);
}

/* Focus */
.news-card__link:focus-visible, .news-card a:focus-visible { outline: 3px solid rgba(11,95,255,0.12); outline-offset: 4px; }

/* fallback for inline category color text */
.news-label[style] { color: #fff !important; }
