/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Version: 1.0
Description: Twenty Twenty-Five 用の子テーマ。固定ページでPHPテンプレートを使用するハイブリッド構成。
Text Domain: twentytwentyfive-child
*/

/* 
 * 注意: 親テーマのスタイルは functions.php でエンキューされます
 * 子テーマのカスタムスタイルはここに記述してください
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
	html {
		font-size: 16px;
		overflow-x: hidden;
	}

	body {
		font-feature-settings: "palt";
	}

	/* WordPress管理バーの保護（rem拡大の影響を受けないように固定） */
	#wpadminbar {
		font-size: 13px;
		width: 100%;
		height: 32px;
	}
}

/* text-gray-700 / text-black を #231815 に統一 */
.text-gray-700,
.text-black {
	color: #231815 !important;
}

/* ハンバーガーメニューボタン（Englishの右・PC/SPとも表示）角丸 8px */
.menu-toggle {
	display: flex;
	background-color: #231815;
	border: none;
	width: 50px;
	height: 50px;
	cursor: pointer;
	border-radius: 8px;
	padding: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.header-menu-toggle .hamburger-icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 24px;
}

.header-menu-toggle .hamburger-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: #fff;
	border-radius: 2px;
}

@media (max-width: 1024px) {
	.header-menu-toggle {
		position: relative;
		z-index: 1003;
	}
}

/* ハンバーガーオーバーレイ（header直下に展開・既存ヘッダーは巻き込まない） */
.site-header {
	position: sticky;
	top: 1rem;
	z-index: 10000;
	/* バックドロップが body コンテンツより手前に出るように */
	background-color: #ffffff;
	/* ヘッダー全体を不透明にし、バックドロップの黒が透けないようにする */
}

/* ヘッダーバー（ロゴ・ナビ・ボタン）に角丸を適用。overflow-hidden はここだけにし、オーバーレイは .site-header 直下のためクリップされない */
.site-header .header-container {
	position: relative;
	z-index: 10001;
	/* バックドロップ(1000)より手前で、body 側だけが暗く見えるようにする */
	background-color: #ffffff;
	border-radius: 1rem;
	/* 16px = Tailwind rounded-2xl */
	overflow: hidden;
}

/* PC時のみ overflow: visible にし、.sub-menu プルダウンがヘッダーからはみ出して表示されるようにする（ハンバーガーは .header-container 外のため干渉しない） */
@media (min-width: 1024px) {
	.site-header .header-container {
		overflow: visible;
	}
}

/* メニュー開時：ヘッダーバーの下側の角丸のみ解除 */
.site-header.is-menu-open .header-container {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* メニュー開時：position fixed ＋ 幅をマージン分差し引いた値で配置。top は通常時と同じ 1rem */
.site-header.is-menu-open {
	position: fixed;
	top: 1rem;
	left: 1rem;
	right: 1rem;
	margin: 0;
}

@media (min-width: 769px) {
	.site-header.is-menu-open {
		left: 2rem;
		right: 2rem;
	}
}

/* メニュー開時：背景のスクロールを無効にする */
body.is-hamburger-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
	left: 0;
}

/* body 要素のバックドロップ（メニュー開時のみ。body::before で表示。ヘッダーは z-index で手前に出す） */
body.is-hamburger-open::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 9999;
	background-color: rgba(0, 0, 0, 0.5);
	pointer-events: auto;
}

.hamburger-overlay {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10002;
	background-color: #fff;
	visibility: hidden;
	opacity: 0;
	max-height: calc(92vh - var(--header-height, 5rem));
	overflow-y: auto;
}

.hamburger-overlay.is-open {
	visibility: visible;
	opacity: 1;
	border-radius: 0 0 .8rem .8rem;
}

.hamburger-overlay__inner {
	display: flex;
	width: 100%;
	overflow: hidden;
	gap: 90px;
}

/* SP（1024px未満）：背景画像エリア（画像を後で設定する場合は .hamburger-overlay__bg-image に background-image を指定） */
.hamburger-overlay__bg-image {
	display: none;
}

/* コンテンツ・ナビは高さを伸ばさずテキストに合わせる */
.hamburger-overlay__content {
	flex: 0 1 auto;
}

.hamburger-overlay__nav {
	flex: 0 1 auto;
}

@media (max-width: 1023px) {
	.hamburger-overlay__inner {
		gap: 45px;
	}

	.hamburger-overlay__bg-image {
		display: block;
		position: absolute;
		inset: 0;
		background-color: #fff;
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
		opacity: 0.4;
		z-index: 0;
	}

	.hamburger-overlay__content {
		background: rgba(255, 255, 255, 0.92);
	}

	.hamburger-overlay__image-wrap {
		display: none !important;
	}
}

/* PC（1024px以上）：左画像エリアはテキストの高さに合わせて最大まで伸ばす */
@media (min-width: 1024px) {
	.hamburger-overlay__image-wrap {
		align-self: stretch;
	}

	.hamburger-overlay__dummy-image {
		height: 100%;
		min-height: 0;
	}
}

/* ハンバーガーオーバーレイ：緑文字（カテゴリ見出し）18px相当 / 灰色（リンク等）14px相当
 * タイトルは緑の左ボーダー、子項目は #DDDDDD の左ボーダー。border 1px・padding-left 20px に統一 */
.hamburger-overlay .hamburger-overlay__nav-col h3 {
	font-size: 1.125rem;
	border-left: 1px solid rgb(34 120 31);
	/* primary-green */
	padding-left: 20px;
	margin-left: 0;
}

.hamburger-overlay .text-primary-green {
	line-height: 2;
}

.hamburger-overlay .hamburger-overlay__nav-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hamburger-overlay .hamburger-overlay__nav-col ul li {
	border-left: 1px solid #DDDDDD;
	padding-left: 20px;
	margin-left: 0;
}

.hamburger-overlay .hamburger-overlay__nav-col,
.hamburger-overlay .hamburger-overlay__nav-col a {
	font-size: 14px;
	line-height: 2;
}

.hamburger-overlay .hamburger-overlay__footer,
.hamburger-overlay .hamburger-overlay__footer a {
	font-size: 12px;
}

/* 開閉実装時：親に is-menu-open を付与すると×表示になる */
.site-header.is-menu-open .header-menu-toggle .hamburger-icon span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.site-header.is-menu-open .header-menu-toggle .hamburger-icon span:nth-child(2) {
	opacity: 0;
}

.site-header.is-menu-open .header-menu-toggle .hamburger-icon span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
	.site-header {
		margin: 1rem;
	}
}

/* ヘッダー「English」リンク */
.header-english-link {
	color: #333333;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.3s ease;
	padding: 8px 0;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	user-select: none;
}

/* 会社沿革タイムライン：●の左右の余白を均等に（●は border-4 で視覚的に広がるため右側を +4px で調整） */
.timeline-content-col {
	padding-left: calc(2rem + 4px);
}

.timeline-dot-pos {
	left: -0.5rem;
}

/* 会社沿革タイムライン：●の枠線を太くする（border-4 / border-6 など → 10px） */
.timeline-dot-pos.border-4,
.timeline-dot-pos.border-6,
.timeline-dot-pos[class*="border-"] {
	border-width: 10px;
}

/* タイムライン日付列を w-28（7rem）にした場合：縦線を幅に合わせる／色は primary-green */
.timeline-vertical-line {
	left: 7rem;
	background-color: rgb(34 120 31);
}

/* 一番下の段は縦線を表示しない（最後の●の中心より下を隠す） */
.relative:has(.timeline-vertical-line) .mb-8.flex:last-of-type .timeline-content-col::after {
	content: "";
	position: absolute;
	left: -2px;
	top: 0.875rem;
	/* 最後の●の中心（0.375rem + 0.5rem） */
	bottom: -3rem;
	width: 4px;
	background-color: #ffffff;
}

