/*
 * 本文（ブロック）とブロックパターンの見た目
 * サイト表示と編集画面の両方で読み込みます。
 */

/* ---------- 本文の幅 ---------- */
.entry-content > * {
	max-width: var(--wp--style--global--content-size, 760px);
	margin-left: auto;
	margin-right: auto;
}

.entry-content > .alignwide {
	max-width: var(--wp--style--global--wide-size, 1000px);
}

.entry-content > .alignfull {
	max-width: none;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 2.2em;
	margin-bottom: 0.8em;
}

/* 上下だけを決める（左右まで0にすると、上の「本文の幅」の中央寄せが消えて、段落だけ左に寄ってしまうため） */
.entry-content p {
	margin-top: 0;
	margin-bottom: 1.4em;
}

.entry-content hr.wp-block-separator {
	margin: 2.5em auto;
	border: 0;
	border-top: 1px solid currentColor;
	opacity: 1;
}

.entry-content .wp-block-separator:not(.is-style-dots) {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 760px);
}

.entry-content .wp-block-image img {
	height: auto;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border: 1px solid #d5d8e0;
	vertical-align: top;
}

.entry-content th {
	background: #f4f5f9;
}

/* ---------- リード文（大きめの太字・中央） ---------- */
.bn-lead {
	font-size: clamp(1.125rem, 2.2vw, 1.5rem);
	font-weight: 700;
	line-height: 1.8;
	text-align: center;
}

/* ---------- 両側に線が入る見出し（Latest Information など） ---------- */
.line-title,
.bn-line-title {
	display: flex;
	align-items: center;
	gap: 40px;
	margin: 0 0 16px;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 600;
	font-size: clamp(1.75rem, 3.4vw, 2.5rem);
	line-height: 1.3;
	text-align: center;
}

.line-title::before,
.line-title::after,
.bn-line-title::before,
.bn-line-title::after {
	content: "";
	flex: 1 1 0;
	border-top: 1px solid var(--wp--preset--color--line, #2a2a2a);
}

.entry-content > .bn-line-title {
	max-width: none;
}

/* ---------- Read more 付きのカード（Contents の一覧など） ---------- */
.bn-card {
	padding: 48px 8% 44px;
	border: 1px solid var(--wp--preset--color--line, #2a2a2a);
	background: var(--wp--preset--color--surface, #fff);
}

.bn-card + .bn-card {
	margin-top: 24px;
}

.bn-card > h2 {
	margin: 0 0 24px;
	text-align: center;
}

.bn-card > .wp-block-separator {
	margin: 0 0 28px;
}

.bn-card > h3 {
	margin: 0 0 6px;
}

.bn-card .wp-block-buttons {
	margin-top: 32px;
	justify-content: center;
}

/* ---------- 論文などの出典 ---------- */
.bn-refs {
	margin-top: 2.5em;
	padding: 24px 28px;
	background: #f4f5f9;
	font-size: 0.9375rem;
	line-height: 1.8;
}

.bn-refs > p {
	margin: 0;
}

.bn-refs > p + p {
	margin-top: 1.2em;
}

.bn-refs strong {
	font-weight: 700;
}

/* ---------- 年表（左：年、右：内容） ---------- */
.bn-timeline {
	gap: 0 !important;
	margin-bottom: 0 !important;
}

.bn-timeline > .wp-block-column:first-child {
	padding: 4px 32px 32px 0;
	text-align: right;
}

.bn-timeline > .wp-block-column:last-child {
	padding: 0 0 40px 32px;
	border-left: 1px solid var(--wp--preset--color--line, #2a2a2a);
}

.bn-timeline__year {
	margin: 0 !important;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.4;
}

.bn-timeline__label {
	margin: 4px 0 0 !important;
	font-size: 0.9375rem;
	line-height: 1.6;
}

/* ---------- 「Back to Contents」などの戻るリンク ---------- */
.bn-back-link {
	text-align: right;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 500;
	font-size: 1.125rem;
}

.bn-back-link a {
	color: #1e4d2b;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}

.bn-back-link a:hover {
	color: var(--wp--preset--color--accent, #3d4db0);
}

/* ---------- フォームへ移動するボタン（下向き矢印） ---------- */
.bn-jump {
	text-align: center;
}

.bn-jump a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid #1e4d2b;
	color: #1e4d2b;
	font-size: 1.5rem;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.bn-jump a:hover {
	background: #1e4d2b;
	color: #fff;
}

/* ---------- お問い合わせフォーム（黒い箱） ---------- */
.bn-form-box {
	padding: 56px 8% 48px;
	background: var(--wp--preset--color--dark, #000);
	color: #fff;
	scroll-margin-top: 24px;
}

.bn-form-box h2,
.bn-form-box h3 {
	margin-top: 0;
	color: #fff;
	text-align: center;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 500;
}

.bn-form-box .wpcf7 p {
	margin: 0 0 24px;
}

.bn-form-box label {
	display: block;
	font-size: 0.9375rem;
}

.bn-form-box input[type="text"],
.bn-form-box input[type="email"],
.bn-form-box input[type="tel"],
.bn-form-box textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 8px 2px;
	border: 0;
	border-bottom: 1px solid #fff;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font: inherit;
}

.bn-form-box textarea {
	height: 160px;
	resize: vertical;
}

.bn-form-box input:focus,
.bn-form-box textarea:focus {
	outline: none;
	border-bottom-color: #8fa2ff;
}

.bn-form-box input[type="submit"] {
	display: block;
	margin: 8px auto 0;
	padding: 12px 48px;
	border: 1px solid #fff;
	background: transparent;
	color: #fff;
	font: inherit;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.bn-form-box input[type="submit"]:hover {
	background: #fff;
	color: #000;
}

.bn-form-box .wpcf7-not-valid-tip {
	color: #ff9b9b;
	font-size: 0.875rem;
}

.bn-form-box .wpcf7-response-output {
	margin: 16px 0 0 !important;
	color: #fff;
}

.bn-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
}

/* ---------- スマホ ---------- */
@media (max-width: 782px) {
	.line-title,
	.bn-line-title {
		gap: 16px;
	}

	.bn-card {
		padding: 32px 20px;
	}

	.bn-refs {
		padding: 18px 16px;
	}

	.bn-timeline > .wp-block-column:first-child {
		padding: 0 0 4px 16px;
		text-align: left;
		border-left: 1px solid var(--wp--preset--color--line, #2a2a2a);
	}

	.bn-timeline > .wp-block-column:last-child {
		padding: 0 0 32px 16px;
	}

	.bn-form-box {
		padding: 40px 20px 32px;
	}

	.bn-form-row {
		grid-template-columns: 1fr;
	}
}

/* ---------- プロフィール（写真＋項目） ---------- */
.bn-profile {
	margin-bottom: 64px !important;
}

.bn-profile .wp-block-image img {
	max-width: 220px;
}

.bn-profile h3 {
	margin-top: 0;
}
