/*====================
page-service（私たちにできること）
ブレイクポイント: variables.css 参照
====================*/
.service-page {
	display: block;
	background: var(--color-topics-bg);
}

.service-page__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1040px;
	margin-inline: auto;
	padding: 96px 16px;
}

@media screen and (max-width: 1279px) {
	.service-page__inner {
		padding: 48px 16px 64px;
	}
}

.service-page__content {
	margin-top: 48px;
	color: var(--color-main);
	font-size: 16px;
	line-height: 1.8;
}

/* 事業部門 */
.service-depts {
	box-sizing: border-box;
	width: 100%;
}

.service-depts__list {
	--service-dept-gap: 20px;

	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: var(--service-dept-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media screen and (max-width: 767px) {
	.service-depts__list {
		--service-dept-gap: 16px;

		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
}

.service-depts__item {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.service-depts__item:nth-child(1) {
	grid-column: 1 / span 2;
}

.service-depts__item:nth-child(2) {
	grid-column: 3 / span 2;
}

.service-depts__item:nth-child(3) {
	grid-column: 5 / span 2;
}

.service-depts__item:nth-child(4) {
	grid-column: 2 / span 2;
}

.service-depts__item:nth-child(5) {
	grid-column: 4 / span 2;
}

@media screen and (max-width: 767px) {
	.service-depts__item:nth-child(1),
	.service-depts__item:nth-child(2),
	.service-depts__item:nth-child(3),
	.service-depts__item:nth-child(4),
	.service-depts__item:nth-child(5) {
		grid-column: auto;
	}
}

.service-dept-card {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
	width: 100%;
	height: 100%;
	padding: 24px 20px 20px;
	border-radius: 27px;
	background: #00297d;
	color: #fff;
	text-decoration: none;
	transition:
		background-color 0.35s cubic-bezier(0.65, 0, 0.35, 1),
		box-shadow 0.35s ease,
		transform 0.35s ease;
}

@media screen and (max-width: 767px) {
	.service-dept-card {
		padding: 14px 16px 16px;
	}
}

.service-dept-card:hover,
.service-dept-card:focus-visible {
	background: #003694;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
	transform: translateY(-4px);
}

.service-dept-card:focus-visible {
	outline: 2px solid #def1ff;
	outline-offset: 3px;
}

/* #16346D の上に service_1 を下側のみ重ねる（リピートなし） */
.service-dept-card__deco {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	height: min(56%, 240px);
	border-radius: 0 0 27px 27px;
	background-color: #16346d;
	background-image: var(--service-card-deco-img);
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: 100% auto;
	pointer-events: none;
}

.service-dept-card__title,
.service-dept-card__media {
	position: relative;
	z-index: 1;
}

.service-dept-card__title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.13em;
	text-align: center;
}

.service-dept-card__media {
	position: relative;
	display: block;
	flex: 1 1 auto;
	overflow: hidden;
	border-radius: 16px;
}

.service-dept-card__picture,
.service-dept-card__img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: top;
}

.service-dept-card__img {
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.service-dept-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(22, 52, 109, 0.18);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.service-dept-card:hover .service-dept-card__img,
.service-dept-card:focus-visible .service-dept-card__img {
	transform: scale(1.04);
}

.service-dept-card:hover .service-dept-card__media::after,
.service-dept-card:focus-visible .service-dept-card__media::after {
	opacity: 1;
}

.service-dept-card__cta {
	position: absolute;
	right: 12px;
	bottom: 12px;
	left: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 999px;
	background: #fff;
	color: #16346d;
}

.service-dept-card__cta-text {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.09em;
	text-align: center;
	white-space: nowrap;
}

.service-dept-card__cta-icon {
	position: absolute;
	top: 50%;
	right: 16px;
	left: auto;
	display: block;
	width: 27px;
	height: 10px;
	margin: 0;
	transform: translateY(-50%);
	transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.service-dept-card:hover .service-dept-card__cta-icon,
.service-dept-card:focus-visible .service-dept-card__cta-icon {
	transform: translate(4px, -50%);
}

@media (prefers-reduced-motion: reduce) {
	.service-dept-card,
	.service-dept-card__img,
	.service-dept-card__media::after,
	.service-dept-card__cta-icon {
		transition: none;
	}

	.service-dept-card:hover,
	.service-dept-card:focus-visible {
		transform: none;
	}

	.service-dept-card:hover .service-dept-card__img,
	.service-dept-card:focus-visible .service-dept-card__img {
		transform: none;
	}

	.service-dept-card:hover .service-dept-card__cta-icon,
	.service-dept-card:focus-visible .service-dept-card__cta-icon {
		transform: none;
	}
}
