/*
 * What's New: category colours for post tags and card accents, filter chips.
 * A post's colours follow its category (Course news / Events / Rankings);
 * other categories use the Course news colours.
 */
.hc-news-item {
	--hc-cat-accent: var(--gcid-primary-color);
	--hc-cat-bg: var(--gcid-hc-open-bg);
	--hc-cat-fg: var(--gcid-hc-open-text);
}
.hc-news-item:has(.hc-news-cat a[href*="/category/events/"]) {
	--hc-cat-accent: var(--gcid-secondary-color);
	--hc-cat-bg: #f3e7c4;
	--hc-cat-fg: var(--gcid-hc-gold-deep);
}
.hc-news-item:has(.hc-news-cat a[href*="/category/rankings/"]) {
	--hc-cat-accent: var(--gcid-hc-gold-dark);
	--hc-cat-bg: var(--gcid-hc-tan);
	--hc-cat-fg: var(--gcid-primary-color);
}
.hc-news-card {
	border-top-color: var(--hc-cat-accent) !important;
}
.hc-news-cat p,
.hc-news-cat .et_pb_text_inner {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hc-news-cat a {
	display: inline-flex;
	padding: 3px 9px;
	border-radius: 3px;
	background: var(--hc-cat-bg);
	color: var(--hc-cat-fg) !important;
	font-family: "Archivo", sans-serif;
	font-size: 11px;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: 0.12em;
	line-height: 1.6;
	text-transform: uppercase;
	text-decoration: none;
	pointer-events: none;
}
.hc-news-item[hidden] {
	display: none !important;
}

/* Filter chips (assets/js/news-filter.js) */
body #page-container .et_pb_section .et_pb_button.hc-chip.is-active,
body #page-container .et_pb_section .et_pb_button.hc-chip.is-active:hover {
	background: var(--gcid-primary-color) !important;
	border-color: var(--gcid-primary-color) !important;
	color: var(--gcid-hc-cream) !important;
}
.hc-chip__count {
	margin-left: 8px;
	font-size: 12px;
	font-weight: 800;
}
@media (max-width: 767px) {
	.hc-chip__count {
		opacity: 0.8;
	}
}

/* An empty events loop (e.g. no upcoming events) shows nothing. */
.hc-events-list .entry {
	display: none;
}

/*
 * Single news post (Theme Builder → "Single post").
 */

/* " · By Tara Kelly" after the date ([hc_post_byline]). */
.hc-byline {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}
.hc-byline__dot {
	color: var(--gcid-secondary-color);
}
.hc-story-caption,
.hc-story-posted {
	margin: 0;
	padding: 0 !important;
}

/* Posts without a feature image: no figure, and the hero closes up. */
body.hc-story-no-image .hc-story-figure-row {
	display: none;
}
body.hc-story-no-image #page-container .hc-story-hero.et_pb_section {
	padding-bottom: 72px;
}

/* Post content (the Post Content module has the class "hc-story-body"). */
.hc-story-body {
	color: var(--gcid-hc-body-dark);
	font-family: "Archivo", sans-serif;
	font-size: 19px;
	line-height: 1.75;
}
.hc-story-body > * {
	margin-top: 0;
	margin-bottom: 0;
}
.hc-story-body > * + * {
	margin-top: 22px;
}
.hc-story-body p {
	padding: 0;
}
.hc-story-body > p:first-child {
	color: var(--gcid-body-color);
	font-size: 22px;
	line-height: 1.6;
}
.hc-story-body h2,
.hc-story-body h3 {
	padding: 0;
	color: var(--gcid-heading-color);
	font-family: "Ultra", Georgia, serif;
	font-weight: 400;
	line-height: 1.2;
}
.hc-story-body h2 {
	font-size: 28px;
}
.hc-story-body h3 {
	font-size: 22px;
}
.hc-story-body > * + h2,
.hc-story-body > * + h3 {
	margin-top: 46px;
}
.hc-story-body ul,
.hc-story-body ol {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 0 0 24px;
	line-height: inherit;
}
.hc-story-body ul {
	list-style: disc;
}
.hc-story-body ol {
	list-style: decimal;
}
.hc-story-body strong {
	color: var(--gcid-body-color);
	font-weight: 700;
}
.hc-story-body a:not(.wp-block-button__link) {
	color: var(--gcid-link-color);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.hc-story-body a:not(.wp-block-button__link):hover {
	text-decoration-thickness: 3px;
}
.hc-story-body img {
	height: auto;
	border-radius: 4px;
}
.hc-story-body figcaption {
	margin-top: 10px;
	color: var(--gcid-hc-muted);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}
.hc-story-body blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 0 0 0 20px;
	border-left: 2px solid var(--gcid-secondary-color);
	color: var(--gcid-primary-color);
	font-style: italic;
	font-weight: 500;
}

/* Buttons in a post (Button block): the gold button. Email links get the mail icon. */
.hc-story-body > * + .wp-block-buttons {
	margin-top: 36px;
}
.hc-story-body .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.hc-story-body .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	box-sizing: border-box;
	border: 0;
	border-radius: 3px;
	background: var(--gcid-secondary-color);
	color: var(--gcid-hc-forest);
	font-family: "Archivo", sans-serif;
	font-size: 14px;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: 0.1em;
	line-height: 1.6;
	text-align: left;
	text-decoration: none;
	text-transform: uppercase;
	transition: background 0.2s ease;
}
.hc-story-body .wp-block-button__link:hover {
	background: var(--gcid-hc-gold-light);
	color: var(--gcid-hc-forest);
}
.hc-story-body .wp-block-button__link[href^="mailto:"]::before {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 767px) {
	.hc-byline {
		gap: 12px;
	}
	body.hc-story-no-image #page-container .hc-story-hero.et_pb_section {
		padding-bottom: 40px;
	}
	.hc-story-body {
		font-size: 17px;
		line-height: 1.7;
	}
	.hc-story-body > * + * {
		margin-top: 18px;
	}
	.hc-story-body > p:first-child {
		font-size: 19px;
	}
	.hc-story-body h2 {
		font-size: 24px;
	}
	.hc-story-body h3 {
		font-size: 20px;
	}
	.hc-story-body > * + h2,
	.hc-story-body > * + h3 {
		margin-top: 36px;
	}
	.hc-story-body ul,
	.hc-story-body ol {
		padding-left: 22px;
	}
	.hc-story-body > * + .wp-block-buttons {
		margin-top: 26px;
	}
	.hc-story-body .wp-block-button,
	.hc-story-body .wp-block-button__link {
		width: 100%;
	}
	.hc-story-body .wp-block-button__link {
		padding: 0 20px;
	}
}
