/*====================
single-topics（お知らせ 詳細）
ブレイクポイント: variables.css 参照
====================*/
.topics-single {
	display: block;
}

.topics-single__main,
.topics-single__main.detail-layout__main {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	background: var(--color-topics-bg);
	overflow: visible;
}

.topics-single .detail-layout__main-inner {
	overflow: visible;
}

/* 詳細：ゆらぎ配置（main-inner 右上・左下） */
.topics-single .detail-layout__main-inner > .topics-page__yuragi-slot--top-right {
	top: 0;
	right: -128px;
}

@media screen and (max-width: 1279px) {
	.topics-single .detail-layout__main-inner > .topics-page__yuragi-slot--top-right {
		right: 0;
	}
}

.topics-single .detail-layout__main-inner > .topics-page__yuragi-slot--bottom-left {
	bottom: 44px;
	left: 0;
}

.topics-single__header,
.topics-single__body,
.topics-post-nav,
.topics-related {
	position: relative;
	z-index: 1;
}

.topics-single__header {
	margin-bottom: 0;
}

.topics-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
	margin: 0 0 16px;
}

.topics-single__date {
	color: var(--color-brand-navy);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.13em;
}

.topics-single__cat {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 8px 16px;
	background: var(--color-brand-navy);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.13em;
	white-space: nowrap;
}

.topics-single__title {
	margin: 0 0 16px;
	color: var(--color-brand-navy);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.07em;
}

@media screen and (max-width: 1279px) {
	.topics-single__title {
		font-size: 24px;
		letter-spacing: -0.01em;
	}
}

.topics-single__title.js-anim-sweep {
	display: block;
	width: 100%;
	max-width: 100%;
}

.topics-single__title .js-anim-sweep__content {
	color: var(--color-brand-navy);
}

.topics-single__rule {
	display: block;
	width: 100%;
	height: 0;
	margin: 0 0 16px;
	border: 0;
	border-top: 1px solid var(--color-brand-navy);
}

.topics-single__body {
	color: var(--color-main);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.13em;
}

.topics-single__body > *:first-child {
	margin-top: 0;
}

.topics-single__body > *:last-child {
	margin-bottom: 0;
}

.topics-single__body p {
	margin: 0 0 32px;
}

.topics-single__body p:last-child {
	margin-bottom: 0;
}

.topics-single__body h2,
.topics-single__body h3 {
	margin: 2em 0 1em;
	color: var(--color-brand-navy);
	font-weight: 700;
	line-height: 1.5;
}

.topics-single__body img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 32px 0;
}

.topics-single__body figure {
	margin: 32px 0;
}

.topics-single__body figure img {
	margin: 0;
}

/* 前後の記事 */
.topics-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 48px;
	padding-top: 48px;
	border-top: 1px solid rgba(0, 41, 125, 0.2);
}

.topics-post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-sizing: border-box;
	padding: 16px;
	border: 1px solid var(--color-brand-navy);
	background: #fff;
	color: var(--color-brand-navy);
	font-size: 14px;
	line-height: 1.5;
	text-decoration: none;
	transition:
		background-color 0.25s ease,
		color 0.25s ease;
}

.topics-post-nav__link--next {
	text-align: right;
}

.topics-post-nav__link:hover {
	background: var(--color-brand-navy);
	color: #fff;
}

.topics-post-nav__link.is-empty {
	visibility: hidden;
	border-color: transparent;
	pointer-events: none;
}

.topics-post-nav__label {
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.13em;
}

.topics-post-nav__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.07em;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.topics-single__body a {
	color: var(--color-brand-navy);
	text-decoration: underline;
}

.topics-single__body a:hover {
	opacity: 0.75;
}

/* 関連記事 */
.topics-related {
	margin-top: 48px;
}

.topics-related__title {
	margin: 0 0 24px;
	color: var(--color-main);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.07em;
}

@media screen and (max-width: 1279px) {
	.topics-related__title {
		font-size: 20px;
	}
}

.topics-related__title.js-anim-sweep {
	display: block;
	width: fit-content;
	max-width: 100%;
}

.topics-related__title .js-anim-sweep__content {
	color: var(--color-main);
}

.topics-related__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.topics-related__item + .topics-related__item {
	margin-top: 16px;
}

.topics-related__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	padding: 24px;
	background: var(--color-brand-navy);
	color: #fff;
	text-decoration: none;
	transition:
		background-color 0.3s ease,
		transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.topics-related__card:hover {
	background-color: #003694;
	transform: translateY(-2px);
}

.topics-related__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.topics-related__date {
	flex: 0 0 100px;
	width: 100px;
	box-sizing: border-box;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.13em;
	white-space: nowrap;
	opacity: 0.92;
}

@media screen and (max-width: 1279px) {
	.topics-related__date {
		font-size: 14px;
	}
}

.topics-related__cat {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 4px 12px;
	background: #fff;
	color: var(--color-brand-navy);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.13em;
	white-space: nowrap;
}

@media screen and (max-width: 1279px) {
	.topics-related__cat {
		font-size: 14px;
	}
}

.topics-related__card-title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.07em;
	word-break: break-word;
	overflow-wrap: break-word;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

@media screen and (max-width: 1279px) {
	.topics-related__card-title {
		font-size: 14px;
	}
}

@media screen and (max-width: 600px) {
	.topics-single .detail-layout__main-inner > .topics-page__yuragi-slot--top-right {
		top: 24px;
	}

	.topics-single__cat {
		padding: 4px 16px;
	}

	.topics-single__title {
		letter-spacing: -0.02em;
	}

	.topics-post-nav {
		grid-template-columns: 1fr;
	}

	.topics-post-nav__link--next {
		text-align: left;
	}

	.topics-related__card {
		padding: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.topics-related__card {
		transition: none;
	}
}
