/*
 * トップページ（inc/top.php）。トークンは htn-parts.css、見出しの打ち消しなどは htn-guide.css。
 * モック①（Design キャンバス「血圧の学校 リニューアル案」）に合わせる。
 * 画像は inc/top.php が CSS 変数（--htn-img-*）で渡す。
 */

.htn-top-page {
	background: var(--htn-ground);
	position: relative;
}

/* SWELL のページタイトル（固定ページの h1）はトップでは出さない。ロゴの h1 がある */
.htn-top-page .c-pageTitle,
.htn-top-page .l-topTitleArea {
	display: none;
}

/* ---------- 左右の波の帯（1360px 以上だけ・下端はフェード） ---------- */
@media (min-width: 1360px) {
	.htn-top-page::before,
	.htn-top-page::after {
		content: "";
		position: absolute;
		top: 0;
		z-index: 0;
		width: 170px;
		height: 1180px;
		background: var(--htn-img-wave-l) top left / 170px 1180px no-repeat;
		-webkit-mask-image: linear-gradient(180deg, #000 75%, transparent);
		mask-image: linear-gradient(180deg, #000 75%, transparent);
		pointer-events: none;
	}
	.htn-top-page::before {
		left: 0;
	}
	.htn-top-page::after {
		right: 0;
		background-image: var(--htn-img-wave-r);
	}
}

.htn-top-page .htn-guide {
	position: relative;
	z-index: 1;
}

/* ---------- サイドバーは下へ（オーナー監修 2026-10-07） ----------
 * SWELL は -sidebar-on のとき本文とサイドバーを横並びにする（本文幅＝全幅−サイドバー幅）。
 * トップだけ横並びを解き、ヒーロー・検索カードをコンテナいっぱいに伸ばして、サイドバーはページの下に横並びで置く。
 * 検索ウィジェットは KEYWORD セクションと二重になるので出さない。 */
.htn-top-page.-sidebar-on .l-content {
	display: block;
}
.htn-top-page.-sidebar-on .l-mainContent,
.htn-top-page.-sidebar-on #sidebar {
	width: 100%;
}
.htn-top-page .htn-guide.is-layout-constrained > * {
	max-width: none;
}
.htn-top-page #sidebar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--htn-line);
}
.htn-top-page #sidebar > .c-widget {
	margin: 0;
}
.htn-top-page #sidebar > .c-widget:has(.wp-block-search) {
	display: none;
}
.htn-top-page .htn-guide > * + * {
	margin-top: 0;
}
.htn-top-sec {
	margin: 0 0 72px !important;
}
.htn-top-center {
	text-align: center;
}

/* ---------- ヒーロー ---------- */
.htn-top-hero {
	position: relative;
	padding: 12px 0 8px;
	text-align: center;
}
.htn-top-hero::before,
.htn-top-hero::after {
	content: "";
	position: absolute;
	top: 64px;
	width: 130px;
	height: 190px;
	background: var(--htn-img-monitor) center / contain no-repeat;
	pointer-events: none;
}
.htn-top-hero::before {
	left: calc(50% - 360px);
}
.htn-top-hero::after {
	right: calc(50% - 360px);
	background-image: var(--htn-img-heart);
}
.post_content .htn-top-hero .htn-top-catch {
	display: inline-block;
	margin: 0 0 22px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--htn-ink);
	font-family: var(--htn-display);
	font-size: 1.25rem;
	font-weight: 400;
	letter-spacing: .06em;
}
.post_content .htn-top-hero h1.htn-top-logo {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--htn-ink);
	font-family: var(--htn-display);
	font-size: clamp(3.25rem, 2rem + 4.5vw, 5.25rem);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: .08em;
}
.post_content .htn-top-hero h1.htn-top-logo::before,
.post_content .htn-top-hero h1.htn-top-logo::after {
	content: none;
}
.htn-top-logo .htn-rose,
.htn-rose {
	color: var(--htn-rose);
}
.post_content .htn-top-hero .htn-top-sub {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 14px 0 0;
	font-family: var(--htn-latin);
	font-size: .875rem;
	letter-spacing: .4em;
}
.htn-top-sub::before {
	content: "";
	width: 120px;
	height: 26px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26' fill='none' stroke='%23D9506A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 14h46l6-10 8 20 6-14 4 4h50'/%3E%3C/svg%3E") center / contain no-repeat;
}
.htn-top-sub span {
	padding: 6px 14px;
	background: #fff;
}
.post_content .htn-top-hero .htn-top-sup {
	margin: 20px 0 0;
	font-size: .8125rem;
	color: var(--htn-muted2);
}

