
.mosque-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: 1.25rem;
	margin-block: 1.5rem;
	width: 100%;
}

.mosque-card {
	background: #fff;
	border: 1px solid #dfe7e2;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(12, 59, 41, 0.07);
	overflow: hidden;
	text-align: start;
}

.mosque-card-image,
.mosque-card-image img {
	display: block;
	width: 100%;
}

.mosque-card-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.mosque-card-body {
	padding: 1.25rem;
}

.mosque-card h3 {
	margin-block: 0 0.75rem;
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	line-height: 1.25;
}

.mosque-card h3 a,
.mosque-link {
	color: #0c3b29;
}

.mosque-meta {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.mosque-meta li {
	margin-block: 0.35rem;
}

.mosque-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-block-start: 1rem;
}

.mosque-button {
	display: inline-block;
	background: #145a3a;
	color: #fff !important;
	border-radius: 999px;
	padding: 0.65rem 1rem;
	text-decoration: none;
	font-weight: 700;
}

.mosque-link {
	font-weight: 700;
	text-underline-offset: 0.18em;
}

.mosque-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-block-end: 0.8rem;
}

.mosque-badge {
	background: #eef5f1;
	border-radius: 999px;
	color: #0c3b29;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.3rem 0.65rem;
	text-transform: capitalize;
}

.mosque-badge.priority {
	background: #fff3cd;
	color: #664d03;
}

.mosque-notice.priority-urgent {
	border-color: #b42318;
	border-width: 2px;
}

.mosque-table-wrap {
	overflow-x: auto;
	margin-block: 1.5rem;
}

.mosque-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	background: #fff;
}

.mosque-table th,
.mosque-table td {
	border-bottom: 1px solid #dfe7e2;
	padding: 0.85rem 1rem;
	text-align: start;
}

.mosque-table thead th {
	background: #0c3b29;
	color: #fff;
}

