/**
 * Seminar Brain - Lecturer templates CSS.
 * Lightning G3 revised.
 *
 * 方針:
 * - 余白・行間・色をCSS変数で管理
 * - 同一クラスの重複定義を避ける
 * - 講師写真は正方形表示
 */

/* ==================================================
   Variables
================================================== */

:root {
	/* 余白 */
	--sb-space-xs: 8px;
	--sb-space-sm: 16px;
	--sb-space-md: 24px;
	--sb-space-lg: 48px;
	--sb-space-xl: 56px;

	/* 行間 */
	--sb-line-height-tight: 1.5;
	--sb-line-height-normal: 1.8;
	--sb-line-height-body: 1.9;

	/* 色 */
	--sb-color-border: #e5e5e5;
	--sb-color-border-light: #ddd;
	--sb-color-text-muted: #666;
	--sb-color-placeholder-bg: #f3f3f3;
	--sb-color-placeholder-text: #777;
	--sb-color-button-border: #222;
	--sb-color-pagination-current-bg: #222;
	--sb-color-pagination-current-text: #fff;
}

/* ==================================================
   Common
================================================== */

.sb-page-header {
	margin: var(--sb-space-lg) 0;
}

.sb-page-title {
	margin: 0;
}

.sb-page-description {
	margin-top: 12px;
}

.sb-pagination {
	margin-top: var(--sb-space-lg);
	margin-bottom: var(--sb-space-lg);
	text-align: center;
}

.sb-pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--sb-space-xs);
}

.sb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--sb-color-border-light);
	text-decoration: none;
}

.sb-pagination .page-numbers.current {
	background: var(--sb-color-pagination-current-bg);
	color: var(--sb-color-pagination-current-text);
	border-color: var(--sb-color-pagination-current-bg);
}

/* ==================================================
   Lecturer archive / taxonomy
================================================== */

.sb-lecturer-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}


/* VK Filter Search の結果画面も通常一覧と同じ横幅で表示する */
/* ==================================================
   Lecturer card
================================================== */

.sb-lecturer-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: var(--sb-space-sm);
	border: 1px solid var(--sb-color-border);
	background: #fff;
}

.sb-lecturer-card__top {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: var(--sb-space-sm);
	margin-bottom: var(--sb-space-sm);
}

.sb-lecturer-card__photo-link {
	display: block;
	text-decoration: none;
}

.sb-lecturer-card__profile {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.sb-lecturer-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.sb-lecturer-card__name {
	margin: 0 0 var(--sb-space-xs);
	font-size: 1.25rem;
	line-height: 1.4;
}

.sb-lecturer-card__name a {
	text-decoration: none;
}

.sb-lecturer-card__title {
	font-size: 0.95rem;
	line-height: var(--sb-line-height-normal);
}

.sb-lecturer-card__summary {
	margin-bottom: var(--sb-space-sm);
	font-size: 0.95rem;
	line-height: var(--sb-line-height-normal);
}

.sb-lecturer-card__button-wrap {
	margin-top: auto;
}

.sb-lecturer-card__button,
.sb-lecturer-documents__button {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid var(--sb-color-button-border);
	text-decoration: none;
}

/* ==================================================
   Lecturer photo
================================================== */

.sb-lecturer-photo__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.sb-lecturer-photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: var(--sb-color-placeholder-bg);
	color: var(--sb-color-placeholder-text);
}

/* ==================================================
   Lecturer genre tags
================================================== */