/* 状況別の丸ボタン */
.htn-top-hero .wp-block-buttons.htn-qs {
	justify-content: center;
	gap: 22px;
	margin-top: 36px;
}
.htn-qs .wp-block-button__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 170px;
	height: 170px;
	padding: 0 16px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--htn-wine);
	box-shadow: 0 10px 24px rgba(142, 35, 64, .22);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
}
.htn-qs .wp-block-button__link::after {
	content: "";
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%238E2340' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M7 3l3 3-3 3'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.htn-qs .wp-block-button__link:hover,
.htn-qs .wp-block-button__link:focus-visible {
	background: var(--htn-wine-dark);
	color: #fff;
}

/* ---------- 共通：中央見出し・「一覧はこちら」 ---------- */
.htn-top-center .htn-en {
	text-align: center;
}
.post_content .htn-top-center h2 {
	text-align: center;
}
.htn-more-wrap {
	margin: 24px 0 0 !important;
	text-align: right;
}
.htn-top-center .htn-more-wrap {
	text-align: center;
}
.htn-guide a.htn-more,
.htn-more-wrap a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--htn-ink);
	color: var(--htn-ink);
	font-size: .875rem;
	font-weight: 700;
	text-decoration: none;
	box-sizing: border-box;
}
.htn-guide a.htn-more::after,
.htn-more-wrap a::after {
	content: "";
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--htn-wine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M7 3l3 3-3 3'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- KEYWORD ---------- */
.htn-top-keyword {
	overflow: hidden;
	padding: 50px 40px 44px;
	position: relative;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(110, 40, 55, .06);
}
.htn-top-keyword::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 14px;
	background: repeating-linear-gradient(90deg, var(--htn-rose) 0 34px, var(--htn-blush) 34px 68px);
}
.htn-top-keyword .wp-block-search {
	max-width: 540px;
	margin: 0 auto 22px;
}
.htn-top-keyword .wp-block-search__inside-wrapper {
	position: relative;
	padding: 0;
	border: 0;
}
.htn-top-keyword .wp-block-search__input {
	height: 56px;
	padding: 0 60px 0 26px;
	border: 1px solid var(--htn-line);
	border-radius: 28px;
	background: #fff;
	color: var(--htn-ink);
	font-size: .9375rem;
}
.htn-top-keyword .wp-block-search__button {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--htn-wine);
	color: #fff;
}
.htn-top-keyword .wp-block-search__button svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}
.htn-pickup {
	padding: 26px 28px;
	border-radius: 14px;
	background: var(--htn-paper);
	text-align: center;
}
.post_content .htn-pickup .htn-en {
	font-size: 1.125rem;
	letter-spacing: .08em;
	color: var(--htn-wine);
	text-align: center;
}
.post_content .htn-pickup p.htn-tags {
	margin: 10px 0 0;
	line-height: 2.4;
}
.htn-tags a {
	display: inline-block;
	margin: 0 10px;
	color: var(--htn-ink);
	font-size: .875rem;
	font-weight: 500;
	text-decoration: none;
}
.htn-tags a:hover,
.htn-tags a:focus-visible {
	color: var(--htn-wine);
	text-decoration: underline;
}

/* ---------- DISEASE ---------- */
.htn-top-page .wp-block-buttons.htn-pills {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 28px;
}
.htn-pills .wp-block-button {
	width: auto;
	margin: 0;
}
.htn-pills .wp-block-button__link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 72px;
	padding: 18px 20px 18px 30px;
	box-sizing: border-box;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--htn-shadow);
	color: var(--htn-ink);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: left;
}
.htn-pills .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--htn-wine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M7 3l3 3-3 3'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.htn-pills .wp-block-button__link:hover,
.htn-pills .wp-block-button__link:focus-visible {
	color: var(--htn-wine);
}

/* ---------- 受診チェックへのバナー ---------- */
.htn-top-check {
	position: relative;
	max-width: 720px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 32px 210px 32px 36px;
	border-radius: 20px;
	background: var(--htn-blush) var(--htn-img-gauge) right 25px center / 120px no-repeat;
}
.post_content .htn-top-check .htn-top-check__ttl {
	margin: 0 0 12px;
	font-family: var(--htn-display);
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1.4;
}
.post_content .htn-top-check p {
	margin: 0;
	font-size: .875rem;
	line-height: 1.8;
	color: var(--htn-muted);
}
.htn-top-check a {
	color: var(--htn-ink);
	text-decoration: none;
}
/* バナー全体を押せるように（リンクは見出しの1本だけ） */
.htn-top-check .htn-top-check__ttl a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
	background: linear-gradient(var(--htn-wine), var(--htn-wine)) right bottom / 44px 44px no-repeat;
}
.htn-top-check::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px 0 20px 0;
	background: var(--htn-wine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M7 3l3 3-3 3'/%3E%3C/svg%3E") center / 14px no-repeat;
	pointer-events: none;
}
.htn-top-check .htn-top-check__ttl a::after {
	background: none;
}
.htn-top-check .htn-top-check__ttl a:focus-visible::after {
	outline: 3px solid var(--htn-wine);
	outline-offset: 2px;
}
.htn-top-check:hover .htn-top-check__ttl a {
	color: var(--htn-wine);
}
.htn-top-check .htn-q-mark {
	font-size: 2.5rem;
	color: var(--htn-rose);
}