/* 会社グループ一覧：PC/タブレットはテーブルレイアウト（dt|dd 2列）、SPは1列で縦落ち */
.company-group-list .company-group-dl,
.has-custom-border dl[style*="grid-template-columns"] {
	display: grid;
	grid-template-columns: auto 1fr;
}

@media (max-width: 767px) {

	/* 会社沿革タイムライン：SP時●の中心が縦線と一致するよう位置を補正（border 10px 分） */
	.timeline-dot-pos {
		left: calc(0rem - 11px);
		z-index: 99;
	}

	.company-group-list .company-group-dl,
	.has-custom-border dl[style*="grid-template-columns"] {
		grid-template-columns: 1fr !important;
	}

	.has-custom-border dl dd {
		word-break: break-word;
		overflow-wrap: break-word;
	}



	/* 拠点一覧（Untitled-2 型）：SPで住所+ボタン行を1列に・オーバーフロー防止 */
	.has-custom-border div[style*="grid-template-columns: auto auto"] {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.has-custom-border div[style*="grid-template-columns: auto auto"]>* {
		min-width: 0;
	}

	.has-custom-border div[style*="grid-template-columns: auto auto"] .company-site-btn {
		max-width: 100%;
		min-width: 0;
		width: auto;
	}

	/* 拠点一覧：外側グリッドのSP用 gap 縮小・はみ出し防止 */
	.has-custom-border.relative.w-full.grid,
	.has-custom-border>div.relative.w-full.grid {
		gap: 1.5rem !important;
		min-width: 0;
		overflow-x: hidden;
	}
}

/* 拠点一覧（Untitled-2 型）：PC表示（デフォルト） */
.has-custom-border div[style*="grid-template-columns: auto auto"] {
	grid-template-columns: auto auto;
	justify-content: space-between;
}

/* 会社グループ一覧：画像エリアの幅（PC＝デフォルト） */
.company-group-list section:nth-child(1) .company-group-img-wrap,
.company-group-list section:nth-child(2) .company-group-img-wrap {
	width: 21rem;
	max-width: 21rem;
}

.company-group-list section:nth-child(3) .company-group-img-wrap {
	width: 25rem;
	max-width: 25rem;
}

.company-group-list section:nth-child(4) .company-group-img-wrap {
	width: 10.5rem;
	max-width: 10.5rem;
}

.company-group-list section:nth-child(5) .company-group-img-wrap {
	width: 20rem;
	max-width: 20rem;
}

.company-group-list section:nth-child(6) .company-group-img-wrap {
	width: 14.3rem;
	max-width: 14.3rem;
}

.company-group-list section:nth-child(7) .company-group-img-wrap {
	width: 14.3rem;
	max-width: 14.3rem;
}

@media (max-width: 767px) {
	.company-group-list .company-group-img-wrap {
		width: 100%;
		max-width: 100%;
	}

	.company-group-list section:nth-child(4) .company-group-img-wrap {
		max-width: 40%;
		margin: 0 auto;
	}
}

/* 下層固定ページなどでコンテンツが少ない場合：.business-detail-page-main のときのみメインを伸ばしてサイドバーをビューポート下部に揃える */
body:not(.home) {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body:not(.home) .business-detail-page-main {
	flex: 1 0 auto;
}

/* 1400px以下（DevTools・倍率75%等）：初回ロード時はメインを伸ばさずサイドバーをコンテンツ直下（上部）に表示 */
@media (max-width: 1400px) {
	body:not(.home) .business-detail-page-main {
		flex: 0 0 auto;
	}
}

/* フロントページ：サイドバーを非表示 */
body.home .business-sidebar-mobile-wrapper,
body.home .business-detail-sidebar {
	display: none !important;
}

/* フロントページ：サステナビリティ・企業情報カード ホバー時画像拡大 */
.front-card-img-wrap img {
	transition: transform 0.4s ease;
}

.sustainability-card-link:hover .front-card-img-wrap img,
.about-card-link:hover .front-card-img-wrap img {
	transform: scale(1.08);
}

/* ページヘッダー（parts/page-header）：SP時などで明朝にならないようゴシック系フォールバック */
.w-full.max-w-\[85\%\].mx-auto.pb-12 h1,
.w-full.max-w-\[85\%\].mx-auto.pb-12 h1 span,
.w-full.max-w-\[85\%\].mx-auto.pb-12 p {
	font-family: 'Noto Sans', 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

/* ==========================================================================
   共通パーツ（page-support 等で使用するインラインスタイルの置き換え）
   ========================================================================== */

/* セクションパディング（front-page用） */
.pt-section-sm.pb-section-sm {
	padding-block: 3.75rem;
}

.pt-section-sm {
	padding-top: 2.75rem;
}

.pb-section-sm {
	padding-bottom: 2.75rem;
}

@media (max-width: 768px) {
	.pt-section-sm.pb-section-sm {
		padding-block: 3.875rem;
	}

	.pt-section-sm {
		padding-top: 0;
	}

	.pb-section-sm {
		padding-bottom: 3.75rem;
	}
}

/* セクション見出し h4：和文フォント指定 */
.support-section-title {
	font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

/* h4タイトルの左側装飾・縦文字（介護・医薬品・医療機器等で使用） */
.section-title-wrapper {
	position: relative;
}

.decorative-boxes {
	gap: 0;
}

.vertical-text {
	writing-mode: vertical-rl;
	font-family: 'Manrope', sans-serif;
	display: inline-block;
	white-space: nowrap;
}

/* 事業案内下層・ページタイトル（h2）PC/SP共通（本番で親CSSより確実に適用するため子テーマでも定義） */
.text-page-title {
	font-size: 2.875rem;
}

/* グリッド列（tailwind.config.js の gridTemplateColumns と同様） */
.grid-cols-1fr {
	grid-template-columns: 1fr;
}

.grid-cols-2fr-1fr {
	grid-template-columns: 2fr 1fr;
}

.grid-cols-solution {
	grid-template-columns: 1.3fr 1fr;
}

.grid-cols-solution-reverse {
	grid-template-columns: 1fr 1.3fr;
}

.grid-cols-company {
	grid-template-columns: 1.3fr auto;
}

@media (max-width: 769px) {
	.grid-cols-2fr-1fr {
		grid-template-columns: 1fr;
	}

	.grid-cols-solution {
		grid-template-columns: 1fr;
	}

	.grid-cols-solution-reverse {
		grid-template-columns: 1fr;
	}

	.grid-cols-company {
		grid-template-columns: 1fr;
	}
}

/* ソリューション2カラム：SP/sm で文字→画像の並び（tailwind.config.js の .solution-order-* と同様） */

.solution-order-text,
.solution-order-img {
	order: 0;
}

@media (max-width: 768px) {
	.solution-order-text {
		order: 1;
	}

	.solution-order-img {
		order: 2;
	}
}


/* メインコンテンツ内側：幅とマージン（サイドバー追従の「止める境界」として JS で参照） */
.support-content-inner {
	margin: 0;
	max-width: 90%;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	position: relative;
	/* 境界の参照用 */
}

/* 事業案内下層ページ：コンテンツの左右余白 */
main.business-detail-page-main .max-w-\[90\%\],
main.business-detail-page-main [style*="max-width: 90%"],
main.business-detail-page-main [style*="max-width:95%"] {
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}

/* 支援ページの画像コンテナ高さ */
.support-img-container {
	height: 541px;
}

/* 支援ページ：画像＋キャプション（画像高さに合わせたレスポンシブ） */
.support-img-with-caption {
	display: block;
}

.support-img-with-caption .support-img-caption {
	/* 画像高さの約25〜45%でオーバーレイ高さが可変（HTML側の min-h-[25%] max-h-[45%] と併用） */
	min-height: min(25vh, 25%);
	max-height: 45%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
	.support-img-with-caption .support-img-caption {
		min-height: min(120px, 28%);
	}
}

/* h3-card：画像エリアの高さを揃える（肌年齢計などグリッドカード用） */
.h3-card {
	min-width: 0;
	/* グリッド内でオーバーフローしないよう縮小を許可 */
}

.h3-card>div:first-of-type {
	width: 17.5rem;
	max-width: 100%;
	/* iPad・タブレットで親幅をはみ出さない */
	height: 11.25rem;
	min-height: 11.25rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.h3-card>div:first-of-type img {
	max-height: 100%;
	max-width: 100%;
	width: 6.5rem;
	height: auto;
	object-fit: contain;
}

.h3-card::last-of-type>div img {
	width: 5.9rem;
}

/* 開業の流れ：2カラムグリッド */
.support-flow-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	column-gap: 2rem;
	row-gap: 1.5rem;
}

/* 開業の流れ：ステップバッジ（01 など） */
.support-flow-badge {
	border-radius: 999px;
	padding: 0.25rem;
	line-height: 1;
	font-size: 1.25rem;
}

/* 開業の流れ：ステップ見出しのフォントサイズ */
.support-flow-step-title {
	font-size: 1.25rem;
}

/* 開業の流れ：説明文のフォントサイズ */
.support-flow-desc {
	font-size: 0.9375rem;
}

/* 開業の流れ：* アイコンのベースライン揃え */
.support-flow-desc .w-icon-10.h-icon-10 {
	align-self: baseline;
}

/* 診療科ボックス：枠線とフォントサイズ */
.support-dept-box {
	border: 2px solid #22781F;
	font-size: 1.0625rem;
}

/* 支援ページ：サービスカードのグリッド（PC/SP共通で.4fr 1fr） */
.grid-cols-support-service {
	grid-template-columns: 0.4fr 1fr;
}

/* 支援ページ：サービスアイコンの画像コンテナ */
.w-support-icon.h-support-icon {
	width: 100%;
	height: 100%;
}

/* 診療科セクション（チョイス等）：内側パディング */
.support-choice-section {
	padding: 2.75rem;
}

/* Product Site ボタン（フェムテック等） */
.product-site-btn {
	min-width: 250px;
	max-width: 250px;
	justify-content: space-between;
	min-height: 60px;
}

/* Coming soon：グレーアウト・クリック不可・矢印アイコン */
.product-site-btn--coming-soon {
	opacity: 0.6;
	background-color: #9ca3af !important;
	pointer-events: none;
	cursor: default;
}

.product-site-btn--coming-soon:hover {
	background-color: #9ca3af !important;
}

/* 拠点一覧：Safari等で1pxボーダーの太さが揃うようにする（サブピクセル描画の抑制） */
.company-site-list-row {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	transform: translateZ(0);
}

/* PC＝デフォルト */
.company-site-btn {
	min-width: 12rem;
	max-width: 12rem;
	justify-content: space-between;
	min-height: 60px;
	padding-left: 2rem;
	padding-right: 1rem;
}

@media (max-width: 767px) {
	.company-site-btn {
		padding-left: 1rem;
		padding-right: 1rem;
		min-height: 40px;
	}
}

/* アイコン左の縦線（疑似要素） */
.product-site-btn__icon {
	display: inline-flex;
	align-items: center;
}

/* PC＝デフォルト：Product Site ボタンのpadding-x・アイコン右マージン */
.product-site-btn {
	padding-left: 1rem;
	padding-right: 1rem;
}

.product-site-btn__icon::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 1.75rem;
	background-color: #fff;
	margin-right: 1rem;
}

@media (max-width: 768px) {

	.hero-content h1 {
		font-size: 2.25rem;
		margin-bottom: 0.75rem;
	}

	.product-site-btn {
		min-width: 160px;
		max-width: 160px;
		min-height: 40px;
	}

	.product-site-btn__icon::before {
		height: 1rem;
		margin-right: 0.5rem;
	}
}

/* ワクチン事業：カード内見出し */
.vaccine-card h5 {
	font-size: 1.375rem;
}

/* ==========================================================================
   事業案内下層：右サイドバー追従（support-content-inner の下辺付近で止める）
   ========================================================================== */
main.business-detail-page-main {
	position: relative;
	/* サイドバーを support-content-inner 下辺で止めるための基準 */
}

/* PC＝デフォルト：ページ内グリッド用で親コンテンツ内のみ追従（sticky） */
.business-detail-sidebar {
	position: sticky;
	top: 1.5rem;
}

/* space-y-6 の margin-top を 1rem に変更 */
.space-y-6> :not([hidden])~ :not([hidden]) {
	--tw-space-y-reverse: 0;
	margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
	margin-top: calc(1rem * (1 - var(--tw-space-y-reverse)));
}

@media (max-width: 1024px) {
	.business-detail-sidebar {
		position: static;
		align-self: start;
	}
}

/* ヘッダー内の「事業案内」サイドバー（PC：1201px以上） */
@media (min-width: 1201px) {
	.business-header-content .business-detail-sidebar {
		position: absolute;
		top: -2.5rem;
		right: calc(-4rem + 8px);
		width: 100%;
		max-width: 18.75rem;
		z-index: 20;
	}

	/* single.php（単一投稿）の場合は right: 20px のまま */
	body.single .business-header-content .business-detail-sidebar {
		margin-top: 3.2rem;
		right: 20px;
	}

	/* archive（アーカイブページ）も最上部で right: 20px のまま */
	body.archive .business-header-content .business-detail-sidebar {
		margin-top: 3.2rem;
		right: 20px;
	}

	/* 常にPCサイドバー内のカードにボーダーを表示 */
	.business-header-content .business-detail-sidebar .bg-white.rounded-lg.space-y-4 {
		border: 1px solid #DDDDDD;
	}

	/* フルHD等でコンテンツ量が多いときビューポートからはみ出さないよう：縦幅を制限し内部スクロール */
	.business-header-content .business-detail-sidebar .bg-white.rounded-lg.space-y-4 {
		max-height: min(calc(100vh - 6rem), 800px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* スクロール後にヘッダー側に寄せる（8rem→5remで「グループ情報」まで見切れにくく） */
	.business-header-content .business-detail-sidebar.sidebar-scrolled {
		position: fixed;
		right: 20px;
		top: 6.5rem;
	}

	/* main の下辺が表示されたときに JS で .sidebar-at-main-end を付与し、PCサイドバー下端を main 下辺で止める（bottom は JS で px 指定） */
	.business-header-content .business-detail-sidebar.sidebar-at-main-end {
		position: fixed;
		top: auto;
		right: 20px;
		/* bottom は JS で main の下辺に合わせて設定 */
	}

	/* PCサイドバーのすべてのボタンのサイズ調整 */
	.business-header-content .business-detail-sidebar .w-btn-arrow-md,
	.business-header-content .business-detail-sidebar .h-btn-arrow-md {
		width: 24px;
		height: 24px;
	}

	/* サイドバー（ヘッダー内）：画像・文字・余白を統一 */
	.business-header-content .business-detail-sidebar .bg-white.rounded-lg.space-y-4>a figure {
		width: 3.3rem;
		height: 3.3rem;
	}

	.business-header-content .business-detail-sidebar .bg-white.rounded-lg.space-y-4>a h3 {
		font-size: 0.95rem;
		line-height: normal;
	}

	.business-header-content .business-detail-sidebar .bg-white.rounded-lg.space-y-4>a {
		padding: 0.8rem;
	}
}

/* ==========================================================================
   リンクの矢印アイコン ホバーアニメーション
   ========================================================================== */

/* 子要素全体がaタグで囲まれている場合：親a.groupホバー時に緑矢印を中央から縮小 */
.business-detail-sidebar a.group:hover span.rounded-full.flex-shrink-0,
.business-header-content .business-detail-sidebar a.group:hover span.rounded-full.flex-shrink-0 {
	transform: scale(0.9);
}

.business-detail-sidebar a.group span.rounded-full.flex-shrink-0,
.business-header-content .business-detail-sidebar a.group span.rounded-full.flex-shrink-0 {
	transform-origin: center;
	transition: transform 0.3s ease-out;
}

/* リンクホバー時：矢印アイコンが中央から縮小 */
a.group:hover .link-arrow-icon {
	transform: scale(0.85);
}

/* スムーズなアニメーション */
.link-arrow-icon {
	transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* 事業案内セクションのボタンホバー効果 */
.business-button:hover {
	transform: scale(0.85);
}

/* front-page内の緑のボタンのホバー効果（円形・角丸共通） */
.site-main .bg-primary-green.rounded-full:hover,
.site-main .bg-primary-green.rounded-tl-2xl:hover {
	transform: scale(0.85);
	transition: transform 0.3s ease;
}

/* parts/button-primaryテンプレートパート（大きなボタン）のホバー効果 */
.site-main a.bg-primary-green.inline-grid:hover {
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

/* ヒーローエリア（背景画像・フロントページ）PC＝デフォルト */
.hero-section {
	background-image: var(--hero-bg-pc);
	background-size: cover;
	background-position: right;
	background-repeat: no-repeat;
	border-radius: 1rem;
	margin-bottom: 2rem;
	overflow: hidden;
	height: auto;
}

.hero-section .hero-content {
	position: static;
	top: auto;
	left: auto;
}

/* 768px以下：SP表示（2段レイアウト・上＝テキスト、下＝画像） */
.hero-section__image {
	display: none;
}

@media (max-width: 768px) {
	.hero-section {
		display: grid;
		grid-template-rows: auto 1fr;
		aspect-ratio: unset;
		background-image: none;
		min-height: 0;
	}

	.hero-section__inner {
		order: 1;
		background-color: #fff;
	}

	.hero-section__image {
		display: block;
		order: 2;
		position: relative;
		overflow: hidden;
		background-color: #fff;
		background-image: var(--hero-bg-sp);
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
		border-radius: none;
	}

	/* SP：画像左側に白グラデーション（PC版ヒーロースライダーと同様） */
	.hero-section__image::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: linear-gradient(to right, rgba(255, 255, 255, 1) 5%, rgba(255, 255, 255, 0) 33%);
		pointer-events: none;
		border-radius: 1rem;
	}
}

/* 541px〜768px：画像の位置を上揃え */
@media (min-width: 541px) and (max-width: 768px) {
	.hero-section__image {
		background-position: top;
	}
}

/* ヒーロースライダー（Swiper） */
.hero-slider {
	margin-bottom: 2rem;
	height: 60vh;
	position: relative;
}

/* 画像の親要素にクラスを付与 */
.hero-slider__img-wrap.image-with-gradient {
	position: absolute;
	inset: 0;
	padding: 0 1.5rem;
	border-radius: 16px;
	overflow: hidden;
	display: block;
}

.hero-slider__img-wrap.image-with-gradient img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right;
}

/* SP画像にグラデーションオーバーレイ（::before） */
@media (max-width: 1024px) {
	.hero-slider__img-wrap.image-with-gradient {
		padding: 0;
	}

	.hero-slider__img-wrap.image-with-gradient::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
		pointer-events: none;
		border-radius: 16px;
	}
}

.hero-swiper {
	width: 100%;
	height: 100%;
	position: relative;
}

.hero-swiper .swiper-slide {
	text-align: center;
	font-size: 1.125rem;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}

.hero-swiper .swiper-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ヒーローテキストコンテンツ */
.hero-content {
	position: absolute;
	z-index: 20;
	top: 10%;
	left: 10%;
}

/* Swiperページネーションのスタイル */
.hero-pagination {
	bottom: 1.5rem !important;
}

.hero-pagination .swiper-pagination-bullet {
	width: 0.5rem;
	height: 0.5rem;
	background: rgba(255, 255, 255, 0.5);
	opacity: 1;
	margin: 0 0.2rem;
}

.hero-pagination .swiper-pagination-bullet-active {
	background: #fff;
}

/* スライド遷移ボタン（右中央・左半分の半円） */
.hero-slide-next-btn {
	position: absolute !important;
	right: 1.5rem !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 3.5rem !important;
	height: 3.5rem !important;
	border-radius: 50% 0 0 50% !important;
	/* 右半分の半円（2:2の比率） */
	background: #fff !important;
	border: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	z-index: 30 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	transition: all 0.3s ease !important;
	margin: 0 !important;
	padding: 0 !important;
}

.hero-slide-next-btn::after {
	display: none !important;
}

.hero-slide-next-btn .arrow-text {
	font-size: 1.5rem;
	color: #22781F;
	font-weight: bold;
	line-height: 1;
}

.hero-slide-next-btn:hover {
	background: #f5f5f5 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
	transform: translateY(-50%) scale(1.05) !important;
}

.hero-slide-next-btn:active {
	transform: translateY(-50%) scale(0.95) !important;
}

/* 事業案内セクションのリストアイテムホバー効果 */
.business-list-item:hover .business-item-inner {
	background-color: #fef2f2;
	/* bg-red-bg */
}

.business-list-item:hover .business-item-inner .text-primary-green {
	color: #e94940;
	/* text-primary-red */
}

.business-list-item:hover .business-item-inner .business-button {
	background-color: #e94940;
	/* bg-primary-red */
}

/* ==========================================================================
   無料ご相談フォーム（Contact Form 7）
   ========================================================================== */

.support-contact-form-section .consultation-form-wrap {
	max-width: 100%;
}

.support-contact-form-section .consultation-form-fields .form-row {
	display: grid;
	grid-template-columns: 14.8rem 1fr;
	gap: 0.5rem 1rem;
	align-items: center;
	margin-bottom: 2rem;
}

.support-contact-form-section .consultation-form-fields .form-row label {
	font-weight: 500;
	font-size: 1rem;
	color: #231815;
}

.support-contact-form-section .consultation-form-fields .label-with-badge {
	grid-column: 1;
	display: flex;
	align-items: center;
	gap: 0.25em;
	justify-content: space-between;
}

.support-contact-form-section .consultation-form-fields .required-badge {
	color: #22781F;
	font-size: 0.75rem;
	font-weight: bold;
}

.support-contact-form-section .wpcf7-form-control-wrap {
	grid-column: 2;
	width: 100%;
}

.support-contact-form-section .input-with-required .wpcf7-form-control-wrap {
	flex: 1;
	min-width: 0;
}

.support-contact-form-section .wpcf7-text,
.support-contact-form-section .wpcf7-email,
.support-contact-form-section .wpcf7-tel,
.support-contact-form-section .wpcf7-textarea {
	width: 100%;
	max-width: none;
	padding: 0.5rem 0.75rem;
	background-color: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
}

.support-contact-form-section .wpcf7-textarea {
	min-height: 120px;
	resize: vertical;
}

.wpcf7 input[type="file"] {
	font-size: 1rem;
}

.support-contact-form-section .form-hint {
	display: block;
	grid-column: 2;
	font-size: 0.8125rem;
	margin-top: 0.25rem;
}

.support-contact-form-section .input-with-required {
	grid-column: 2;
	width: 100%;
	gap: 0.5rem;
	display: flex;
	align-items: center;
}

/* 郵便番号・都道府県（5番目・6番目のform-row）のみPC時のみ特殊レイアウト */
.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-postal"]),
.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]),
.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-postal"]),
.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) {
	grid-template-columns: 14.8rem min-content auto;
}

.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-postal"]) .input-with-required,
.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]) .input-with-required,
.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-postal"]) .input-with-required,
.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) .input-with-required {
	width: 282px;
}

