/**
 * Team Archive styles.
 *
 * @package NexioEducation
 */

/* Page Header */
.team-archive-header {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 142px;
	box-sizing: border-box;
}

.team-archive-breadcrumb {
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 300;
	line-height: 18px;
	color: #064d8e;
	margin: 0 0 0 0;
}

.team-archive-breadcrumb a {
	color: #064d8e;
	text-decoration: none;
}

.team-archive-breadcrumb a:hover {
	text-decoration: underline;
}

.team-archive-title {
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 48px;
	font-weight: 800;
	line-height: 58px;
	color: #064d8e;
	margin: 0 0 54px 0;
}

/* Archive wrapper */
.team-archive {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 142px 80px;
	box-sizing: border-box;
}

/* Filter bar */
.team-archive-filters {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 54px;
	position: relative;
}

.team-archive-filters-label {
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 16px;
	font-weight: 400;
	line-height: 20px;
	color: #064d8e;
	flex-shrink: 0;
	order: 0;
}

/* Horizontal line between label and buttons */
.team-archive-filters::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: #064d8e;
	margin: 0 24px;
	order: 1;
}

.team-archive-filters-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	order: 2;
}

.team-archive-filter-select {
	padding: 8px 32px 8px 16px;
	border: 1px solid rgba(6, 77, 142, 0.25);
	border-radius: 30px;
	background: transparent;
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
	color: #064d8e;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23064d8e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.team-archive-filter-select:hover,
.team-archive-filter-select:focus {
	border-color: #064d8e;
	outline: none;
}

.team-archive-filter-clear {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(6, 77, 142, 0.25);
	border-radius: 50%;
	background: transparent;
	font-size: 18px;
	font-weight: 400;
	color: #064d8e;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.team-archive-filter-clear:hover {
	background-color: #064d8e;
	border-color: #064d8e;
	color: #fffefa;
}

/* Section */
.team-archive-section {
	margin-bottom: 122px;
}

.team-archive-section:last-child {
	margin-bottom: 0;
}

.team-archive-section-title {
	font-family: var(--wp--preset--font-family--heading, 'Apris Trial', serif);
	font-size: 48px;
	font-weight: 400;
	line-height: 58px;
	color: #064d8e;
	margin: 0 0 64px 0;
}

/* Grid */
.team-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
}

/* Card outer wrapper - creates gap for bottom line */
.team-archive .team-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 13px;
	padding-bottom: 22px;
	position: relative;
	height: 100%;
}

/* Card inner content */
.team-archive .team-card-inner {
	display: flex;
	flex-direction: column;
	gap: 42px;
	background: #fffefa;
	border-left: 1px solid rgba(6, 77, 142, 0.25);
	border-right: 1px solid rgba(6, 77, 142, 0.25);
	padding: 24px;
	width: 100%;
	box-sizing: border-box;
	flex: 1;
}

/* Remove double borders between adjacent cards */
.team-archive .team-card:not(:nth-child(3n+1)) .team-card-inner {
	border-left: none;
}

/* Bottom line - outside card, centered */
.team-archive .team-card::after {
	content: "";
	width: 362px;
	max-width: calc(100% - 24px);
	height: 1px;
	background-color: rgba(6, 77, 142, 0.25);
}

/* Card content wrapper */
.team-archive .team-card-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

/* Card image */
.team-archive .team-card-image {
	display: block;
	width: 100%;
	max-width: 300px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 50%;
	margin: 0 auto;
}

.team-archive .team-card-image img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.team-archive .team-card-image:hover img {
	transform: scale(1.03);
}

/* Card name/role link */
.team-archive .team-card-name-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.team-archive .team-card-name-link:hover .team-card-name {
	color: #053d6e;
}

