/* Members Directory dynamic source. */
.mdir .mdir-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	align-items: start;
}

.mdir.mdir-nofilter .mdir-layout {
	grid-template-columns: 1fr;
}

/* Toolbar (count + sort) ----------------------------------------- */
.mdir-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.mdir-count {
	margin: 0;
	color: var(--brand-body, #5a5a5a);
	font-size: 0.92rem;
}

.mdir-count-num {
	font-weight: 700;
	color: var(--brand-ink, #000);
}

.mdir-sort-select {
	font: inherit;
	font-size: 0.9rem;
	color: var(--brand-ink, #000);
	background: #fff;
	border: 1px solid var(--brand-line, #d9e2e0);
	border-radius: var(--brand-radius, 6px);
	padding: 8px 12px;
	cursor: pointer;
}

.mdir-sort-select:focus {
	outline: none;
	border-color: var(--brand, #1b938f);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #1b938f) 18%, transparent);
}

/* Sidebar -------------------------------------------------------- */
.mdir-side {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mdir-search-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--brand-line, #d9e2e0);
	border-radius: var(--brand-radius, 6px);
	font: inherit;
	color: var(--brand-ink, #000);
	background: #fff;
}

.mdir-search-input:focus {
	outline: none;
	border-color: var(--brand, #1b938f);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #1b938f) 18%, transparent);
}

.mdir-filter-title {
	margin: 0 0 8px;
	font-family: var(--brand-head, inherit);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-body, #5a5a5a);
}

/* Category filter: a plain title on desktop, a collapsible accordion header on
   mobile. The toggle button carries the title; the chevron + active-count only
   appear on mobile. */
.mdir-filter-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	cursor: default;
	text-align: left;
}

.mdir-filter-toggle .mdir-filter-title {
	margin: 0;
}

.mdir-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--brand, #1b938f);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
}

.mdir-filter-count[hidden] {
	display: none;
}

.mdir-filter-chev {
	display: none;
	margin-left: auto;
	color: var(--brand-body, #5a5a5a);
	transition: transform 0.2s ease;
}

.mdir-filter-chev svg {
	width: 18px;
	height: 18px;
	display: block;
}

.mdir-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mdir-check {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 5px 0;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--brand-ink, #000);
	cursor: pointer;
}

.mdir-check-sub {
	padding-left: 34px;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--brand-body, #5a5a5a);
}

/* Rounded, custom-drawn checkboxes. */
.mdir-check input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 2px solid var(--brand-line, #d9e2e0);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: background 0.15s, border-color 0.15s;
}

.mdir-check input:checked {
	background: var(--brand, #1b938f);
	border-color: var(--brand, #1b938f);
}

.mdir-check input:checked::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 3px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.mdir-check input:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #1b938f) 25%, transparent);
}

/* List ----------------------------------------------------------- */
.mdir-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mdir-card[hidden] {
	display: none;
}

.mdir-card {
	display: grid;
	grid-template-columns: 120px 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 20px 24px;
	border: 1px solid #C9E5E4;
	border-radius: var(--brand-radius, 6px);	background: #fff;
}

.mdir-card-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 72px;
	border: 1px solid #C9E5E4;
	border-radius: 5px;
}

.mdir-card-logo img {
	max-width: 100%;
	max-height: 72px;
	object-fit: contain;
}

.mdir-card-noimg {
	font-family: var(--brand-head, inherit);
	font-weight: 700;
	color: var(--brand, #1b938f);
	text-align: center;
}

.mdir-card-name {
	margin: 0 0 6px !important;
	font-family: var(--brand-head, inherit) !IMPORTANT;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	color: var(--brand-ink, #000) !important;
	text-transform: uppercase;
}

.mdir-card-loc {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	color: #5a5a5a;
	font-size: 0.92rem;
}

.mdir-card-loc svg {
	width: 16px;
	height: 16px;
	color: #5a5a5a;
}

.mdir-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mdir-tag {
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--brand, #1b938f);
	background: color-mix(in srgb, var(--brand, #1b938f) 9%, #fff);
	border-radius: 5px;
	padding: 4px 12px;
}

.mdir-more {
	font: inherit;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--brand, #1b938f);
	background: transparent;
	border: 1px solid var(--brand, #1b938f);
	border-radius: var(--brand-radius, 6px);
	padding: 10px 20px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.mdir-more:hover {
	background: var(--brand, #1b938f);
	color: #fff;
}

.mdir-noresults,
.mdir-empty {
	color: var(--brand-body, #5a5a5a);
	padding: 24px 0;
}

/* Modal ---------------------------------------------------------- */
.mdir-modal[hidden] {
	display: none;
}

.mdir-modal,
.ev-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.mdir-modal-backdrop,
.ev-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.mdir-modal-panel {
	position: relative;
	z-index: 1;
	width: min(940px, 100%);
	background: #fff;
	border-radius: 12px;
	/* overflow: hidden; */
}

.mdir-modal-close,
.ev-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 999px;
	background: var(--brand-paper, #f4faf9);
	color: var(--brand-ink, #000);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.mdir-modal-close {
	top: -18px;
	right: -18px;
	width: 40px;
	height: 40px;
	background: #fff;
	border: 1px solid var(--brand-line, #d9e2e0);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
}

.mdir-modal-grid {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 0;
	align-items: stretch;
	min-height: 460px;
	max-height: 90vh;
}

.mdir-modal-info {
	padding: 44px;
	overflow-y: auto;
}

.mdir-modal-logo img {
	max-height: 72px;
	margin-bottom: 20px;
}

.mdir-modal-name {
	margin: 0 0 22px !important;
	font-family: var(--brand-head, inherit);
	font-size: 1.6rem;
	color: var(--brand-ink, #000);
}

.mdir-modal-desc {
	color: var(--brand-body, #5a5a5a);
	margin-bottom: 20px;
}

.mdir-modal-desc.is-clamped {
	display: -webkit-box;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mdir-desc-toggle {
	margin: -12px 0 20px;
	padding: 0;
	border: none;
	background: none;
	color: var(--brand, #1b938f);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.mdir-desc-toggle:hover {
	text-decoration: underline;
}

.mdir-contact {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mdir-contact li {
	display: flex;
	gap: 14px;
	align-items: center;
	color: var(--brand-body, #5a5a5a);
}

.mdir-cico {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: var(--brand, #1b938f);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mdir-cico svg {
	width: 18px;
	height: 18px;
}

.mdir-cbody {
	min-width: 0;
	line-height: 1.4;
}

.mdir-cbody p {
	margin: 0;
}

.mdir-clabel {
	color: var(--brand-ink, #000);
	font-weight: 600;
}

.mdir-csep {
	color: var(--brand, #1b938f);
	margin: 0 8px;
}

.mdir-contact a {
	color: var(--brand-body, #5a5a5a);
	text-decoration: none;
}

.mdir-contact a:hover {
	color: var(--brand, #1b938f);
}

.mdir-gallery {
	position: relative;
	overflow: hidden;
	background: var(--brand-paper, #f4faf9);
}

.mdir-slides {
	height: 100%;
	min-height: 100%;
	max-height: 20rem;
	background: var(--brand-paper, #f4faf9);
}

.mdir-slide {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mdir-gnav {
	position: absolute;
	bottom: 28px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 4px 14px rgb(0 0 0 / 9%);
	color: var(--brand, #1b938f);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: transform 0.15s ease;
}

.mdir-gnav:hover {
	transform: scale(1.06);
}

.mdir-prev {
	left: 18%;
	margin-left: -52px;
}

.mdir-next {
	left: 17%;
	margin-left: 8px;
}

@media (max-width: 860px) {
	.mdir .mdir-layout {
		grid-template-columns: 1fr;
	}

	.mdir-side {
		position: static;
	}

	/* Collapse the category list behind an accordion header so it doesn't push
	   the results far down the page. Toggled by members.js. */
	.mdir-filter-toggle {
		cursor: pointer;
		padding: 12px 14px;
		border: 1px solid var(--brand-line, #d9e2e0);
		border-radius: var(--brand-radius, 6px);
		background: #fff;
	}

	.mdir-filter-chev {
		display: inline-flex;
	}

	.mdir-filter[data-collapsed] .mdir-filter-chev {
		transform: rotate(-90deg);
	}

	.mdir-filter-body {
		padding: 10px 2px 0;
	}

	.mdir-filter[data-collapsed] .mdir-filter-body {
		display: none;
	}

	.mdir-card {
		grid-template-columns: 1fr;
	}

	.mdir-card-logo {
		justify-content: left;
		border: 0;
	}

	.mdir-more {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.mdir-modal-grid {
		grid-template-columns: 1fr;
		min-height: 0;
		max-height: 75vh;
		overflow-y: auto;
	}

	.mdir-modal-info {
		padding: 32px 24px;
		overflow: visible;
	}

	.mdir-gallery {
		aspect-ratio: 16 / 11;
	}
	
}
