/* Teacher cards - styles for layouts/joi/teacher/card.php variants.
   Replaces the inline style="" attributes the old hand-written blocks used.
   Colours follow the sources: #234e70/#2a4d9b (teachers pages, course cards),
   #e06b86 (blog "Meet the Teacher" card). */

/* --- shared bits ----------------------------------------------------------*/
.joi-tquals {
	margin: .2em 0 16px;
	line-height: 1.6;
	padding-left: 1.2em;
	color: #333;
}

.joi-tmessage {
	background: #f7f8fa;
	border-left: 4px solid #e6e9ef;
	padding: 1.1em 1.2em;
	border-radius: 12px;
	margin: 1em 0 0;
	max-width: 42em;
}

.joi-tmessage p {
	margin: 0 0 .8em;
	color: #333;
}

.joi-tmessage p:last-child {
	margin-bottom: 0;
}

.joi-tcard-noimg {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #e6e9ef;
	color: #4a4f57;
	font-weight: 700;
	border-radius: 50%;
}

/* --- avatar (gallery byline, article sub-header, figures) -----------------*/
.joi-tavatar,
.joi-tavatar-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.joi-tavatar-link {
	text-decoration: none;
	color: inherit;
}

.joi-tavatar-link:hover .joi-tavatar-name {
	text-decoration: underline;
}

.joi-tavatar-img,
.joi-content img.joi-tavatar-img {
	border-radius: 50%;
	object-fit: cover;
	width: 48px;
	height: 48px;
	max-width: none;
	flex-shrink: 0;
	aspect-ratio: 1;
	display: block;
}

.joi-tavatar-name {
	font-weight: 600;
	color: #4a4f57;
	font-size: .95em;
}

/* --- blog ("Meet the Teacher" card on /teachers-blog posts) ----------------*/
.joi-tblog-h {
	border-left: 4px solid #e06b86;
	padding: 0.8em 1em;
	margin-top: 2.4em;
	margin-bottom: 0;
	color: #333;
	font-size: 1.4em;
	font-weight: 600;
	background-color: #fef7f8;
}

.joi-tblog {
	border: 1px solid #e6e0e2;
	border-top: 0;
	padding: 28px 24px;
	background-color: #fff;
	display: flex;
	align-items: flex-start;
	gap: 28px;
	flex-wrap: wrap;
}

.joi-tblog-photo {
	flex: 0 0 160px;
	width: 160px;
	text-align: center;
}

.joi-tblog-img,
.joi-content img.joi-tblog-img {
	border: 1px solid #e6e0e2;
	border-radius: 50%;
	object-fit: cover;
	object-position: center top;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	width: 160px;
	height: 160px;
	max-width: none;
	aspect-ratio: 1;
	display: block;
	margin: 0 auto;
}

.joi-tblog-name {
	margin-top: 0.85em;
	padding: 0 4px;
	font-weight: 500;
	color: #555;
	line-height: 1.4;
}

.joi-tblog-name span {
	font-size: 0.9em;
}

.joi-tblog-body {
	flex: 1 1 300px;
}

.joi-tblog .joi-tmessage {
	background-color: #f9f9f9;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #eee;
	border-left: 1px solid #eee;
	line-height: 1.6;
	margin: 0;
}

.joi-tblog-quals-h {
	border-left: 4px solid #e06b86;
	padding-left: 0.6em;
	margin-top: 2em;
	margin-bottom: 1em;
	color: #333;
	font-size: 1.2em;
	font-weight: 600;
}

.joi-tblog .joi-tquals {
	line-height: 1.8;
	margin: 1em 0;
	padding-left: 20px;
}

.joi-tblog-cta-line {
	text-align: center;
	margin-top: 20px;
	font-weight: 500;
}

.joi-tblog-cta {
	text-align: center;
}

.joi-tblog-cta a {
	background-color: #e06b86;
	color: #fff;
	text-decoration: none;
	padding: 14px 30px;
	display: inline-block;
	border-radius: 4px;
	font-size: 1.1em;
	min-width: 200px;
	text-align: center;
}

@media (max-width: 575px) {
	.joi-tblog {
		padding: 20px 16px;
		gap: 18px;
		justify-content: center;
	}

	.joi-tblog-photo {
		flex: 0 0 100%;
		width: 100%;
	}
}

/* --- grid (/teachers directory rows) --------------------------------------*/
.joi-tgrid {
	border: 1px solid #e6e9ef;
	border-radius: 12px;
	padding: 22px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 2em;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
	background: #fff;
}

.joi-tgrid-photo {
	flex: 0 0 auto;
	margin-bottom: 16px;
}

.joi-tgrid-img {
	display: block;
	width: auto;
	max-width: 180px;
	height: auto;
	border-radius: 8px;
}

.joi-tgrid-body {
	flex: 1 1 300px;
	min-width: 0;
	max-width: 42em;
}

.joi-tgrid-name {
	margin: .1em 0 .2em;
	font-size: 1.6em;
	font-weight: bold;
	color: #4a4f57;
	letter-spacing: .5px;
}

.joi-tgrid-levels {
	margin: .2em 0 .6em;
	color: #555;
	font-size: .95em;
}

.joi-tgrid-link {
	margin: 0 0 1em 0;
}

.joi-tgrid-link a {
	color: #2a4d9b;
	font-weight: bold;
	font-size: .95em;
	text-decoration: none;
}

.joi-tgrid-link a:hover {
	text-decoration: underline;
}

.joi-tgrid-quals-h {
	margin: 0 0 6px 0;
	font-size: 1.1em;
	font-weight: 600;
	color: #333;
}

