/* ============================================================
   POPGATE テーマ共通CSS
   役割：デザイン一式の <helmet> 共通style ＋ style-hover/style-focus の
   クラス化 ＋ レスポンシブ表示切替（ブレークポイント1080px）のみ。
   見た目の本体は各テンプレートのインラインstyle（デザイン忠実再現）。
   ============================================================ */

/* --- デザイン一式の共通ベース（全ページ同一） --- */
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: #F8FAFC;
	font-family: 'Noto Sans JP', system-ui, sans-serif;
	color: #333333;
	-webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation: none !important; transition: none !important; }
}

/* --- ヘッダーのレスポンシブ切替（元：sc-if isDesktop / isMobile） --- */
.pg-nav-desktop { display: flex; align-items: center; gap: 30px; }
.pg-header-ctas { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pg-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 44px;
	height: 44px;
	padding: 0 10px;
	margin-left: auto;
	border: none;
	background: none;
	cursor: pointer;
}
.pg-mobile-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #F8FAFC;
	border-bottom: 1px solid rgba(27, 30, 34, .12);
	padding: 12px 20px 24px;
}
@media (max-width: 1080px) {
	.pg-nav-desktop, .pg-header-ctas { display: none; }
	.pg-hamburger { display: flex; }
	.pg-mobile-menu.open { display: block; }
}

/* --- サービスドロップダウン（元：sc-if svcOpen） --- */
.pg-dd {
	display: none;
	position: absolute;
	top: 100%;
	left: -20px;
	min-width: 240px;
	padding: 10px;
	background: #FFFFFF;
	border: 1px solid rgba(27, 30, 34, .5);
	border-radius: 20px 20px 20px 8px;
	box-shadow: 0 10px 30px rgba(27, 30, 34, .08);
}
.pg-dd.open { display: block; }

