/* ==================================================================
 * ブロックパターンの見た目
 *
 * patterns/ に置いた12種のパターンが使うクラスをここでまとめて持つ。
 * 命名は `wh-b-` で始める（b = block）。
 * `wh-` だけのクラスは既存の実装（イベント・土地・記事）が使っており、
 * 同じ名前を別の意味で使うと事故になるため、必ず接頭辞を分けること。
 *
 * 色・余白は theme.json のプリセット（--wp--preset--*）を使う。
 * 客先が編集画面で色を変えたときに、ここの指定が邪魔をしないよう、
 * 背景色・文字色はパターン側のブロック設定に持たせ、ここでは
 * 「並び方」と「間隔」を中心に書く。
 *
 * このファイルはブロックで書かれたページでしか読み込まない
 * （inc/nicoichi-assets.php の nicoichi_page_has_blocks）。
 * ================================================================== */

:root {
	--wh-b-radius: 4px;
	--wh-b-shadow: 0 2px 14px rgba(62, 79, 99, .08);
}


/* ==================================================================
 * ブロックで書かれたページの本文組版
 *
 * 客先が自分で足した見出し・段落・箇条書きの見え方。
 * 数値は common/nicoichi-design.css 7章（記事の本文）と同じにしてある。
 * ここを揃えておかないと「編集画面ではきれいだったのに公開したら違う」
 * が起き、客先は二度と自分で触らなくなる。
 *
 * `:not([class*="wh-b-"])` でパターンの見出しを除いている。
 * パターンは自前の見た目を持っているので、記事の見出し装飾を
 * 上から重ねると（カードの中に縦線と罫線が出て）壊れる。
 * common/editor.css にも同じ除外を書いてある（片方だけ直さないこと）。
 * ================================================================== */
.wh-blocks {
	font-size: 16px;
	line-height: 2;
	letter-spacing: .02em;
	color: #333;
}

.wh-blocks p:not([class*="wh-b-"]) {
	margin: 0 0 1.9em;
}

.wh-blocks :is(h1, h2, h3, h4, h5, h6):not([class*="wh-b-"]) {
	font-weight: 600;
	letter-spacing: .02em;
}

