/* =========================================================================
   LP Factory - フロント CSS
   構造: html > body > .lp-wrapper > (.lp-header / .lp-main > .lp-content /
         .lp-footer) + .lp-cta--sticky
   方針: スマホファースト / 画像は隙間なく連続 / 依存最小
   ========================================================================= */

:root {
	--lp-max-width: 750px;
	--lp-sticky-height: 64px;
	--lp-header-height: 52px;
	--lp-cta-bg: #f39800;
	--lp-cta-fg: #ffffff;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	background: #efefef;
	color: #222;
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
		"Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	/* clip は overflow:hidden と違い position: sticky を壊さずに横はみ出しを止める。
	   未対応の旧ブラウザでは無視されるが、画像は width:100% のため実害なし。 */
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

/* ---- LP 全体ラッパー ------------------------------------------------------ */
.lp-wrapper {
	width: 100%;
	max-width: var(--lp-max-width);
	margin: 0 auto;
	background: #fff;
	/* overflow-x: clip は position: sticky を壊さずに横はみ出しを抑える */
	overflow-x: clip;
}

/* ---- ヘッダー（ロゴのみ・高さ最小・スクロール追従） -------------------- */
.lp-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	padding: 6px 12px;
	padding-top: calc(6px + env(safe-area-inset-top, 0px));
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.lp-header__inner {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 36px;
}

.lp-header__logo,
.lp-header .custom-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.lp-header__logo-img,
.lp-header .custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 36px;
	margin: 0;
}

.lp-header__site-name {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* ---- LP 本文（画像を隙間なく連続表示） --------------------------------- */
.lp-main {
	display: block;
}

.lp-content {
	margin: 0;
	padding: 0;
}

/* 画像ブロック: figure の余白・キャプションを完全に除去 */
.lp-content figure,
.lp-content .wp-block-image {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0;
}

.lp-content .wp-block-image figcaption,
.lp-content figure figcaption {
	display: none !important;
}

.lp-content img,
.lp-content figure img,
.lp-content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: bottom;
}

.lp-content p {
	margin: 0;
}

/* ---- CTA（本文 / 共通） ------------------------------------------------- */
.lp-cta {
	box-sizing: border-box;
}

.lp-cta--content {
	background: #fff;
	/* 上下15px: 先頭パーツの上・末尾パーツの下も15px空ける */
	padding: 15px 16px;
}

.lp-cta__inner {
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
	/* 各パーツ（期限バンド / バナー / 補足文 / ボタン）の間を均等に15px */
	display: flex;
	flex-direction: column;
	gap: 15px;
}

