/*
 * トップ中央の業務案内：スライダーをやめ、4業務をカードで一度に並べる（GitHub Issue #21 案A）
 * 既存のスライダー（Swiper）のマークアップのまま、見た目と動きを上書きする。
 */

/* スライダーの動きを止めて格子状に並べる */
.sample03 .swiper-container {
	overflow: visible;
	padding: 0 16px;
}

.sample03 .swiper-wrapper {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	transform: none !important;
	width: auto !important;
	height: auto !important;
	max-width: 1120px;
	margin: 0 auto;
}

/* ループ用の複製カードと、矢印・ページ送りの点は使わない
 * 複製カードはカードの表示指定（.sample03 .swiper-slide.top-service）より強い詳細度で隠す（#29） */
.sample03 .swiper-wrapper > .swiper-slide.swiper-slide-duplicate,
.sample03 .swiper-slide-duplicate,
.sample03 .swiper-button-prev,
.sample03 .swiper-button-next,
.sample03 .swiper-pagination {
	display: none !important;
}

/* ---------- カード ---------- */
.sample03 .swiper-slide.top-service {
	width: auto !important;
	margin: 0 !important;
	height: auto;
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--wn-line, #e3e6e1);
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(20, 40, 20, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	text-align: left;
	opacity: 1 !important;
	padding: 0 !important;
}

.sample03 .swiper-slide.top-service:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(20, 40, 20, 0.10);
	border-color: var(--wn-green, #37792b);
}

.sample03 .top-service .top-about-img {
	margin: 0 !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 0 !important;
}

.sample03 .top-service .top-about-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.sample03 .top-service:hover .top-about-img img {
	transform: scale(1.04);
}

.sample03 .top-service h3 {
	font-size: 19px;
	line-height: 1.5;
	margin: 18px 20px 8px;
	padding: 0;
	color: var(--wn-text, #2b2f2c);
	border: none;
	text-align: left;
	min-height: 3em; /* 見出しが1行でも2行でも、下の説明の位置を揃える */
}

.sample03 .top-service p {
	font-size: 15px;
	line-height: 1.85;
	max-height: calc(1.85em * 4); /* 4行ちょうど（#28） */
	flex: 0 0 auto;
	color: var(--wn-sub, #5d645f);
	margin: 0 20px 16px;
	/* 長い説明は4行で切って高さを揃える（全文は業務案内ページで） */
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ボタン：カードの一番下に「詳しく見る」として置く */
.sample03 .top-service .bt-about {
	margin-top: auto;
	padding: 0 20px 20px;
}

.sample03 .top-service .bt-about p {
	display: block;
	margin: 0;
	-webkit-line-clamp: unset;
	overflow: visible;
	max-height: none;
}

.sample03 .top-service .bt-link {
	width: 100% !important;
	margin: 0 !important;
	background: transparent !important;
	border: 1px solid var(--wn-green, #37792b);
	border-radius: 3px !important;
	box-shadow: none !important;
}

.sample03 .top-service .bt-link a {
	display: block;
	padding: 10px 12px;
	color: var(--wn-green, #37792b) !important;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
}

.sample03 .top-service .bt-link a::before {
	content: "詳しく見る　→";
	font-weight: 600;
}

/* 元のボタン文字（業務名）は見出しと重複するので隠す */
.sample03 .top-service .bt-link a {
	font-size: 0;
}

.sample03 .top-service .bt-link a::before {
	font-size: 14px;
	letter-spacing: 0.1em;
}

.sample03 .top-service:hover .bt-link {
	background: var(--wn-green, #37792b) !important;
}

.sample03 .top-service:hover .bt-link a {
	color: #fff !important;
}

/* カード全体を押せるようにする */
.sample03 .top-service .bt-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ---------- タブレット・スマホ ---------- */
@media screen and (max-width: 1024px) {
	.sample03 .swiper-wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}
}

@media screen and (max-width: 600px) {
	.sample03 .swiper-wrapper {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	/* スマホ：写真を左、文字を右に置く横長のカード
	 * 写真は左側に絶対配置し、カードの高さは文字の分だけにする（#28：grid だと写真の枠が行を押し広げていた） */
	.sample03 .swiper-slide.top-service {
		display: flex !important;
		flex-direction: column;
		padding-left: 38% !important;
		min-height: 170px;
	}
	.sample03 .top-service .top-about-img {
		position: absolute !important;
		left: 0;
		top: 0;
		bottom: 0;
		width: 38% !important;
		height: auto !important;
		min-height: 0;
		aspect-ratio: auto;
	}
	.sample03 .top-service .top-about-img img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}
	.sample03 .top-service h3 {
		font-size: 21px;
		min-height: 0;
		margin: 12px 14px 4px;
	}
	.sample03 .top-service > p {
		font-size: 18px !important;
		line-height: 1.7;
		margin: 0 14px 10px;
		-webkit-line-clamp: 2;
		max-height: calc(1.7em * 2); /* 2行ちょうど。途中の行が半分見えないように（#28） */
	}
	.sample03 .top-service .bt-about {
		margin-top: auto;
	}
	.sample03 .top-service .bt-about {
		padding: 0 14px 12px;
	}
	.sample03 .top-service .bt-link a {
		padding: 7px 10px;
	}
	.sample03 .top-service .bt-link a::before {
		font-size: 17px;
	}
	.sample03 .swiper-slide.top-service:hover {
		transform: none;
	}
	.sample03 .swiper-wrapper > .swiper-slide.swiper-slide-duplicate {
		display: none !important;
	}
}