/* 都道府県のform-hintを3列目に配置（PC時のみ） */
.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]) .form-hint,
.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) .form-hint {
	grid-area: 1 / 3 / 2 / 4;
	margin-top: 0;
}

/* 診療科：4列チェックボックス */
.support-contact-form-section .form-row--dept {
	display: block;
}

.support-contact-form-section .form-row--dept .wpcf7-checkbox {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.5rem 1rem;
	margin-top: 0.5rem;
}

.support-contact-form-section .form-row--dept .wpcf7-list-item {
	margin: 0;
}

/* 診療科：「アレルギー科」の直前で改行するための空グリッドセル（JS で挿入） */
.support-contact-form-section .form-row--dept .dept-grid-break {
	grid-column: span 1;
}

.support-contact-form-section .form-row--dept .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 1rem;
	cursor: pointer;
}

/* 個人情報保護方針リンク・同意チェックボックス・送信：1列表示 */
.support-contact-form-section .form-row--privacy,
.support-contact-form-section .form-row--consent,
.support-contact-form-section .form-row--submit {
	display: block;
	text-align: center;
}

.support-contact-form-section .form-row--privacy {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
}

.support-contact-form-section .form-row--consent {
	margin-bottom: 1.5rem;
	text-align: left;
}

.support-contact-form-section .form-row--consent .wpcf7-list-item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.support-contact-form-section .form-row--consent .wpcf7-list-item-label {
	cursor: pointer;
	font-size: 0.95rem;
}

