/* MissionaryConnect Pro - front-end styles */

.mcd-grid {
	display: grid;
	gap: 24px;
	margin: 24px 0;
	grid-template-columns: repeat(3, 1fr);
	align-items: stretch;
}

.mcd-columns-1 { grid-template-columns: 1fr; }
.mcd-columns-2 { grid-template-columns: repeat(2, 1fr); }
.mcd-columns-3 { grid-template-columns: repeat(3, 1fr); }
.mcd-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.mcd-columns-3,
	.mcd-columns-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.mcd-grid {
		grid-template-columns: 1fr !important;
	}
}

.mcd-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	height: 100%;
}

.mcd-photo {
	width: 100% !important;
	height: 220px !important;
	overflow: hidden;
	background: #f2f2f2;
	flex-shrink: 0;
}

.mcd-photo img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center top;
}

.mcd-photo-link {
	display: block;
	width: 100%;
	height: 100%;
	cursor: zoom-in;
}

.mcd-photo-link:focus-visible {
	outline: 2px solid #4fa8f5;
	outline-offset: -2px;
}

/* Click-to-enlarge lightbox for the missionary photo. Pure CSS (:target) —
   no JavaScript involved. The anchor with the matching id becomes visible
   when its href is the current URL fragment; clicking anywhere on it
   (including the enlarged photo) navigates to "#" and closes it again. */
.mcd-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 24px;
	cursor: zoom-out;
}

.mcd-lightbox:target {
	display: flex;
}

.mcd-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mcd-photo-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: #f2f2f2;
	color: #a3a3a3;
	border-bottom: 1px dashed #d8d8d8;
}

.mcd-photo-placeholder span {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.mcd-org {
	margin: 0 0 4px;
	font-size: 0.85rem;
	color: #444444;
	font-style: italic;
}

.mcd-ministry-status {
	margin: 0 0 4px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #0a5c36;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.mcd-phone,
.mcd-email {
	margin: 0 0 4px;
	font-size: 0.85rem;
}

.mcd-phone a,
.mcd-email a {
	color: #0a5c36;
	text-decoration: none;
}

.mcd-phone a:hover,
.mcd-email a:hover {
	text-decoration: underline;
}

.mcd-since {
	margin: 0 0 10px;
	font-size: 0.8rem;
	color: #999999;
}

.mcd-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

.mcd-link-give {
	background: #b3872a;
}

.mcd-link-give:hover,
.mcd-link-give:focus {
	background: #8f6c20;
}

.mcd-link-social {
	background: #555555;
}

.mcd-link-social:hover,
.mcd-link-social:focus {
	background: #3d3d3d;
}

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

.mcd-name {
	margin: 0 0 4px;
	font-size: 1.1rem;
	line-height: 1.3;
}

.mcd-field {
	margin: 0 0 4px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #0a5c36;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.mcd-location {
	margin: 0 0 10px;
	font-size: 0.85rem;
	color: #777777;
}

.mcd-bio {
	margin: 0 0 14px;
	font-size: 0.92rem;
	line-height: 1.55;
	color: #333333;
	flex: 1;
}

.mcd-link {
	align-self: flex-start;
	display: inline-block;
	padding: 8px 16px;
	background: #0a5c36;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
}

.mcd-link:hover,
.mcd-link:focus {
	background: #08472a;
	color: #ffffff;
}

.mcd-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 24px 0;
	font-size: 0.9rem;
}

.mcd-pagination a {
	text-decoration: none;
	font-weight: 600;
	color: #0a5c36;
}

.mcd-pagination a:hover {
	text-decoration: underline;
}

.mcd-page-info {
	color: #666666;
}

.mcd-error {
	color: #b00020;
	font-weight: 600;
}

.mcd-empty {
	color: #666666;
	font-style: italic;
}
