/* =============================================================
   中澤秀徳税理士事務所 デザインシステム
   コンセプト: 数字を味方に、経営をもっと楽しく。
   方針: 高級感より安心感 / 営業感より誠実さ / 分かりやすさ
   ============================================================= */

/* -------------------------------------------------------------
   1. デザイントークン（CSS変数）
   ------------------------------------------------------------- */
:root {
	/* カラー */
	--c-primary:   #1E4E79; /* ネイビー: 見出し / リンク / アクセント */
	--c-secondary: #F7F9FB; /* ライトグレー: 背景 / カード背景 */
	--c-cta:       #2E7D32; /* グリーン: お問い合わせ / 電話 / CTA */
	--c-cta-hover: #256528; /* CTAホバー時の濃いグリーン */
	--c-text:      #333333; /* ダークグレー: 本文 */
	--c-border:    #E5E7EB; /* ボーダー */
	--c-white:     #FFFFFF;

	/* タイポグラフィ */
	--font-base: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

	--fs-h1:    48px;
	--fs-h2:    36px;
	--fs-h3:    24px;
	--fs-body:  18px;

	--fs-h1-sp:   34px;
	--fs-h2-sp:   28px;
	--fs-h3-sp:   20px;
	--fs-body-sp: 16px;

	--lh-heading: 1.4;
	--lh-body:    1.8;

	/* レイアウト幅 */
	--w-max:     1200px;
	--w-content: 1080px;
	--w-text:    760px;

	/* 余白 */
	--space-section:    120px; /* セクション上下 PC */
	--space-section-sp:  80px; /* セクション上下 SP */
	--space-element:     40px; /* 要素間 */
	--space-card:        32px; /* カード内余白 */

	/* 角丸 */
	--radius-btn:  8px;
	--radius-card: 16px;

	/* 影（薄い） */
	--shadow-card: 0 2px 12px rgba(30, 78, 121, 0.08);
	--shadow-card-hover: 0 6px 20px rgba(30, 78, 121, 0.12);

	/* ボタン */
	--btn-height: 56px;

	/* ブレイクポイント参考: 768px */
}

/* -------------------------------------------------------------
   2. ベース
   ------------------------------------------------------------- */
body {
	font-family: var(--font-base);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--c-text);
	background-color: var(--c-white);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--c-primary);
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}
a:hover {
	opacity: 0.8;
}

/* -------------------------------------------------------------
   3. 見出し
   ------------------------------------------------------------- */
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); color: var(--c-primary); font-weight: 700; }
h2, .h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); color: var(--c-primary); font-weight: 700; }
h3, .h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); color: var(--c-primary); font-weight: 700; }

/* セクション見出し（中央寄せ・装飾控えめ） */
.nz-section-title {
	text-align: center;
	margin-bottom: var(--space-element);
}
.nz-section-title small {
	display: block;
	color: var(--c-cta);
	font-size: 0.5em;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-bottom: 8px;
}

/* -------------------------------------------------------------
   4. レイアウトヘルパー
   ------------------------------------------------------------- */
.nz-section {
	padding-top: var(--space-section);
	padding-bottom: var(--space-section);
}
.nz-section--gray {
	background-color: var(--c-secondary);
}
/* グレー背景が連続した場合の保険。境目が消えないよう細い罫線を入れる。 */
.nz-section--gray + .nz-section--gray {
	border-top: 1px solid var(--c-border);
}
.nz-container {
	max-width: var(--w-content);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}
.nz-text-width {
	max-width: var(--w-text);
	margin-left: auto;
	margin-right: auto;
}

/* 単一記事の本文幅を760pxに制限 */
.single-post .entry-content {
	max-width: var(--w-text);
	margin-left: auto;
	margin-right: auto;
}

/* -------------------------------------------------------------
   5. ボタン
   ------------------------------------------------------------- */
.nz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--btn-height);
	padding: 0 32px;
	border-radius: var(--radius-btn);
	font-weight: 700;
	font-size: var(--fs-body);
	text-align: center;
	transition: transform 0.2s ease, background-color 0.2s ease;
	cursor: pointer;
	line-height: 1.4;
}

