/* =========================================================================
   WHM Mentors
   Colors/sizes are CSS variables so Elementor's Style controls (or your own
   CSS) can override them without specificity fights.
   ========================================================================= */

.whm-tabs {
	/* Tab bar */
	--whm-tab-bg: #1a1a1a;
	--whm-tab-color: #ffffff;
	--whm-tab-hover-bg: #0e7501;
	--whm-tab-hover-color: #ffffff;
	--whm-tab-active-bg: #58b301;
	--whm-tab-active-color: #000000;
	--whm-tab-sep: #000000;
	--whm-tab-pointer: 12px;

	/* Cards */
	--whm-arch-bg: #58b301;               /* behind headshots / initials */
	--whm-plate-bg: #1a1a1a;              /* card background */
	--whm-plate-radius: 10px;             /* card corners */
	--whm-ink: #ffffff;                   /* name */
	--whm-ink-2: #ffffff;                 /* title, company */
	--whm-accent: #58b301;                /* bio button */
	--whm-shadow: rgba(255, 255, 255, 0.28); /* white glow */
	--whm-gap: 32px;

	width: 100%;
}

.whm-tabs .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- Tab bar */

.whm-tabs__nav {
	display: flex;
	flex-wrap: nowrap;
	margin: 0 0 48px;
	padding: 0 0 var(--whm-tab-pointer); /* room for the active pointer */
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.whm-tabs .whm-tabs__tab {
	position: relative;
	flex: 1 1 0;
	min-width: max-content;
	margin: 0;
	padding: 26px 32px;
	background: var(--whm-tab-bg);
	color: var(--whm-tab-color);
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	white-space: nowrap;
	border: 0;
	border-left: 1px solid var(--whm-tab-sep);
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.whm-tabs .whm-tabs__tab:first-child {
	border-left: 0;
}

/* :where() keeps theme button:hover/focus resets (e.g. Hello Elementor) from repainting the tabs. */
.whm-tabs .whm-tabs__tab:where(:hover, :focus) {
	background: var(--whm-tab-hover-bg);
	color: var(--whm-tab-hover-color);
}

.whm-tabs .whm-tabs__tab.is-active,
.whm-tabs .whm-tabs__tab.is-active:hover,
.whm-tabs .whm-tabs__tab.is-active:focus {
	background: var(--whm-tab-active-bg);
	color: var(--whm-tab-active-color);
}

/* Downward pointer under the active tab */
.whm-tabs .whm-tabs__tab.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-left: var(--whm-tab-pointer) solid transparent;
	border-right: var(--whm-tab-pointer) solid transparent;
	border-top: var(--whm-tab-pointer) solid var(--whm-tab-active-bg);
	pointer-events: none;
}

.whm-tabs .whm-tabs__tab:focus-visible {
	outline: 3px solid var(--whm-tab-active-bg);
	outline-offset: -6px;
}

@media (max-width: 767px) {
	.whm-tabs .whm-tabs__tab {
		flex: 0 0 auto;
		padding: 18px 22px;
		font-size: 17px;
	}
}

/* ----------------------------------------------------------------- Panels */

.whm-tabs__panel[hidden] {
	display: none !important;
}

.whm-tabs__panel:focus {
	outline: none;
}

.whm-tabs__panel:focus-visible {
	outline: 2px dashed var(--whm-tab-bg);
	outline-offset: 8px;
}

.whm-tabs__grid {
	display: grid;
	/* Even rows of equal cards, each at most 300px wide (headshots max 300 × 300). */
	grid-template-columns: repeat(var(--whm-cols, 4), minmax(0, 300px));
	justify-content: center;
	gap: var(--whm-gap);
	align-items: stretch;
}

@media (max-width: 1024px) {
	.whm-tabs__grid {
		grid-template-columns: repeat(var(--whm-cols-t, 2), minmax(0, 300px));
	}
}

@media (max-width: 767px) {
	.whm-tabs__grid {
		grid-template-columns: repeat(var(--whm-cols-m, 1), minmax(0, 300px));
	}
}

/* ------------------------------------------------------------------- Card
   Square headshot on a #1a1a1a card with 10px corners and a soft white glow.
   ------------------------------------------------------------------------- */

.whm-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	max-width: 300px;
	width: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: var(--whm-plate-bg);
	border-radius: var(--whm-plate-radius);
	box-shadow: 0 0 14px var(--whm-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
	.whm-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 0 22px var(--whm-shadow);
	}
}

