/*
 * News archive and article — templates/archive-news.html, templates/single-news.html
 * (prototype "07 Новини", "07b Статия"). Loaded there only (inc/screens/news.php) and in the editor.
 *
 * Markup contract (core blocks, generated by scripts/gen-episode-news-templates.py):
 *   .hc-news      H1.hc-page-title, Query Loop (ul.hc-grid.hc-grid--news of .hc-newscard), .hc-pagination
 *   .hc-article   .hc-crumbs, p.hc-article__date, H1.hc-article__title,
 *                 .hc-player | figure.hc-article__media, .hc-article__content, .hc-share,
 *                 .hc-article__more (section head + ul.hc-grid--more-news of .hc-newscard--sm)
 */

/* Bands: the old flex columns of style.css §21 do not apply to block markup. */
.wp-block-group.hc-news { padding-top: 4px; }
.wp-block-group.hc-article { padding-top: 0; }
.hc-article > .wp-block-spacer + .wp-block-spacer { display: none; }

/* Dates read "1 Септември, 2026" as in the design. */
.hc-newscard__date.wp-block-post-date { text-transform: capitalize; }

/* Archive. */
.hc-news .hc-newscard__excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.hc-news .hc-newscard > * + * { margin-top: 0; }
.hc-news .hc-newscard { gap: 6px; }
.hc-news .hc-newscard > .hc-thumb { margin-bottom: 6px; }
.wp-block-query-pagination.hc-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; }
.wp-block-query-pagination.hc-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next):hover { background: var(--hc-chip2); color: var(--hc-ink); }
.wp-block-query-pagination.hc-pagination :is(.wp-block-query-pagination-previous-arrow, .wp-block-query-pagination-next-arrow) { margin: 0; transform: none; }

/* Article: breadcrumbs. */
.wp-block-group.hc-crumbs { gap: 8px; }
.hc-crumbs > * { margin: 0; }
.hc-crumbs p { font-size: 13px; font-weight: 600; line-height: 1.4; }

/* Article: head. */
p.hc-article__date { margin-bottom: 0; line-height: 1.3; }
h1.hc-article__title { text-transform: none; font-weight: 700; }

/* Featured image (no video). */
figure.hc-article__media { margin-inline: 0; margin-bottom: 0; }
figure.hc-article__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-article > .hc-player { border-radius: 20px; }

/* Content at the width of the band (860px). */
.wp-block-post-content.hc-article__content {
	max-width: var(--hc-maxw-text);
	margin-top: 18px;
	gap: 16px;
	font-size: 18px;
	line-height: 1.65;
}
.hc-article__content :is(img, video, iframe) { max-width: 100%; border-radius: 12px; }
.hc-article__content :is(figure, .wp-block-image) { margin: 0; }
.hc-article__content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.hc-article__content a { color: var(--hc-accent-ink); }
.hc-article__content :is(h2, h3, h4) { color: var(--hc-ink); }

/* Action row. (.hc-btn--sm of style.css §4 is for the link, not the Button wrapper.) */
.wp-block-buttons.hc-share { gap: 8px; margin-top: 18px; }
.hc-share .wp-block-button.hc-btn--sm { height: auto; padding: 0; }
.hc-share button.wp-block-button__link { cursor: pointer; }

/* "Още новини". */
.wp-block-group.hc-article__more { display: block; margin-top: 0; }
.hc-article__more > * { margin-block: 0; }
.hc-article__more > * + * { margin-top: 14px; }
.hc-article__more .hc-section-head > h2.wp-block-heading { font-size: 16px; }
.hc-article__more:not(:has(.wp-block-post-template > li)) { display: none; }
.hc-grid--more-news { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hc-newscard--sm { gap: 8px; }
.hc-newscard--sm > * + * { margin-top: 0; }
.hc-newscard.hc-newscard--sm .hc-thumb { border-radius: 12px; }
.hc-newscard--sm .hc-newscard__date { display: none; }
h3.hc-newscard__title:where(.hc-newscard--sm *) { font-size: 14px; line-height: 1.3; }
.hc-newscard--sm h3.hc-newscard__title { font-size: 14px; line-height: 1.3; }

/* Editor: loops have no current post there. */
.editor-styles-wrapper .hc-article__more { display: block; }
