/*
 * HOA Web Directors: front end.
 * Everything is prefixed .hwd- and uses the theme's own fonts and colours.
 */

.hwd-page {
	width: 100%;
	max-width: 100%;
}
.hwd-inner {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 20px 56px;
}
.hwd-header {
	margin: 0 0 28px;
}
.hwd-title {
	margin: 0;
}
.hwd-empty {
	padding: 24px 0;
	opacity: 0.7;
}

.hwd-group {
	margin: 0 0 36px;
}
.hwd-group:last-child {
	margin-bottom: 0;
}
.hwd-group-title {
	margin: 0 0 18px;
	font-size: 1.25em;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

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

.hwd-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.hwd-photo {
	width: 128px;
	height: 128px;
	margin-bottom: 14px;
	border-radius: 50%;
	overflow: hidden;
	background: #e6e8eb;
}
.hwd-photo-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hwd-photo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(0, 0, 0, 0.4);
	font-size: 2em;
	font-weight: 600;
}

.hwd-body {
	max-width: 30ch;
}
.hwd-name {
	margin: 0;
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.35;
}
.hwd-role {
	margin: 2px 0 0;
	opacity: 0.75;
	font-size: 0.9em;
}
.hwd-short {
	margin: 10px 0 0;
	font-size: 0.92em;
	line-height: 1.5;
}
.hwd-email {
	margin: 8px 0 0;
	font-size: 0.9em;
}
.hwd-email a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-word;
}

@media (max-width: 900px) {
	.hwd-grid {
		grid-template-columns: repeat(min(3, var(--hwd-cols, 3)), minmax(0, 1fr));
	}
}
@media (max-width: 620px) {
	.hwd-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}
	.hwd-inner {
		padding: 20px 14px 40px;
	}
}
@media (max-width: 400px) {
	.hwd-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.hwd-photo {
		width: 108px;
		height: 108px;
	}
}

/* ---- Single cards and contact lines ([hoa_director], [hoa_management_contact]) ---- */
.hwd-grid.hwd-grid-single {
	grid-template-columns: minmax(0, 1fr);
}
.hwd-phone {
	margin: 8px 0 0;
	font-size: 0.9em;
}
.hwd-email + .hwd-phone,
.hwd-phone + .hwd-email {
	margin-top: 2px;
}
.hwd-phone a {
	color: inherit;
	text-decoration: none;
}

/* ---- Management company ([hoa_management]) ---- */
.hwd-mgmt-company {
	margin: 0 0 28px;
}
.hwd-mgmt-name {
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 1.15em;
}
.hwd-mgmt-details {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 6px 18px;
	margin: 0;
}
.hwd-mgmt-row {
	display: contents;
}
.hwd-mgmt-details dt {
	margin: 0;
	font-weight: 600;
}
.hwd-mgmt-details dd {
	margin: 0;
}
.hwd-mgmt-details a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-word;
}
@media (max-width: 480px) {
	.hwd-mgmt-details {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
	.hwd-mgmt-details dd {
		margin-bottom: 8px;
	}
}
