/* ===========================================================
   Object / Project / First Visit（TOPページ：初めての方へ セクション）
   - 白背景、コンテンツ幅 800px（l-section__inner--narrow）
   - 4つの STEPカード（PC：タイトル中央配置、SP：アイコン左 タイトル右）
   - カード間にダッシュ矢印（icon-arrow-under.svg）
   - 末尾に波SVG（wave-first-to-condition.svg）
   =========================================================== */

.p-first {
	background-color: var(--color-white);
	color: var(--color-navy-500);
	padding-top: 40px;
	position: relative;
	z-index: 3; /* features (z-index:2) より前面に */
}

@media (min-width: 768px) {
	.p-first {
		padding-top: 80px;
	}
}

/* 800px以上のviewportでは narrow inner（max-width 800px）の左右paddingを0にして
   800pxフル幅でカードを表示する。それ未満は通常の余白を保つ。 */
@media (min-width: 800px) {
	.p-first .l-section__inner--narrow {
		padding-inline: 0;
	}
}

/* ===========================
   見出しエリア
   - タイトル＋サブは画面中央寄せ
   - イラストはタイトル右横に絶対配置（当院についてセクションの左配置をミラー）
   =========================== */

.p-first__header {
	text-align: center;
	margin-bottom: 16px;
}

@media (min-width: 768px) {
	.p-first__header {
		margin-bottom: 24px;
	}
}

.p-first__header-text {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	position: relative;
	z-index: 10; /* イラスト含めて features の波より前面 */
}

/* イラストはタイトル右外側に絶対配置。
   bottom が正値なので、タイトル底辺の上方にイラスト下端が来る = タイトルより上に伸びる。
   features セクションの波下端あたりに重なって視認性を増す配置。 */
.p-first__header-illust {
	display: block;
	width: 50px;
	height: auto;
	position: absolute;
	left: 100%;
	bottom: 40px;
	margin-left: 12px;
	z-index: 10;
}

@media (min-width: 768px) {
	.p-first__header-illust {
		width: 72px;
		bottom: 65px;
		margin-left: 16px;
	}
}

.p-first__title {
	font-size: 22px;
	font-weight: 700;
	color: var(--color-navy-500);
	letter-spacing: 0.04em;
	line-height: 1.3;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
}

.p-first__title::before,
.p-first__title::after {
	content: "・・・";
	color: var(--color-pink-500);
	font-weight: 400;
	font-size: 0.5em;
	letter-spacing: -0.18em;
	line-height: 1;
}

@media (min-width: 768px) {
	.p-first__title {
		font-size: 28px;
		gap: 10px;
	}
}

.p-first__subtitle {
	font-size: 13px;
	color: var(--color-pink-500);
	letter-spacing: 0.08em;
	font-weight: 500;
	margin: 0;
}

@media (min-width: 768px) {
	.p-first__subtitle {
		font-size: 14px;
	}
}

/* ===========================
   リード文
   =========================== */

.p-first__lead {
	text-align: center;
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
	margin: 0 0 40px;
}

@media (min-width: 768px) {
	.p-first__lead {
		font-size: 18px;
		margin-bottom: 56px;
	}
}

/* ===========================
   STEPリスト
   =========================== */

