/**
 * スライダーのスタイル（B to B / B to C 共通）
 *
 * @package kaigounei
 */

.homecare-slider {
	width: 100%;
	margin: 30px 0 0;
}

.homecare-slider .swiper {
	width: 100%;
	height: auto;
}

.homecare-slider .swiper-slide {
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: 0; /* スキマをなくす */
	height: 400px;
}

.homecare-slider .slider-content {
	position: relative;
	overflow: hidden;
	background: #f5f5f5;
	transition: transform 0.3s ease;
	height: 100%;
}

.homecare-slider .slider-content::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(rgba(0, 0, 0, 0.0) 50%, rgba(0, 0, 0, 0.6) 100%);
	z-index: 1;
	pointer-events: none;
}

.homecare-slider .slider-content:hover {
	transform: translateY(-5px);
}

.homecare-slider .slider-content:hover .slider-content-title {
	color: #F87B1B;
}

.homecare-slider .slider-content a {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
	position: relative;
}

/* 画像コンテナ：親の高さいっぱいに表示 */
.homecare-slider .slider-content-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #f5f5f5;
	overflow: hidden;
	z-index: 0;
}

.homecare-slider .slider-content-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover; /* contain から cover に変更して隙間をなくす */
	object-position: center;
}

/* タイトルを画像全体にオーバーレイ表示 */
.homecare-slider .slider-content-title {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 15px 20px;
	color: #fff;
	font-size: 22px;
	font-weight: bold;
	font-family: "Meiryo UI", "メイリオ", "Meiryo";
	line-height: 1.5;
	letter-spacing: 0.05em;
	z-index: 2;
}

/* 50:25:25の比率（PC・タブレット） */
.homecare-slider .slider-content-1 {
	width: 50%;
}

.homecare-slider .slider-content-1 .slider-content-title {
	font-size: 28px;
}

.homecare-slider .slider-content-2 {
	width: 25%;
}

.homecare-slider .slider-content-2 .slider-content-title {
	font-size: 22px;
}

.homecare-slider .slider-content-3 {
	width: 25%;
}

.homecare-slider .slider-content-3 .slider-content-title {
	font-size: 22px;
}

/* Swiperのページネーション */
.homecare-slider .swiper-pagination {
	bottom: 10px;
}

.homecare-slider .swiper-pagination-bullet {
	background: #fff;
	opacity: 0.5;
}

.homecare-slider .swiper-pagination-bullet-active {
	opacity: 1;
	background: #007aff;
}

/* レスポンシブ対応 */
@media ( max-width: 768px ) {
	/* スマホ表示時の余白調整 */
	.homecare-slider {
		margin: 20px 0 30px;
	}

	/* スマホ表示時は1カラム（縦並び）に変更 */
	.homecare-slider .swiper-slide {
		flex-direction: column;
		gap: 20px;
		height: auto;
	}

	.homecare-slider .slider-content {
		width: 100% !important;
		height: auto;
		position: relative;
	}

	.homecare-slider .slider-content-1,
	.homecare-slider .slider-content-2,
	.homecare-slider .slider-content-3 {
		width: 100% !important;
	}

	/* スマホ表示時：画像コンテナをrelativeにして高さを確保 */
	.homecare-slider .slider-content-image {
		position: relative;
		width: 100%;
		height: auto;
	}

	/* スマホ表示時：4:3の比率で高さを確保 */
	.homecare-slider .slider-content-image::before {
		content: '';
		display: block;
		padding-top: 75%; /* 4:3 = 3/4 = 0.75 */
	}

	.homecare-slider .slider-content-image img {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.homecare-slider .slider-content-title {
		font-size: 18px;
		padding: 12px 15px;
	}

	/* ホバーエフェクトをスマホでは無効化 */
	.homecare-slider .slider-content:hover {
		transform: none;
	}
}

