/* ==========================================================================
   Underdog Blog Archive
   Card geometry and type scale measured from the brand reference's journal
   section: white card, 1px #ddd6e8 border, 12px radius, 800x450 media,
   23px/24px body padding, 22px title, 13px excerpt, divider-topped link row
   with a 29px circular arrow.
   ========================================================================== */

.udm-ba {
	--udm-accent: #451BAB;
	--udm-ba-title-lines: initial;
}

.udm-ba *,
.udm-ba *::before,
.udm-ba *::after {
	box-sizing: border-box;
}

.udm-ba ul.udm-ba__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.udm-ba li.udm-ba__item {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
}

.udm-ba__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	border: 1px solid #ddd6e8;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.udm-ba__visual {
	position: relative;
	aspect-ratio: 1.78;
	background: #f3f0f8;
	overflow: hidden;
}

.udm-ba .udm-ba__visual img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.udm-ba__body {
	flex: 1 1 auto;
	padding: 23px 24px 0;
}

.udm-ba__cat {
	display: inline-block;
	margin-bottom: 12px;
	padding: 5px 12px;
	border: 1px solid var(--udm-accent);
	border-radius: 999px;
	background: transparent;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--udm-accent);
}

.udm-ba__date {
	margin: 0 0 10px;
	font-size: 11px;
	line-height: 1.4;
	color: #5c5167;
}

.udm-ba__date-prefix { margin-right: 4px; }

.udm-ba__title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.28;
	color: #000;
	transition: color .2s ease;
}

/* Clamps only when the Limit title control is set; the variable is `initial`
   otherwise, which leaves line-clamp inactive and titles free to run. */
.udm-ba__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--udm-ba-title-lines);
	line-clamp: var(--udm-ba-title-lines);
	overflow: hidden;
}

.udm-ba .udm-ba__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is clickable, but the link itself stays the real target so
   text remains selectable and the URL shows in the status bar. */
.udm-ba .udm-ba__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.udm-ba__card { position: relative; }

.udm-ba__excerpt {
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 1.75;
	color: #49404f;
}

.udm-ba a.udm-ba__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 24px;
	padding: 17px 0;
	border-top: 1px solid #e6e0ed;
	font-size: 13px;
	font-weight: 600;
	color: var(--udm-accent);
	text-decoration: none;
	/* Sits above the title's card-wide overlay so its own hover styles work. */
	position: relative;
	z-index: 2;
}

.udm-ba__more { padding-inline: 0; }

.udm-ba__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.udm-ba__arrow {
	flex: none;
	display: grid;
	place-items: center;
	width: 29px;
	height: 29px;
	border: 1px solid rgba(69, 27, 171, .44);
	border-radius: 50%;
	color: var(--udm-accent);
	font-size: 11px;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.udm-ba__arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	/* The reference arrow points up-right. */
	transform: rotate(45deg);
}

.udm-ba__empty {
	margin: 24px 0;
	font-size: 15px;
	text-align: center;
}

.udm-ba a.udm-ba__more:focus-visible,
.udm-ba .udm-ba__title a:focus-visible {
	outline: 3px solid var(--udm-accent);
	outline-offset: 3px;
}

@media (max-width: 1024px) {
	.udm-ba ul.udm-ba__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.udm-ba ul.udm-ba__grid { grid-template-columns: minmax(0, 1fr); }
	.udm-ba__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.udm-ba__card,
	.udm-ba .udm-ba__visual img,
	.udm-ba__arrow { transition: none; }
}
