/* ブログ・お知らせ（投稿の詳細ページ）
 * Elementor Pro のテーマビルダー「Post_template」の余白・文字サイズを再現している。
 * 共通パーツ（タイトル帯・ボタン・お問い合わせ導線）は base.css にある。
 */

.yb-body {
	display: grid;
	grid-template-columns: 65% 35%;
	max-width: 1170px;
	margin: 120px auto 80px;
}

.yb-main {
	min-width: 0;
	padding-right: 50px;
}

/* 投稿日・投稿者 */
.yb-meta {
	display: flex;
	align-items: center;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	font-family: "Roboto", "Noto Sans JP", sans-serif;
	font-size: 1em;
	line-height: 1.5em;
}

.yb-meta__item + .yb-meta__item::before {
	content: "";
	display: inline-block;
	width: 0;
	height: 1em;
	margin: 0 12px;
	border-left: 5px dotted var(--yw-secondary);
	vertical-align: middle;
}

.yb-meta a {
	color: var(--yw-secondary);
	text-decoration: none;
}

.yb-meta a:hover {
	text-decoration: underline;
}

/* 抜粋（リード文） */
.yb-excerpt {
	margin: 0;
	padding-left: 24px;
	border-left: 4px solid #d3b574;
	font-size: 1.5em;
	font-weight: 600;
	line-height: 2em;
}

.yb-thumbnail {
	margin: 40px 0 0;
}

.yb-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* 本文（ブロックエディタの内容）
   Elementor 版のウィジェット設定（本文 1.25em / 行間 2em / 見出し 1.875em）に合わせている。 */
.yb-content {
	/* Elementor のウィジェット内側の余白（左右 10px）に合わせる */
	padding: 0 10px;
	font-size: 1.25em;
	font-weight: 400;
	line-height: 2em;
}

.yb-content > *:first-child {
	margin-top: 24px;
}

.yb-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.yb-content figure {
	margin: 0 0 1.75em;
}

.yb-content h2 {
	/* Elementor 版は見出しに余白を付けず、段落側の余白で間隔を取っている */
	margin: 0;
	font-size: 1.875rem;
	font-weight: 600;
	line-height: 1.3em;
}

.yb-content h3,
.yb-content h4 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3em;
}

.yb-content p {
	margin: 0 0 1.75em;
}

.yb-content ul,
.yb-content ol {
	margin: 0 0 1.2em;
	padding-left: 1.5em;
}

.yb-content table {
	width: 100%;
	border-collapse: collapse;
}

.yb-content td,
.yb-content th {
	padding: 8px 12px;
	border: 1px solid #d8d9e4;
}

.yb-content .wp-block-separator {
	margin: 32px 0;
	border: 0;
	border-top: 1px solid #d8d9e4;
}

/* サイドバー（Elementor のウィジェット内側の余白 10px に合わせる） */
.yb-side {
	min-width: 0;
	padding: 0 10px;
}

.yb-share {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 80px;
	padding: 20px 0;
	border-top: 1px solid var(--yw-primary);
	border-bottom: 1px solid var(--yw-primary);
}

.yb-share__title {
	margin: 0;
	color: #16163f;
	font-family: "Merriweather", "Noto Sans JP", serif;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.5em;
}

.yb-share__list {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.yb-share__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s;
}

.yb-share__btn:hover {
	opacity: 0.8;
}

.yb-share__btn--facebook {
	background: #3b5998;
}

.yb-share__btn--x {
	background: #000;
}

.yb-related__title {
	margin: 0;
	color: var(--yw-primary);
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.5em;
}

.yb-related {
	display: grid;
	gap: 24px;
	margin: 0;
	padding: 24px 0 0;
	list-style: none;
}

.yb-related__item {
	display: flex;
	align-items: flex-start;
	margin: 0;
}

.yb-related__thumb {
	flex: 0 0 30%;
	margin-right: 16px;
}

.yb-related__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 4px;
}

.yb-related__post-title {
	margin: 0 0 8px;
	font-family: "Noto Sans", "Noto Sans JP", sans-serif;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.5em;
}

.yb-related__post-title a {
	color: var(--yw-text);
	text-decoration: none;
}

.yb-related__post-title a:hover {
	text-decoration: underline;
}

.yb-related__date {
	display: block;
	margin-bottom: 13px;
	color: var(--yw-secondary);
	font-size: 0.92em;
	line-height: 1.3em;
}

/* 前後の記事 */
.yb-nav {
	display: flex;
	align-items: stretch;
	max-width: 1170px;
	margin: 0 auto 80px;
	border-top: 1px solid var(--yw-secondary);
	border-bottom: 1px solid var(--yw-secondary);
}

.yb-nav__side {
	flex: 1 1 50%;
	min-width: 0;
	padding: 16px 24px;
}

.yb-nav__side--next {
	text-align: right;
}

.yb-nav__separator {
	width: 1px;
	background: var(--yw-secondary);
}

.yb-nav a {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
}

.yb-nav__side--next a {
	justify-content: flex-end;
}

.yb-nav__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.yb-nav__label {
	color: var(--yw-secondary);
	font-size: 1em;
	line-height: 1.8em;
}

.yb-nav__post-title {
	overflow: hidden;
	color: var(--yw-primary);
	font-size: 1em;
	line-height: 1.6em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.yb-nav__arrow {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border: 2px solid var(--yw-primary);
	border-radius: 50%;
	position: relative;
}

.yb-nav__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 6px;
	height: 6px;
	border-top: 2px solid var(--yw-primary);
	border-right: 2px solid var(--yw-primary);
}

.yb-nav__arrow--prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.yb-nav__arrow--next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

@media (max-width: 1024px) {
	.yb-body {
		margin: 0 auto;
		padding: 80px 24px 0;
	}

	.yb-main {
		padding-right: 24px;
	}
}

@media (max-width: 767px) {
	.yb-body {
		grid-template-columns: minmax(0, 1fr);
		padding: 80px 24px 0;
	}

	.yb-meta {
		margin-bottom: 20px;
	}

	/* スマートフォンでは Elementor 版に左右の内側余白がない */
	.yb-content {
		padding: 0;
	}

	.yb-content > *:first-child {
		margin-top: 20px;
	}

	.yb-thumbnail {
		margin-top: 60px;
	}

	.yb-side {
		padding: 0;
	}

	.yb-main {
		padding-right: 0;
	}

	.yb-excerpt {
		font-size: 1.25em;
	}

	/* スマートフォンでは Elementor 版の本文が 1.125em 相当で表示されるため合わせる */
	.yb-content {
		font-size: 1.40625em;
	}

	.yb-share {
		margin: 40px 0;
	}

	.yb-nav {
		margin-bottom: 40px;
	}

	.yb-nav__side {
		padding: 12px 16px;
	}

	.yb-nav__label {
		font-size: 0.85em;
	}

	.yb-nav__post-title {
		font-size: 0.9em;
	}
}