.sb-lecturer-genres {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.sb-lecturer-genres__item a {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid var(--sb-color-border-light);
	border-radius: 999px;
	font-size: 0.8rem;
	text-decoration: none;
}

/* ==================================================
   Lecturer detail
================================================== */

.sb-lecturer-detail {
	padding-top: var(--sb-space-lg);
}

.sb-lecturer-detail__header {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: var(--sb-space-lg);
	margin-bottom: var(--sb-space-lg);
}

.sb-lecturer-detail__name-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

.sb-lecturer-detail__name {
	margin: 0;
}

.sb-lecturer-detail__furigana {
	margin: 0;
	font-size: 0.95rem;
	color: var(--sb-color-text-muted);
}

.sb-lecturer-detail__title {
	margin-bottom: var(--sb-space-sm);
	line-height: var(--sb-line-height-normal);
}

.sb-lecturer-detail__summary,
.sb-lecturer-section__body {
	line-height: var(--sb-line-height-body);
}

.sb-lecturer-detail__summary {
	margin-top: var(--sb-space-sm);
}

/* ==================================================
   Lecturer detail sections
================================================== */

.sb-lecturer-section {
	margin: 0 0 var(--sb-space-xl);
}

.sb-lecturer-section__title {
	margin: 0 0 var(--sb-space-sm);
	padding-bottom: var(--sb-space-xs);
	border-bottom: 1px solid var(--sb-color-border-light);
}

/* ==================================================
   Lecturer themes
================================================== */

.sb-lecturer-theme {
	padding: 20px;
	border: 1px solid var(--sb-color-border);
}

.sb-lecturer-theme + .sb-lecturer-theme {
	margin-top: var(--sb-space-sm);
}

.sb-lecturer-theme__title {
	margin: 0 0 10px;
	font-size: 1.1rem;
}

.sb-lecturer-theme__summary {
	line-height: var(--sb-line-height-normal);
}

/* ==================================================
   Lecturer documents
================================================== */

.sb-lecturer-documents {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sb-lecturer-documents__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sb-space-sm);
	padding: 14px 0;
	border-bottom: 1px solid var(--sb-color-border);
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 991px) {
	.sb-lecturer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sb-lecturer-detail__header {
		grid-template-columns: 240px minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.sb-lecturer-detail__photo {
		max-width: 240px;
		margin: 0 auto;
	}

	.sb-lecturer-card__top {
		grid-template-columns: 96px minmax(0, 1fr);
	}

	.sb-lecturer-grid {
		grid-template-columns: 1fr;
	}

	.sb-lecturer-detail {
		padding-top: var(--sb-space-md);
	}

	.sb-lecturer-detail__header {
		grid-template-columns: 1fr;
		gap: var(--sb-space-md);
	}

	/* 講師詳細：狭い画面では資料名とボタンを縦並びにする */
	.sb-lecturer-documents__item {
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 14px;
	}

	.sb-lecturer-documents__title {
		display: block;
		width: 100%;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.sb-lecturer-documents__button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: auto;
		margin-top: 0;
	}
}


/* VK Filter Search 結果画面：
   Lightningカスタマイザーのカラム設定を尊重するため、
   main-section幅の強制指定やsub-section非表示は行いません。 */
.sb-is-vk-filter-search .sb-lecturer-grid {
	display: grid;
}


/* ==================================================
   Company info pattern outside main-section
================================================== */

/*
 * 会社案内ブロックは、2カラム時に main-section の幅へ引っ張られないよう、
 * sb_lightning_site_body_end() の後に出力します。
 * 見た目は WordPress パターン footer-company-info-2 側のデザインをそのまま使用します。
 */
.sb-company-info-area {
	clear: both;
	width: 100%;
	margin: 0;
	padding: 0;
}

.sb-company-info-area > * {
	margin-top: 0;
	margin-bottom: 0;
}

.sb-company-info-area .alignfull {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.sb-company-info-area .wp-block-group {
	box-sizing: border-box;
}


/* ==================================================
   VK Filter Search result card width fix
================================================== */

/*
 * VK Filter Search の結果画面でも、通常の講師プロフィール一覧と同じ
 * カード幅・3列グリッドになるようにする。
 * Lightning のカラム設定自体は尊重し、main-section 幅や sidebar 表示は強制しない。
 */
.sb-is-vk-filter-search .sb-lecturer-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	width: 100%;
	max-width: none;
}

.sb-is-vk-filter-search .sb-lecturer-card {
	width: 100%;
	min-width: 0;
}

.sb-is-vk-filter-search .sb-lecturer-card__head {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.sb-is-vk-filter-search .sb-lecturer-card__photo {
	width: 120px;
	height: 120px;
}

.sb-is-vk-filter-search .sb-lecturer-card__photo img,
.sb-is-vk-filter-search .sb-lecturer-card__photo .sb-lecturer-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 991.98px) {
	.sb-is-vk-filter-search .sb-lecturer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.sb-is-vk-filter-search .sb-lecturer-grid {
		grid-template-columns: 1fr;
	}

	.sb-is-vk-filter-search .sb-lecturer-card__head {
		grid-template-columns: 120px minmax(0, 1fr);
	}
}



/* ==================================================
   Lecturer detail Font Awesome icon adjustments
================================================== */

.sb-lecturer-section__title {
	display: flex;
	align-items: center;
	gap: 0.45em;
}

.sb-lecturer-section__title .fa-solid {
	font-size: 0.9em;
	line-height: 1;
	flex-shrink: 0;
}

.sb-lecturer-documents__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
}

.sb-lecturer-documents__button .fa-solid {
	font-size: 0.95em;
	line-height: 1;
}

/* ==================================================
   Lecturer archive card alignment (2026-07-11)
================================================== */

/* 氏名は省略せず、表示幅に応じて折り返して全文を表示する。 */
.sb-lecturer-card__name {
	overflow: visible;
	white-space: normal;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: normal;
}