/* --- profile (course / JLPT / business / LRC cards) ------------------------*/
.joi-tprofile {
	flex: 1 1 300px;
	background: #fff;
	border: 1px solid #e6edf5;
	border-radius: 12px;
	padding: 18px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .04);
}

.joi-tprofile-figure {
	margin: 0 0 10px 0;
	text-align: center;
}

.joi-tprofile-frame {
	width: 180px;
	height: 180px;
	border-radius: 10px;
	overflow: hidden;
	background: #f4fbfd;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	margin: 0 auto;
}

.joi-tprofile-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.joi-tprofile-name {
	font-size: 1.1em;
	color: #234e70;
	margin: .2em 0;
	font-weight: bold;
}

.joi-tprofile-meta {
	margin: .2em 0 .4em;
	color: #555;
	font-size: .95em;
}

.joi-tprofile-quals {
	color: #555;
	font-size: .95em;
	line-height: 1.6;
	margin: .4em 0;
}

.joi-tprofile-comment {
	margin: .4em 0 0;
	background: #f5f7fa;
	border: 1px solid #e6e9ef;
	border-left: 1px solid #e6e9ef;
	padding: 0.9em;
	border-radius: 8px;
	line-height: 1.65;
	font-size: .96em;
	max-width: none;
}

.joi-tprofile-link {
	margin: .6em 0 0;
}

.joi-tprofile-link a {
	color: #2a4d9b;
	font-weight: bold;
	text-decoration: underline;
}

/* --- wide (business / LRC horizontal cards) --------------------------------*/
.joi-twide {
	border: 1px solid #ccc;
	border-radius: 12px;
	padding: 16px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-bottom: 2em;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	color: #333;
	line-height: 1.6;
	gap: 20px;
}

.joi-twide-photo {
	flex: 0 0 auto;
	text-align: center;
}

.joi-twide-img {
	width: auto;
	max-width: 180px;
	height: auto;
	border-radius: 8px;
}

.joi-twide-body {
	flex: 1 1 300px;
	min-width: 250px;
}

.joi-twide-name {
	margin: 0 0 0.15em 0;
	font-size: 1.4em;
	font-weight: bold;
	color: #2a4d9b;
	letter-spacing: 0.5px;
}

.joi-twide-meta {
	margin: 0 0 0.5em 0;
	font-weight: 500;
	color: #555;
	font-size: 0.95em;
}

.joi-twide-link {
	margin: 0 0 1em 0;
}

.joi-twide-link a {
	color: #2a4d9b;
	font-weight: bold;
	font-size: 0.95em;
	text-decoration: none;
}

.joi-twide-link a:hover {
	text-decoration: underline;
}

.joi-twide-quals-h {
	margin: 0 0 6px 0;
	font-size: 1.1em;
	font-weight: 600;
	color: #333;
}

.joi-twide-comment {
	margin-top: .8em;
}

/* --- figure (classes-and-textbooks course cards) ---------------------------*/
.joi-tfigure {
	margin: 0;
	text-align: center;
}

.joi-tfigure-img {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e6eef6;
	display: block;
	margin: 0 auto;
}

.joi-tfigure-cap {
	font-size: .9em;
	font-weight: 600;
	color: #234e70;
	margin-top: .4em;
}

/* --- quals fragment (profile pages, blue-dot pseudo list) ------------------*/
.joi-tquals-dot {
	margin: .5em 0;
	display: flex;
	gap: 6px;
	align-items: flex-start;
	font-size: 14px;
	color: #234e70;
}

.joi-tquals-dot span {
	color: #9bb9da;
	font-size: 0.7em;
}

/* --- profile "Teacher's Blog" article cards --------------------------------*/
.joi-tposts {
	margin: 28px 0 6px;
	border: 1px solid #eee;
	border-radius: 16px;
	padding: 24px;
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

.joi-tposts-h {
	margin: 0 0 12px;
	font-size: 20px;
	color: #234e70;
	font-weight: bold;
}

.joi-tposts-lead {
	margin: 0 0 18px;
	font-size: 15px;
	color: #555;
	line-height: 1.6;
}

.joi-tposts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.joi-tposts-card {
	border: 1px solid #eee;
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(180deg, #fff, #f9fbff);
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.joi-tposts-cover-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.joi-tposts-cover,
.joi-content img.joi-tposts-cover {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.joi-tposts-cover-empty {
	background: linear-gradient(135deg, #f7f8fa 0%, #e6eef7 100%);
}

.joi-tposts-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.joi-tposts-copy {
	display: block;
	text-decoration: none;
	color: inherit;
	flex: 1 1 auto;
}

.joi-tposts-title {
	margin: 0;
	font-weight: bold;
	color: #234e70;
	font-size: 15px;
	line-height: 1.5;
}

.joi-tposts-copy:hover .joi-tposts-title,
.joi-tposts-copy:focus .joi-tposts-title {
	color: #f31065;
}

.joi-tposts-excerpt {
	margin: .5em 0 0;
	font-size: 13px;
	color: #456;
	opacity: .9;
	line-height: 1.6;
}

.joi-tposts-date {
	display: block;
	margin: .8em 0 0;
	font-size: 12px;
	color: #678;
}

.joi-tposts-more {
	margin: .8em 0 0;
	font-size: 13px;
	font-weight: 500;
}

.joi-tposts-more a {
	color: #234e70;
	text-decoration: none;
}

.joi-tposts-more a:hover,
.joi-tposts-more a:focus {
	color: #f31065;
	text-decoration: underline;
}
