@charset "UTF-8";

/*
 * M&A・事業承継ページ（page-ma.php）。
 *
 * メインビジュアル・お悩み・3つの理由・FLOW・Q&A は page-first.css を
 * 流用しているため、functions.php で 'first' を extends に指定している。
 *
 * このファイルには、このページだけの見た目
 * （見出しの下線、吹き出し、秘密保持の囲み、CTA）を書いている。
 *
 * モバイルファースト。PC は 840px 以上。
 */

.p-ma {
	--ma-bubble: #fff;     /* 吹き出しの色 */
	--ma-line: #e4ded9;    /* 区切り線 */
	overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   見出しの「悩み」の下線
   -------------------------------------------------------------------------- */
.p-ma__underline {
	/* 文字の下にオレンジの線を引いて強調する */
	background-image: linear-gradient(#1A1311, #1A1311);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% 2px;
	padding-bottom: 4px;
	font-size: 50px;
}

@media (max-width: 839px) {
	.p-ma__underline {
		font-size: 30px;
	}
}
/* --------------------------------------------------------------------------
   1. こんなお悩みありませんか？
   -------------------------------------------------------------------------- */
.p-ma__worry {
	padding-top: 48px;
	background-color: var(--gray-bg, #f4f2f0);
}

.p-ma__worry-body {
	display: grid;
	gap: 16px;
	margin-top: 28px;
}

/* 中央の写真 */
.p-ma__worry-image {
	order: -1;
	line-height: 0;
	text-align: center;
}

.p-ma__worry-image {
	width: 100%;
}

.p-ma__worry-image picture {
	display: block;
	width: 100%;
}

.p-ma__worry-image .img-slot--empty,
.p-ma__worry-image picture img {
	display: block;
	width: 100%;
	max-width: 1020px;
	height: auto;
	margin-inline: auto;
	aspect-ratio: 1000 / 500;
	object-fit: contain;
	margin-bottom: -50px;
}
@media (max-width: 839px) {
	.p-ma__worry-image .img-slot--empty,
	.p-ma__worry-image picture img {
		max-width: 1020px;
		height: auto;
		margin-inline: auto;
		aspect-ratio: 300 / 400;
		object-fit: contain;
		margin-bottom: -50px;
	}
}

.p-ma__bubbles {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 吹き出し。左下（右側は右下）に小さな尻尾を付ける */
.p-ma__bubble {
	position: relative;
	padding: 14px 18px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
	background-color: var(--ma-bubble);
	border-radius: 10px;
}

/* 吹き出しの尻尾 */
.p-ma__bubble::after {
	position: absolute;
	bottom: -7px;
	left: 50%;
	width: 0;
	height: 0;
	margin-left: -7px;
	border-top: 8px solid var(--ma-bubble);
	border-right: 7px solid transparent;
	border-left: 7px solid transparent;
	content: "";
}

/* --------------------------------------------------------------------------
   2. 経営者様の不安に寄り添う
   -------------------------------------------------------------------------- */
.p-ma__reasons {
	padding: 48px 0 56px;
	background-color: var(--color-bg);
}

/* カードの見出しは中央ぞろえ（デザインどおり） */
.p-ma__reasons .p-reasons__title {
	text-align: center;
}

/* --------------------------------------------------------------------------
   3. ご相談の流れ
   -------------------------------------------------------------------------- */
.p-ma__flow {
	padding: 48px 0 56px;
	background-color: var(--cream, #fef7f3);
}

/* 見出しはオレンジの明朝体（デザインどおり） */
.p-ma__flow-title {
	font-family: var(--font-mincho);
	/* 明朝体は太字にしない */
	font-weight: 400;
	color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   4. 秘密保持について
   -------------------------------------------------------------------------- */
.p-ma__privacy {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	align-items: center;
	gap: 16px;
	margin-top: 32px;
	padding: 20px 18px;
	background-color: #f4f2f0;
	border-radius: 10px;
}

.p-ma__privacy-icon {
	width: 56px;
	line-height: 0;
}

.p-ma__privacy-icon .img-slot--empty,
.p-ma__privacy-icon img {
	width: 100%;
	height: auto;
	/* 画像が未配置のときも同じ大きさの場所を取る */
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.p-ma__privacy-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.p-ma__privacy-text {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--color-text-body);
}

/* --------------------------------------------------------------------------
   5. CTA（このページ専用）
   -------------------------------------------------------------------------- */
.p-ma__cta {
	padding: 48px 0 56px;
	/* 左から薄いオレンジ、右にかけて濃いオレンジ */
	background-image: linear-gradient(100deg, #faa41e 0%, var(--color-primary) 62%);
}

.p-ma__cta-title {
	margin: 0;
	font-family: var(--font-mincho);
	/* 明朝体は太字にしない */
	font-weight: 400;
	font-size: 28px;
	line-height: 1.4;
	color: #fff;
	text-align: center;
	letter-spacing: .04em;
}

.p-ma__cta-lead {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.8;
	color: #fff;
	text-align: center;
}

.p-ma__cta-buttons {
	display: grid;
	gap: 14px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.p-ma__cta-button {
	width: 100%;
	min-height: 60px;
	font-size: 15px;
}

/* 電話番号のボタン。受話器のマークを左に置く */
.p-ma__cta-button--tel {
	gap: 10px;
}

.p-ma__cta-tel-icon {
	display: block;
	width: 24px;
	line-height: 0;
}

.p-ma__cta-tel-icon .img-slot--empty,
.p-ma__cta-tel-icon img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.p-ma__cta-tel-number {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .02em;
	font-variant-numeric: tabular-nums;
}

.p-first__qa{
	background-color: white;
}

/* ==========================================================================
   PC（840px 以上）
   ========================================================================== */
@media (min-width: 840px) {

	/* --- 1. お悩み --- */
	.p-ma__worry {
		padding-top: 80px;
	}

	.p-ma__worry .l-section {
		max-width: 1010px;
	}

	/* 左の吹き出し・写真・右の吹き出しの3列 */
	.p-ma__worry-body {
		align-items: center;
		gap: 0 20px;
		margin-top: 44px;
		/* セクション下端のウェーブ（画面幅の約 8.6%）に吹き出しが
		   隠れないよう、ウェーブの高さぶん下を空けておく */
		padding-bottom: clamp(100px, 8.6vw, 130px);
	}

	.p-ma__worry-image {
		order: 0;
		/* 写真の下端だけはウェーブに少しかぶせる（デザインどおり） */
		margin-bottom: calc(clamp(100px, 8.6vw, 130px) * -0.5);
	}

	.p-ma__bubbles {
		gap: 18px;
	}

	.p-ma__bubble {
		font-size: 15px;
	}

	/* 吹き出しの尻尾を写真側に向ける */
	.p-ma__bubbles--left .p-ma__bubble::after {
		bottom: auto;
		top: 50%;
		left: auto;
		right: -12px;
		margin: -7px 0 0;
		border-top: 7px solid transparent;
		border-bottom: 7px solid transparent;
		border-left: 12px solid var(--ma-bubble);
		border-right: 0;
	}

	.p-ma__bubbles--right .p-ma__bubble::after {
		bottom: auto;
		top: 50%;
		left: -12px;
		margin: -7px 0 0;
		border-top: 7px solid transparent;
		border-bottom: 7px solid transparent;
		border-right: 12px solid var(--ma-bubble);
		border-left: 0;
	}

	/* 段違いに置いて、デザインの並びに近づける */
	.p-ma__bubbles--left .p-ma__bubble:nth-child(1) {
		margin-left: 26px;
	}

	.p-ma__bubbles--left .p-ma__bubble:nth-child(3) {
		margin-left: 8px;
	}

	.p-ma__bubbles--right .p-ma__bubble:nth-child(2) {
		margin-left: 40px;
	}

	.p-ma__bubbles--right .p-ma__bubble:nth-child(3) {
		margin-left: 37px;
	}

	/* --- 2. 寄り添う --- */
	.p-ma__reasons {
		padding: 80px 0 90px;
	}

	.p-ma__reasons .l-section {
		max-width: 1249px;
	}

	/* --- 3. ご相談の流れ --- */
	.p-ma__flow {
		padding: 80px 0 90px;
	}

	.p-ma__flow-title {
		font-size: 17px;
	}

	/* --- 4. 秘密保持 --- */
	.p-ma__privacy {
		grid-template-columns: 79px minmax(0, 1fr);
		gap: 20px;
		margin-top: 40px;
		padding: 25px 30px;
	}

	.p-ma__privacy-icon {
		width: 79px;
	}

	.p-ma__privacy-title {
		font-size: 16px;
	}

	.p-ma__privacy-text {
		font-size: 14px;
	}

	/* --- 5. CTA --- */
	.p-ma__cta {
		padding: 60px 0 70px;
	}

	.p-ma__cta .l-section {
		max-width: 1202px;
	}

	.p-ma__cta-title {
		font-size: 35px;
	}

	.p-ma__cta-lead {
		margin-top: 20px;
		font-size: 16px;
	}

	.p-ma__cta-buttons {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
		margin-top: 36px;
	}

	.p-ma__cta-button {
		min-height: 99px;
		font-size: 17px;
	}

	.p-ma__cta-tel-icon {
		width: 32px;
	}

	.p-ma__cta-tel-number {
		font-size: 20px;
	}
}
