/*
 * CiviCRM UI Boost – styles for the [cub_events] shortcode.
 * Override any of these in Appearance → Customize → Additional CSS.
 */

/* List of events */
.aln-events {
	display: grid;
	gap: 2rem;
	margin: 0 0 2.5rem;
}

/* One event: image on the left, text on the right */
.aln-event {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

/* Fixed 200x200 image box */
.aln-event__image {
	flex: 0 0 200px;
	display: block;
	width: 200px;
	height: 200px;
	overflow: hidden;
	border-radius: 4px;
}

/*
 * Fill the square and trim the longer edges equally (centre crop).
 * Already-cropped Media Library images fit exactly; anything else is
 * cropped here.
 */
.aln-event__img {
	display: block;
	width: 200px;
	height: 200px;
	max-width: none;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.aln-event__image:hover .aln-event__img {
	transform: scale(1.04);
}

/* Text */
.aln-event__body {
	flex: 1;
	min-width: 0; /* Lets long titles wrap instead of overflowing. */
}

.aln-event__title {
	margin: 0 0 0.25em;
	font-family: var(--global-heading-font-family, inherit); /* Kadence heading font */
	line-height: 1.3;
}

.aln-event__title a {
	text-decoration: none;
}

.aln-event__title a:hover,
.aln-event__title a:focus {
	text-decoration: underline;
}

.aln-event__date {
	margin: 0 0 0.6em;
	font-size: 0.9em;
	font-weight: 600;
	opacity: 0.8;
}

.aln-event__summary {
	margin: 0;
}

/* Phones: stack the image above the text */
@media (max-width: 600px) {
	.aln-event {
		flex-direction: column;
		gap: 0.75rem;
	}
}

.event_summary-section {
	display: none;
}

/* ---------- "Show more" button (per_page) ---------- */
.aln-event[hidden] {
	display: none;
}

.aln-events-more-wrap {
	margin: -1rem 0 2.5rem;
	text-align: center;
}

.aln-events-more {
	display: inline-block;
	padding: 1rem 1.5rem;
	border: 0;
	border-radius: 3px;
	background: var(--global-palette1, #2b6cb0);
	color: #fff;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.aln-events-more:hover,
.aln-events-more:focus-visible {
	background: color-mix(in srgb, var(--global-palette1, #2b6cb0) 80%, #000);
	box-shadow: 8px 8px 0 0 var(--global-palette4, #2D3748);
	color: #fff;
}

.aln-events-more:focus-visible {
	outline: 2px solid var(--global-palette4, #2D3748);
	outline-offset: 3px;
}