/* Primary CTA: グリーン */
.nz-btn--primary {
	background-color: var(--c-cta);
	color: var(--c-white);
}
.nz-btn--primary:hover {
	background-color: var(--c-cta-hover);
	transform: scale(1.05);
	opacity: 1;
}

/* Secondary CTA: 白地+ネイビー枠 */
.nz-btn--secondary {
	background-color: var(--c-white);
	color: var(--c-primary);
	border: 2px solid var(--c-primary);
}
.nz-btn--secondary:hover {
	transform: scale(1.05);
	opacity: 1;
}

/* 電話ボタン */
.nz-btn--tel {
	background-color: var(--c-cta);
	color: var(--c-white);
}
.nz-btn--tel:hover {
	background-color: var(--c-cta-hover);
	transform: scale(1.05);
	opacity: 1;
}

/* -------------------------------------------------------------
   6. カード
   ------------------------------------------------------------- */
.nz-card {
	background-color: var(--c-white);
	border-radius: var(--radius-card);
	padding: var(--space-card);
	box-shadow: var(--shadow-card);
	border: 1px solid var(--c-border);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
}
.nz-card--link:hover {
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-4px);
}
.nz-card__icon {
	display: block;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	color: var(--c-primary);
}
.nz-card__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.nz-card__title {
	font-size: var(--fs-h3);
	color: var(--c-primary);
	margin-bottom: 12px;
}

/* 悩み訴求カード：チェックリスト風（当てはまる悩みにチェック） */
.nz-card--problem {
	display: flex;
	align-items: center;
	gap: 14px;
}
.nz-card--problem::before {
	content: "✓";
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--c-primary);
	color: var(--c-white);
	border-radius: 50%;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}
.nz-card--problem p {
	margin: 0;
}

/* グリッド */
.nz-grid {
	display: grid;
	gap: var(--space-element);
}
.nz-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nz-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nz-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* -------------------------------------------------------------
   6a. ヘッダー固定（事務所名＋メニューをスクロール中も常に表示）
   ------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(30, 78, 121, 0.08);
}
/* ログイン中は管理バーの下に固定する */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
/* 600px以下では管理バーがスクロールで消えるため上端に固定 */
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}
/* ページ内リンク（目次など）の飛び先がヘッダーに隠れないようにする */
html { scroll-padding-top: 120px; }

/* -------------------------------------------------------------
   6b. トップページ メッセージ帯（ヘッダーとHEROの間）
   ------------------------------------------------------------- */
.nz-message {
	position: relative;
	overflow: hidden;
	padding: 104px 0;
	text-align: center;
	color: var(--c-white);
	background: linear-gradient(135deg, #16395A 0%, var(--c-primary) 55%, #2A6496 100%);
}
/* 右肩上がりの細線（黒字＝成長のモチーフ）を背景にうっすら */
.nz-message::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cpolyline points='0,270 200,230 360,245 560,170 760,185 960,90 1200,30' fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='3'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
	pointer-events: none;
}
.nz-message .nz-container {
	position: relative;
}
.nz-message__text {
	margin: 0;
	font-size: clamp(34px, 5.6vw, 64px);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	color: var(--c-white);
}
.nz-sp-only { display: none; }

/* -------------------------------------------------------------
   7. HERO
   ------------------------------------------------------------- */
.nz-hero {
	min-height: 700px;
	display: flex;
	align-items: center;
	background-color: var(--c-secondary);
}
/* WordPress はグループブロックの子要素を .wp-block-group__inner-container で
   包むため、グリッドはそのラッパーに適用する（コピー列＋画像列を横並びに）。 */
