/**
 * Frontend styles for the executives grid.
 */

.nj-execs {
	--nj-red: #8B1E1E;
	--nj-green: #00450E;
	--nj-gold: #C9A227;
	--nj-ink: #2e2a26;
	--nj-muted: #6b6259;
	--nj-cream: #fbf8f3;
	--nj-line: #e6ded2;
	box-sizing: border-box;
}

.nj-execs * {
	box-sizing: inherit;
}

/* Term label + picker */

.nj-execs-term {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 22px;
}

.nj-execs-term-name {
	display: inline-block;
	padding: 7px 17px;
	background: var(--nj-green);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nj-execs-term-past {
	font-size: 13px;
	font-style: italic;
	color: var(--nj-muted);
}

.nj-execs-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--nj-line);
}

.nj-execs-picker-item {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 999px;
	background: var(--nj-cream);
	box-shadow: inset 0 0 0 1px var(--nj-line);
	color: var(--nj-ink) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.nj-execs-picker-item:hover {
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--nj-ink);
}

.nj-execs-picker-item.is-active {
	background: var(--nj-red);
	color: #fff !important;
	box-shadow: none;
}

.nj-execs-picker-item:focus-visible {
	outline: 3px solid var(--nj-gold);
	outline-offset: 2px;
}

/* Grid */

.nj-execs-grid {
	list-style: none !important;
	margin: 0;
	padding: 0 !important;
	display: grid;
	grid-template-columns: repeat(var(--nj-exec-cols, 4), minmax(0, 1fr));
	gap: 32px 26px;
}

.nj-exec {
	margin: 0;
	padding: 0 !important;
	text-align: center;
	list-style: none !important;
}

/* Themes (Divi included) commonly draw bullets with a pseudo-element on the
   list item, which list-style:none does not remove. */
.nj-execs-grid > .nj-exec::before,
.nj-execs-grid > .nj-exec::after {
	content: none !important;
	display: none !important;
}

.nj-execs-grid > .nj-exec::marker {
	content: "";
}

.nj-exec-photo {
	position: relative;
	width: 100%;
	max-width: 190px;
	margin: 0 auto 16px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--nj-cream);
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--nj-gold);
}

.nj-exec-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nj-exec-initials {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 42px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--nj-red);
	background: var(--nj-cream);
}

.nj-exec-name {
	margin: 0 0 4px;
	font-size: 19px;
	line-height: 1.3;
	color: var(--nj-ink);
}

.nj-exec-role {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nj-red);
}

.nj-exec-city {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--nj-muted);
}

.nj-exec-bio {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.65;
	color: var(--nj-muted);
	text-align: left;
}

.nj-exec-bio p:last-child {
	margin-bottom: 0;
}

.nj-exec-contact {
	margin: 10px 0 0;
	font-size: 14px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	word-break: break-word;
}

.nj-exec-contact a {
	color: var(--nj-green) !important;
}

.nj-execs-empty {
	margin: 0;
	color: var(--nj-muted);
	font-style: italic;
}

.nj-execs .nj-editor-hint {
	margin: 12px 0 0;
	padding: 12px 16px;
	border: 1px dashed #b9a06a;
	border-radius: 6px;
	background: #fdf8ea;
	color: #6d5a24;
	font-size: 14px;
	font-style: normal;
}

/* Responsive */

@media (max-width: 1024px) {
	.nj-execs-grid {
		grid-template-columns: repeat(min(3, var(--nj-exec-cols, 4)), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nj-execs-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 18px;
	}

	.nj-exec-photo {
		max-width: 140px;
	}

	.nj-exec-initials {
		font-size: 32px;
	}
}

@media (max-width: 420px) {
	.nj-execs-grid {
		grid-template-columns: 1fr;
	}

	.nj-exec-photo {
		max-width: 170px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nj-execs-picker-item {
		transition: none;
	}
}
