@charset "UTF-8";

/* =========================
	全体
========================= */

.flowchart_inner {
	margin: auto;
}

/* =========================
	ボックス
========================= */

.flowchart_item,
.flowchart_child {
	background: #fff;
	border: 2px solid #8aa9c9;
	border-radius: 18px;
	padding: 10px;
	text-align: center;
	position: relative;
	z-index: 2;
	box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
	width: 75%;
}

.flowchart_item p,
.flowchart_child p {
	margin: 0;
	color: #2d3f50;
	font-weight: 600;
	line-height: 1.6;
}

.parent {
	max-width: 460px;
	margin: 0 auto 90px;
	background: #eef5fc;
}

.parent p {
	font-size: 3rem;
	line-height: 1.5;
}

/* =========================
	横並び
========================= */

.row_4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	align-items: start;
}

.row_3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	align-items: start;
}

.row_2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0;
	align-items: start;
	max-width: 800px;
	margin: 0 auto;
}

.flowchart_col {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 26px;
}

.flowchart_col:nth-child(2),
.flowchart_col:nth-child(3) {
	padding-top: 0;
}

.row_2 .flowchart_col:nth-child(1) {
	padding: 0;
}

/* =========================
	縦矢印
========================= */

.flowchart_arrow.vertical {
	width: 2px;
	height: 80px;
	background: #7f98b4;
	position: relative;
	margin: 18px 0;
}

.flowchart_arrow.vertical::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -12px;
	transform: translateX(-50%);
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 14px solid #7f98b4;
}

.flowchart_col:nth-child(1) .flowchart_arrow.vertical::after {
	display: none;
}

.row_2 .flowchart_col:nth-child(1) .flowchart_arrow.vertical::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -12px;
	transform: translateX(-50%);
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 14px solid #7f98b4;
	display: block;
}

.flowchart_arrow.vertical.top {
	margin-top: -72px;
}

.flowchart_col:nth-child(1) .flowchart_arrow.vertical {
	height: 40px;
}

.row_2 .flowchart_col:nth-child(1) .flowchart_arrow.vertical {
	height: 80px;
}

/* =========================
	斜め矢印
========================= */

.flowchart_arrow.diagonal {
	position: absolute;
	top: -30px;
	width: 180px;
	height: 2px;
	background: #7f98b4;
}

