﻿.af-docs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-start;
}

.af-doc {
	position: relative;
	display: block;
	width: 290px; /* tune to match your caption tiles */
	max-width: 100%;
	aspect-ratio: 4 / 4; /* card proportions similar to your UI */
	border-radius: 5px;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

	.af-doc::before {
		content: "";
		position: absolute;
		inset: 0;
		opacity: .9;
	}

	.af-doc:hover {

	}

.af-doc-badge {
	position: absolute;
	top: 0px;
	left: 0px;
	z-index: 2;
	font-size: .75rem;
	font-weight: 400;
	padding: 6px 10px;
	background: #222;
	color: #fff; /* adjust to your brand blue */
}

.af-doc-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	background: rgba(0, 55, 125, 0.9);
	color: #fff;
	/* collapsed state */
	height: 35px; /* small band height */
	padding: 3px 14px 14px 14px;
	box-sizing: border-box;
	overflow: hidden;
	/* animation */
	transition: height 220ms ease;
}

.af-doc:hover .af-doc-overlay {
	height: 100%; /* expand to fill card */
}

.af-doc-title {
	font-size: 1.1em;
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
	text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.af-doc-sub {
	margin-top: 6px;
	font-size: .85rem;
	opacity: .9;
}

/* Responsive */
@media (max-width: 640px) {
	.af-doc {
		width: 100%;
	}
}
