/* Murata World — 細部の調整（theme.json で表現しづらい部分のみ） */

/* 横方向のはみ出しを防ぐ安全策 */
html {
	overflow-x: hidden;
}

/* 見出しが極端に長くてもビューポートを超えない */
h1, h2, h3 {
	overflow-wrap: anywhere;
}

/* ヘッダーの電話番号リンクは色を継承させる */
.header-tel a {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

/* スマホ：ヘッダーを2段組みにして見切れを防ぐ
   1段目=ロゴ＋サイト名 / 2段目=ハンバーガー＋電話番号 */
@media (max-width: 600px) {
	.site-header .alignwide {
		flex-direction: column;
		align-items: stretch;
		row-gap: 0.5rem;
	}
	.site-header .alignwide > .wp-block-group {
		justify-content: space-between;
		width: 100%;
	}
	.header-tel {
		font-size: 1rem !important;
	}
}

/* フッター内リンクは下線控えめ＆色継承 */
.site-footer a {
	color: inherit;
	text-decoration: none;
}
.site-footer a:hover {
	text-decoration: underline;
}

/* Contact Form 7 のフォームをブランドに合わせる */
.wpcf7-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 1.2rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.7em 0.9em;
	border: 1px solid #d9d3c2;
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
	box-sizing: border-box;
}
.wpcf7-form textarea {
	min-height: 160px;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
	outline: none;
	border-color: #5a7a3a;
	box-shadow: 0 0 0 3px rgba(90, 122, 58, 0.15);
}
.wpcf7-form .wpcf7-submit {
	margin-top: 0.5rem;
	padding: 0.8em 2.6em;
	border: none;
	border-radius: 40px;
	background: #5a7a3a;
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease;
	width: auto;
}
.wpcf7-form .wpcf7-submit:hover {
	background: #6c4233;
}

/* --- ロゴ --- */
/* ヘッダー（白地）：白抜きロゴを黒く反転して表示 */
.site-header .wp-block-site-logo img {
	filter: brightness(0);
}
/* フッター（緑地）：白抜きのまま */
.site-footer .wp-block-site-logo img {
	filter: none;
}
/* ロゴ画像が縦に間延びしないよう高さ自動 */
.wp-block-site-logo img {
	height: auto;
}

/* ===================================================================
   デザイン作り込み（2026/6）— 階層・テーブル・カード・リンク・リスト
   =================================================================== */

/* --- 中央寄せテキストの行を均等化（孤立文字を防ぐ） --- */
.wp-block-post-content p.has-text-align-center,
.wp-block-cover__inner-container p,
h1, h2, h3 {
	text-wrap: balance;
}
/* 本文（左揃え）はpretty で末尾の孤立を防ぐ */
.wp-block-post-content p:not(.has-text-align-center):not(.has-text-align-right) {
	text-wrap: pretty;
}

/* --- 見出しのアンカー --- */
/* 中央寄せ見出し（トップの各セクション）：下に短い罫 */
.wp-block-post-content h2.has-text-align-center::after {
	content: "";
	display: block;
	width: 42px;
	height: 3px;
	margin: 0.8rem auto 0;
	border-radius: 2px;
	background: var(--wp--preset--color--gold-brown);
}
/* 左寄せ見出し（下層ページ）：左に縦バー。※post-title（お知らせ一覧の記事タイトル等）は除外 */
.wp-block-post-content h2:not(.has-text-align-center):not(.wp-block-post-title) {
	position: relative;
	padding-left: 0.9rem;
	margin-top: 2.4rem;
}
.wp-block-post-content h2:not(.has-text-align-center):not(.wp-block-post-title)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.18em;
	bottom: 0.18em;
	width: 4px;
	border-radius: 2px;
	background: var(--wp--preset--color--olive-green);
}
/* セクションのeyebrow（ABOUT US等）と見出しの間を詰める */
.wp-block-post-content h2.has-text-align-center {
	margin-top: 0.2rem;
}

/* --- テーブル：Excel感をなくし、罫線最小＋ラベル列を意匠化 --- */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table th,
.wp-block-table td {
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--border-soft);
	padding: 0.9em 1em;
	vertical-align: top;
	line-height: 1.8;
}
.wp-block-table th {
	text-align: left;
	color: var(--wp--preset--color--olive-green);
	font-weight: 700;
	white-space: nowrap;
	width: 30%;
	background: transparent;
}
/* ストライプ指定を打ち消してすっきり */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) th {
	background-color: transparent;
}
/* 沿革テーブルを年表風に：年セルにオリーブの下線ドット */
.wp-block-table table th:first-child {
	position: relative;
}

/* --- カード：奥行きとホバー --- */
.wp-block-columns .wp-block-column > .wp-block-group.has-border-soft-border-color {
	box-shadow: 0 1px 2px rgba(47, 47, 47, 0.04);
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
	height: 100%;
}
.wp-block-columns .wp-block-column:hover > .wp-block-group.has-border-soft-border-color {
	box-shadow: 0 10px 28px rgba(47, 47, 47, 0.10);
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--olive-green);
}

/* --- 事業アイコンの円背景 --- */
.mw-bizicon {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	margin: 0;
	border-radius: 50%;
	background: rgba(90, 122, 58, 0.10);
	display: flex;
	align-items: center;
	justify-content: center;
}
.mw-bizicon img {
	width: 30px;
	height: 30px;
}