/* ---- キャンペーン期限（横幅いっぱい・ド派手） ---- */
.lp-cta__deadline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 13px 16px;
	border-radius: 12px;
	background: linear-gradient(135deg, #ff2d55 0%, #ff3b30 55%, #ff6b00 100%);
	color: #fff;
	font-size: clamp(17px, 5.6vw, 23px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.04em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	box-shadow: 0 6px 18px rgba(255, 45, 85, 0.42), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
	animation: lp-deadline-pulse 1.3s ease-in-out infinite;
}

.lp-cta__deadline-text {
	position: relative;
}

.lp-cta__slash {
	font-size: 1.4em;
	font-weight: 900;
	color: #ffe14d;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	line-height: 1;
}

/* 幾何変化ではなく発光で強調（横幅いっぱいでもはみ出さない） */
@keyframes lp-deadline-pulse {
	0%,
	100% {
		box-shadow: 0 6px 18px rgba(255, 45, 85, 0.42), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
		filter: brightness(1);
	}
	50% {
		box-shadow: 0 6px 28px rgba(255, 45, 85, 0.75), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
		filter: brightness(1.09);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lp-cta__deadline {
		animation: none;
	}
}

/* ---- CTA内キャンペーンバナー画像（期限表示の下） ---- */
.lp-cta__banner-wrap {
	margin: 0;
	line-height: 0;
}

.lp-cta__banner {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: 10px;
}

.lp-cta__note {
	margin: 0;
	font-size: 14px;
	color: #666;
}

.lp-cta__button {
	display: block;
	width: 100%;
	padding: 17px 20px;
	border-radius: 10px;
	background: var(--lp-cta-bg, #f39800);
	color: var(--lp-cta-fg, #fff);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lp-cta__button:active {
	transform: translateY(1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.lp-cta--content .lp-cta__button {
	animation: lp-cta-bob 1.9s ease-in-out infinite;
}

@keyframes lp-cta-bob {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lp-cta--content .lp-cta__button {
		animation: none;
	}
}

/* ---- CTA（追従・スマホ下部固定） ------------------------------------- */
.lp-cta--sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(180%) blur(4px);
	box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.16);
}

.lp-cta--sticky .lp-cta__button {
	max-width: var(--lp-max-width);
	margin: 0 auto;
	padding: 15px 20px;
	font-size: 18px;
	box-shadow: none;
	animation: none;
}

.lp-cta__sticky-deadline {
	max-width: var(--lp-max-width);
	margin: 0 auto 5px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #d63838;
}

/* 追従CTAぶんの余白をコンテンツ下部に確保（最下部が隠れない） */
body.has-sticky-cta .lp-footer {
	padding-bottom: calc(var(--lp-sticky-height) + env(safe-area-inset-bottom, 0px) + 12px);
}

/* CTA が「対応店舗までスクロール」動作のとき */
.lp-cta__button--scroll {
	text-decoration: none;
}

/* ---- 予約方法ボタン（電話 / LINE / WEB）: 本文CTA ---- */
.lp-cta__buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lp-cta__buttons .lp-cta__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	animation: none; /* 複数ボタンはバウンドさせない */
}

.lp-cta__buttons .lp-cta__button .lp-icon {
	flex: 0 0 auto;
	fill: currentColor;
}

/* LINE はブランドカラー。電話 / WEB は LP の CTA カラーを継承 */
.lp-cta__button--line {
	background: #06c755;
	color: #fff;
}

/* ---- 予約方法ボタン: 追従CTA（横並び・等幅） ---- */
.lp-cta__sticky-buttons {
	display: flex;
	gap: 8px;
	max-width: var(--lp-max-width);
	margin: 0 auto;
}

.lp-cta__sticky-buttons .lp-cta__button {
	flex: 1 1 0;
	min-width: 0;
	max-width: none;
	margin: 0;
	padding: 12px 6px;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	animation: none;
}

.lp-cta__sticky-buttons .lp-cta__button .lp-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* ---- 対応店舗（店舗カード） ------------------------------------------- */
.lp-clinics {
	background: #f7f7f8;
	padding: 24px 14px 26px;
	/* 追従ヘッダーの下に隠れないようスクロール位置をずらす */
	scroll-margin-top: calc(var(--lp-header-height) + 8px);
}

.lp-clinics__heading {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	color: #222;
}

.lp-clinics__grid {
	display: grid;
	gap: 14px;
}

.lp-clinics__grid--multi {
	grid-template-columns: 1fr;
}

.lp-clinic-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lp-clinic-card__photo {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #e9ebef;
	line-height: 0;
}

.lp-clinic-card__photo.is-empty {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lp-clinic-card__photo.is-empty .lp-icon {
	width: 40px;
	height: 40px;
	fill: #b7bcc6;
}

.lp-clinic-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lp-clinic-card__body {
	padding: 14px 14px 16px;
}

.lp-clinic-card__name {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
	color: #1b1b1b;
}

.lp-clinic-card__address {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.6;
	color: #555;
}

.lp-clinic-card__postal {
	display: block;
	font-size: 12px;
	color: #888;
}

.lp-clinic-card__meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #444;
}

.lp-clinic-card__meta li {
	display: flex;
	gap: 7px;
	align-items: flex-start;
	margin-top: 4px;
}

.lp-clinic-card__meta .lp-icon {
	flex: 0 0 auto;
	margin-top: 2px;
	fill: #7a8291;
}

/* 地図埋め込み（アクセス情報の下） */
.lp-clinic-card__map {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	margin: 0 0 12px;
	border-radius: 8px;
	overflow: hidden;
	background: #e9ebef;
}

.lp-clinic-card__map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.lp-clinic-card__stopped {
	margin: 0 0 12px;
	padding: 8px 10px;
	background: #fdecea;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #c0392b;
	text-align: center;
}

.lp-clinic-card__ctas {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lp-clinic-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 14px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	background: var(--lp-cta-bg, #f39800);
	color: var(--lp-cta-fg, #fff);
	border: 2px solid var(--lp-cta-bg, #f39800);
}

.lp-clinic-cta .lp-icon {
	fill: currentColor;
}

.lp-clinic-cta:active {
	transform: translateY(1px);
}

/* 種別ごとの軽微な差（将来は個別カラー設定に拡張可能） */
.lp-clinic-cta--map {
	background: #fff;
	color: var(--lp-cta-bg, #f39800);
}

.lp-clinic-cta--line {
	background: #06c755;
	border-color: #06c755;
	color: #fff;
}

/* ---- 期限切れ表示 ---------------------------------------------------- */
.lp-cta--ended {
	background: #f6f6f6;
	padding: 26px 16px;
	text-align: center;
}

.lp-cta--ended p {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #888;
}

/* ---- フッター（最小） ---------------------------------------------------- */
.lp-footer {
	background: #fff;
	padding: 22px 16px 28px;
	text-align: center;
	font-size: 12px;
	line-height: 1.8;
	color: #999;
}

.lp-footer a {
	color: #888;
	text-decoration: none;
}

.lp-footer__links {
	margin: 0 0 8px;
}

.lp-footer__links a {
	display: inline-block;
	margin: 0 8px;
}

.lp-footer__copyright {
	margin: 0;
}

/* ---- PC（LPを中央配置・巨大化させない） ------------------------------- */
@media (min-width: 768px) {
	body {
		padding: 24px 0;
	}

	.lp-wrapper {
		box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
		border-radius: 4px;
	}

	/* 追従CTAはPCでも下部固定。ボタン幅はLP幅に合わせる */
	.lp-cta--sticky {
		background: rgba(255, 255, 255, 0.98);
	}

	/* 2店舗以上は最大2列（LP幅750pxのため無理な多列化はしない） */
	.lp-clinics__grid--multi {
		grid-template-columns: 1fr 1fr;
	}

	.lp-clinics__grid--single {
		max-width: 520px;
		margin: 0 auto;
	}
}

@media (min-width: 1024px) {
	body {
		padding: 32px 0;
	}
}
