/* ==========================================================================
   Teacher cards — credential badge and "Read full profile"
   (inc/teacher-profile.php). Loaded on the program and category pages.
   Hover: the "Read full profile" button fills deep green; expertise chips
   fill saffron. The opened profile reads left-aligned for comfort.
   ========================================================================== */
.instructor-card .teacher-credential {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--color-secondary), var(--color-gold));
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: 0 4px 12px rgba(217, 138, 61, 0.3);
}

/* ---- "Read full profile" ---- */
.instructor-card .teacher-profile { margin: 14px 0 4px; text-align: left; }
.instructor-card .teacher-profile summary {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: max-content;
	margin: 0 auto;
	padding: 7px 16px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface);
	color: var(--color-primary);
	font-size: 0.82rem;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
	transition: background 250ms ease, color 250ms ease, border-color 250ms ease;
}
.instructor-card .teacher-profile summary::-webkit-details-marker { display: none; }
.instructor-card .teacher-profile summary svg { width: 16px; height: 16px; transition: transform 300ms ease; }
.instructor-card .teacher-profile summary:hover,
.instructor-card .teacher-profile summary:focus-visible { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.instructor-card .teacher-profile summary:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }
.instructor-card .teacher-profile .teacher-profile-close { display: none; }
.instructor-card .teacher-profile[open] .teacher-profile-open { display: none; }
.instructor-card .teacher-profile[open] .teacher-profile-close { display: inline; }
.instructor-card .teacher-profile[open] summary svg { transform: rotate(180deg); }

.instructor-card .teacher-profile-body {
	margin-top: 16px;
	padding: 18px 18px 16px;
	border-radius: var(--radius-md);
	background: var(--color-bg-alt);
	animation: teacher-profile-in 350ms ease;
}
@keyframes teacher-profile-in { from { opacity: 0; transform: translateY(-6px); } }
.instructor-card .teacher-profile-body .teacher-team {
	display: block;
	margin-bottom: 8px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-secondary-dark);
}
.instructor-card .teacher-profile-body p {
	margin: 0 0 10px;
	font-size: 0.88rem;
	line-height: 1.6;
	color: var(--color-text);
}
.instructor-card .teacher-profile-body h4 {
	margin: 14px 0 8px;
	font-family: var(--font-heading);
	font-size: 0.95rem;
	color: var(--color-primary-dark);
}
.instructor-card .teacher-expertise { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.instructor-card .teacher-expertise li {
	padding: 4px 11px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface);
	font-size: 0.76rem;
	font-weight: 500;
	color: var(--color-primary-dark);
	transition: background 250ms ease, color 250ms ease, border-color 250ms ease;
}
.instructor-card .teacher-expertise li:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
.instructor-card .teacher-quote {
	margin: 16px 0 0;
	padding: 12px 14px 12px 16px;
	border-left: 3px solid var(--color-secondary);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--color-surface);
}
.instructor-card .teacher-quote p { margin: 0 0 4px; font-family: var(--font-heading); font-size: 0.95rem; font-style: italic; color: var(--color-primary-dark); }
.instructor-card .teacher-quote cite { font-size: 0.72rem; font-style: normal; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-light); }

/* Exactly 4 teachers: 2 per row (2 × 2) on wider screens instead of 3 + 1,
   which also gives an opened profile more room. Phones keep 1 per row. */
@media (min-width: 901px) {
	body .instructor-grid:has(> .instructor-card:nth-child(4):last-child),
	body #instructors .grid-3:has(> .instructor-card:nth-child(4):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 920px;
		margin-left: auto;
		margin-right: auto;
	}
}

/* Only one profile opens at a time (assets/js/teacher-profile.js). While it
   is open, the other cards in its row keep their own height instead of
   stretching into tall empty boxes. */
body .instructor-grid:has(.teacher-profile[open]),
body #instructors .grid-3:has(.teacher-profile[open]) { align-items: start; }

@media (prefers-reduced-motion: reduce) {
	.instructor-card .teacher-profile-body { animation: none; }
	.instructor-card .teacher-profile summary svg { transition: none; }
}