.flowchart_arrow.diagonal::after {
	content: "";
	position: absolute;
	right: -2px;
	top: 50%;
	transform: translateY(-50%);
	border-left: 13px solid #7f98b4;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

.flowchart_arrow.diagonal.left {
	left: 50%;
	transform: rotate(-24deg);
	transform-origin: left center;
}

.flowchart_arrow.diagonal.left::after {
	left: -8px;
	right: auto;
	border-left: none;
	border-right: 13px solid #7f98b4;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

.flowchart_arrow.diagonal.right {
	right: 50%;
	transform: rotate(24deg);
	transform-origin: right center;
}

.flowchart_arrow.diagonal.right::after {
	right: -8px;
}

/* =========================
	子要素2つ
========================= */

.flowchart_children.two {
	display: grid;
	grid-template-columns: repeat(2, minmax(140px, 1fr));
	gap: 20px;
	width: 100%;
	position: relative;
	margin-top: 40px;
	justify-content: center;
}

.flowchart_children.two::before {
	content: "";
	position: absolute;
	top: -58px;
	left: 24%;
	width: 53%;
	height: 2px;
	background: #7f98b4;
}

.flowchart_children.two .flowchart_child {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 100%;
}

.flowchart_children.two .flowchart_child::before {
	content: "";
	position: absolute;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	width: 2px;
	height: 40px;
	background: #7f98b4;
}

.flowchart_children.two .flowchart_child::after {
	content: "";
	position: absolute;
	left: 50%;
	top: -20px;
	transform: translateX(-50%);
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 14px solid #7f98b4;
}

.flowchart_children.two .flowchart_child a {
	padding: 10px;
	height: calc(100% - 20px);
	align-content: center;
}

.flowchart_children.two .flowchart_child a:hover,
.flowchart_child a:hover {
	opacity: 0.8;
}

.flowchart_children.two .flowchart_child p {
	line-height: 1.5;
	word-break: keep-all;
}

/* =========================
	高さ調整
========================= */

.row_4 > .flowchart_col > .flowchart_item {
	min-height: 120px;
	width: 60%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.row_3 > .flowchart_col > .flowchart_item {
	min-height: 120px;
	width: 60%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.row_2 > .flowchart_col > .flowchart_item {
	width: 75%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* =====================================
	row_3 専用調整
===================================== */

.row_3 .flowchart_arrow.diagonal {
	width: 140px;
}

.row_3 > .flowchart_col > .flowchart_item {
	min-height: 100px;
	width: 70%;
}

.row_3 .flowchart_children.two {
	margin-top: 25px;
}

.row_3 .flowchart_child {
	min-height: 80px;
}

.row_3 .flowchart_children.two .flowchart_child::before {
	height: 25px;
	top: -45px;
}

.row_3 .flowchart_children.two .flowchart_child::after {
	top: -20px;
}

.row_3 .flowchart_children.two::before {
	top: -43px;
}

.row_3 .flowchart_col:nth-child(2) .flowchart_arrow.vertical,
.row_3 .flowchart_col:nth-child(3) .flowchart_arrow.vertical {
	height: 40px;
}

.row_3 .flowchart_col:nth-child(2) .flowchart_arrow.vertical::after,
.row_3 .flowchart_col:nth-child(3) .flowchart_arrow.vertical::after {
	display: none;
}

.row_3 .flowchart_col {
	padding: 0 10px;
}

.row_3 .flowchart_col:nth-child(2) {
	padding-top: 15px !important;
}

.row_3 .flowchart_col:nth-child(2) > .flowchart_arrow.vertical.top::after {
	display: block;
}

/* =========================
	SP・タブレット
========================= */

@media (max-width: 900px) {

	.flowchart {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 20px;
		position: relative;
	}

	.flowchart::before {
		content: "← 横にスクロールできます →";
		display: block;
		text-align: center;
		font-size: 1.2rem;
		color: #7f98b4;
		font-weight: 600;
		margin-bottom: 10px;
		animation: flowchartSwipe 1.8s infinite;
	}

	.flowchart_inner {
		min-width: 980px;
		padding: 0 20px;
		transform: scale(.9);
		transform-origin: top left;
		width: 111%;
	}

	.row_4 {
		grid-template-columns: repeat(4, 1fr);
		gap: 0;
	}

	.row_3 {
		grid-template-columns: repeat(3, 1fr);
		gap: 0;
	}

	.row_2 {
		grid-template-columns: repeat(2, 1fr);
		gap: 0;
	}

	.flowchart_item,
	.flowchart_child {
		border-radius: 14px;
		width: 80%;
	}

	.row_4 > .flowchart_col > .flowchart_item {
		min-height: 120px;
		width: 75%;
	}

	.row_3 > .flowchart_col > .flowchart_item {
		min-height: 120px;
		width: 75%;
	}

	.row_2 > .flowchart_col > .flowchart_item {
		min-height: 35px;
		width: 75%;
	}

	.flowchart_item p,
	.flowchart_child p {
		font-size: 1.4rem;
		line-height: 1.5;
	}

	.parent p {
		font-size: 1.8rem;
	}

	.flowchart_arrow.diagonal {
		width: 150px;
		top: -40px;
	}

	.flowchart_children.two {
		gap: 12px;
	}

	.flowchart_children.two .flowchart_child {
		width: 100%;
	}
}

/* =========================
	2カラム用
========================= */

@media (max-width: 900px) {

	.flowchart_2col {
		overflow: visible;
	}

	.flowchart_2col .flowchart_inner {
		min-width: 0;
		width: 100%;
		padding: 0;
		transform: none;
	}

	.flowchart_2col .row_2 {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.flowchart.flowchart_2col::before {
		display: none;
	}
}

/* =========================
	アニメーション
========================= */

@keyframes flowchartSwipe {

	0% {
		transform: translateX(0);
		opacity: .6;
	}

	50% {
		transform: translateX(6px);
		opacity: 1;
	}

	100% {
		transform: translateX(0);
		opacity: .6;
	}
}