[data-name="acceptance-privacy"] {
	font-size: 1rem;
}

/* キャリア採用フォーム内の .wpcf7-list-item（ラジオ・チェックボックス等） */
.consultation-form-fields.career .wpcf7-list-item:first-of-type {
	margin: 0;
}

.support-contact-form-section .form-row--privacy a {
	font-size: 0.9rem;
	text-decoration: underline;
}

.support-contact-form-section .form-row--privacy a:hover {
	text-decoration: none;
}

/* 送信ボタン */
.support-contact-form-section .form-row--submit {
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.support-contact-form-section .consultation-submit,
.support-contact-form-section .wpcf7-form input.consultation-submit {
	background-color: #E94D40;
	color: #fff;
	border: none;
	padding: 0.75rem 4rem;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	transition: opacity 0.2s;
}

.support-contact-form-section .consultation-submit:hover,
.support-contact-form-section .wpcf7-form input.consultation-submit:hover {
	opacity: 0.9;
}

/* エラー・レスポンス */
.support-contact-form-section .wpcf7-not-valid-tip {
	font-size: 0.8125rem;
	color: #E94D40;
	margin-top: 0.25rem;
}

/* wpcf7-response-output：バリデーションエラー時のみ表示（送信成功・送信失敗等は非表示、サンクスへリダイレクトするため） */
.support-contact-form-section .wpcf7-response-output {
	display: none;
	margin: 0.75rem 0 0;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
}

.support-contact-form-section .wpcf7-form.invalid .wpcf7-response-output {
	display: block;
	background-color: #fef2f2;
	border: 1px solid #E94D40;
	color: #991b1b;
}

/* wpcf7-spinner：通常は非表示、バリデーションエラー時のみ表示 */
.support-contact-form-section .wpcf7-spinner {
	display: none;
}

.support-contact-form-section .wpcf7-form.invalid .wpcf7-spinner {
	display: block;
}

/* 事業案内ヘッダー：h2タイトル（PC版） */
.business-header-content h2 {
	font-size: 2.875rem;
}

@media (max-width: 768px) {
	.support-contact-form-section .consultation-form-fields .form-row {
		grid-template-columns: 1fr;
		display: grid;
	}

	.support-contact-form-section .wpcf7-form-control-wrap {
		grid-column: 1;
	}

	.support-contact-form-section .form-hint {
		grid-column: 1;
	}

	/* SP時：label-with-badgeを1列目に配置し、labelとrequired-badgeを横並びに */
	.support-contact-form-section .form-row .label-with-badge {
		grid-column: 1;
		display: flex;
		align-items: center;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
		justify-content: flex-start;
	}

	.support-contact-form-section .form-row .input-with-required {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		grid-column: 1;
		width: 100%;
	}

	.support-contact-form-section .consultation-form-fields.career .form-row .input-with-required {
		flex-direction: unset;
	}

	/* SP時：郵便番号・都道府県も通常の1列レイアウトに戻す */
	.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-postal"]),
	.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]),
	.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-postal"]),
	.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) {
		grid-template-columns: 1fr;
	}

	.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-postal"]) .input-with-required,
	.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]) .input-with-required,
	.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-postal"]) .input-with-required,
	.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) .input-with-required {
		width: 100%;
	}

	/* SP時：都道府県のform-hintを通常のレイアウトに戻す */
	.support-contact-form-section .consultation-form-fields .form-row:has(.wpcf7-form-control-wrap input[name="your-pref"]) .form-hint,
	.support-contact-form-section .consultation-form-fields .form-row:has(input[name="your-pref"]) .form-hint {
		grid-area: auto;
		grid-column: 1;
		margin-top: 0.25rem;
	}

	.support-contact-form-section .form-row--dept .wpcf7-checkbox {
		grid-template-columns: repeat(2, 1fr);
	}

	/* 診療科：SPではアレルギー科前の改行なし */
	.support-contact-form-section .form-row--dept .dept-grid-break {
		display: none;
	}

	/* SP時：開業の流れタイトルのフォントサイズ */
	.support-flow-step-title {
		font-size: 1.0625rem;
	}

	/* SP時：開業の流れバッジを小さく */
	.support-flow-badge {
		width: 2rem;
		height: 2rem;
		font-size: 0.875rem;
	}

	/* SP時：開業の流れセクションの薄い緑背景のパディングを抑える */
	.bg-light-green.rounded-lg.p-4 {
		padding: 0.75rem !important;
		/* 元の1remより小さく */
	}

	/* SP時：support-content-innerのpadding-inlineを0に */
	.support-content-inner {
		padding-inline: 0;
		max-width: 100%;
	}
}