.mosque-table .amount {
	text-align: end;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.mosque-latest-collection {
	display: grid;
	gap: 0.3rem;
	background: #f7f3e8;
	border-inline-start: 5px solid #c5a253;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	text-align: start;
}

.mosque-latest-collection .label {
	font-weight: 700;
	color: #0c3b29;
}

.mosque-latest-collection strong {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	line-height: 1;
	color: #145a3a;
}

.mosque-empty {
	padding: 1rem;
	border: 1px dashed #aebdb5;
	border-radius: 12px;
}

html[lang^="ar"] .mosque-card,
html[lang^="ar"] .mosque-table,
html[lang^="ar"] .mosque-latest-collection {
	font-family: Tahoma, Arial, sans-serif;
}

@media (max-width: 960px) {
	.mosque-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mosque-card-grid {
		grid-template-columns: 1fr;
	}

	.mosque-card-body {
		padding: 1rem;
	}
}


.mosque-language-switcher ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mosque-language-switcher a {
	font-weight: 700;
	text-decoration: none;
}

.mosque-language-switcher .current-lang a {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.mosque-amount-warning {
	font-size: 1rem !important;
	color: #b42318 !important;
}


.mosque-events-table th,
.mosque-events-table td {
	vertical-align: top;
}

@media (max-width: 760px) {
	.mosque-events-table {
		min-width: 0;
	}

	.mosque-events-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.mosque-events-table,
	.mosque-events-table tbody,
	.mosque-events-table tr,
	.mosque-events-table td {
		display: block;
		width: 100%;
	}

	.mosque-events-table tr {
		border: 1px solid #dfe7e2;
		border-radius: 12px;
		margin-bottom: 1rem;
		overflow: hidden;
	}

	.mosque-events-table td {
		display: grid;
		grid-template-columns: minmax(105px, 38%) 1fr;
		gap: 0.75rem;
		border-bottom: 1px solid #edf1ef;
		text-align: start;
	}

	.mosque-events-table td::before {
		content: attr(data-label);
		font-weight: 700;
		color: #0c3b29;
	}

	.mosque-events-table td:last-child {
		border-bottom: 0;
	}
}


/* Version 1.7: wider, responsive homepage event cards */
.mosque-events .mosque-card {
	min-width: 0;
}

.mosque-events .mosque-card-body {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.mosque-events .mosque-actions {
	margin-block-start: auto;
	padding-block-start: 0.5rem;
}

@media (min-width: 800px) {
	.mosque-events > .mosque-card:only-child .mosque-card-body {
		display: grid;
		grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.5fr);
		column-gap: 2rem;
		align-items: start;
	}

	.mosque-events > .mosque-card:only-child h3 {
		grid-column: 1 / -1;
	}

	.mosque-events > .mosque-card:only-child .mosque-meta {
		grid-column: 1;
		margin-bottom: 0;
	}

	.mosque-events > .mosque-card:only-child .mosque-card-body > p {
		grid-column: 2;
		grid-row: 2;
		margin-top: 0;
		font-size: 1.05rem;
		line-height: 1.65;
	}

	.mosque-events > .mosque-card:only-child .mosque-actions {
		grid-column: 2;
	}
}

/* Version 1.7: structured single-event page */
.mosque-event-single,
.mosque-event-agenda {
	width: 100%;
	box-sizing: border-box;
}

.mosque-event-single {
	margin-block: 1.5rem 2rem;
	padding: clamp(1.2rem, 3vw, 2rem);
	background: linear-gradient(135deg, #f7f3e8 0%, #ffffff 70%);
	border: 1px solid #dfe7e2;
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(12, 59, 41, 0.08);
}

.mosque-event-single-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.mosque-event-kicker {
	margin: 0;
	color: #0c3b29;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mosque-event-date-badge {
	margin: 0;
	padding: 0.45rem 0.8rem;
	background: #145a3a;
	color: #fff;
	border-radius: 999px;
	font-weight: 700;
}

.mosque-event-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
}

.mosque-event-detail-item {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr);
	gap: 0.65rem;
	align-items: start;
	padding: 0.9rem;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid #e4ebe7;
	border-radius: 12px;
	overflow-wrap: anywhere;
}

.mosque-event-detail-icon {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	background: #eef5f1;
	border-radius: 50%;
	color: #0c3b29;
	font-weight: 800;
}

.mosque-event-detail-label {
	display: block;
	margin-bottom: 0.15rem;
	color: #59655f;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.mosque-event-detail-item strong {
	display: block;
	color: #15231c;
	font-size: 1rem;
	line-height: 1.45;
}

.mosque-event-detail-item a {
	color: #0c3b29;
}

.mosque-event-register-row {
	margin: 1.25rem 0 0;
}

.mosque-event-agenda {
	margin-block: 2rem;
	padding: clamp(1.2rem, 3vw, 2rem);
	background: #fff;
	border-inline-start: 5px solid #c5a253;
	border-radius: 0 14px 14px 0;
	box-shadow: 0 8px 24px rgba(12, 59, 41, 0.05);
}

.mosque-event-agenda h2 {
	margin-top: 0;
	font-size: clamp(1.45rem, 3vw, 2rem);
}

.mosque-event-agenda-content {
	font-size: 1.05rem;
	line-height: 1.75;
}

.mosque-event-agenda-content > :first-child {
	margin-top: 0;
}

.mosque-event-agenda-content > :last-child {
	margin-bottom: 0;
}

.mosque-event-back {
	margin-block: 1.5rem 0;
}

.mosque-event-back a {
	color: #0c3b29;
	font-weight: 700;
}

/* Remove the empty-looking author/category line from block themes. */
body.single-mosque_event .wp-block-post-author,
body.single-mosque_event .wp-block-post-author-name,
body.single-mosque_event .wp-block-post-terms,
body.single-mosque_event .wp-block-group:has(.wp-block-post-author-name) {
	display: none !important;
}

@media (max-width: 700px) {
	.mosque-event-detail-grid {
		grid-template-columns: 1fr;
	}

	.mosque-event-single-heading {
		align-items: flex-start;
		flex-direction: column;
	}
}