.wh-blocks h2:not([class*="wh-b-"]) {
	margin: 3.4em 0 1.3em;
	padding: .1em 0 .55em .8em;
	border-left: 5px solid var(--wh-navy, #3E4F63);
	border-bottom: 1px solid var(--wh-line, rgba(62, 79, 99, .14));
	font-size: 23px;
	line-height: 1.5;
	color: var(--wh-navy, #3E4F63);
}

.wh-blocks h3:not([class*="wh-b-"]) {
	position: relative;
	margin: 2.6em 0 .9em;
	padding-left: 1.15em;
	font-size: 18px;
	line-height: 1.6;
	color: var(--wh-navy, #3E4F63);
}

.wh-blocks h3:not([class*="wh-b-"])::before {
	content: "";
	position: absolute;
	left: 0;
	top: .62em;
	width: .5em;
	height: .5em;
	background: var(--wh-accent, #942827);
	border-radius: 1px;
}

.wh-blocks h4:not([class*="wh-b-"]) {
	margin: 2.2em 0 .7em;
	padding-bottom: .3em;
	border-bottom: 1px dashed var(--wh-line, rgba(62, 79, 99, .14));
	font-size: 16px;
	line-height: 1.7;
	color: var(--wh-navy-deep, #2E3B4B);
}

.wh-blocks :is(ul, ol):not([class*="wh-b-"]) {
	margin: 0 0 1.9em 1.4em;
}

.wh-blocks li {
	margin-bottom: .5em;
}

.wh-blocks mark {
	background: linear-gradient(transparent 60%, #ffff00 60%);
	padding: 0 .1em;
	color: inherit;
}

@media screen and (max-width: 767px) {

	.wh-blocks h2:not([class*="wh-b-"]) {
		margin: 2.6em 0 1em;
		padding-left: .7em;
		border-left-width: 4px;
		font-size: 20px;
	}

	.wh-blocks h3:not([class*="wh-b-"]) {
		margin: 2.1em 0 .8em;
		font-size: 17px;
	}

	.wh-blocks h4:not([class*="wh-b-"]) {
		font-size: 15.5px;
	}
}


/* ------------------------------------------------------------------
 * 共通：セクションの見出し
 * ------------------------------------------------------------------ */
.wh-b-sectionhead {
	margin-bottom: 2.4em;
	text-align: center;
}

.wh-b-eyebrow {
	margin: 0 0 .6em;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .18em;
	color: var(--wp--preset--color--accent, #942827);
}

.wh-b-title {
	margin: 0 0 .7em;
	font-size: clamp(22px, 4vw, 30px);
	line-height: 1.5;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-lead {
	margin: 0 auto;
	max-width: 46em;
	line-height: 2;
	color: #444;
}


/* ------------------------------------------------------------------
 * ボタン（矢印つき）
 *
 * 既存サイトのボタンは、文字の右に赤い矢印が入る形で統一されている。
 * 画像を足さずに疑似要素で描く（アイコンフォントは全廃済み）。
 * ------------------------------------------------------------------ */
.wh-b-btn .wp-block-button__link {
	position: relative;
	display: inline-block;
	padding: .95em 3.4em .95em 2em;
	border-radius: 3px;
	background-color: var(--wp--preset--color--navy, #3E4F62);
	color: #fff;
	font-weight: 600;
	letter-spacing: .06em;
	text-decoration: none;
	transition: background-color .3s var(--wh-ease, ease), transform .3s var(--wh-ease, ease);
}

.wh-b-btn .wp-block-button__link::after {
	content: "";
	position: absolute;
	right: 1.4em;
	top: 50%;
	width: 1.1em;
	height: 1px;
	background: currentColor;
	transform: translateY(-50%);
	transition: width .3s var(--wh-ease, ease);
}

.wh-b-btn .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--navy-deep, #2E3B4B);
}

.wh-b-btn .wp-block-button__link:hover::after {
	width: 1.6em;
}

.wh-b-btn.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--navy, #3E4F62);
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-btn.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--navy, #3E4F62);
	color: #fff;
}

/* 紺地の上に置くとき用（お問い合わせ導線のパターン） */
.wh-b-btn.is-style-outline-light .wp-block-button__link {
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, .7);
	color: #fff;
}

.wh-b-btn.is-style-outline-light .wp-block-button__link:hover {
	background-color: #fff;
	color: var(--wp--preset--color--navy, #3E4F62);
}


/* ------------------------------------------------------------------
 * 1. ページ下部CTA
 *
 * 相談会・来場予約・資料請求の3枚。
 * いま Elementor テンプレート 2261 が担っている役割の受け皿。
 * ------------------------------------------------------------------ */
.wh-b-cta {
	padding: clamp(40px, 7vw, 76px) 20px;
}

.wh-b-cta-cards {
	gap: 24px;
}

.wh-b-cta-card {
	height: 100%;
	padding-bottom: 26px;
	background: #fff;
	border-radius: var(--wh-b-radius);
	box-shadow: var(--wh-b-shadow);
	overflow: hidden;
	text-align: center;
}

.wh-b-cta-photo {
	margin: 0 0 20px;
}

.wh-b-cta-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.wh-b-cta-title {
	margin: 0 0 .6em;
	padding: 0 20px;
	font-size: 21px;
	line-height: 1.5;
	letter-spacing: .06em;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-cta-card p {
	margin: 0 0 1.4em;
	padding: 0 24px;
	font-size: 14px;
	line-height: 1.9;
	text-align: left;
	color: #555;
}

.wh-b-cta-card .wp-block-buttons {
	justify-content: center;
}


/* ------------------------------------------------------------------
 * 2. 3カラムの特徴カード
 * ------------------------------------------------------------------ */
.wh-b-cards {
	gap: 28px;
}

.wh-b-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--wh-line, rgba(62, 79, 99, .14));
	border-radius: var(--wh-b-radius);
	overflow: hidden;
}

.wh-b-card-photo {
	margin: 0;
}

.wh-b-card-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.wh-b-card-title {
	margin: 20px 22px .6em;
	font-size: 18px;
	line-height: 1.6;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-card p {
	margin: 0 22px 1.2em;
	font-size: 14px;
	line-height: 1.9;
	color: #555;
}

/* 「詳しく見る」はカードの下端に揃える（既存の理由カードと同じ考え方） */
.wh-b-card-more {
	margin-top: auto !important;
	padding-top: .4em;
}

.wh-b-card-more a {
	font-weight: 600;
	color: var(--wp--preset--color--accent, #942827);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}


/* ------------------------------------------------------------------
 * 3. アイコンボックス列
 * ------------------------------------------------------------------ */
.wh-b-iconboxes {
	gap: 28px;
}

.wh-b-iconbox {
	text-align: center;
}

.wh-b-iconbox-icon {
	margin: 0 auto 14px;
}

.wh-b-iconbox-title {
	margin: 0 0 .5em;
	font-size: 17px;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-iconbox p {
	margin: 0;
	font-size: 14px;
	line-height: 1.9;
	color: #555;
}


/* ------------------------------------------------------------------
 * 4. 画像＋テキスト（左右）
 * ------------------------------------------------------------------ */
.wh-b-media {
	margin: 3em 0;
	gap: clamp(24px, 4vw, 56px);
}

.wh-b-media .wp-block-media-text__media img {
	border-radius: var(--wh-b-radius);
}

.wh-b-media-title {
	margin: 0 0 .8em;
	font-size: 21px;
	line-height: 1.6;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-media .wp-block-media-text__content p {
	line-height: 2;
	color: #444;
}


/* ------------------------------------------------------------------
 * 5. ステップ
 *
 * 左に細い縦線を通して「順番がある」ことを形で示す。
 * ------------------------------------------------------------------ */
.wh-b-steps {
	position: relative;
	margin: 2.4em 0;
	padding-left: 26px;
}

.wh-b-steps::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 10px;
	bottom: 10px;
	width: 1px;
	background: var(--wh-line, rgba(62, 79, 99, .14));
}

.wh-b-step {
	position: relative;
	margin: 0 0 2.2em;
}

.wh-b-step::before {
	content: "";
	position: absolute;
	left: -25px;
	top: 6px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--wp--preset--color--accent, #942827);
}

.wh-b-step-num {
	margin: 0 0 .3em;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .16em;
	color: var(--wp--preset--color--accent, #942827);
}

.wh-b-step-title {
	margin: 0 0 .5em;
	font-size: 18px;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-step p {
	margin: 0;
	line-height: 1.95;
	color: #555;
}


/* ------------------------------------------------------------------
 * 6. 料金・仕様の表
 *
 * スマホでも横に潰さず、はみ出す分は横スクロールで見せる。
 * ------------------------------------------------------------------ */
.wh-b-table {
	margin: 2em 0;
	overflow-x: auto;
}

.wh-b-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.wh-b-table th,
.wh-b-table td {
	padding: .9em 1.1em;
	border: 1px solid var(--wh-line, rgba(62, 79, 99, .14));
	text-align: left;
	vertical-align: top;
	line-height: 1.8;
}

.wh-b-table th {
	background: #f2f5f7;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
	white-space: nowrap;
}

.wh-b-table figcaption {
	margin-top: .8em;
	font-size: 13px;
	color: #777;
}


/* ------------------------------------------------------------------
 * 7. よくある質問
 * ------------------------------------------------------------------ */
.wh-b-faq {
	margin: 3em 0;
}

.wh-b-faq-item {
	margin: 0 0 12px;
	border: 1px solid var(--wh-line, rgba(62, 79, 99, .14));
	border-radius: var(--wh-b-radius);
	background: #fff;
	overflow: hidden;
}

.wh-b-faq-item summary {
	position: relative;
	padding: 1.05em 3em 1.05em 1.2em;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	line-height: 1.7;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-faq-item summary::-webkit-details-marker {
	display: none;
}

/* ＋ / − を線2本で描く */
.wh-b-faq-item summary::before,
.wh-b-faq-item summary::after {
	content: "";
	position: absolute;
	right: 1.2em;
	top: 50%;
	width: 13px;
	height: 2px;
	background: var(--wp--preset--color--accent, #942827);
	transition: transform .25s var(--wh-ease, ease);
}

.wh-b-faq-item summary::after {
	transform: translateY(-50%) rotate(90deg);
}

.wh-b-faq-item summary::before {
	transform: translateY(-50%);
}

.wh-b-faq-item[open] summary::after {
	transform: translateY(-50%) rotate(0deg);
}

.wh-b-faq-item > *:not(summary) {
	margin: 0;
	padding: 0 1.2em 1.2em;
	line-height: 1.95;
	color: #555;
}


/* ------------------------------------------------------------------
 * 8. ギャラリー帯
 *
 * 写真が4枚以上あると JavaScript が Swiper に組み替えて横スワイプにする
 * （js/nicoichi-slider.js）。JS が動かない環境では、
 * 普通のギャラリー（格子状の並び）としてそのまま読める。
 * ------------------------------------------------------------------ */
.wh-b-gallery {
	padding: clamp(30px, 5vw, 56px) 0;
}

.wh-b-gallery .wp-block-gallery img {
	border-radius: var(--wh-b-radius);
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Swiper に組み替わったあとの見た目
 *
 * ギャラリーブロックは写真を格子に並べるための flex 指定を自前で持っている。
 * スライドの中に入れ子にすると、その指定が写真を本来より小さく縮める。
 * （実測：スライド幅305pxに対して写真141px）
 * ここで「スライドの幅いっぱいに広げる」を明示して打ち消す。
 */
.wh-b-gallery .swiper {
	padding-bottom: 34px;
}

.wh-b-gallery .swiper-slide {
	display: block;
	height: auto;
}

/* 幅だけ !important を付けている。
 * コアは `figure.wp-block-image:not(#individual-image)` と書いて
 * ID相当の詳細度を稼いでおり（幅を calc(50% - gap) に固定）、
 * 普通のセレクタでは何段深く書いても勝てないため。
 * 打ち消しているのは「格子に2列で並べる」という指定だけで、
 * ギャラリーブロック本来の見た目には触れていない。 */
.wh-b-gallery .wp-block-gallery .swiper-slide > figure.wp-block-image {
	display: block;
	width: 100% !important;
	margin: 0;
}

.wh-b-gallery .wp-block-gallery .swiper-slide > figure.wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

.wh-b-gallery .swiper-pagination-bullet-active {
	background: var(--wp--preset--color--accent, #942827);
}


/* ------------------------------------------------------------------
 * 9. イベント告知バナー
 * ------------------------------------------------------------------ */
.wh-b-event {
	margin: 3em auto;
	padding: clamp(26px, 4vw, 40px) clamp(20px, 4vw, 44px);
	border: 2px solid var(--wp--preset--color--accent, #942827);
	border-radius: var(--wh-b-radius);
	background: #fff;
	text-align: center;
}

.wh-b-event-date {
	margin: 0 0 .5em;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .08em;
	color: var(--wp--preset--color--accent, #942827);
}

.wh-b-event-title {
	margin: 0 0 .5em;
	font-size: clamp(20px, 3.4vw, 26px);
	line-height: 1.5;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #3E4F62);
}

.wh-b-event-place {
	margin: 0 0 1.4em;
	font-size: 14px;
	color: #555;
}

.wh-b-event .wp-block-buttons {
	justify-content: center;
}


/* ------------------------------------------------------------------
 * 10. お問い合わせ導線
 * ------------------------------------------------------------------ */
.wh-b-contact {
	margin: 3em auto;
	padding: clamp(30px, 5vw, 50px) clamp(20px, 4vw, 48px);
	border-radius: var(--wh-b-radius);
	text-align: center;
}

.wh-b-contact-title {
	margin: 0 0 1.2em;
	font-size: clamp(20px, 3.4vw, 26px);
	letter-spacing: .06em;
}

.wh-b-contact-cols {
	gap: clamp(20px, 4vw, 48px);
}

.wh-b-contact-label {
	margin: 0 0 .5em;
	font-size: 13px;
	letter-spacing: .1em;
	opacity: .85;
}

.wh-b-contact-tel {
	margin: 0 0 .4em;
	font-size: clamp(26px, 5vw, 34px);
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.3;
}

.wh-b-contact-tel a {
	color: inherit;
	text-decoration: none;
}

.wh-b-contact-note {
	margin: .6em 0 0;
	font-size: 12.5px;
	opacity: .8;
}

.wh-b-contact .wp-block-buttons {
	justify-content: center;
}


/* ------------------------------------------------------------------
 * 11. 記事の締め（まとめ＋導線）
 * ------------------------------------------------------------------ */
.wh-b-outro {
	margin: 2.6em 0 0;
	padding: 26px 28px 28px;
	background: #f5f7f8;
	border-radius: var(--wh-b-radius);
}

.wh-b-outro-label {
	margin: 0 0 .5em;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	color: var(--wp--preset--color--accent, #942827);
}

.wh-b-outro p {
	line-height: 1.95;
}

.wh-b-outro .wp-block-buttons {
	margin-top: 1.2em;
	gap: 12px;
}


/* ------------------------------------------------------------------
 * スマートフォン
 *
 * カラムブロックは 782px 未満で自動的に縦積みになる。
 * ここでは、縦積みになったときに間延びしない分の詰めだけを書く。
 * ------------------------------------------------------------------ */
@media screen and (max-width: 781px) {

	.wh-b-cta-cards,
	.wh-b-cards,
	.wh-b-iconboxes {
		gap: 18px;
	}

	.wh-b-steps {
		padding-left: 22px;
	}

	.wh-b-media {
		margin: 2em 0;
	}
}