/* --- style-hover のクラス化（インラインstyleに勝つため !important） --- */
.hov-red:hover { color: #A81729 !important; }
.hov-dd-item:hover { background: #F5F6F7 !important; color: #A81729 !important; }
.hov-bg-gray:hover { background: #D9DEE3 !important; }
.hov-bg-red:hover { background: #8E1322 !important; }
.hov-row:hover { background: rgba(255, 255, 255, .6) !important; }
.hov-card-dl:hover {
	background: #F5F6F7 !important;
	transform: translateY(-4px);
}
.hov-card-ct:hover {
	background: #FDF6F7 !important;
	transform: translateY(-4px);
	box-shadow: 0 20px 44px rgba(168, 23, 41, .2) !important;
}
.hov-outline-red:hover { border-color: #A81729 !important; color: #A81729 !important; }
.hov-border-red:hover { border-color: #A81729 !important; }
.hov-fade:hover { opacity: .85; }
.hov-fade72:hover { opacity: .72; }
.foc-red:focus { border-color: #A81729 !important; }
.hov-bg-pink:hover { background: #FDF6F7 !important; }
.hov-bb-red:hover { border-bottom-color: #A81729 !important; }

/* --- 記事目次の表示切替（元：sc-if sideTocVisible / boxTocVisible） ---
   PC＝右レール追従目次／モバイル＝本文冒頭のボックス目次 */
@media (max-width: 1080px) {
	.pg-toc-side { display: none; }
}
.pg-toc-box { display: none; }
@media (max-width: 1080px) {
	.pg-toc-box { display: block; }
}

/* --- 番号付きセクション見出しの赤バー（元：style-before） --- */
.pg-sec-head::before {
	content: '';
	position: absolute;
	top: -2px;
	left: 0;
	width: 56px;
	height: 3px;
	background: #A81729;
}

/* --- 右レールのセクションナビ（元：sc-if isDesktop。モバイルは非表示） --- */
@media (max-width: 1080px) {
	.pg-side-nav { display: none; }
}

/* --- フォームページ専用の基礎スタイル（元：フォーム系5ページの<helmet>共通style） --- */
.pg-form-page a { color: #A81729; text-decoration: none; }
.pg-form-page a:hover { color: #8E1322; }
.pg-form-page input::placeholder,
.pg-form-page textarea::placeholder { color: rgba(27, 30, 34, .38); }
.pg-form-page input:focus,
.pg-form-page textarea:focus { outline: none; border-color: #A81729 !important; background: #FFFFFF !important; }

/* --- CF7フォーム（フェーズE）：デザインの入力欄・チップ・同意欄をCF7出力に再現 --- */
/* CF7の外側ラッパーが余白を足さないように0固定 */
.pg-form-page .wpcf7 { margin: 0; }
.pg-form-page form.wpcf7-form { margin: 0; }
/* 各入力欄のラッパー（エラー文言がこの中に入るためブロック表示に） */
.pg-form-page .wpcf7-form-control-wrap { display: block; }

/* テキスト系入力欄（元：contact.php の <input>/<textarea> インラインstyleを移設） */
.pg-cf7-input,
.pg-cf7-textarea {
	box-sizing: border-box;
	width: 100%;
	margin: 12px 0 0;
	background: #F5F6F7;
	border: 1px solid rgba(27, 30, 34, .2);
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
	color: #333333;
	transition: border-color .15s ease;
}
.pg-cf7-input { height: 52px; padding: 0 16px; }
.pg-cf7-textarea { padding: 14px 16px; line-height: 2; resize: vertical; }

/* 種別チップ（元：.pg-type-chip ボタン。CF7ラジオを同じ見た目に。選択状態は :checked で切替） */
.pg-cf7-type .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-cf7-type .wpcf7-list-item { margin: 0; }
.pg-cf7-type .wpcf7-list-item label { display: block; cursor: pointer; }
.pg-cf7-type .wpcf7-list-item input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.pg-cf7-type .wpcf7-list-item-label {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	height: 44px;
	padding: 0 20px;
	background: #FFFFFF;
	border: 1px solid rgba(27, 30, 34, .3);
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .03em;
	color: #333333;
	transition: all .15s ease;
}
.pg-cf7-type input:checked + .wpcf7-list-item-label {
	background: #A81729;
	border-color: #A81729;
	color: #FFFFFF;
}
.pg-cf7-type input:focus-visible + .wpcf7-list-item-label {
	outline: 2px solid #A81729;
	outline-offset: 2px;
}

/* プラポリ同意（元：checkbox＋テキストのflexラベル） */
.pg-cf7-accept .wpcf7-list-item { margin: 0; display: block; }
.pg-cf7-accept .wpcf7-list-item label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.pg-cf7-accept input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: #A81729;
	cursor: pointer;
}
.pg-cf7-accept input[type="checkbox"]:focus-visible { outline: 2px solid #A81729; outline-offset: 2px; }
.pg-cf7-accept .wpcf7-list-item-label {
	font-size: 13.5px;
	line-height: 1.9;
	letter-spacing: .02em;
	color: rgba(27, 30, 34, .82);
}

/* エラー表示（CF7標準の文言をブランド色で。デザインには存在しない追加要素） */
.pg-form-page .wpcf7-not-valid-tip {
	display: block;
	margin: 8px 0 0;
	font-size: 12px;
	letter-spacing: .03em;
	color: #A81729;
}
.pg-form-page form.wpcf7-form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border: 1px solid rgba(168, 23, 41, .5);
	border-radius: 10px;
	background: rgba(168, 23, 41, .05);
	font-size: 13.5px;
	line-height: 1.9;
	letter-spacing: .02em;
	color: #A81729;
}
/* 送信成功（資料DLのインライン完了表示）はエラーの赤と区別して落ち着いた色に */
.pg-form-page form.wpcf7-form.sent .wpcf7-response-output {
	border-color: rgba(27, 30, 34, .25);
	background: #F5F6F7;
	color: #333333;
}

/* --- サービスページ埋め込みの無料相談フォーム（フェーズF 2026-07-15・静的フォームをCF7化） --- */
.pg-cf7-embed .wpcf7-form-control-wrap { display: block; }
/* ブラウザ標準の下線を消す（.pg-form-page a と同じ扱い。消さないと同意文のリンクが
   標準下線＋装飾のborder-bottomで二重下線になる・2026-07-15修正） */
.pg-cf7-embed a { text-decoration: none; }

/* 入力欄（元：service-llmo.php / service-pr.php の静的 <input>/<textarea> のインラインstyleを移設） */
.pg-cf7-input-s,
.pg-cf7-textarea-s {
	box-sizing: border-box;
	width: 100%;
	margin: 8px 0 0;
	background: #F5F6F7;
	border: 1px solid rgba(27, 30, 34, .2);
	border-radius: 8px;
	font-family: inherit;
	font-size: 13.5px;
	color: #333333;
	transition: border-color .15s ease;
}
.pg-cf7-input-s { height: 44px; padding: 0 14px; }
.pg-cf7-textarea-s { padding: 12px 14px; line-height: 1.9; resize: vertical; }

/* エラー文言・送信結果表示（.pg-form-page と同じ見た目をこのスコープにも適用） */
.pg-cf7-embed .wpcf7-not-valid-tip {
	display: block;
	margin: 8px 0 0;
	font-size: 12px;
	letter-spacing: .03em;
	color: #A81729;
}
.pg-cf7-embed form.wpcf7-form .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 16px;
	border: 1px solid rgba(168, 23, 41, .5);
	border-radius: 10px;
	background: rgba(168, 23, 41, .05);
	font-size: 13px;
	line-height: 1.9;
	letter-spacing: .02em;
	color: #A81729;
}

/* --- 汎用のPC/モバイル出し分け（元：sc-if isDesktop / isMobile） --- */
@media (max-width: 1080px) {
	.pg-desktop-only { display: none !important; }
}
@media (min-width: 1081px) {
	.pg-mobile-only { display: none !important; }
}

/* --- FAQアコーディオン（元：sc-if f.open ＋ mark色の切替） --- */
.pg-faq-a { display: none; }
.pg-faq-item.open .pg-faq-a { display: block; }
.pg-faq-mark { background: #FFFFFF; color: #333333; }
.pg-faq-item.open .pg-faq-mark { background: #A81729; color: #FFFFFF; }

/* --- 記事本文（the_content の出力に元デザインの本文スタイルを当てる） ---
   お知らせ個別（.pg-article-body）：【確定】お知らせ個別ページ.dc.html の本文部の移植。
   管理画面のエディタで書いた p / h2 / ul / a が元デザインと同じ見た目になる。 */
.pg-article-body > *:first-child { margin-top: 0; }
.pg-article-body p {
	margin: 1.4em 0 0;
	font-size: 16px;
	line-height: 2.2;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
	text-wrap: pretty;
}
.pg-article-body h2 {
	margin: clamp(40px, 5.5vw, 60px) 0 0;
	padding: clamp(24px, 3.2vw, 32px) 0 0;
	border-top: 1px solid rgba(27, 30, 34, .12);
	font-size: clamp(19px, 2.4vw, 23px);
	font-weight: 800;
	line-height: 1.8;
	letter-spacing: .04em;
	color: #333333;
	text-wrap: pretty;
}
.pg-article-body h2 + p { margin-top: clamp(18px, 2.2vw, 24px); }
.pg-article-body ul {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: clamp(20px, 2.6vw, 28px) 0 0;
	padding: 0;
	list-style: none;
}
.pg-article-body ul li {
	position: relative;
	padding-left: 21px;
	font-size: 15.5px;
	line-height: 2.1;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
}
.pg-article-body ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 13px;
	width: 7px;
	height: 7px;
	background: #A81729;
	border-radius: 999px;
}
.pg-article-body a {
	color: #A81729;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(168, 23, 41, .4);
	padding-bottom: 2px;
}
.pg-article-body a:hover { border-bottom-color: #A81729; }
.pg-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}
.pg-article-body figure { margin: clamp(20px, 2.6vw, 28px) 0 0; }

/* --- ブログ記事本文（.pg-body-blog） ---
   【確定】ブログ記事ページ.dc.html の本文部の移植。エディタの書き方ルール：
   h2＝章見出し（赤mono番号は自動採番・目次に自動掲載）／h3＝小見出し／
   ul＝赤ドット箇条書き／ol＝赤mono番号リスト／blockquote＝引用パネル／figure＝図版 */
.pg-body-blog { counter-reset: pgsec; }
/* 先頭の段落のみ密着（リード扱い）。先頭が h2 の場合は、上のリード文・
   「この記事でわかること」枠との間隔（clamp余白）をデザインどおり残す */
.pg-body-blog > p:first-child { margin-top: 0; }
.pg-body-blog p {
	margin: 1.4em 0 0;
	font-size: 16px;
	line-height: 2.2;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
	text-wrap: pretty;
}
.pg-body-blog h2 {
	counter-increment: pgsec;
	margin: clamp(48px, 6.5vw, 72px) 0 0;
	padding: clamp(28px, 3.6vw, 40px) 0 0;
	border-top: 1px solid rgba(27, 30, 34, .12);
	font-size: clamp(20px, 2.6vw, 25px);
	font-weight: 800;
	line-height: 1.8;
	letter-spacing: .04em;
	color: #333333;
	text-wrap: pretty;
}
.pg-body-blog h2::before {
	content: counter(pgsec, decimal-leading-zero);
	display: block;
	margin: 0 0 10px;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	font-weight: 400;
	letter-spacing: .08em;
	line-height: normal;
	color: #A81729;
}
.pg-body-blog h2 + p { margin-top: clamp(20px, 2.6vw, 28px); }
.pg-body-blog h3 {
	margin: clamp(32px, 4.4vw, 44px) 0 0;
	font-size: 17.5px;
	font-weight: 700;
	line-height: 1.9;
	letter-spacing: .04em;
	color: #333333;
	text-wrap: pretty;
}
.pg-body-blog h3 + p { margin-top: 14px; }
.pg-body-blog ul,
.pg-body-blog ol {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: clamp(20px, 2.6vw, 28px) 0 0;
	padding: 0;
	list-style: none;
}
.pg-body-blog ul li,
.pg-body-blog ol li {
	position: relative;
	font-size: 15.5px;
	line-height: 2.1;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
}
.pg-body-blog ul li { padding-left: 21px; }
.pg-body-blog ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 13px;
	width: 7px;
	height: 7px;
	background: #A81729;
	border-radius: 999px;
}
.pg-body-blog ol { counter-reset: pgol; }
.pg-body-blog ol li { padding-left: 30px; }
.pg-body-blog ol li::before {
	counter-increment: pgol;
	content: counter(pgol, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	line-height: 2.8;
	color: #A81729;
}
.pg-body-blog blockquote {
	margin: clamp(36px, 5vw, 52px) 0 0;
	background: #E6E9EC;
	border-radius: 24px 24px 24px 10px;
	padding: clamp(24px, 3.2vw, 36px) clamp(22px, 3vw, 36px);
}
.pg-body-blog blockquote::before {
	content: '引用';
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .2em;
	color: #A81729;
}
.pg-body-blog blockquote p {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 2.15;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
}
.pg-body-blog blockquote cite {
	display: block;
	margin: 14px 0 0;
	font-size: 12px;
	font-style: normal;
	letter-spacing: .05em;
	color: rgba(27, 30, 34, .55);
	text-align: right;
}
.pg-body-blog a {
	color: #A81729;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(168, 23, 41, .4);
	padding-bottom: 2px;
}
.pg-body-blog a:hover { border-bottom-color: #A81729; }
.pg-body-blog figure { margin: clamp(36px, 5vw, 52px) 0 0; }
.pg-body-blog figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	border: 1px solid rgba(27, 30, 34, .15);
	box-sizing: border-box;
}
.pg-body-blog figcaption {
	margin: 12px 0 0;
	font-size: 12px;
	letter-spacing: .04em;
	color: rgba(27, 30, 34, .55);
	text-align: center;
}

/* --- 事例インタビュー本文（.pg-body-works） ---
   【確定】個別事例ページ.dc.html の本文部の移植。エディタの書き方ルール：
   h2＝章見出し（赤mono番号は自動採番）／h3＝質問（Q.自動付与）／
   h4＝回答者名（赤バー付きチップ）／p＝本文／figure＝図版。
   ※本文の段落間隔は一律1.2em（元デザインは導入部のみ1.4em。
     エディタ由来の本文では区別できないため、回答部の1.2emに統一） */
.pg-body-works { counter-reset: pgsec; }
.pg-body-works > *:first-child { margin-top: 0; }
.pg-body-works p {
	margin: 1.2em 0 0;
	font-size: 16px;
	line-height: 2.2;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
	text-wrap: pretty;
}
.pg-body-works h2 {
	counter-increment: pgsec;
	margin: clamp(48px, 6.5vw, 72px) 0 0;
	padding: clamp(28px, 3.6vw, 40px) 0 0;
	border-top: 1px solid rgba(27, 30, 34, .12);
	font-size: clamp(20px, 2.6vw, 25px);
	font-weight: 800;
	line-height: 1.8;
	letter-spacing: .04em;
	color: #5C6B78;
	text-wrap: pretty;
}
.pg-body-works h2::before {
	content: counter(pgsec, decimal-leading-zero);
	display: block;
	margin: 0 0 10px;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	font-weight: 400;
	letter-spacing: .08em;
	line-height: normal; /* 元デザインの番号divは行高未指定（monoの標準行高）。1.5等にすると章見出しが4.3px高くなる */
	color: #A81729;
}
.pg-body-works h3 {
	display: flex;
	gap: 14px;
	margin: clamp(28px, 3.6vw, 40px) 0 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 2.1;
	letter-spacing: .03em;
	color: #333333;
	text-wrap: pretty;
}
.pg-body-works h2 + h3 { margin-top: clamp(24px, 3.2vw, 32px); }
.pg-body-works h3::before {
	content: 'Q.';
	flex: none;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 14px;
	font-weight: 600;
	color: #A81729;
	line-height: 2.1;
}
.pg-body-works h4 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 18px 0 0;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	color: #333333;
}
.pg-body-works h4::before {
	content: '';
	display: block;
	width: 14px;
	height: 2px;
	background: rgba(168, 23, 41, .55);
}
.pg-body-works h4 + p { margin-top: 8px; }
.pg-body-works ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: clamp(20px, 2.6vw, 28px) 0 0;
	padding: 0;
	list-style: none;
}
.pg-body-works ul li {
	position: relative;
	padding-left: 18px;
	font-size: 15px;
	line-height: 2.1;
	letter-spacing: .03em;
	color: rgba(27, 30, 34, .82);
}
.pg-body-works ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 13px;
	width: 6px;
	height: 6px;
	background: #A81729;
	border-radius: 999px;
}
.pg-body-works a {
	color: #A81729;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(168, 23, 41, .4);
	padding-bottom: 2px;
}
.pg-body-works a:hover { border-bottom-color: #A81729; }
.pg-body-works figure { margin: clamp(36px, 5vw, 52px) 0 0; }
.pg-body-works figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	border: 1px solid rgba(27, 30, 34, .15);
	box-sizing: border-box;
}
.pg-body-works figcaption {
	margin: 12px 0 0;
	font-size: 12px;
	letter-spacing: .04em;
	color: rgba(27, 30, 34, .55);
	text-align: center;
}

/* --- 画像スロット（元：image-slot.js の見た目の忠実再現） --- */
.pg-slot {
	position: relative;
	overflow: hidden;
	background: rgba(0, 0, 0, .04);
	font: 13px/1.3 system-ui, -apple-system, sans-serif;
	color: rgba(0, 0, 0, .55);
}
/* 画像は枠(.pg-slot)に対して絶対配置で浮かせる＝画像の縦横比が枠の高さに影響しない
   （image-slot.js の .frame img と同じ構造。枠の寸法は .pg-slot 側のインラインstyleが持つ） */
.pg-slot > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pg-slot .pg-slot-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	padding: 12px;
	box-sizing: border-box;
}
.pg-slot .pg-slot-empty svg { opacity: .45; }
.pg-slot .pg-slot-cap { max-width: 90%; font-weight: 500; letter-spacing: .01em; }
.pg-slot .pg-slot-ring {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border: 1.5px dashed rgba(0, 0, 0, .25);
}
.pg-slot .pg-slot-credit {
	position: absolute;
	left: 6px;
	bottom: 6px;
	max-width: calc(100% - 12px);
	padding: 3px 7px;
	border-radius: 5px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font: 10px/1.2 system-ui, -apple-system, sans-serif;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
a.pg-slot-credit:hover { background: rgba(0, 0, 0, .8); text-decoration: underline; }