/* ==========================================================================
   事業案内下層：共通レスポンシブ（768px以下：スマホ・タブレット）
   ========================================================================== */
@media (max-width: 768px) {

	/* grid-cols-femtech-stats：SPで2列 1fr 1fr */
	.grid-cols-femtech-stats {
		grid-template-columns: 1fr 1fr;
	}

	/* フェムテック統計グリッド：SP時は1個目が1列、2個目以降が2列 */
	.femtech-stats-grid {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(3, auto);
	}

	.femtech-stats-item-1 {
		grid-area: 1 / 1 / 2 / 3;
		/* 1行目、1列目から3列目まで（全幅） */
	}

	.femtech-stats-item-2 {
		grid-area: 2 / 1 / 3 / 2;
		/* 2行目、1列目から2列目まで */
	}

	.femtech-stats-item-3 {
		grid-area: 2 / 2 / 3 / 3;
		/* 2行目、2列目から3列目まで */
	}

	.femtech-stats-item-4 {
		grid-area: 3 / 1 / 4 / 2;
		/* 3行目、1列目から2列目まで */
	}

	.femtech-stats-item-5 {
		grid-area: 3 / 2 / 4 / 3;
		/* 3行目、2列目から3列目まで */
	}

	/* 医薬品卸売事業ページ：SP時にPoint連番を非表示 */
	.point-label {
		display: none;
	}

	/* pt-section-sm / pb-section-sm：SPで縮小 */
	.pt-section-sm {
		padding-top: 4.5rem;
	}

	.pb-section-sm {
		padding-bottom: 4.5rem;
	}

	/* ページヘッダー・タイトル */
	main.business-detail-page-main .page-header-title {
		font-size: 2.25rem;
	}

	main.business-detail-page-main>div.pb-20 {
		padding-bottom: 2rem;
	}

	/* コンテンツ幅：SPで少し広く */
	main.business-detail-page-main .max-w-\[90\%\] {
		max-width: 95%;
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* has-global-padding：SPでパディング解除 */
	main.business-detail-page-main .has-global-padding {
		padding: 0;
	}

	/* セクション見出し h4（サービスの特徴 等）：SPでフォント縮小 */
	main.business-detail-page-main .section-title-wrapper h4 {
		font-size: 1.25rem;
	}

	/* 医薬品卸売事業ページ：h4タイトル（SP時） */
	main.business-detail-page-main .section-title-wrapper h4.text-3xl {
		font-size: 1.5rem;
	}

	/* h4.text-primary-green（医院開業をトータルに… 等）：SPでフォント縮小 */
	main.business-detail-page-main h4.text-primary-green.text-3xl {
		font-size: 1.25rem;
	}

	/* 縦文字：SPでも縦向きのまま（vertical-rl は .vertical-text で共通） */

	/* グリッド gap 縮小 */
	main.business-detail-page-main .gap-20 {
		gap: 1rem;
	}

	main.business-detail-page-main .gap-12 {
		gap: 2rem;
	}

	main.business-detail-page-main .gap-8 {
		gap: 1rem;
		/* 元のgap-8（2rem）の半分 */
	}

	/* 見出し h5（例: text-[26px]） */
	main.business-detail-page-main h5.text-\[26px\] {
		font-size: 1.25rem;
	}

	/* マージン・スペーシング */
	main.business-detail-page-main .section-title-wrapper.mb-8,
	main.business-detail-page-main .mb-8 {
		margin-bottom: 1.5rem;
	}

	main.business-detail-page-main .space-y-4>*+* {
		margin-top: 0.5rem;
		/* 元のspace-y-4（1rem）の半分 */
	}

	/* SP時：フェムテックページのh4タイトルのline-height */
	main.business-detail-page-main h4.text-28-sp.text-primary-green {
		line-height: 1;
	}

	/* --- support 固有 --- */
	/* 開業の流れ：2列→1列 */
	.support-flow-grid {
		grid-template-columns: 1fr;
		column-gap: 1rem;
		row-gap: .5rem;
	}

	/* 診療科エリア：パディング縮小 */
	.support-choice-section {
		padding: 2rem 1.5rem;
	}

	/* 診療科セクション：SP時文字サイズ縮小 */
	.support-choice-section h4 {
		font-size: 1rem;
	}

	.support-choice-section p {
		font-size: 0.875rem;
	}

	/* 診療科ボックス親：4列→2列 */
	.support-dept-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.75rem;
	}

	/* 診療科ボックス：SP時文字サイズ縮小 */
	.support-dept-box {
		font-size: 0.875rem;
		padding: 0.5rem;
	}

	/* 支援ページ：サービスアイコンサイズ（SP時） */
	.w-support-icon {
		width: 5rem;
	}

	.h-support-icon {
		height: 5rem;
	}

	/* 事業案内ヘッダー：h3タイトル（SP時） */
	.business-header-extra h3 {
		font-size: 1.25rem;
	}

	/* パンくずリスト：SP時横スクロール */
	.breadcrumb-nav {
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		word-break: keep-all;
		word-wrap: normal;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		/* Firefox */
		-ms-overflow-style: none;
		/* IE and Edge */
	}

	/* スクロールバーを非表示（Chrome, Safari, Opera） */
	.breadcrumb-nav::-webkit-scrollbar {
		display: none;
	}

	/* パンくずリスト内の要素も改行無効 */
	.breadcrumb-nav>* {
		white-space: nowrap;
		flex-shrink: 0;
	}

	/* 画像コンテナ：高さ可変 */
	.support-img-container {
		height: auto;
		min-height: 240px;
	}

	/* --- business-header-content（ヘッダー画像・サイドバー） --- */
	.business-header-content .absolute.left-0.bottom-0 {
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
	}

	.business-header-content h2 {
		font-size: 1.5rem;
		margin-top: 1rem;
	}

	/* ↑ SP版（768px以下）。PC版はメディアクエリ外で 2.875rem */

	.business-header-content .business-detail-sidebar h3 {
		font-size: 1rem;
	}

	.business-detail-sidebar {
		margin-top: 1rem;
		position: relative;
		width: 100%;
		max-width: 100%;
	}

	/* フッターの直前に配置されたサイドバーのスタイル */
	footer.site-footer~.business-detail-sidebar,
	.business-detail-sidebar:not(.business-header-content .business-detail-sidebar) {
		width: 90%;
		max-width: 100%;
		margin: 3rem auto 3rem auto;
		padding: 0;
	}

	/* SP用サイドバーラッパー（フッター上部）のスタイルは下のメディアクエリで定義 */
}

