/**
 * Program cards.
 *
 * Structural only. Colours, typography and spacing that a page-builder would
 * plausibly want to change per instance are exposed as Style controls on the
 * widget (and inherited from Inlingua's post grid), not hardcoded here.
 */

/* brand.css .prog carries shadow-sm at rest, not only on hover. */
.nysf-program-card {
	background: var(--nysf-card);
	border: 1px solid var(--nysf-line);
	border-radius: var(--nysf-r-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: var(--nysf-shadow-sm);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nysf-program-card:hover,
.nysf-program-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--nysf-shadow);
}

.nysf-program-card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.nysf-program-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nysf-program-card__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

/*
 * The design uses a small-caps coloured label, not a filled pill. The pill
 * competed with the gold CTA buttons for attention in the same viewport.
 */
.nysf-program-card__type {
	align-self: flex-start;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	/* 11px bold is small text: 4.5:1. See --nysf-flare-ink in tokens.css. */
	color: var(--nysf-flare-ink);
}

/*
 * No dark-panel override.
 *
 * There used to be one setting this to gold-d, on the assumption that a card
 * inside a navy section sits on navy. It does not: the section is dark, the
 * card body is still --nysf-card, so the rule painted pale gold on near-white
 * at 2.22:1. It was the worst contrast on the site and it was hard to see
 * precisely because it was hard to see.
 */

.nysf-program-card__go {
	margin-top: 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nysf-navy);
}

.nysf-program-card:hover .nysf-program-card__go {
	color: var(--nysf-flare);
}

.nysf-program-card__title {
	font-family: var(--nysf-display);
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
}

 /*
 * brand.css .prog p has flex:1, which is what pushes the Explore link to the
 * foot of every card so the links line up across the row. The removed meta
 * row used to do that job with margin-top:auto; without either, links sit at
 * different heights whenever summaries wrap to a different number of lines.
 */
.nysf-program-card__summary {
	color: var(--nysf-ink-soft);
	margin: 0;
	flex: 1;
}

/* Whole-card click target without nesting interactive elements. */
.nysf-program-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.nysf-program-card {
	position: relative;
}

.nysf-program-card__link:focus-visible {
	outline: 3px solid var(--nysf-flare);
	outline-offset: 3px;
}

/*
 * Cards stay light inside the navy panel. An earlier version inverted them to
 * navy-on-navy, which was invisible: the design uses white cards precisely so
 * they lift off the dark panel.
 */
.nysf-panel-dark .nysf-program-card {
	background: var(--nysf-card);
	border-color: transparent;
	color: var(--nysf-ink);
}

.nysf-panel-dark .nysf-program-card__title,
.nysf-panel-dark .nysf-program-card__title a {
	color: var(--nysf-ink);
}

.nysf-panel-dark .nysf-program-card__summary {
	color: var(--nysf-ink-soft);
}
