/* ============================================================
   お客様の声（voice）専用スタイル
   works.css をベースに読み込み、この voice.css で上書き・追加する
============================================================ */

/* 詳細ページ：タイトル＋写真の2カラムヒーロー */
.works-post.voice-post .voice-post__hero {
	display: flex;
	gap: 48px;
	align-items: stretch;
	margin-bottom: 48px;
}

.works-post.voice-post .voice-post__hero-img {
	flex: 0 0 44%;
	border-radius: 8px;
	overflow: hidden;
	min-height: 280px;
}

.works-post.voice-post .voice-post__hero-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.works-post.voice-post .voice-post__hero-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@media (max-width: 782px) {
	.works-post.voice-post .voice-post__hero {
		flex-direction: column;
		gap: 20px;
		margin-bottom: 32px;
	}
	.works-post.voice-post .voice-post__hero-img {
		flex: none;
		width: 100%;
		min-height: 200px;
	}
	/* タイトル下の余白（本文用に50px+padding-bottom分ある）が
	   写真との間にそのまま乗って間延びするので、ヒーロー内だけ詰める */
	.works-post.voice-post .voice-post__hero-body .works-post__ttl {
		margin-block-end: 0 !important;
		padding-bottom: 20px;
	}
}

/* 詳細ページ：Q&A（見出し=質問／直後の段落=回答）を吹き出し風に装飾 */
.works-post.voice-post .entry-content h3.wp-block-heading {
	position: relative;
	background: var(--wp--preset--color--silver-white, #f7f7fa);
	border-left: 4px solid var(--wp--preset--color--primary, #00436d);
	border-radius: 4px;
	padding: 16px 24px 16px 56px;
	margin: 48px 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
}

.works-post.voice-post .entry-content h3.wp-block-heading:first-child {
	margin-top: 0;
}

.works-post.voice-post .entry-content h3.wp-block-heading::before {
	content: "Q";
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-family: Georgia, serif;
	font-size: 24px;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #00436d);
}

.works-post.voice-post .entry-content h3.wp-block-heading + p.wp-block-paragraph {
	position: relative;
	padding: 4px 24px 4px 56px;
	margin-bottom: 8px;
	line-height: 1.9;
}

.works-post.voice-post .entry-content h3.wp-block-heading + p.wp-block-paragraph::before {
	content: "A";
	position: absolute;
	left: 18px;
	top: 4px;
	font-family: Georgia, serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--wp--preset--color--secondary, #006eb3);
}

/* 詳細ページ：エリア／お客様名ラベル＋日付の横並び
   works.css の元の並び方は .works-post__cat クラス前提のため、
   このテンプレートの実際のクラス（txtCat）に合わせて明示的に指定し直す */
.works-post.voice-post .works-post__data {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 25px;
}

/* txtCatはバッジ行（県・サービス）とテキスト行（市区町村・名前）の2段 */
.works-post.voice-post .txtCat {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
}

.works-post.voice-post .txtCat-badges,
.works-post.voice-post .txtCat-info {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.works-post.voice-post .works-post__date {
	margin: 0;
}

.works-post.voice-post .txtCat .taxonomy-area a {
	display: inline-block;
	background: var(--wp--preset--color--primary, #00436d);
	color: #fff;
	padding: 4px 14px;
	border-radius: 999px;
	font-size: 13px;
	text-decoration: none;
}

/* サービス名バッジ：一覧ページと同じく、県バッジと対のセカンダリーカラーのピル。
   中の<a>にテーマ標準のpost-termsリンク装飾（枠線・パディング）が別に効いて
   二重の箱に見えるため明示的に打ち消す */
.works-post.voice-post .txtCat .taxonomy-works-cat {
	display: inline-flex;
	align-items: center;
	padding: 4px 14px;
	background: var(--wp--preset--color--secondary, #006eb3);
	border-radius: 999px;
	font-size: 13px;
}

.works-post.voice-post .txtCat .taxonomy-works-cat a {
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	font-size: inherit;
	color: #fff;
	text-decoration: none;
}

.works-post.voice-post .txtCat .taxonomy-works-cat a:hover {
	background: transparent;
	color: #fff;
}

.works-post.voice-post .txtCat .taxonomy-works-cat .wp-block-post-terms__suffix {
	color: #fff;
}

.works-post.voice-post .txtCat-info p {
	font-weight: 700;
	font-size: 15px;
	margin: 0;
}

/* 詳細ページ：本文冒頭の「全体的な感想」（統括コメント） */
.works-post.voice-post .voice-post__summary {
	position: relative;
	background: var(--wp--preset--color--silver-white, #f7f7fa);
	border-radius: 8px;
	padding: 32px 40px 32px 64px;
	margin-bottom: 40px;
}

.works-post.voice-post .voice-post__summary::before {
	content: "\201C";
	position: absolute;
	left: 20px;
	top: 4px;
	font-family: Georgia, serif;
	font-size: 56px;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #00436d);
	line-height: 1;
}

.works-post.voice-post .voice-post__summary-text {
	margin: 0;
	font-size: 17px;
	line-height: 1.9;
	font-weight: 500;
	color: #333;
}

@media (max-width: 782px) {
	.works-post.voice-post .voice-post__summary {
		padding: 24px 20px 20px 48px;
	}
	.works-post.voice-post .voice-post__summary::before {
		font-size: 40px;
		left: 12px;
		top: 0;
	}
	.works-post.voice-post .voice-post__summary-text {
		font-size: 15px;
	}
}

/* ============================================================
   一覧ページ：カード内の県／サービス名バッジ＋市区町村／名前テキスト
   （バッジ行とテキスト行の2段に分けて、1列に詰め込んで文字が折り返されるのを防ぐ）
============================================================ */
.works-list .txtCat-badges {
	flex-wrap: wrap;
}

/* サービス名バッジ：県バッジ（c-works-item__cat、紺色の角丸3px）と対になる、
   ピル型（角丸999px）・セカンダリーカラーのタグ。
   中の<a>にテーマ標準のpost-termsリンク装飾（枠線・パディング・文字色）が
   個別に効いて「箱の中に箱」に見えるため、ここで明示的に打ち消す。 */
.works-list .c-works-item__service {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 16px;
	background: var(--wp--preset--color--secondary, #006eb3);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

.works-list .c-works-item__service a {
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	font-size: inherit;
	font-weight: inherit;
	color: #fff;
	text-decoration: none;
}

.works-list .c-works-item__service a:hover {
	background: transparent;
	color: #fff;
}

.works-list .c-works-item__service .wp-block-post-terms__suffix {
	color: #fff;
}

/* 市区町村／名前：テキストのみ。折り返しが必要な場合はテキスト行ごと改行する */
.works-list .txtCat-info {
	flex-wrap: wrap;
	font-size: 14px;
	color: #555;
}

.works-list .txtCat-info p {
	margin: 0;
	white-space: nowrap;
}

/* ============================================================
   管理画面（ブロックエディタ）用
   フロントでは .works-post.voice-post .entry-content の中に本文が入るが、
   投稿編集画面の本文エリアは .editor-styles-wrapper 配下になり
   上記セレクタの前提（親クラス）が存在しない。
   そのため同じ見た目を .editor-styles-wrapper 基準でも定義する。
============================================================ */
.editor-styles-wrapper h3.wp-block-heading {
	position: relative;
	background: var(--wp--preset--color--silver-white, #f7f7fa);
	border-left: 4px solid var(--wp--preset--color--primary, #00436d);
	border-radius: 4px;
	padding: 16px 24px 16px 56px;
	margin: 48px 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
}

.editor-styles-wrapper h3.wp-block-heading:first-child {
	margin-top: 0;
}

.editor-styles-wrapper h3.wp-block-heading::before {
	content: "Q";
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-family: Georgia, serif;
	font-size: 24px;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #00436d);
}

.editor-styles-wrapper h3.wp-block-heading + p.wp-block-paragraph {
	position: relative;
	padding: 4px 24px 4px 56px;
	margin-bottom: 8px;
	line-height: 1.9;
}

.editor-styles-wrapper h3.wp-block-heading + p.wp-block-paragraph::before {
	content: "A";
	position: absolute;
	left: 18px;
	top: 4px;
	font-family: Georgia, serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--wp--preset--color--secondary, #006eb3);
}

/* ============================================================
   一覧ページ（SP）：2列カードのはみ出し対策
   サービス名バッジが nowrap のままだと、その幅に押されてグリッドの列が広がり、
   右の列が画面の外にはみ出す（左の余白だけが多く見える）。
   列が縮めるように min-width:0 を指定し、バッジを小さめにして折り返しを許可する。
   施工事例一覧（.works-list）と同じ「左右20px・2列等幅」にそろえる。
============================================================ */
@media (max-width: 782px) {
	.works-list > li {
		min-width: 0;
	}
	.works-list .c-works-item__service {
		max-width: 100%;
		padding: 4px 10px;
		font-size: 12px;
		white-space: normal;
		text-align: center;
	}
	.works-list .txtCat-info p {
		white-space: normal;
	}
}