/* 肩書は3行分の高さを確保し、超過分を「…」で省略する。 */
.sb-lecturer-card__title {
	display: -webkit-box;
	height: calc(1.8em * 3);
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* 紹介文は5行分の高さを確保し、超過分を「…」で省略する。 */
.sb-lecturer-card__summary {
	display: -webkit-box;
	height: calc(1.8em * 5);
	margin-bottom: var(--sb-space-sm);
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	line-clamp: 5;
}

/* ジャンルは紹介文の下に2段分の高さで表示する。 */
.sb-lecturer-card .sb-lecturer-genres,
.sb-lecturer-genres-space {
	height: 66px;
	margin: 0 0 var(--sb-space-sm);
}

.sb-lecturer-card .sb-lecturer-genres {
	align-content: flex-start;
	overflow: hidden;
}

.sb-lecturer-genres__item[hidden] {
	display: none !important;
}

/* 2段に収まらないジャンル数（例：+3）。 */
.sb-lecturer-genres__more {
	display: inline-flex;
	align-items: center;
	min-height: 27px;
	padding: 3px 6px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1;
}

/* ボタンはカード最下部に配置する。 */
.sb-lecturer-card__button-wrap {
	margin-top: auto;
}

/* ==================================================
   Document archive / horizontal card (2026-07-13)
================================================== */

/* 資料一覧はサイドバー用カラム幅を使わず、本文コンテナ全幅で表示 */
.sb-is-document-archive .site-body-container {
	display: block;
}

.sb-is-document-archive .main-section {
	width: 100%;
	max-width: none;
	flex: 0 0 100%;
}

.sb-document-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	width: 100%;
}

.sb-document-card {
	display: grid;
	grid-template-columns: minmax(170px, 190px) minmax(0, 1fr);
	gap: 24px;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--sb-color-border);
	background: #fff;
}

.sb-document-card__thumbnail {
	width: 100%;
	min-width: 0;
	max-width: 190px;
}

.sb-document-card__thumbnail-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.sb-document-thumbnail__img,
.sb-document-thumbnail--placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 210 / 297; /* A4縦 */
	border: 1px solid var(--sb-color-border);
}

.sb-document-thumbnail__img {
	height: auto;
	object-fit: contain;
	background: var(--sb-color-placeholder-bg);
}

.sb-document-thumbnail--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	background: var(--sb-color-placeholder-bg);
	color: var(--sb-color-placeholder-text);
}

.sb-document-thumbnail--placeholder .fa-solid {
	font-size: 3rem;
	line-height: 1;
}

.sb-document-card__body {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

/* Lightning側の見出し装飾を解除し、短いアクセント線に統一 */
.sb-document-card__title {
	position: relative;
	display: -webkit-box;
	margin: 0 0 10px;
	padding: 12px 0 8px;
	overflow: hidden;
	border: 0;
	background: none;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.sb-document-card__title a {
	color: inherit;
	text-decoration: none;
}

.sb-document-card__title::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 88px;
	height: 2px;
	background: #287d3c;
	content: "";
}

.sb-document-card__summary {
	display: -webkit-box;
	margin: 0 0 12px;
	overflow: hidden;
	font-size: 0.95rem;
	line-height: var(--sb-line-height-normal);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.sb-document-card__summary p:last-child {
	margin-bottom: 0;
}

.sb-document-card__footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--sb-color-border);
}

.sb-document-card__lecturers {
	min-width: 0;
	font-size: 0.9rem;
}

.sb-document-card__lecturers-label {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin-bottom: 5px;
	font-weight: 700;
}

.sb-document-card__lecturers-label .fa-solid {
	font-size: 0.95em;
	line-height: 1;
}

.sb-document-card__lecturers-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sb-document-card__lecturers-list a {
	text-decoration: none;
}

.sb-document-card__button-wrap {
	flex: 0 0 auto;
}

.sb-document-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 140px;
	padding: 9px 18px;
	border: 1px solid var(--sb-color-button-border);
	text-decoration: none;
}

@media (max-width: 991px) {
	.sb-document-card {
		grid-template-columns: minmax(155px, 175px) minmax(0, 1fr);
		gap: 20px;
	}

	.sb-document-card__footer {
		align-items: flex-start;
	}
}

@media (max-width: 767px) {
	.sb-document-grid {
		gap: 20px;
	}

	.sb-document-card {
		display: flex;
		flex-direction: column;
		gap: 0;
		padding: 16px;
	}

	.sb-document-card__thumbnail {
		width: min(100%, 180px);
		max-width: 180px;
		margin: 0 auto 16px;
	}

	.sb-document-thumbnail__img {
		height: auto;
		max-height: none;
	}

	.sb-document-card__title {
		font-size: 1.15rem;
	}

	.sb-document-card__summary {
		-webkit-line-clamp: 4;
		line-clamp: 4;
	}

	.sb-document-card__footer {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.sb-document-card__button {
		width: 100%;
	}
}
