/*
 * Event card and registration status badge (template-parts/components/event-card.php).
 * Mockup: docs/sections/home/home_wydarzenia.png. The „Zapisy otwarte” badge is
 * a little stronger than in the mockup (user request, 2026-10-26): filled
 * primary colour with a dot instead of white.
 */

.hf-event-card
{
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--hf-color-card-border);
	border-radius: var(--hf-radius-m);
	background: var(--hf-color-surface);
	transition: box-shadow var(--hf-transition), transform var(--hf-transition);
}

.hf-event-card:hover
{
	box-shadow: 0 10px 28px color-mix(in srgb, var(--hf-color-heading) 10%, transparent);
}

/* The stretched title link draws the focus ring around the whole card. */
.hf-event-card:focus-within
{
	outline: 3px solid var(--hf-color-focus);
	outline-offset: 3px;
}

.hf-event-card__media
{
	position: relative;
	aspect-ratio: 11 / 8;
	background: var(--hf-color-band);
}

.hf-event-card__image
{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hf-event-card__date
{
	position: absolute;
	top: var(--hf-space-s);
	left: var(--hf-space-s);
	margin: 0;
	padding: 0.55rem 1.1rem 0.6rem;
	border-radius: var(--hf-radius-m);
	background: color-mix(in srgb, var(--hf-color-bg) 94%, transparent);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--hf-color-heading) 12%, transparent);
	color: var(--hf-color-heading);
	line-height: 1.15;
	text-align: center;
}

.hf-event-card__days
{
	display: block;
	font-family: var(--hf-font-display);
	font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.875rem);
}

.hf-event-card__month
{
	display: block;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hf-event-card__status
{
	position: absolute;
	right: var(--hf-space-s);
	bottom: calc(-1 * var(--hf-space-xs));
}

.hf-event-card__body
{
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: calc(var(--hf-space-m) + var(--hf-space-xs)) clamp(1.25rem, 0.9rem + 1vw, 2rem) clamp(1.25rem, 0.9rem + 1vw, 2rem);
}

.hf-event-card__title
{
	margin: 0 0 var(--hf-space-xs);
	font-size: var(--hf-text-card-title);
}

.hf-event-card__link
{
	color: inherit;
	text-decoration: none;
}

.hf-event-card__link::after
{
	position: absolute;
	inset: 0;
	content: "";
}

.hf-event-card__link:focus-visible
{
	outline: none;
}

.hf-event-card__text
{
	margin: 0 0 var(--hf-space-m);
	font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1875rem);
	line-height: 1.5;
}

.hf-event-card__more
{
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin-top: auto;
	color: var(--hf-color-heading);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.35em;
}

.hf-event-card__more-icon
{
	width: 1.1em;
	height: 1.1em;
	transition: transform var(--hf-transition);
}

.hf-event-card:hover .hf-event-card__more-icon
{
	transform: translateX(3px);
}

/* Registration status badge. */
.hf-badge
{
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	padding: 0.4em 0.9em;
	border: 1px solid transparent;
	border-radius: var(--hf-radius-m);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--hf-color-heading) 16%, transparent);
	font-size: clamp(0.875rem, 0.84rem + 0.15vw, 1rem);
	line-height: 1.3;
	white-space: nowrap;
}

.hf-badge::before
{
	width: 0.45em;
	height: 0.45em;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.hf-badge--open
{
	background: var(--hf-color-primary);
	color: var(--hf-color-on-dark);
}

.hf-badge--last
{
	background: var(--hf-color-heading);
	color: var(--hf-color-on-dark);
}

.hf-badge--soon
{
	border-color: var(--hf-color-card-border);
	background: var(--hf-color-surface);
	color: var(--hf-color-heading);
}

.hf-badge--closed
{
	border-color: var(--hf-color-card-border);
	background: var(--hf-color-band);
	color: var(--hf-color-text);
}
