/**
 * Team Grid Widget Styles
 *
 * @package BM_Investor
 * @since 1.0.0
 */

.team-grid-widget {
	width: 100%;
	max-width: none;
	padding: 0;
}

.elementor-widget-team-grid,
.elementor-widget-team-grid .elementor-widget-container,
.elementor-widget-team-grid .team-grid-widget {
	width: 100% !important;
	max-width: var(--container-max-width, 100%) !important;
	margin-left: auto;
	margin-right: auto;
	align-self: stretch;
}

/* Filter Bar */
.team-grid-widget__filter-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.team-grid-widget__filter-dropdown {
	position: relative;
}

.team-grid-widget__filter-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--e-global-color-primary)!important;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: color 0.2s ease;
	text-decoration: none;
}

.team-grid-widget__filter-trigger:hover {
	color: var(--e-global-color-text);
	opacity: 0.7;
}

.team-grid-widget__filter-label {
	display: inline-block;
}

.team-grid-widget__filter-chevron {
	width: 16px;
	height: 16px;
	color: currentColor;
	transition: transform 0.2s ease;
}

.team-grid-widget__filter-dropdown.active .team-grid-widget__filter-chevron {
	transform: rotate(180deg);
}

.team-grid-widget__filter-menu {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 8px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	min-width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 100;
	padding: 8px 0;
}

.team-grid-widget__filter-dropdown.active .team-grid-widget__filter-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.team-grid-widget__filter-option {
	display: block;
	padding: 10px 16px;
	color: var(--e-global-color-primary)!important;
	text-decoration: none;
	font-size: 0.875rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.team-grid-widget__filter-option:hover,
.team-grid-widget__filter-option.active {
	background-color: rgba(0, 0, 0, 0.05);
	color: rgba(0, 0, 0, 0.9);
}

.team-grid-widget__item.hidden {
	display: none;
}

/* Grid */
.team-grid-widget__grid,
.team-grid {
	display: grid;
	width: 100%;
	max-width: none;
	grid-template-columns: repeat(3, 1fr);
	gap: 48px 40px;
}

.team-grid-widget__item,
.team-card {
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	opacity: 0;
	transform: translateX(-30px);
	animation: slideInFromLeft 0.5s ease-out forwards;
	position: relative;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}

@keyframes slideInFromLeft {
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.team-grid-widget__item:hover {
	transform: translateY(-8px);
	box-shadow: none;
}

.team-grid-widget__image,
.team-card-photo {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 0;
	background: var(--drk-green);
	position: relative;
}

.team-grid-widget__image::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.team-grid-widget__item:hover .team-grid-widget__image::after {
	opacity: 1;
}

.team-grid-widget__image img,
.team-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(20%);
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-grid-widget__item:hover .team-grid-widget__image img,
.team-card:hover .team-card-photo img {
	filter: grayscale(0%);
	transform: scale(1.03);
}

.team-grid-widget__content {
	text-align: left;
	border-radius: 0;
	position: relative;
}


.team-grid-widget__name,
.team-card-name {
	font-family: var(--e-global-typography-secondary-font-family)!important;
	font-size: 1.1rem!important;
	font-weight: 400!important;
	color: var(--e-global-color-text);
	margin-top: 18px!important;
	margin-bottom: 0!important;
}

.team-grid-widget__position,
.team-card-title {

	font-size: 0.72rem!important;
	font-weight: 700!important;
	letter-spacing: 0.13em!important;
	text-transform: uppercase;
	color: var(--e-global-color-secondary);
	margin-top: 6px;
	opacity: 1;
}

.team-grid-widget__contact {
	display: none;
}

.team-grid-widget__contact-item {
	display: none;
}

.team-grid-widget__view-bio {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 16px;
	padding: 6px 10px;
	background: transparent;
	border: 1px solid var(--e-global-color-primary);
	border-radius: 4px;
	color: var(--e-global-color-primary);
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	transition: all 0.2s ease;
	line-height: 1;
}


/* Empty State */
.team-grid-widget__empty {
	text-align: center;
	padding: 60px 20px;
	color: rgba(255, 255, 255, 0.7);
}

/* Popup Modal */
.team-grid-widget__popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.team-grid-widget__popup.active {
	opacity: 1;
	visibility: visible;
}

.team-grid-widget__popup.active {
	opacity: 1;
	visibility: visible;
}

.team-grid-widget__popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
}

.team-grid-widget__popup-content {
	position: relative;
	background: #fff;
	border-radius: 0;
	width: 100%;
	padding: 40px;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.3s ease;
}

@media (min-width: 769px) {
	.team-grid-widget__popup-content {
		width: 70vw;
	}
}

.team-grid-widget__popup.active .team-grid-widget__popup-content {
	opacity: 1;
}

.team-grid-widget__popup-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	z-index: 2;
	text-decoration: none;
}

.team-grid-widget__popup-close svg {
	width: 20px;
	height: 20px;
	color: #333;
}

.team-grid-widget__popup-close:hover svg {
	color: #000;
}

.team-grid-widget__popup-title {
	font-size: 2rem;
	font-family: var(--e-global-typography-secondary-font-family) !important;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 12px;
	line-height: 1.3;
}

.team-grid-widget__popup-position {
	font-size: 0.72rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.13em !important;
	text-transform: uppercase;
	color: var(--e-global-color-secondary);
	margin: 0 0 16px!important;
	opacity: 1;
}


.team-grid-widget__popup-contact {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
	flex-wrap: wrap;
}

.team-grid-widget__popup-phone,
.team-grid-widget__popup-email,
.team-grid-widget__popup-location {
	font-size: 1em;
	color: var(--e-global-color-text);
	line-height: 1.4;
	margin: 0;
}

.team-grid-widget__popup-contact-separator {
	color: var(--e-global-color-text);
	margin: 0;
	opacity: 0.5;
}

.team-grid-widget__popup-bio {
	font-size: 16px;
	line-height: 1.7;
	color: var(--e-global-color-text);
}

.team-grid-widget__popup-bio p {
	margin: 0 0 16px;
}

.team-grid-widget__popup-bio p:last-child {
	margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
	.team-section {
		padding: 72px 32px;
	}

	.team-grid-widget {
		padding: 30px 0;
	}

	.team-grid-widget__filter-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.team-grid-widget__filter-dropdown {
		width: 100%;
		display: block;
	}

	.team-grid-widget__filter-trigger {
		width: 100%;
		background-color: #f5f5f5;
		padding: 12px 16px;
		border-radius: 4px;
		justify-content: space-between;
		border: 1px solid rgba(0, 0, 0, 0.1);
	}

	.team-grid-widget__filter-menu {
		position: static;
		width: 100%;
		margin-top: 4px;
		transform: none;
		box-shadow: none;
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-radius: 4px;
		background-color: #fff;
		max-height: 250px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		display: none;
	}

	.team-grid-widget__filter-dropdown.active .team-grid-widget__filter-menu {
		transform: none;
		display: block;
	}

	.team-grid-widget__grid,
	.team-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 30px!important;
	}

	.team-grid-widget__popup {
		align-items: flex-start;
		padding: 20px 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		justify-content: flex-start;
	}

	.team-grid-widget__popup-overlay {
		min-height: 100%;
	}

	.team-grid-widget__popup-content {
		padding: 30px 20px;
		max-width: 95%;
		margin: 20px auto 40px;
		overflow-y: visible;
		position: relative;
		flex-shrink: 0;
	}

	.team-grid-widget__popup-title {
		font-size: 24px;
	}
}

@media (max-width: 560px) {
	.team-section {
		padding: 56px 24px;
	}

	.team-grid-widget__grid,
	.team-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

