/* ヘッダーの予約・電話アイコンの背景（影・角丸）を削除して見た目を統一 */
header.wp-block-template-part .wp-block-image img {
	box-shadow: none;
	border-radius: 0;
}

/* 予約・電話アイコンの高さを揃えてサイズを統一 */
header.wp-block-template-part .wp-block-image img {
	height: 99px !important;
	width: auto !important;
}

/* ===== スマホ表示：ロゴと予約ボタンを横並びに ===== */
@media (max-width: 781px) {

	/* ヘッダーの左右余白を詰めて横幅を確保 */
	header.wp-block-template-part > .wp-block-group.has-global-padding {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	/* ロゴ列とボタン列を同じ行に並べる */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between {
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/* 各ブロックの余分な余白をリセット */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between > * {
		margin: 0 !important;
	}

	/* ロゴのサイズを画面幅に合わせて縮小 */
	header.wp-block-template-part .wp-block-site-logo img {
		width: clamp(100px, 36vw, 210px) !important;
		height: auto !important;
	}

	/* 予約ボタン（右寄せ・メニューボタンと隣接させる） */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between > .wp-block-group:nth-child(2) {
		flex: 0 0 auto;
		gap: 6px;
		margin-left: auto !important;
	}
	header.wp-block-template-part figure.wp-block-image {
		flex: 0 0 auto !important;
		flex-basis: auto !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
	}
	header.wp-block-template-part .wp-block-image img {
		height: clamp(38px, 13vw, 70px) !important;
		width: auto !important;
	}

	/* タブレット幅ではメニューは次の行に */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between > .wp-block-group:last-child {
		flex: 0 0 100%;
		justify-content: center;
	}
}

/* ===== ハンバーガーを「診療内容」ラベル付きメニューボタンに ===== */
header.wp-block-template-part .wp-block-navigation__responsive-container-open {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px 12px;
	border-radius: 10px;
	line-height: 1.2;
}
header.wp-block-template-part .wp-block-navigation__responsive-container-open svg {
	width: 20px;
	height: 20px;
}
header.wp-block-template-part .wp-block-navigation__responsive-container-open::after {
	content: "診療内容";
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}


/* ===== スマホ（メニューが折りたたまれる幅）：電話アイコンを非表示にし、その位置に「診療内容」ボタンを配置 ===== */
@media (max-width: 599px) {

	/* 電話で相談・予約するアイコンは非表示 */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between > .wp-block-group:nth-child(2) figure.wp-block-image:last-child {
		display: none !important;
	}

	/* 「診療内容」ボタンを予約ボタンの右隣（旧・電話アイコンの位置）に */
	header.wp-block-template-part .wp-block-group.is-content-justification-space-between > .wp-block-group:last-child {
		flex: 0 0 auto;
		justify-content: center;
		gap: 0 !important;
	}
	header.wp-block-template-part nav.wp-block-navigation {
		padding: 0 !important;
		margin: 0 !important;
		gap: 0 !important;
	}
}
