/* ===============================
   News Gallery (List Layout)
   =============================== */

/* Wrapper */
.news-gallery {
  margin-block: clamp(28px, 5vw, 72px);
  max-width: 960px;
  margin-inline: auto;
  padding-inline: clamp(8px, 2vw, 16px);
}

/* Title with small underline */
.news-gallery__title {
  margin: 0 0 1.5em 0;
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.2;
  text-align: center;
  position: relative;
}

/* List wrapper */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--wp--preset--color--contrast-3, #e6e6e6);
}

/* Each row */
.news-list > li {
  padding: 14px 0;
  border-bottom: 1px solid var(--wp--preset--color--contrast-3, #e6e6e6);
}

/* Row grid */
.news-row {
  display: grid;
  grid-template-columns: 116px 140px 1fr; /* date | label | title+excerpt */
  align-items: center;
  column-gap: clamp(12px, 2vw, 20px);
}

@media (max-width: 900px) {
  .news-row {
    grid-template-columns: 116px 1fr; /* hide labels on small screens */
  }
  .news-row__labels { display: none; }
}

.news-row__date {
  color: var(--wp--preset--color--contrast-2, #777);
  font-size: 0.95rem;
}

/* Labels (categories) as pills */
.news-row__labels a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #666;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  margin-right: 8px;
}

/* Main text area (title + excerpt) */
.news-row__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0; /* for ellipsis */
}

.news-row__title { /* post-title block wrapper */
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  display: inline-flex;
}
.news-row__title a {
  color: var(--wp--preset--color--contrast, #333);
  text-decoration: none;
  white-space: nowrap;
}
.news-row__title a:hover { text-decoration: underline; }

/* Post excerpt inline & truncated */
.news-row__excerpt { margin: 0; flex: 1 1 auto; min-width: 0; }
.news-row__excerpt .wp-block-post-excerpt__excerpt {
  display: inline;
  margin: 0;
  color: var(--wp--preset--color--contrast-2, #777);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-row__excerpt .wp-block-post-excerpt__more-text { display: none; }

/* more link */
.news-gallery__more { margin-top: clamp(16px, 3vw, 28px); }
.news-gallery__more a {
  color: var(--wp--preset--color--contrast, #333);
  text-decoration: none;
  font-weight: 700;
}
.news-gallery__more a:hover { text-decoration: underline; }
