.mcd-grid {
	display: grid;
	grid-template-columns: repeat(var(--mcd-cols, 3), minmax(0, 1fr));
	gap: 32px;
}

.mcd-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

.mcd-photo {
	display: block;
	position: relative;
	aspect-ratio: 4 / 5;
	background: #eef0ea;
}

.mcd-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mcd-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

.mcd-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px;
}

.mcd-name {
	margin: 0 0 4px;
	font-size: 1.5rem;
}

.mcd-name a,
.mcd-name a:hover {
	color: inherit;
	text-decoration: none;
}

.mcd-details {
	margin: 0 0 10px;
	font-size: 0.9rem;
	font-weight: 600;
	opacity: 0.7;
}

.mcd-desc {
	margin-bottom: 16px;
	font-size: 0.97rem;
	line-height: 1.55;
}

.mcd-desc p {
	margin: 0 0 0.7em;
}

.mcd-desc[data-mcd-clamp]:not(.is-open) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--mcd-lines, 5);
	line-clamp: var(--mcd-lines, 5);
	overflow: hidden;
}

/* Paragraphs flow as one block while clamped so the line count is exact. */
.mcd-desc[data-mcd-clamp]:not(.is-open) p {
	display: inline;
}

.mcd-desc[data-mcd-clamp]:not(.is-open) p::after {
	content: " ";
}

.mcd-more {
	align-self: flex-start;
	margin: -10px 0 16px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.mcd-more:hover,
.mcd-more:focus {
	background: none;
	color: inherit;
}

.mcd-button {
	display: block;
	margin-top: auto;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--e-global-color-accent, #2f5d3a);
	color: #fff;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.mcd-button:hover,
.mcd-button:focus {
	color: #fff;
	filter: brightness(1.12);
}

@media (max-width: 1024px) {
	.mcd-grid {
		grid-template-columns: repeat(min(var(--mcd-cols, 3), 2), minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 640px) {
	.mcd-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Dog bio page */
.mcd-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
}

.mcd-facts div {
	padding: 14px 16px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.05);
}

.mcd-facts dt {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
}

.mcd-facts dd {
	margin: 2px 0 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.mcd-status-pill {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--e-global-color-accent, #2f5d3a);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
}

.mcd-button.mcd-button-inline {
	display: inline-block;
	margin-top: 0;
	padding-left: 28px;
	padding-right: 28px;
}

/* Volunteer / admin tools (never shown to the public) */
.mcd-tools {
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 1px dashed rgba(0, 0, 0, 0.35);
	border-radius: 10px;
	background: #fff8e1;
	color: #1b2430;
	font-size: 0.9rem;
}

.mcd-tools a {
	color: #0e6e72;
	font-weight: 700;
}

.mcd-tools strong {
	color: #b45309;
}

.mcd-tools-card {
	margin: 0 0 12px;
	padding: 8px 10px;
	font-size: 0.8rem;
}

.mcd-tools-card a {
	white-space: nowrap;
}

.mcd-tools-page {
	margin: 0 0 20px;
	padding: 14px 16px 16px;
}

.mcd-tools-page p {
	margin: 0 0 10px;
}

.mcd-tools-label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.mcd-tool-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mcd-tools a.mcd-tool {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.mcd-tools a.mcd-tool:hover {
	color: #fff;
	filter: brightness(1.12);
}

.mcd-tools a.mcd-tool-bio {
	background: #0e6e72;
}

.mcd-tools a.mcd-tool-medical {
	background: #b45309;
}

.mcd-tools a.mcd-tool-print {
	background: #1b2430;
}

.mcd-tools a.mcd-tool-apps {
	background: #2f5d3a;
}