/* Card info wrapper */
.team-archive .team-card-info {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Name and role */
.team-archive .team-card-name-role {
	display: flex;
	flex-direction: column;
}

.team-archive .team-card-name {
	font-family: var(--wp--preset--font-family--heading, 'Apris Trial', serif);
	font-size: 32px;
	font-weight: 300;
	line-height: 38px;
	color: #064d8e;
	margin: 0;
}

.team-archive .team-card-role {
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
	color: #064d8e;
	margin: 0;
}

/* Details wrapper (education + specializations) */
.team-archive .team-card-details {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Education */
.team-archive .team-card-education {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.team-archive .team-card-education p {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: #064d8e;
	margin: 0;
}

.team-archive .team-card-education p::before {
	content: "";
	display: inline-block;
	width: 24px;
	height: 24px;
	background-image: url('../images/icons/icon-education.png');
	background-size: contain;
	background-repeat: no-repeat;
	flex-shrink: 0;
}

/* Labels */
.team-archive .team-card-label {
	display: block;
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
	color: #064d8e;
}

/* Specializations */
.team-archive .team-card-specializations {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.team-archive .team-card-specs-list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 0;
	padding: 0;
}

.team-archive .team-card-spec-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: #064d8e;
}

.team-archive .team-card-spec-icon {
	flex-shrink: 0;
}

/* Learn more button */
.team-archive .team-card-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 40px;
	padding: 8px 32px;
	border: 1px solid rgba(6, 77, 142, 0.25);
	border-radius: 30px;
	font-family: var(--wp--preset--font-family--body, 'Manrope', sans-serif);
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: #064d8e;
	text-decoration: none;
	text-align: center;
	box-sizing: border-box;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.team-archive .team-card-link:hover {
	background-color: #064d8e;
	border-color: #064d8e;
	color: #fffefa;
}

.team-archive .team-card-link svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* Filter states */
.team-archive .team-card.hidden {
	display: none;
}

/* Responsive - Tablet */
@media (max-width: 1350px) {
	.team-archive-header {
		padding: 0 max(60px, calc((100% - 1156px) / 2));
	}

	.team-archive {
		padding: 0 max(60px, calc((100% - 1156px) / 2)) 80px;
	}
}

@media (max-width: 1200px) {
	.team-archive-header {
		padding: 0 60px;
	}

	.team-archive-title {
		font-size: 36px;
		line-height: 44px;
		margin-bottom: 40px;
	}

	.team-archive {
		padding: 40px 60px 60px;
	}

	.team-archive-section-title {
		font-size: 36px;
		line-height: 44px;
		margin-bottom: 48px;
	}

	.team-archive-filters {
		margin-bottom: 48px;
	}
}

@media (max-width: 1100px) {
	.team-archive-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Adjust border removal for 2-column grid */
	.team-archive .team-card:not(:nth-child(3n+1)) .team-card-inner {
		border-left: 1px solid rgba(6, 77, 142, 0.25);
	}

	.team-archive .team-card:not(:nth-child(2n+1)) .team-card-inner {
		border-left: none;
	}
}

/* Responsive - Mobile */
@media (max-width: 768px) {
	.team-archive-header {
		padding: 0 24px;
	}

	.team-archive-title {
		font-size: 28px;
		line-height: 34px;
		margin-bottom: 24px;
	}

	.team-archive {
		padding: 32px 24px 40px;
	}

	.team-archive-filters {
		flex-wrap: wrap;
		gap: 16px;
		margin-bottom: 32px;
	}

	/* Hide the line on mobile when wrapping */
	.team-archive-filters::after {
		display: none;
	}

	.team-archive-filters-buttons {
		width: 100%;
		flex-wrap: wrap;
		margin-left: 0;
	}

	.team-archive-filter {
		padding: 6px 20px;
		font-size: 13px;
	}

	.team-archive-section {
		margin-bottom: 48px;
	}

	.team-archive-section-title {
		font-size: 28px;
		line-height: 34px;
		margin-bottom: 32px;
	}

	.team-archive .team-card-name {
		font-size: 24px;
		line-height: 30px;
	}

}

@media (max-width: 700px) {
	.team-archive-grid {
		grid-template-columns: 1fr;
	}

	/* Reset border for single column */
	.team-archive .team-card:not(:nth-child(2n+1)) .team-card-inner {
		border-left: 1px solid rgba(6, 77, 142, 0.25);
	}
}

/* Very small screens */
@media (max-width: 420px) {
	.team-archive {
		padding: 24px 16px 32px;
	}

	.team-archive .team-card-inner {
		padding: 16px;
		border: none !important;
	}

	.team-archive .team-card::after {
		width: calc(100% - 16px);
	}


	.team-archive .team-card-name {
		font-size: 22px;
		line-height: 28px;
	}

	.team-archive-section-title {
		font-size: 24px;
		line-height: 30px;
	}

	.team-archive-filters-label {
		font-size: 14px;
	}

	.team-archive-filter {
		padding: 6px 16px;
		font-size: 12px;
	}
}