/* --- 営業所カード（上下に積む全幅／中は 写真｜情報｜地図 の横並び） --- */
.office-list {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
}
.office-list > * { margin-top: 0; }
.office-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-soft);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(47, 47, 47, 0.05);
}
/* 上：画像（全幅） */
.office-card__photo { height: 300px; }
.office-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 下：2カラム（左 情報／右 地図） */
.office-card__lower {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	align-items: stretch;
	border-top: 1px solid var(--wp--preset--color--border-soft);
}
.office-card__info {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1.7rem 1.9rem;
}
.office-card__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.45rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 0 0 0.4rem;
	padding-left: 0.7rem;
	position: relative;
	color: var(--wp--preset--color--charcoal-gray);
}
.office-card__name::before {
	content: "";
	position: absolute;
	left: 0; top: 0.15em; bottom: 0.15em;
	width: 4px; border-radius: 2px;
	background: var(--wp--preset--color--olive-green);
}
.office-card__addr { line-height: 1.9; margin: 0; }
.office-card__role { font-size: 0.88rem; line-height: 1.8; color: var(--wp--preset--color--moss-olive); margin: 0; }
.office-card__link {
	margin-top: auto;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--olive-green);
}
.office-card__link:hover { color: var(--wp--preset--color--deep-red-brown); text-decoration: underline; text-underline-offset: 3px; }
.office-card .office-map { display: block; }
.office-card .office-map iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 280px;
	border: 0;
	border-left: 1px solid var(--wp--preset--color--border-soft);
}
/* モバイル：縦積み（写真→情報→地図） */
@media (max-width: 781px) {
	.office-card__photo { height: 210px; }
	.office-card__lower { grid-template-columns: 1fr; }
	.office-card .office-map iframe { height: 240px; min-height: 0; border-left: 0; border-top: 1px solid var(--wp--preset--color--border-soft); }
}

/* --- おすすめ商品バッジ（画像左上のオーバーレイ。本文の段組みに影響させない） --- */
.mw-prodcard { position: relative; }
.prod-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	margin: 0;
	padding: 0.3em 1em;
	border-radius: 40px;
	background: var(--wp--preset--color--deep-red-brown);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	box-shadow: 0 2px 6px rgba(47, 47, 47, 0.2);
}

/* --- 事業タイル（大きなバナー画像＋説明） --- */
.biz-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.6rem;
	align-items: stretch;
}
/* WPレイアウト(is-layout-flow)が子に付ける上マージンを打ち消す（タイルのズレ防止） */
.biz-grid > * {
	margin-top: 0;
	margin-block-start: 0;
}
@media (max-width: 781px) {
	.biz-grid { grid-template-columns: 1fr; }
}
.biz-tile {
	height: 100%; /* グリッド行の高さいっぱいに伸ばし、左右のカードを必ず同じ高さに */
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-soft);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(47, 47, 47, 0.05);
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.biz-tile:hover {
	box-shadow: 0 14px 32px rgba(47, 47, 47, 0.13);
	transform: translateY(-4px);
	border-color: var(--wp--preset--color--olive-green);
}
.biz-tile__img {
	display: block;
	aspect-ratio: 1599 / 984; /* 全タイル画像を同一比率に固定し高さを揃える */
	background: #fff;
}
.biz-tile__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.biz-tile--logo .biz-tile__img { background: #fff; }
.biz-tile__body {
	flex: 1 1 auto; /* 本文がタイルの残り高さを埋める＝行数差を吸収 */
	padding: 1.4rem 1.6rem 1.7rem;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}
.biz-tile__desc {
	font-size: 0.92rem;
	line-height: 1.95;
	color: var(--wp--preset--color--charcoal-gray);
	min-height: 5.85em; /* 3行分を確保し、2行/3行の差で高さがズレないようにする */
}
@media (max-width: 781px) {
	.biz-tile__desc { min-height: 0; } /* 1列表示では不要 */
}
.biz-tile__more {
	font-weight: 600;
	color: var(--wp--preset--color--olive-green);
	transition: color 0.2s ease, transform 0.2s ease;
}
.biz-tile:hover .biz-tile__more {
	color: var(--wp--preset--color--deep-red-brown);
	transform: translateX(2px);
}

/* 事業アイコン（写真を丸く切り抜き：バナー左の文字を避けて人物・商品を表示） */
.mw-bizphoto {
	flex: 0 0 auto;
	width: 76px;
	height: 76px;
	margin: 0;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(47, 47, 47, 0.12);
}
.mw-bizphoto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- カード内「詳しく見る ›」リンクをボタン風に --- */
.wp-block-column .wp-block-group p:last-child a {
	display: inline-block;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--olive-green);
	transition: color 0.2s ease, transform 0.2s ease;
}
.wp-block-column .wp-block-group p:last-child a:hover {
	color: var(--wp--preset--color--deep-red-brown);
	transform: translateX(2px);
}

/* --- リスト：標準の「・」をやめて金茶のひし形マーカー --- */
.wp-block-post-content ul.wp-block-list {
	list-style: none;
	padding-left: 0.2em;
}
.wp-block-post-content ul.wp-block-list li {
	position: relative;
	padding-left: 1.5em;
	margin-bottom: 0.45em;
	line-height: 1.9;
}
.wp-block-post-content ul.wp-block-list li::before {
	content: "";
	position: absolute;
	left: 0.15em;
	top: 0.66em;
	width: 0.5em;
	height: 0.5em;
	border-radius: 0.12em;
	transform: rotate(45deg);
	background: var(--wp--preset--color--gold-brown);
}

/* --- 本文リンク（カード外）：下線オフセットで上品に --- */
.wp-block-post-content p a {
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

/* カード型記事のホバーで軽く持ち上げる */
.wp-block-query .wp-block-post-template > li .wp-block-group {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-block-query .wp-block-post-template > li:hover .wp-block-group {
	box-shadow: 0 6px 20px rgba(47, 47, 47, 0.08);
	transform: translateY(-2px);
}