.nz-hero__inner > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	/* 画像列を左コピー列の高さ（見出し上〜TELボタン下）にそろえる */
	align-items: stretch;
}
.nz-hero__copy h1 {
	margin-bottom: 24px;
}
.nz-hero__lead {
	margin-bottom: 32px;
	font-size: var(--fs-body);
}
.nz-hero__cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}
/* 「無料相談」と「電話」の枠幅をそろえる（縦並び・同一幅） */
.nz-hero__cta .nz-btn {
	width: 100%;
	max-width: 320px;
}
/* 画像列を左コピー列の高さにピッタリそろえる。
   画像を絶対配置にして行の高さ計算から外し、行高は左コピー列のみで決定。
   これで画像の縦横比に関係なく、見出し上端〜TELボタン下端に一致する。 */
.nz-hero__image {
	position: relative;
	margin: 0;
	align-self: stretch;
}
.nz-hero__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%; /* 人物写真の顔が切れないよう上寄せでトリミング */
	border-radius: var(--radius-card);
}

/* -------------------------------------------------------------
   8. FAQ アコーディオン
   ------------------------------------------------------------- */
.nz-faq__item {
	border: 1px solid var(--c-border);
	border-radius: var(--radius-btn);
	margin-bottom: 16px;
	background: var(--c-white);
	overflow: hidden;
}
.nz-faq__q {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 20px 24px;
	font-weight: 700;
	color: var(--c-primary);
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: var(--fs-body);
	font-family: inherit;
}
.nz-faq__q::after {
	content: "+";
	font-size: 1.6em;
	line-height: 1;
	color: var(--c-cta);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}
.nz-faq__item.is-open .nz-faq__q::after {
	content: "−";
}
.nz-faq__a {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}
.nz-faq__a-inner {
	padding: 0 24px 20px;
}

/* -------------------------------------------------------------
   9. 目次（記事）
   ------------------------------------------------------------- */
.nz-toc {
	background: var(--c-secondary);
	border: 1px solid var(--c-border);
	border-radius: var(--radius-card);
	padding: 24px 28px;
	margin: 32px auto;
}
.nz-toc__title {
	font-weight: 700;
	color: var(--c-primary);
	margin-bottom: 12px;
}
.nz-toc ol {
	margin: 0;
	padding-left: 1.4em;
}
.nz-toc li {
	margin-bottom: 8px;
	line-height: 1.6;
}

/* -------------------------------------------------------------
   10. パンくず
   ------------------------------------------------------------- */
.nz-breadcrumb {
	font-size: 14px;
	color: #6b7280;
	padding: 12px 0;
}
.nz-breadcrumb a { color: #6b7280; }
.nz-breadcrumb .sep { margin: 0 8px; }

/* -------------------------------------------------------------
   11. 共通CTAセクション
   ------------------------------------------------------------- */
.nz-cta {
	background-color: var(--c-primary);
	color: var(--c-white);
	border-radius: var(--radius-card);
	padding: 48px 32px;
	text-align: center;
}
.nz-cta h2 { color: var(--c-white); margin-bottom: 16px; }
.nz-cta p { margin-bottom: 24px; }
.nz-cta__tel {
	font-size: 28px;
	font-weight: 700;
	color: var(--c-white);
	display: inline-block;
	margin-bottom: 16px;
}
.nz-cta__buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}
/* 電話番号の下の「土日祝日も対応します」 */
.nz-tel-note {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.05em;
}
.nz-cta .nz-tel-note {
	margin: -8px 0 24px;
	color: var(--c-white);
}
.nz-cta .nz-cta__buttons + .nz-tel-note {
	margin: 16px 0 0;
}
.nz-hero__cta .nz-tel-note {
	width: 100%;
	max-width: 320px;
	margin: -8px 0 0;
	text-align: center;
	color: var(--c-primary);
}
.nz-tel-note--inline {
	font-size: 0.7em;
}
.nz-cta .nz-btn--secondary {
	background: var(--c-white);
	border-color: var(--c-white);
}
/* CTAの2ボタンを同一幅にそろえる */
.nz-cta__buttons .nz-btn {
	width: 250px;
	max-width: 100%;
}

/* -------------------------------------------------------------
   12. 著者ボックス
   ------------------------------------------------------------- */
