/*
 * The club page's News tab — one featured card, then a flat list of regular
 * rows. See ClubNews.js for the PREVIEW STUB every article here reads from,
 * and for the two open questions (tap destination, feed scope) still ahead
 * of it.
 *
 * Unlike Overview/Squad/Transfers, the regular rows are *not* wrapped in a
 * `.club-overview__card` — the spec calls for the featured card to be the one
 * thing on this tab with a tinted background set apart from the page, and the
 * rows underneath it to sit flush on the page the way a plain list does. So
 * this file keeps its own divider and card rules rather than sharing those
 * classes.
 */

.club-news {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-inline: var(--space-4);
  opacity: 1;
  transition: opacity var(--duration) var(--easing);
}

/* Same UA-rule note as .club-overview[hidden] — see that file. */
.club-news[hidden] {
  display: none;
}

.club-news[data-open="false"] {
  opacity: 0;
}

/* --- Featured card ----------------------------------------------------- */

/*
 * `overflow: hidden` is what clips the full-bleed hero image to the card's
 * own radius — the image sits flush against the card's top edge with no
 * padding of its own, unlike the text underneath it.
 */
.news-featured {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: left;
}

/*
 * Wide, not square — this is the hero, and the headline-style copy baked into
 * the source image (see ClubNews.js) needs the room a landscape frame gives
 * it. `object-fit: cover` rather than `contain`: a placeholder or a real
 * photo should fill the frame exactly the way `.logo` fills its own box
 * elsewhere in the app, not letterbox inside it.
 */
.news-featured__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-featured__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-5);
}

/*
 * Up to two lines, clamped — the spec's own ceiling for this headline. Every
 * browser Telegram's WebView ships is WebKit-based, so the (still officially
 * unstandardised) -webkit- clamp properties are safe to reach for here
 * without a fallback.
 */
.news-featured__headline {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --- Regular rows -------------------------------------------------------- */

.news-list {
  display: flex;
  flex-direction: column;
}

.news-list__divider {
  height: 1px;
  margin: 0;
  border: none;
  background: var(--border);
}

.news-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  padding-block: var(--space-4);
  text-align: left;
}

.news-row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.news-row__headline {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1.35;
  color: var(--text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Roughly square — a single portrait and a multi-person collage are drawn
   identically, see ArticleRow's own comment in ClubNews.js. */
.news-row__image {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/*
 * The review layout: picture first, headline beside it, nothing under it. See
 * `ReviewRow` in NewsList.js for why this is a layout on the row rather than a
 * card of its own.
 *
 * The clamp goes to four lines rather than off altogether. A headline is a
 * headline, not a paragraph, and a row that can grow without limit is a row
 * one badly-written story can make taller than the card holding it.
 */
.news-row[data-layout="review"] {
  align-items: center;
  padding-block: 0;
}

.news-row[data-layout="review"] .news-row__headline {
  font-size: var(--text-md);
  line-height: 1.3;
  -webkit-line-clamp: 4;
}

/* --- Shared meta line ----------------------------------------------------
 *
 * Publisher name, separator dot, timestamp — under the featured card's
 * headline and under a row's headline alike, see `PublisherLine` in
 * ClubNews.js.
 */

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--text-muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
}

.news-meta__publisher {
  min-width: 0;
  color: var(--text-secondary);
}

.news-meta__dot,
.news-meta__time {
  flex: none;
}
