/* QariGroup Teachers – teacher cards */
.qgt-grid {
	--qgt-brown: #885D2D;
	--qgt-brown-700: #6E4A22;
	--qgt-tan: #BC8C53;
	--qgt-cream: #FBF6EF;
	--qgt-cream-2: #F5EBDD;
	--qgt-line: #ECE4D8;
	--qgt-ink: #3A4F66;
	--qgt-ink-strong: #192A3D;
	--qgt-muted: #69727D;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin: 0 auto;
	max-width: 1180px;
	text-align: left;
}
@media (max-width: 1024px) { .qgt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (max-width: 640px)  { .qgt-grid { grid-template-columns: 1fr; } }

.qgt-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--qgt-line);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(25, 42, 61, .05);
	transition: transform .3s, box-shadow .3s;
}
.qgt-card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(25, 42, 61, .05), 0 18px 40px -22px rgba(93, 59, 46, .35); }

.qgt-photo { position: relative; aspect-ratio: 1 / 1; background: var(--qgt-cream); overflow: hidden; }
.qgt-grid .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Intro video: play button over the photo */
.qgt-intro {
	position: absolute; inset: 0; z-index: 2;
	display: block; width: 100%; height: 100%;
	margin: 0; padding: 0; border: 0; border-radius: 0;
	background: linear-gradient(180deg, rgba(25, 42, 61, 0) 55%, rgba(25, 42, 61, .55));
	cursor: pointer;
}
.qgt-intro:hover, .qgt-intro:focus { background: linear-gradient(180deg, rgba(25, 42, 61, .05) 45%, rgba(25, 42, 61, .6)); }
.qgt-intro:focus-visible { outline: 3px solid var(--qgt-tan); outline-offset: -3px; }
.qgt-intro-play {
	position: absolute; left: 50%; top: 50%;
	width: 68px; height: 68px; margin: -34px 0 0 -34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5);
	transition: transform .3s;
}
.qgt-intro-play::before {
	content: ""; position: absolute; left: 50%; top: 50%;
	margin: -12px 0 0 -7px;
	border-style: solid; border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent var(--qgt-brown);
}
.qgt-intro:hover .qgt-intro-play { transform: scale(1.1); }
.qgt-intro-badge {
	position: absolute; left: 16px; bottom: 16px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .95);
	color: var(--qgt-brown-700);
	font-size: 13px; font-weight: 700; line-height: 1.2;
	box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35);
}
.qgt-intro-badge::before {
	content: ""; width: 0; height: 0;
	border-style: solid; border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent var(--qgt-brown);
}

/* Intro video playing inside the photo area */
.qgt-photo.is-playing { background: #000; }
.qgt-player { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; display: block; background: #000; object-fit: contain; }
.qgt-photo .qgt-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.qgt-avatar {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	background: radial-gradient(circle at 30% 25%, var(--qgt-cream-2), var(--qgt-cream) 70%);
}
.qgt-avatar span {
	width: 42%; aspect-ratio: 1 / 1;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--qgt-brown);
	color: #fff;
	font-size: clamp(32px, 5vw, 52px);
	font-weight: 700;
	letter-spacing: .02em;
}

.qgt-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 26px; }
.qgt-name { margin: 0 0 10px; color: var(--qgt-ink-strong); font-size: 21px; line-height: 1.25; font-weight: 700; }

.qgt-badges, .qgt-quals, .qgt-courses { list-style: none; margin: 0; padding: 0; }
.qgt-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.qgt-badges li {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--qgt-cream-2);
	color: var(--qgt-brown-700);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;
}

.qgt-facts { margin: 0 0 14px; display: grid; gap: 12px; }
.qgt-facts dt { margin: 0 0 2px; color: var(--qgt-tan); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qgt-facts dd { margin: 0; color: var(--qgt-ink); font-size: 15px; line-height: 1.55; }
.qgt-quals li { position: relative; padding-left: 14px; }
.qgt-quals li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--qgt-tan); }
.qgt-courses { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.qgt-courses a { color: var(--qgt-brown); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(136, 93, 45, .35); }
.qgt-courses a:hover { text-decoration-color: currentColor; }

.qgt-bio { color: var(--qgt-ink); font-size: 15px; line-height: 1.6; }
.qgt-bio p { margin: 0 0 .8em; }
.qgt-bio p:last-child { margin-bottom: 0; }
.qgt-bio.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}
.qgt-more {
	align-self: flex-start;
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--qgt-brown);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.qgt-more:hover, .qgt-more:focus-visible { text-decoration: underline; background: none; color: var(--qgt-brown-700); }

.qgt-content { flex: 1; display: flex; flex-direction: column; margin-bottom: 22px; }
.qgt-btn {
	align-self: stretch;
	display: block;
	padding: 13px 18px;
	border-radius: 10px;
	background: var(--qgt-brown);
	color: #fff !important;
	text-align: center;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
.qgt-btn:hover, .qgt-btn:focus-visible { background: var(--qgt-brown-700); transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
	.qgt-card, .qgt-btn, .qgt-intro-play { transition: none; }
	.qgt-intro:hover .qgt-intro-play { transform: none; }
	.qgt-card:hover, .qgt-btn:hover { transform: none; }
}