.nz-author {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	background: var(--c-secondary);
	border-radius: var(--radius-card);
	padding: var(--space-card);
	margin: 40px auto;
}
.nz-author__photo img {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}
.nz-author__name {
	font-weight: 700;
	color: var(--c-primary);
	font-size: var(--fs-h3);
}
.nz-author__role {
	color: #6b7280;
	font-size: 14px;
	margin-bottom: 8px;
}

/* -------------------------------------------------------------
   13. フッター
   ------------------------------------------------------------- */
.site-footer,
.nz-footer {
	background-color: var(--c-primary);
	color: var(--c-white);
}
.nz-footer a { color: var(--c-white); }

/* -------------------------------------------------------------
   14. モバイル固定CTA
   ------------------------------------------------------------- */
.nz-fixed-cta {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: var(--c-white);
	box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
}
.nz-fixed-cta a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 56px;
	font-weight: 700;
	color: var(--c-white);
}
.nz-fixed-cta__tel { background: var(--c-primary); }
.nz-fixed-cta__contact { background: var(--c-cta); }

/* -------------------------------------------------------------
   15. アニメーション（最小限・フェードインのみ）
   ------------------------------------------------------------- */
.nz-fade {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.nz-fade.is-visible {
	opacity: 1;
	transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.nz-fade { opacity: 1; transform: none; transition: none; }
	.nz-btn:hover { transform: none; }
}

/* -------------------------------------------------------------
   15b. アクセシビリティ（WCAG AA）
   ------------------------------------------------------------- */
/* キーボードフォーカスの可視化（コントラスト確保） */
a:focus-visible,
button:focus-visible,
.nz-btn:focus-visible,
.nz-faq__q:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--c-cta);
	outline-offset: 2px;
	border-radius: 4px;
}

/* スクリーンリーダー専用テキスト */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------
   16. レスポンシブ（ブレイクポイント 768px）
   ------------------------------------------------------------- */
@media (max-width: 768px) {
	:root {
		--fs-h1: var(--fs-h1-sp);
		--fs-h2: var(--fs-h2-sp);
		--fs-h3: var(--fs-h3-sp);
		--fs-body: var(--fs-body-sp);
	}
	body { font-size: var(--fs-body-sp); }

	.nz-section {
		padding-top: var(--space-section-sp);
		padding-bottom: var(--space-section-sp);
	}

	/* グリッドは1列に */
	.nz-grid--3,
	.nz-grid--2,
	.nz-grid--4 { grid-template-columns: 1fr; }

	/* メッセージ帯 */
	.nz-message { padding: 64px 0; }
	.nz-message__text { letter-spacing: 0.08em; }
	.nz-sp-only { display: inline; }

	/* HERO 縦積み（テキスト上・写真下） */
	.nz-hero { min-height: auto; padding: 48px 0; }
	.nz-hero__inner > .wp-block-group__inner-container { grid-template-columns: 1fr; }
	.nz-hero__cta .nz-btn { width: 100%; max-width: none; }
	.nz-hero__cta .nz-tel-note { max-width: none; }
	/* 1カラム時は画像を通常配置に戻す（絶対配置だと高さが0になり消えるため） */
	.nz-hero__image img { position: static; height: auto; }

	/* モバイル固定CTA 表示 */
	.nz-fixed-cta { display: flex; }
	/* 固定CTA分の余白をbody下部に確保 */
	body { padding-bottom: 56px; }
}

/* アクセス地図 [nz_map] */
.nz-map {
	margin: 48px 0 0;
}
.nz-map__title {
	margin-bottom: 20px;
}
.nz-map__frame {
	position: relative;
	width: 100%;
	height: var(--nz-map-h, 360px);
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--c-border);
	background-color: var(--c-bg-gray);
}
.nz-map__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.nz-map__address {
	margin-top: 16px;
	line-height: 1.9;
}
.nz-map__links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 8px;
}
@media (max-width: 768px) {
	.nz-map__frame { height: 280px; }
	.nz-map__links { gap: 14px; }
}
