/**
 * BongoHive Programmes Grid
 *
 * Section header (with optional right-aligned secondary link) followed
 * by a card grid. Each card stacks: hero image with status pill, body
 * with category tag + title + dot-separated meta line + summary +
 * "View details" link.
 */

.bh-programmes-grid {
	display: flex;
	flex-direction: column;
	gap: 60px;
}

.bh-programmes-grid__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
}

.bh-programmes-grid__header-text {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 791px;
	flex: 1 1 auto;
	min-width: 0;
}

.bh-programmes-grid__heading {
	font-family: 'Ubuntu', 'PT Sans', sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	line-height: 1.3;
	letter-spacing: -0.36px;
	margin: 0;
}

.bh-programmes-grid__subheading {
	font-family: 'Ubuntu', sans-serif;
	font-weight: 400;
	font-size: 1.125rem;
	line-height: 1.5;
	margin: 0;
}

.bh-programmes-grid__header-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	font-family: 'Ubuntu', sans-serif;
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #191919;
	text-decoration: none;
	flex: 0 0 auto;
	white-space: nowrap;
	transition: gap 0.2s ease;
}

.bh-programmes-grid__header-link:hover,
.bh-programmes-grid__header-link:focus-visible {
	gap: 12px;
	text-decoration: none;
}

.bh-programmes-grid__header-link svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.bh-programmes-grid__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.bh-programmes-grid__card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
	overflow: hidden;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bh-programmes-grid__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.bh-programmes-grid__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #f2f2f2;
	overflow: hidden;
	flex: 0 0 auto;
}

.bh-programmes-grid__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bh-programmes-grid__status {
	position: absolute;
	top: 16px;
	left: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 12px;
	border-radius: 100px;
	font-family: 'Ubuntu', sans-serif;
	font-weight: 700;
	font-size: 0.75rem;
	line-height: 1.5;
	letter-spacing: 0;
	white-space: nowrap;
}

.bh-programmes-grid__status--open {
	background-color: #e8faf0;
	color: #29a35c;
}

.bh-programmes-grid__status--next {
	background-color: #fdf2cf;
	color: #c08c1c;
}

.bh-programmes-grid__status--soon {
	background-color: #e8f2fc;
	color: #2e7dde;
}

.bh-programmes-grid__status--closed {
	background-color: #f2f2f2;
	color: #606469;
}

.bh-programmes-grid__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	flex: 1 1 auto;
	min-height: 0;
}

.bh-programmes-grid__category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	background-color: rgba(242, 242, 242, 0.5);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 2px;
	color: #191919;
	font-family: 'Ubuntu', sans-serif;
	font-weight: 400;
	font-size: 0.75rem;
	line-height: 1.5;
	width: max-content;
	max-width: 100%;
}

.bh-programmes-grid__heading-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bh-programmes-grid__title {
	font-family: 'Ubuntu', 'PT Sans', sans-serif;
	font-weight: 500;
	font-size: 1.125rem;
	line-height: 1.5;
	margin: 0;
	color: #000000;
}

.bh-programmes-grid__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-family: 'Ubuntu', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #888;
	margin: 0;
}

.bh-programmes-grid__meta-item {
	display: inline-block;
}

.bh-programmes-grid__meta-dot {
	display: inline-block;
	opacity: 0.7;
}

.bh-programmes-grid__summary {
	font-family: 'Ubuntu', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #606469;
	margin: 0;
	flex: 1 1 auto;
}

.bh-programmes-grid__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 2px 0;
	font-family: 'Ubuntu', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #191919;
	text-decoration: none;
	width: max-content;
	transition: gap 0.2s ease;
}

.bh-programmes-grid__link:hover,
.bh-programmes-grid__link:focus-visible {
	gap: 12px;
	text-decoration: none;
}

.bh-programmes-grid__link svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

/* Tablet — 2 columns by default. */
@media (max-width: 1024px) {
	.bh-programmes-grid {
		gap: 40px;
	}

	.bh-programmes-grid__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bh-programmes-grid__header {
		flex-wrap: wrap;
	}
}

/* Mobile — single column, compact gap. */
@media (max-width: 640px) {
	.bh-programmes-grid {
		gap: 28px;
	}

	.bh-programmes-grid__header-text {
		gap: 12px;
	}

	.bh-programmes-grid__grid {
		grid-template-columns: 1fr;
	}

	.bh-programmes-grid__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.bh-programmes-grid__header-link {
		padding-top: 0;
	}
}

@media (max-width: 480px) {
	.bh-programmes-grid {
		gap: 24px;
	}

	.bh-programmes-grid__heading {
		font-size: 1.5rem;
	}
}
