/* ============================================================
   Profile Category Archive — Grid Layout
   Loaded only on taxonomy-profile_category pages.
   ============================================================ */

/* Force full-width layout — no sidebar on team pages */
.cmsmasters-profile-category-archive .cmsmasters-content-wrap {
	display: block;
}

/* ── Hero Banner ─────────────────────────────────────────── */

.profile-category-hero {
	width: 100%;
	min-height: 520px;
	background-image: url('/wp-content/uploads/2026/07/bg_lake.jpg');
	background-size: cover;
	background-position: center;
	position: relative;
	display: flex;
	align-items: flex-end;
}

.profile-category-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
}

.profile-category-hero__inner {
	position: relative;
	z-index: 1;
	padding: 48px 60px;
	max-width: 1200px;
	width: 100%;
}

.profile-category-hero__title {
	font-size: 42px;
	font-weight: 400;
	color: #ffffff;
	margin: 0 0 10px;
	line-height: 1.15;
}

.profile-category-hero__sub {
	font-size: 15px !important;
	color: rgba(255,255,255,0.75);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.profile-category-hero__back {
	color: rgba(255,255,255,0.75);
	text-decoration: none;
	transition: color 0.15s ease;
}

.profile-category-hero__back:hover {
	color: #ffffff;
}

.profile-category-hero__sep {
	opacity: 0.5;
}

/* ── Two-column layout ───────────────────────────────────── */

.profile-category-layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 48px;
	align-items: start;
}

@media (max-width: 768px) {
	.profile-category-layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

/* ── Sidebar / Department Menu ───────────────────────────── */

.profile-category-sidebar {
	position: sticky;
	top: 100px;
}

.profile-category-sidebar__back {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	color: #999;
	text-decoration: none;
	transition: color 0.15s ease;
	margin-bottom: 4px;
}

.profile-category-sidebar__back:hover {
	color: #1a1a1a;
}

.profile-category-sidebar__label {
	font-size: 15px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #999;
	font-weight: 500;
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e8e4df;
}

.profile-category-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.profile-category-menu li {
	margin: 0;
	padding: 0;
}

.profile-category-menu li a {
	display: block;
	font-size: 13px;
	color: #555;
	text-decoration: none;
	padding: 7px 0;
	border-bottom: 1px solid #f0ece8;
	transition: color 0.15s ease;
}

.profile-category-menu li a:hover {
	color: #1a1a1a;
}

.profile-category-menu li.current-menu-item a,
.profile-category-menu li.current_page_item a {
	color: #1a1a1a;
	font-weight: 500;
}

.profile-category-menu li.current-menu-item a::before,
.profile-category-menu li.current_page_item a::before {
	content: '— ';
	color: #c0a882;
}

/* ── Mobile Sidebar Dropdown ─────────────────────────────── */

/* Toggle button hidden on desktop */
.profile-category-sidebar__toggle {
	display: none;
}

@media (max-width: 768px) {

	/* Sidebar becomes a dropdown container — no border */
	.profile-category-sidebar {
		position: static;
		border: none;
		border-radius: 6px;
		background: transparent;
		overflow: hidden;
	}

	/* Toggle button — orange pill style */
	.profile-category-sidebar__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: auto;
		padding: 10px 14px;
		background: #E0521F;
		border: none;
		border-radius: 6px;
		cursor: pointer;
		font-size: 14px;
		font-weight: 400;
		color: #ffffff;
		font-family: inherit;
		letter-spacing: 0;
		text-transform: none;
	}

	.profile-category-sidebar__toggle-label {
		flex: 1;
		text-align: left;
	}

	/* Chevron icon */
	.profile-category-sidebar__toggle-icon {
		width: 14px;
		height: 14px;
		flex-shrink: 0;
		margin-left: 8px;
		transition: transform 0.2s ease;
		color: #ffffff;
	}

	.profile-category-sidebar.is-open .profile-category-sidebar__toggle-icon {
		transform: rotate(180deg);
	}

	/* Collapsible body */
	.profile-category-sidebar__body {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		background: #ffffff;
		border: 1px solid #e8e4df;
		border-top: none;
		border-radius: 0 0 6px 6px;
	}

	.profile-category-sidebar.is-open .profile-category-sidebar__body {
		max-height: 1000px;
	}

	/* No divider needed — toggle floats above the open body */
	.profile-category-sidebar.is-open .profile-category-sidebar__toggle {
		border-bottom: none;
		border-radius: 6px 6px 0 0;
	}

	/* Inner padding for body content */
	.profile-category-sidebar__body > * {
		padding-left: 14px;
		padding-right: 14px;
	}

	.profile-category-sidebar__body > div:first-child {
		padding-top: 12px;
	}

	.profile-category-sidebar__body > div:last-child {
		padding-bottom: 12px;
	}

	/* Back link inside body */
	.profile-category-sidebar__body .profile-category-sidebar__back {
		display: block;
		padding: 8px 14px 10px;
		border-bottom: 1px solid #f0ece8;
		margin-bottom: 4px;
	}

	/* Slightly larger tap targets on mobile */
	.profile-category-menu li a {
		padding: 9px 0;
	}

	/* Remove bottom border on very last menu item */
	.profile-category-menu li:last-child a {
		border-bottom: none;
	}
}

/* ── Grid ─────────────────────────────────────────────────── */

.profile-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.profile-grid--four {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.profile-grid,
	.profile-grid--four {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.profile-grid,
	.profile-grid--four {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── Card ─────────────────────────────────────────────────── */

.profile-card {
	background: #ffffff;
	border: 1px solid #e8e4df;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
	margin: 0 !important;
}

.profile-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ── Image ─────────────────────────────────────────────────── */

.profile-card__image-wrap {
	display: block;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: #ffffff;
}

.profile-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform 0.3s ease;
}

.profile-card:hover .profile-card__image {
	transform: scale(1.03);
}

/* ── Body ─────────────────────────────────────────────────── */

.profile-card__body {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.profile-card__name {
	font-size: 18px !important;
	font-weight: 400;
	margin: 0 0 6px;
	line-height: 1.25;
}

.profile-card__name a {
	color: #1a1a1a;
	text-decoration: none;
}

.profile-card__name a:hover {
	color: #c0a882;
}

.profile-card__role {
	font-size: 13px;
	letter-spacing: 0.03em;
	text-transform: capitalize;
	color: #E0521F;
	margin: 0 0 3px;
	font-weight: 500;
}

.profile-card__office {
	font-size: 13px;
	color: #999;
	margin: 0 0 5px;
	font-weight: 400;
}

/* ── Link ─────────────────────────────────────────────────── */

.profile-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	color: #1a1a1a;
	text-decoration: none;
	border-bottom: 1px solid #1a1a1a;
	padding-bottom: 2px;
	align-self: flex-start;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.profile-card__link:hover {
	color: #c0a882;
	border-color: #c0a882;
}

.profile-card__link svg {
	flex-shrink: 0;
}

/* ── Category Heading ────────────────────────────────────── */

.profile-category-heading {
	font-size: 24px;
	font-weight: 400;
	color: #E0521F;
	margin: 0 0 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e8e4df;
}

/* ── Pagination ──────────────────────────────────────────── */

.profile-category-pagination {
	margin-top: 40px;
}

/* ── No results ──────────────────────────────────────────── */

.profile-category-archive__no-results {
	color: #666;
	font-size: 15px;
}