.p-first__list {
	list-style: none;
	padding: 0;
	margin: 0 0 40px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

@media (min-width: 768px) {
	.p-first__list {
		margin-bottom: 56px;
	}
}

.p-first__list-item {
	position: relative;
}

/* ----- 矢印：2-4枚目のカードの上に重ねる ----- */

.p-first__list-item--with-arrow::before {
	content: "";
	background-image: url("../../../images/svg/icon-arrow-under.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	display: block;
	width: 15px;
	height: 28px;
	position: absolute;
	top: -45px;
	left: 50%;
	transform: translateX(-50%);
	pointer-events: none;
	z-index: 1;
}

@media (min-width: 768px) {
	.p-first__list-item--with-arrow::before {
		height: 32px;
		top: -50px;
	}
}

/* ===========================
   STEPカード
   =========================== */

.p-first__step {
	position: relative;
	background-color: var(--color-white);
	border: 1px solid var(--color-navy-300);
	border-radius: 16px;
	padding: 24px;
	/* SP：アイコン左 / 右側に title 上 + body 下 */
	display: grid;
	grid-template-columns: 64px 1fr;
	grid-template-areas:
		"icon  title"
		"icon  body";
	column-gap: 16px;
	row-gap: 8px;
}

@media (min-width: 768px) {
	.p-first__step {
		padding: 24px 40px;
		/* PC：タイトル中央のフル幅、その下に アイコン左 + body 右 */
		grid-template-columns: 80px 1fr;
		grid-template-areas:
			"title title"
			"icon  body";
		column-gap: 24px;
		row-gap: 30px;
	}
}

/* ----- 番号バッジ（円形、カード左上角からはみ出す） ----- */

.p-first__step-badge {
	position: absolute;
	top: -12px;
	left: -6px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--color-pink-500);
	color: var(--color-white);
	font-size: 20px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	z-index: 2;
}

@media (min-width: 768px) {
	.p-first__step-badge {
		top: -16px;
		left: -16px;
		width: 64px;
		height: 64px;
		font-size: 32px;
	}
}

/* ----- STEPタイトル -----
   英数字部分（STEP01.）はピンク、日本語部分（ご予約 等）はネイビーで色分け */

.p-first__step-title {
	grid-area: title;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
	align-self: center;
}

.p-first__step-title-num {
	color: var(--color-pink-500);
}

.p-first__step-title-name {
	color: var(--color-navy-500);
}

@media (min-width: 768px) {
	.p-first__step-title {
		font-size: 24px;
		text-align: center;
	}
}

/* ----- STEPアイコン ----- */

.p-first__step-icon {
	grid-area: icon;
	width: 64px;
	height: 64px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.p-first__step-icon img {
	width: 100%;
	height: 100%;
	display: block;
}

@media (min-width: 768px) {
	.p-first__step-icon {
		width: 80px;
		height: 80px;
	}
}

/* ----- STEPボディ ----- */

.p-first__step-body {
	grid-area: body;
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

@media (min-width: 768px) {
	.p-first__step-body {
		font-size: 16px;
		gap: 16px;
	}
}

.p-first__step-body > p {
	margin: 0;
}

/* ----- STEP01：Web予約案内ノート ----- */

.p-first__step-note {
	background-color: var(--color-navy-100);
	color: var(--color-navy-500);
	font-size: 12px;
	line-height: 1.6;
	padding: 10px 14px;
	border-radius: 8px;
	margin: 0;
}

@media (min-width: 768px) {
	.p-first__step-note {
		font-size: 13px;
		padding: 12px 18px;
	}
}

.p-first__step-note a {
	color: var(--color-navy-500);
	text-decoration: underline;
	font-weight: 700;
}

@media (hover: hover) and (min-width: 768px) {
	.p-first__step-note a:hover {
		color: var(--color-pink-500);
	}
}

/* ----- STEP01：Web予約ボタン ----- */

.p-first__step-button {
	width: 100%;
	max-width: 240px;
	height: 52px;
	align-self: center;
	margin-top: 4px;
}

@media (min-width: 768px) {
	.p-first__step-button {
		max-width: 200px;
		height: 48px;
	}
}

/* ===========================
   CTA（セクション末尾）
   =========================== */

.p-first__cta {
	display: flex;
	justify-content: center;
	margin-bottom: 40px;
}

@media (min-width: 768px) {
	.p-first__cta {
		margin-bottom: 64px;
	}
}

/* ===========================
   末尾の波SVG
   =========================== */

.p-first__wave-bottom {
	display: block;
	position: relative;
	z-index: 0;
	/* 100vw はスクロールバー幅を含み右側にはみ出すため、親（section）の 100% を使う。
	   親 .p-first は block 要素でビューポート全幅に展開されるので 100% で十分。 */
	width: 100%;
	background-image: url("../../../images/svg/wave-first-to-condition.svg");
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-position: center;
	height: clamp(70px, 8vw, 140px);
	pointer-events: none;
	margin-bottom: -1px; /* 次セクションとの隙間を打ち消す */
}