/* ==========================================================================
   フッター：6列リンクが確実に表示されるように子テーマで指定
   （読み込みは子テーマ footer.php → body 直下の .site-footer で詳細度を上げて適用）
   ========================================================================== */
body .site-footer .footer-container {
	max-width: 90%;
	margin-left: auto;
	margin-right: auto;
	padding: 0 20px;
}

body .site-footer .footer-links {
	margin-bottom: 50px;
}

body .site-footer .footer-columns {
	display: grid !important;
	grid-template-columns: repeat(6, 1fr) !important;
	gap: 30px;
}

body .site-footer .footer-column {
	display: block !important;
	min-width: 0;
	visibility: visible !important;
}

body .site-footer .footer-column-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #fff;
}

body .site-footer .footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

body .site-footer .footer-menu li {
	margin-bottom: 12px;
}

body .site-footer .footer-menu .over {
	margin-bottom: 8px;
	line-height: 1;
}

body .site-footer .footer-menu a {
	color: #fff;
	text-decoration: none;
	font-size: 13px;
}

body .site-footer .footer-menu a:hover {
	opacity: 0.8;
}

@media (max-width: 1024px) {
	body .site-footer .footer-columns {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 768px) {
	body .site-footer .footer-columns {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* footer用サイドバーのPC/SP表示制御（1200px以下＝SPサイドバー、1201px以上＝PCサイドバー） */
.business-sidebar-footer {
	display: none;
}

/* max-width 1200px 以下で SP サイドバー表示 */
@media (max-width: 1200px) {

	/* SP時：wp-block-groupの幅とマージン調整 */
	.wp-block-group.alignwide.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained.mx-auto {
		width: 100%;
		margin: 0 auto;
		padding-inline: 1rem;
		max-width: 95%;

	}

	.business-sidebar-footer {
		display: block;
		width: 100%;
		max-width: 100%;
		margin: 2rem auto 0;
		padding: 0;
	}

	/* 親ページではフッターサイドバー枠の margin を 0 に */
	body.ttfc-parent-page .business-sidebar-footer {
		margin: 0;
	}

	.business-sidebar-footer .business-detail-sidebar {
		position: relative;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0;
	}

	.business-sidebar-footer .business-detail-sidebar h3 {
		font-size: 1.25rem;
	}

	/* SP用サイドバーのカード内のリンクタイトル */
	.business-sidebar-footer .business-detail-sidebar a h3 {
		font-size: 15px;
	}

	/* SP用フッターサイドバーのすべての矢印ボタンを小さく */
	.business-sidebar-footer .business-detail-sidebar .w-btn-arrow-sm,
	.business-sidebar-footer .business-detail-sidebar .h-btn-arrow-sm {
		width: 1.25rem !important;
		/* 20px（元の1.5remより小さく） */
		height: 1.25rem !important;
		/* 20px（元の1.5remより小さく） */
	}

	/* PCサイドバーは非表示（SPサイドバーに切り替え） */
	.business-header-content .business-detail-sidebar {
		display: none !important;
	}

	/* コンテンツエリアを1カラムに（サイドバーはフッター前のSP用に表示） */
	.business-header-content .grid.grid-cols-1 {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 1201px) {
	.business-sidebar-footer {
		display: none;
	}

	/* PC用サイドバー表示 */
	.business-header-content .business-detail-sidebar.hidden.lg\:block {
		display: block !important;
	}
}

@media (min-width: 1025px) {

	/* --- vaccine 固有 --- */
	/* SP時はflex-col、PC時はgrid-cols-2（HTMLで指定） */
}

/* ==========================================================================
   <br>の表示制御ユーティリティクラス
   ========================================================================== */

/* <br>の表示制御（SP/PC） */
.hide-br-sp br {
	display: none;
}

.br-sp {
	display: inline;
}

/* PC＝デフォルト */
.hide-br-sp br {
	display: block;
}

.br-sp {
	display: none !important;
}

.br-pc {
	display: inline !important;
}

@media (max-width: 768px) {
	.hide-br-sp br {
		display: none;
	}

	.br-sp {
		display: inline !important;
	}

	.br-pc {
		display: none !important;
	}
}

/* SPでline-height: normal */
@media (max-width: 768px) {
	.leading-normal-sp {
		line-height: normal;
	}
}

/* ==========================================================================
   フロントページ レスポンシブ対応
   ========================================================================== */

/* 768px以下：セクションコンテナ共通（幅・パディング） */
@media (max-width: 768px) {

	.news-section-container,
	.business-section-container,
	.our-strengths-section,
	.solution-section-container,
	.recruit-section-container,
	.sustainability-about-section-container {
		max-width: 95%;
		padding-inline: 1rem;
	}
}

/* ヒーローエリア・ヒーロースライダー レスポンシブ */
@media (max-width: 768px) {

	.hero-slider {
		height: 400px !important;
	}

	.hero-content {
		top: 5%;
		left: 10%;
		max-width: 90%;
	}


	.hero-content p.text-5xl {
		font-size: 1.25rem;
		line-height: 1.5;
		padding-bottom: 1rem;
	}

	.hero-slide-next-btn {
		width: 50px !important;
		height: 50px !important;
		right: 1rem !important;
	}

	.hero-slide-next-btn .arrow-text {
		font-size: 1.125rem;
	}

	.hero-pagination {
		bottom: 1rem !important;
	}
}

.news-filter-buttons {
	grid-auto-flow: column;
	grid-template-columns: repeat(6, 1fr);
}

/* 最新情報：非活性時は全ボタン同じホバー（緑文字）、活性時は赤背景・白文字のまま */
.news-filter-btn.news-filter-active:hover {
	background-color: var(--wp--preset--color--primary-red, #E94D40);
	color: #fff;
}

/* 最新情報：選択された際に疑似要素（下三角）を表示 */
.news-filter-btn::after {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.news-filter-btn.news-filter-active::after {
	opacity: 1;
	visibility: visible;
}

/* .news-filter-buttons SPレスポンシブ */
@media (max-width: 768px) {
	.news-filter-buttons {
		grid-auto-flow: row;
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
		width: 100%;
	}

	.news-filter-buttons .news-filter-btn {
		min-height: 44px;
		padding: 0.5rem 0.75rem;
		font-size: 1.125rem;
		line-height: 1.25;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

@media (max-width: 375px) {
	.news-filter-buttons {
		gap: 0.375rem;
	}

	.news-filter-buttons .news-filter-btn {
		padding: 0.5rem 0.5rem;
		font-size: 1.125rem;
	}
}

.news-item-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.news-item-link-block {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.news-item-date-category-grid {
	display: flex;
	align-items: center;
}

.news-item-title-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

@media (max-width: 768px) {
	.news-item-flex {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.news-item-link-block {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.news-item-date-category-grid {
		width: fit-content;
		gap: 0.75rem;
	}

	.news-item-title-flex {
		width: 100%;
	}
}

.news-item-category {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 6.875rem;
	min-width: 6.875rem;
	word-break: keep-all;
	padding: .5rem 1rem;
	background-color: #F8F8F8;
}

.news-item-title {
	width: fit-content;
	display: flex;
}

/* ニュース矢印：ホバー時に中央から収縮 */
.news-item-link-block .news-item-link {
	transform-origin: center;
	transition: transform 0.3s ease-out;
}

.news-item-link-block:hover .news-item-link {
	transform: scale(0.9);
}

/* 最新情報セクション レスポンシブ */
@media (max-width: 768px) {

	.news-item-title-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}

	.news-item-title-grid .news-item-title {
		grid-area: 1 / 1 / 2 / 2;
	}

	.news-item-title-grid .news-item-link {
		grid-area: 1 / 2 / 2 / 3;
	}

	.max-w-6xl.mx-auto.gap-16 {
		gap: 2rem !important;
	}

	.grid.grid-cols-4 {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.5rem !important;
	}

	.news-item-title {
		width: fit-content;
	}

	.news-item-title-grid {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

}

.brand-story-panel {
	padding-top: 3.75rem;
	padding-bottom: 3.75rem;
}

.brand-story-section {
	width: 100%;
}

/* ブランドストーリー：右側の縦向きラベル（PC＝デフォルト・メディアクエリより前に定義しSPで上書きされるようにする） */
.brand-story-vertical-label {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	font-family: 'Manrope';
	justify-content: flex-start;
	font-weight: 400;
	font-size: 5rem;
	overflow: hidden;
	padding-inline: 5rem;
}

/* ブランドストーリーセクション レスポンシブ */
@media (max-width: 1024px) {
	.brand-story-section {
		flex-direction: column;
	}

	.brand-story-vertical-label {
		display: none !important;
	}

	.brand-story-panel {
		max-width: 100%;
		padding-top: 0;
		padding-bottom: 0;
	}
}

@media (max-width: 768px) {

	/* ブランドストーリーセクション SP時のフォントサイズ調整 */
	.brand-story-content {
		gap: 1.5rem !important;

	}

	.brand-story-content p.text-5xl {
		font-size: 5.6rem;
		line-height: 1.6;
	}

	.brand-story-content p.text-base {
		font-size: 1rem;
		line-height: 1.6;
	}
}

.news-section-container {
	margin: 0 auto;
	padding-inline: 1rem;
}

/* 最新情報リスト：5件以上の場合のみy軸スクロール */
#front-news-list.front-news-list--scrollable {
	max-height: 320px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* 事業案内セクション レスポンシブ（front-page用） */
.business-section-container {
	max-width: 90%;
	margin: 0 auto;
	padding-inline: 1rem;
}

@media (max-width: 1024px) {
	.business-section-layout {
		/* flex-direction: column !important; */
		gap: 2rem !important;
	}

	.business-section-layout .order-2[class*="md:order-2"] {
		order: 1 !important;
	}
}

@media (max-width: 768px) {
	.business-item-inner {
		padding: 1rem !important;
	}

	.business-button {
		width: 24px;
		height: 24px;
		font-size: 0.75rem;
	}
}

/* 私たちの強みセクション レスポンシブ（section-bg-our-strengths でセクションを特定） */
@media (min-width: 1025px) {
	.section-bg-our-strengths {
		background-size: 100%;
		background-position: right;
		background-repeat: no-repeat;
	}
}

.our-strengths-section {
	padding-inline: 1.25rem;
	max-width: 90%;
	margin: 0 auto;
}

@media (max-width: 1024px) {
	.our-strengths-section {
		gap: 2rem !important;
	}
}

@media (max-width: 768px) {
	.our-strengths-content {
		gap: 1.5rem !important;
	}

	.our-strengths-content p.text-5xl {
		font-size: 2.45rem;
		line-height: 1.6;
	}

	.our-strengths-section .flex.flex-col.gap-5>div {
		padding: 1rem !important;
	}

	.our-strengths-section [class*="w-[200px]"][class*="h-[160px]"] {
		width: 120px !important;
		height: 96px !important;
	}

	.our-strengths-section [class*="text-[22px]"] {
		font-size: 1.125rem;
	}
}

/* 私たちの強みセクション：カード内画像ラップ（PC＝デフォルト） */
.our-strengths-card-img-wrap {
	width: 12.5rem;
	max-width: 20rem;
	min-width: 0;
	flex-shrink: 0;
	border-radius: 1rem;
	overflow: hidden;
	aspect-ratio: 5 / 4;
}

@media (max-width: 768px) {
	.our-strengths-card-img-wrap {
		width: 7.5rem;
		max-width: 20rem;
	}
}

/* ソリューションセクション：md の padding（PC＝デフォルト） */
.section-parts-py {
	padding-top: 7.5rem;
	padding-bottom: 7.5rem;
}

@media (max-width: 768px) {
	.section-parts-py {
		padding-top: 3.75rem;
		padding-bottom: 3.75rem;
	}
}

/* ソリューションセクションのみ padding-bottom を 3.75rem に（front-page の class 指定を nth-child で上書き） */
.site-main>section:nth-child(7) {
	padding-bottom: 3.75rem;
}

.site-main>section:nth-child(8) {
	padding-top: 3.75rem;
	padding-bottom: 3.75rem;
}

.site-main>section:nth-child(9) {
	padding-top: 3.75rem;
}

/* ソリューションセクション レスポンシブ（front-page用） */
.solution-section-container {
	max-width: 90%;
	margin: 0 auto;
	padding-inline: 0;
}

@media (max-width: 1024px) {
	.solution-cards-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.solution-cards-grid {
		grid-template-columns: 1fr !important;
	}

	.solution-card {
		height: auto;
		padding: 1.5rem;
	}

	.solution-card [class*="text-[26px]"] {
		font-size: 1.25rem;
	}

	.solution-card [class*="w-[70px]"][class*="h-[70px]"] {
		width: 50px;
		height: 50px;
	}

	.solution-card .w-8.h-8 img {
		width: 20px;
		height: 20px;
	}
}

/* サステナビリティ・企業情報セクション レスポンシブ */
@media (max-width: 768px) {
	.site-main [class*="h-72"] {
		height: 200px !important;
	}


}

/* 人事採用セクション */
/* 人事採用セクション（front-page用）：PC pt-[60px] pb-[120px]、SP pt-0 pb-[40px] */
@media (max-width: 768px) {
	.recruit-section-padding {
		padding-block: 0 2.5rem;
	}
}

.recruit-section-container {
	max-width: 90%;
	margin: 0 auto;
	padding-inline: 1.25rem;
}


/* サステナビリティ・企業情報セクション */
.sustainability-about-section-container {
	max-width: 90%;
	margin: 0 auto;
	padding-inline: 1.25rem;
}

/* 人事採用セクション・ブランドストーリー レスポンシブ */
@media (max-width: 1024px) {
	.site-main .grid[class*="grid-cols-1"][class*="md:grid-cols-2"][class*="lg:grid-cols-3"] {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.brand-story-section-padding {
		padding-inline: 1rem;
		padding-block: 1.25rem;
	}

	.site-main .grid[class*="grid-cols-1"][class*="md:grid-cols-2"][class*="lg:grid-cols-3"] {
		grid-template-columns: 1fr !important;
	}
}

/* ブランドストーリー・私たちの強みセクション背景（768px以下でオーバーレイ共通） */
@media (max-width: 1024px) {
	.section-bg-our-strengths {
		background-size: cover;
		background-position: center;
	}
}

@media (max-width: 768px) {
	.section-bg-brand-story {
		background-size: contain;
		background-position: bottom;
		position: relative;
		padding-bottom: 15rem;
	}

	.section-bg-our-strengths {
		background-size: cover;
		padding-inline: 0;
		margin-inline: 0;
		position: relative;
	}

	/* SP時：背景画像を約0.6の透明度に（オーバーレイ共通） */
	.section-bg-brand-story::before,
	.section-bg-our-strengths::before {
		content: "";
		position: absolute;
		inset: 0;
		background: rgba(255, 255, 255, 0.4);
		z-index: 0;
		pointer-events: none;
	}

	.section-bg-brand-story>*,
	.section-bg-our-strengths>* {
		position: relative;
		z-index: 1;
	}
}

/* 無限ループスライド（Our Strengths） */
.infinite-slide-container {
	width: 100%;
	overflow: hidden;
}

.infinite-slide-wrapper {
	display: flex;
	animation: infinite-slide 15s linear infinite;
}

.infinite-slide-text {
	font-size: 100px;
	color: #EDF2F3;
	font-weight: normal;
	line-height: normal;
	padding-right: 2rem;
	flex-shrink: 0;
}

@keyframes infinite-slide {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-33.333%);
	}
}

/* SP対応 */
@media (max-width: 768px) {
	.infinite-slide-text {
		font-size: 60px;
		padding-right: 1rem;
	}
}

/* ========== テンプレート直書きスタイルの移行 ========== */
/* パンくずリストのホバー効果 */
.breadcrumb a:hover {
	text-decoration: underline;
}

/* 事業タイトルの下線（グラデーション） */
.business-title {
	position: relative;
}

.business-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(to right, #DDDDDD 0%, #DDDDDD 90%, #227820 90%, #227820 100%);
}

/* ボイスカード：文字 | hr（横線・1fr） | ボタン（Tailwind: grid grid-cols-[auto_1fr_auto]） */
.voice-title {
	color: #000;
	font-weight: normal;
}

.voice-title__text {
	min-width: 0;
}

.voice-title__hr {
	width: auto;
	border: 0;
	border-bottom: 1px solid currentColor;
	opacity: 0.4;
}

@media (max-width: 768px) {
	.page-header-title {
		font-size: 2.25rem;
	}
}

/* ページヘッダー・親ページアルファベット：先頭1文字のみ大文字 */
.page-header-subtitle::first-letter,
.initial-uppercase::first-letter {
	text-transform: uppercase;
}

/* 事業案内ページ（子テーマ page-business.php） */
.business-page-main {
	margin-top: 0;
}

.business-page-container {
	width: 100%;
}

.business-page-container .wp-block-columns.alignwide {
	margin-top: 40px;
}

.business-page-container .wp-block-columns.alignwide:first-of-type {
	margin-top: 0;
}

.business-page-container .wp-block-image.size-full img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
}

@media (max-width: 1024px) {
	.business-page-container .wp-block-columns.is-layout-flex {
		flex-direction: column;
	}
}

/* 和文フォント用ユーティリティ（インライン style 置き換え） */
.font-noto-sans-jp {
	font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

.strength-detail-header-title {
	margin-top: 2rem !important;
}

.iryo-instrument-products-heading {
	margin-bottom: -11px;
	margin-left: 1rem;
}


/* h3-card SP：後方に配置して優先度を確保 */
@media (max-width: 769px) {
	.h3-card>div:first-of-type {
		height: 10rem;
		min-height: 10rem;
		width: auto;
	}
}

/* h3-card iPad・タブレット：幅に収めてオーバーフロー防止 */
@media (min-width: 770px) and (max-width: 1024px) {
	.h3-card>div:first-of-type {
		width: 100%;
		max-width: 100%;
		height: 11.25rem;
		min-height: 11.25rem;
	}
}

.text-body-specialist {
	font-size: 1.75rem;
	/* 28px */
}

@media (max-width: 768px) {
	.text-body-specialist {
		font-size: 1.3rem;
	}
}

/* スラッグが en の場合：page-header-eyecatch（アイキャッチ画像） */
@media (min-width: 768px) {
	.page-header-eyecatch {
		margin-bottom: -10rem !important;
		padding-bottom: 4rem;
	}
}