.whm-card__photo {
	position: relative;
	aspect-ratio: 1 / 1;
	width: 100%;
	max-width: 300px;
	max-height: 300px;
	overflow: hidden;
	background: var(--whm-arch-bg);
}

.whm-card__photo img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center top;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.whm-card__initials {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1a1a1a;
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-size: clamp(36px, 5vw, 64px);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.whm-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start; /* names line up across a row */
	gap: 2px;
	padding: 22px 20px 24px;
	background: var(--whm-plate-bg);
	text-align: center;
}

/* Name, title and company sit at the top; the bio button is pinned to the bottom,
   so every card in a row lines up no matter how long the text is. */
.whm-card__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	margin-bottom: 16px;
}

.whm-card__body > .whm-card__bio {
	margin-top: auto;
}

.whm-tabs .whm-card__name,
.whm-bio .whm-card__name {
	margin: 0;
	color: var(--whm-ink);
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.03em;
	text-transform: none;
}

.whm-tabs .whm-card__title,
.whm-bio .whm-card__title {
	margin: 4px 0 0;
	color: var(--whm-ink-2);
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-size: 15px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.35;
	opacity: 0.8;
}

.whm-tabs .whm-card__company,
.whm-bio .whm-card__company {
	margin: 2px 0 0;
	color: var(--whm-ink-2);
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-size: 19px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.03em;
}

.whm-tabs .whm-card__bio-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	min-width: 150px;
	margin: auto 0 0; /* pinned to the bottom so buttons line up across a row */
	padding: 12px 26px;
	background: transparent;
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: none;
	border: 2px solid var(--whm-accent);
	border-radius: 7px;
	cursor: pointer;
	list-style: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.whm-tabs .whm-card__bio-btn::-webkit-details-marker {
	display: none;
}

.whm-tabs .whm-card__bio-btn:where(:hover, :focus-visible) {
	background: var(--whm-accent);
	color: #000000;
}

.whm-tabs .whm-card__bio-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.whm-card__bio {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.whm-card__bio-text {
	margin-top: 12px;
	color: var(--whm-ink-2);
	text-align: left;
	font-size: 15px;
	line-height: 1.6;
}

.whm-card__bio-text p:last-child {
	margin-bottom: 0;
}

.whm-tabs__empty {
	opacity: 0.7;
}

/* ------------------------------------------------------------- Bio dialog */

.whm-bio {
	width: min(680px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	margin: auto;
	padding: 0;
	overflow: auto;
	background: var(--whm-plate-bg, #1a1a1a);
	color: #ffffff;
	border: 0;
	border-radius: var(--whm-plate-radius, 10px);
	box-shadow: 0 0 30px var(--whm-shadow, rgba(255, 255, 255, 0.28));
}

.whm-bio::backdrop {
	background: rgba(0, 0, 0, 0.7);
}

.whm-bio__inner {
	position: relative;
	padding: 36px 40px 40px;
}

.whm-bio__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	color: #ffffff;
	font-size: 30px;
	line-height: 1;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
}

.whm-bio__close:hover,
.whm-bio__close:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.whm-bio__head {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 24px;
	padding-right: 32px;
}

.whm-bio .whm-bio__photo {
	flex: 0 0 120px;
	width: 120px;
	border-radius: 10px;
}

.whm-bio .whm-bio__photo .whm-card__initials {
	font-size: 36px;
}

.whm-bio__text {
	font-size: 16px;
	line-height: 1.7;
}

.whm-bio__text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 560px) {
	.whm-bio__inner {
		padding: 28px 22px 28px;
	}

	.whm-bio__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
}

/* One year only: no tab bar needed. */
.whm-tabs--single .whm-tabs__nav { display: none; }