/* ---------- NEWS ---------- */
.htn-top-news {
	padding: 64px 40px;
	border-radius: 40px 40px 0 0;
	background: #fff;
	margin-bottom: 0 !important;
}
.htn-news {
	display: flex;
	flex-wrap: wrap;
	gap: 36px;
}
.htn-news__nav {
	flex: 0 1 170px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.htn-news:not(.is-js) .htn-news__nav {
	display: none;
}
.htn-news__tab {
	min-height: 44px;
	padding: 12px;
	border: 1px solid var(--htn-line);
	border-radius: 8px;
	background: #fff;
	color: var(--htn-ink);
	font: inherit;
	font-size: .875rem;
	font-weight: 500;
	cursor: pointer;
}
.htn-news__tab[aria-pressed="true"] {
	border-color: var(--htn-wine);
	background: var(--htn-wine);
	color: #fff;
	font-weight: 700;
}
.htn-news__tab:focus-visible {
	outline: 3px solid var(--htn-wine);
	outline-offset: 2px;
}
.htn-news__panels {
	flex: 1 1 560px;
	min-width: 0;
}
.post_content ul.htn-news__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
	column-gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.post_content ul.htn-news__list > li {
	margin: 0;
	padding: 0;
}
.post_content ul.htn-news__list > li::before {
	content: none;
}
a.htn-news__item {
	display: grid;
	grid-template-columns: 120px 1fr;
	grid-template-rows: auto 1fr;
	column-gap: 18px;
	row-gap: 8px;
	padding: 22px 0;
	border-bottom: 1px solid #ead9d8;
	color: var(--htn-ink);
	text-decoration: none;
}
.htn-news__thumb {
	grid-row: 1 / 3;
	width: 120px;
	height: 120px;
	margin: 0;
	border-radius: 14px;
	object-fit: cover;
}
.htn-news__thumb--none {
	display: block;
	background: var(--htn-blush);
}
.htn-news__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--htn-latin);
	font-size: .8125rem;
}
.htn-news__cat {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--htn-blush);
	color: var(--htn-wine);
	font-family: "Noto Sans JP", sans-serif;
	font-size: .75rem;
	font-weight: 700;
}
.htn-news__cat--lifestyle {
	background: #fce6da;
	color: #9a3f1c;
}
.htn-news__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6;
}
a.htn-news__item:hover .htn-news__title,
a.htn-news__item:focus-visible .htn-news__title {
	color: var(--htn-wine);
}

/* ---------- CLINIC ---------- */
.htn-top-clinic {
	margin-top: 0 !important;
	padding: 64px 40px 72px;
	border-radius: 40px 40px 0 0;
	background: var(--htn-peach);
}
.post_content .htn-top-clinic p.htn-lead {
	margin: -.5em 0 1.6em;
	font-size: .875rem;
	line-height: 1.8;
	color: var(--htn-muted);
}

/* ---------- 狭い画面 ---------- */
@media (max-width: 799px) {
	.htn-top-hero::before,
	.htn-top-hero::after {
		display: none;
	}
}
@media (max-width: 640px) {
	.post_content .htn-top-hero .htn-top-sub {
		gap: 8px;
		font-size: .6875rem;
		letter-spacing: .22em;
	}
	.htn-top-sub::before {
		width: 56px;
	}
	.htn-top-sub span {
		padding: 5px 10px;
		white-space: nowrap;
	}
	.htn-qs .wp-block-button__link {
		width: 150px;
		height: 150px;
		font-size: .875rem;
	}
	.htn-top-hero .wp-block-buttons.htn-qs {
		gap: 14px;
	}
	.htn-top-keyword {
		padding: 40px 18px 28px;
	}
	.htn-pickup {
		padding: 20px 14px;
	}
	.htn-top-check {
		padding: 26px 22px 70px;
		background-position: right 16px bottom 8px;
		background-size: 72px;
	}
	.htn-top-news,
	.htn-top-clinic {
		padding: 48px 18px;
		border-radius: 28px 28px 0 0;
	}
	.post_content ul.htn-news__list {
		grid-template-columns: 1fr;
	}
	a.htn-news__item {
		grid-template-columns: 96px 1fr;
	}
	.htn-news__thumb {
		width: 96px;
		height: 96px;
	}
	.htn-news__nav {
		flex: 1 1 100%;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.htn-news__tab {
		flex: 1 1 auto;
	}
}
