/**
 * CSR page styles.
 */

.csr-service-block {
	position: relative;
	overflow: visible;
}

.csr-service-block .csr-service-image {
	width: min(42vw, 505px);
	max-width: none;
	margin-top: -56px !important;
	margin-right: -48px !important;
	margin-left: auto !important;
}

.csr-service-block.csr-service-block--reverse .csr-service-image.csr-service-image--left {
	position: absolute;
	top: clamp(24px, 4vw, 64px);
	left: calc((100vw - 100%) / -2 - 10px);
	width: min(48vw, 573px);
	margin: 0 !important;
}

.csr-service-block.csr-service-block--reverse {
	min-height: clamp(520px, 52vw, 680px);
}

.csr-service-block.csr-service-block--reverse::after {
	top: -240px;
	right: -14px;
	width: min(18vw, 250px);
	aspect-ratio: 250 / 460;
	background-image: url("../../img/csr-service-deco02.svg");
	background-size: contain;
}

.csr-service-block .csr-service-image img {
	display: block;
	width: 100%;
	max-width: none;
}

.csr-card-image-cover {
	height: 157px;
	overflow: hidden;
	border-radius: 10px;
}

.csr-card-image-cover img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 10px;
	object-fit: cover;
	object-position: center bottom;
}

.csr-border-title {
	position: relative;
	border-left: 0 !important;
	padding-left: var(--wp--preset--spacing--30);
}

.csr-border-title::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 6px;
	height: 100%;
	content: "";
	background: var(--wp--preset--color--tag-blue);
	border-radius: 10px;
}

.csr-border-title p + p {
	margin-top: 10px !important;
}

.csr-safety-bg,
.csr-safety-section {
	position: relative;
	overflow: visible;
}

.csr-service-block.csr-service-block--reverse::after,
.csr-safety-bg::after,
.csr-safety-section::after {
	position: absolute;
	z-index: 1;
	content: "";
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
}

.csr-safety-bg::after {
	right: auto;
	left: calc(100% - 1367px + 2%);
	bottom: -65px;
	width: 1367px;
	aspect-ratio: 1367 / 80;
	background-image: url("../../img/csr-safety_text.svg");
	background-size: 100% 100%;
}

.csr-safety-section::after {
	top: -20%;
	right: -20%;
	width: min(14vw, 176px);
	aspect-ratio: 176 / 337;
	background-image: url("../../img/csr-safety_deco.svg");
	background-size: contain;
}

.csr-safety-bg > *,
.csr-safety-section > * {
	position: relative;
	z-index: 2;
}

@media (max-width: 900px) {
	.csr-service-block .csr-service-image {
		width: 70%;
		margin-top: 50px !important;
		margin-right: auto !important;
		margin-left: auto !important;
		text-align: center;
	}

	.csr-service-block.csr-service-block--reverse {
		min-height: 0;
	}

	.csr-service-block.csr-service-block--reverse > .wp-block-columns,
	.csr-service-block.csr-service-block--reverse > .wp-block-columns.is-layout-flex {
		display: flex !important;
		flex-direction: column-reverse !important;
	}

	.csr-service-block.csr-service-block--reverse > .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}

	.csr-service-block.csr-service-block--reverse .csr-service-image.csr-service-image--left {
		position: relative;
		top: auto;
		left: auto;
		width: min(70vw, 573px);
		margin-top: 0 !important;
		margin-right: auto !important;
		margin-left: auto !important;
	}

	.csr-service-block .csr-service-image img {
		margin-right: auto;
		margin-left: auto;
	}
}

@media (max-width: 767px) {
	.csr-sp-deco-inset {
		padding-right: 0 !important;
		padding-left: 32px !important;
		border-radius: 10px !important;
	}

	.csr-sp-deco-inset::before {
		right: 12px !important;
		left: 12px !important;
	}

	.csr-safety-bg::after {
		display: none !important;
		content: none !important;
	}

	.csr-service-block.csr-service-block--reverse::after {
		top: -150px;
		width: min(28vw, 190px);
	}

	.csr-border-title::before {
		width: 4px;
	}

	.csr-workplace {
		position: relative;
		overflow: visible;
	}

	.csr-workplace::after {
		position: absolute;
		top: -104px;
		right: -8px;
		z-index: 3;
		width: min(54vw, 219px);
		aspect-ratio: 219 / 182;
		content: "";
		background: url("../../img/csr-workplace_deco_sp.svg") center / contain no-repeat;
		pointer-events: none;
	}

	.csr-workplace > * {
		position: relative;
		z-index: 2;
	}

	.csr-service-heading > .wp-block-group:first-child > p:first-child {
		font-size: 12px !important;
	}

	.csr-service-heading > .wp-block-group:last-child p {
		font-size: 20px !important;
	}

	.csr-service-heading > .wp-block-group:last-child {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
}
