@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: 3.0rem;
	line-height: 1.5;
}

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

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

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

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

.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;
}
/* 上からの矢印 */

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

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

.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, 1fr);
	gap: 20px;
	width: 100%;
	position: relative;
	margin-top: 40px;
}

/* 横線 */

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

/* 縦線 */
.flowchart_col:nth-child(1) .flowchart_arrow.vertical {
    height: 40px;
}
.flowchart_children.two .flowchart_child {
	position: relative;
}

.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;
}
/* =========================
	SP・タブレット
========================= */

@media (max-width: 900px) {

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

	.flowchart_inner {
		min-width: 980px;
		padding: 0 20px;
	}

	/* 横並び維持 */
	.row_4 {
		grid-template-columns: repeat(4, 1fr);
		gap:0;
	}
	.row_4 > .flowchart_col > .flowchart_item {
		    min-height: 85px;
	}
	/* ボックス */
	.flowchart_item,
	.flowchart_child {
		border-radius: 14px;
	}

	/* メインボックス */
	.row_4 > .flowchart_col > .flowchart_item {
		min-height: 120px;
		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段目の高さを統一
========================= */

.row_4 {
	align-items: start;
}

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

/* =========================
	下の2つを横長に
========================= */

.flowchart_children.two {
	grid-template-columns: repeat(2, minmax(140px, 1fr));
	justify-content: center;
}

/* 子ボックス */

.flowchart_children.two .flowchart_child {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 100%;
}
.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;
}

.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;
}
@media (max-width: 900px) {

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

	.flowchart_inner {
		min-width: 980px;
		padding: 0 20px;

		transform: scale(.9);
		transform-origin: top left;

		width: 111%;
	}

}

@media (max-width: 900px) {

	.flowchart {
		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;
	}

}

@keyframes flowchartSwipe {

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

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

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