/**
 * HTSA Staff & Teachers Page Styles
 *
 * @package HTSA_Child
 */

/* === Subject Colour Variables === */
:root {
	--staff-color-tamil: #8B1A1A;
	--staff-color-finearts: #D4A017;
	--staff-color-support: #6A1B9A;
}

/* === Leadership Section (enhanced) === */
.htsa-leadership--staff .htsa-leadership__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}

.htsa-leadership--staff .htsa-person-card--large {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	background: #fff;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.htsa-leadership--staff .htsa-person-card--large .htsa-person-card__photo {
	flex-shrink: 0;
}

.htsa-leadership--staff .htsa-person-card--large .htsa-person-card__photo img,
.htsa-leadership--staff .htsa-person-card--large .htsa-person-card__avatar {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
}

.htsa-leadership--staff .htsa-person-card--large .htsa-person-card__bio {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #555;
	margin-top: 0.75rem;
}

@media (max-width: 768px) {
	.htsa-leadership--staff .htsa-leadership__grid {
		grid-template-columns: 1fr;
	}

	.htsa-leadership--staff .htsa-person-card--large {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

/* === Profile Card Grid === */
.htsa-profile-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

@media (max-width: 992px) {
	.htsa-profile-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.htsa-profile-grid {
		grid-template-columns: 1fr;
	}
}

#panel-support .htsa-profile-grid {
	max-width: 400px;
	margin-inline: auto;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* === Profile Card === */
.htsa-profile-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	border-top: 4px solid var(--card-accent, #8B1A1A);
	padding: 1.5rem;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.htsa-profile-card--clickable {
	cursor: pointer;
}

.htsa-profile-card--clickable:hover,
.htsa-profile-card--clickable:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.htsa-profile-card--clickable:focus-visible {
	outline: 2px solid var(--card-accent, #8B1A1A);
	outline-offset: 2px;
}

.htsa-profile-card__photo {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	margin: 0 auto 1rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--card-accent) 12%, #fff);
	border: 3px solid var(--color-accent, #D4A017);
}

.htsa-profile-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.htsa-profile-card__initials {
	font-family: 'Poppins', sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--card-accent, #8B1A1A);
}

.htsa-profile-card__name {
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #2D2D2D;
	margin: 0 0 0.25rem;
	line-height: 1.3;
}

.htsa-profile-card__class {
	display: block;
	font-size: 0.8125rem;
	color: #777;
	margin-bottom: 0.5rem;
}

.htsa-profile-card__also {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem;
	margin-bottom: 0.5rem;
}

.htsa-profile-card__also-tag {
	font-size: 0.6875rem;
	background: color-mix(in srgb, var(--card-accent) 10%, #fff);
	color: var(--card-accent);
	padding: 0.125rem 0.5rem;
	border-radius: 10px;
	white-space: nowrap;
}

.htsa-profile-card__teaser {
	font-size: 0.8125rem;
	color: #555;
	line-height: 1.5;
	margin: 0.5rem 0 0.75rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.htsa-profile-card__link {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #8B1A1A;
	transition: color 0.2s;
}

.htsa-profile-card--clickable:hover .htsa-profile-card__link {
	color: #D4A017;
}

/* === Compact Cards (Voluntary Assistants) === */
.htsa-compact-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-top: 1.5rem;
}

@media (max-width: 768px) {
	.htsa-compact-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.htsa-compact-grid {
		grid-template-columns: 1fr;
	}
}

.htsa-compact-card {
	text-align: center;
	padding: 1rem;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
}

.htsa-compact-card__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	margin: 0 auto 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--card-accent) 12%, #fff);
	border: 2px solid var(--color-accent, #D4A017);
}

.htsa-compact-card__avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.htsa-compact-card__initials {
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--card-accent, #8B1A1A);
}

.htsa-compact-card__name {
	display: block;
	font-family: 'Poppins', sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2D2D2D;
	line-height: 1.3;
}

.htsa-compact-card__class {
	display: block;
	font-size: 0.75rem;
	color: #777;
	margin-top: 0.125rem;
}

/* === Fine Arts Accordion === */
.htsa-staff-accordion .htsa-accordion-item {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	margin-bottom: 0.75rem;
	overflow: hidden;
}

.htsa-staff-accordion .htsa-accordion-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 1rem 1.25rem;
	background: none;
	border: none;
	cursor: pointer;
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #2D2D2D;
	text-align: left;
}

.htsa-staff-accordion .htsa-accordion-header:hover {
	background: #fafafa;
}

.htsa-staff-accordion .htsa-accordion-header:focus-visible {
	outline: 2px solid #D4A017;
	outline-offset: -2px;
}

.htsa-staff-accordion .htsa-accordion-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.htsa-staff-accordion .htsa-accordion-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.htsa-staff-accordion .htsa-accordion-arrow {
	margin-left: auto;
	width: 20px;
	height: 20px;
	transition: transform 0.3s ease;
}

.htsa-staff-accordion .htsa-accordion-item.is-open .htsa-accordion-arrow {
	transform: rotate(180deg);
}

.htsa-staff-accordion .htsa-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.htsa-staff-accordion .htsa-accordion-content__inner {
	padding: 0 1.25rem 1.25rem;
}

/* === View Toggle === */
.htsa-view-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.htsa-view-toggle__btn {
	padding: 0.5rem 1rem;
	border: 1px solid #ddd;
	border-radius: 20px;
	background: #fff;
	font-family: 'Poppins', sans-serif;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #555;
	cursor: pointer;
	transition: all 0.2s;
}

.htsa-view-toggle__btn.is-active {
	background: #8B1A1A;
	border-color: #8B1A1A;
	color: #fff;
}

.htsa-view-toggle__btn:hover:not(.is-active) {
	border-color: #8B1A1A;
	color: #8B1A1A;
}

/* === Section Subtitle (Voluntary Assistants heading) === */
.htsa-staff-panel__subtitle {
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #555;
	margin: 2.5rem 0 0.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eee;
}

/* === Modal === */
.htsa-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.htsa-modal[hidden] {
	display: none;
}

.htsa-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	animation: htsa-fade-in 0.2s ease;
}

.htsa-modal__container {
	position: relative;
	background: #fff;
	border-radius: 16px;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 2rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	animation: htsa-slide-up 0.25s ease;
}

.htsa-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: #f5f5f5 !important;
	border-radius: 50%;
	font-size: 1.25rem;
	line-height: 1;
	color: #555 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.htsa-modal__close:hover {
	background: #eee !important;
}

.htsa-modal__close:focus-visible {
	outline: 2px solid #8B1A1A;
	outline-offset: 2px;
}

.htsa-modal__header {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}

.htsa-modal__photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	border: 3px solid var(--color-accent, #D4A017);
}

.htsa-modal__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.htsa-modal__photo img[hidden] {
	display: none;
}

.htsa-modal__initials {
	font-family: 'Poppins', sans-serif;
	font-size: 2rem;
	font-weight: 700;
	color: var(--modal-accent, #8B1A1A);
}

.htsa-modal__meta {
	flex: 1;
	padding-top: 0.5rem;
}

.htsa-modal__name {
	font-family: 'Poppins', sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: #2D2D2D;
	margin: 0 0 0.25rem;
}

.htsa-modal__role {
	display: block;
	font-size: 0.875rem;
	color: #777;
	margin-bottom: 0.5rem;
}

.htsa-modal__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.htsa-modal__tag {
	font-size: 0.75rem;
	font-weight: 500;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	background: color-mix(in srgb, var(--modal-accent, #8B1A1A) 10%, #fff);
	color: var(--modal-accent, #8B1A1A);
}

.htsa-modal__body {
	border-top: 1px solid #eee;
	padding-top: 1.25rem;
}

.htsa-modal__bio {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #444;
	margin: 0;
}

/* Modal mobile: full-screen sheet */
@media (max-width: 576px) {
	.htsa-modal {
		padding: 0;
		align-items: flex-end;
	}

	.htsa-modal__container {
		max-width: 100%;
		max-height: 90vh;
		border-radius: 16px 16px 0 0;
		animation: htsa-slide-up-mobile 0.25s ease;
	}

	.htsa-modal__header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.htsa-modal__tags {
		justify-content: center;
	}
}

/* === Animations === */
@keyframes htsa-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes htsa-slide-up {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes htsa-slide-up-mobile {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

/* === Body scroll lock when modal open === */
body.htsa-modal-open {
	overflow: hidden;
}
