/* ==============================================
   導入事例ギャラリー（sensing/case-gallery）
   Figma デザイン準拠
============================================== */

/* ---- コンテナ ---- */
.wp-block-sensing-case-gallery {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	margin: 0 0 32px;
	width: 100%;
	box-sizing: border-box;
}

/* ---- スライドトラック ---- */
.case-gallery__track {
	display: flex;
	transition: transform 0.5s ease-in-out;
}

/* ---- 各スライド ---- */
.case-gallery__slide {
	min-width: 100%;
	position: relative;
	height: 480px;
}

.case-gallery__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 記事本文内のギャラリー画像は 16:9 / border-radius を上書きしない */
.column-article__body .case-gallery__image {
	aspect-ratio: auto;
	border-radius: 0;
	margin: 0;
}

/* ---- グラデーションオーバーレイ ---- */
.case-gallery__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
	padding: 24px;
	min-height: 80px;
}

.case-gallery__caption {
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	margin: 0;
	font-family: Helvetica, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* ---- 前後ナビゲーションボタン ---- */
.case-gallery__prev,
.case-gallery__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	z-index: 2;
	padding: 0;
}

.case-gallery__prev:hover,
.case-gallery__next:hover {
	background: #fff;
}

.case-gallery__prev { left: 16px; }
.case-gallery__next { right: 16px; }

/* CSS シェブロンアイコン */
.case-gallery__prev::before,
.case-gallery__next::before {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	border-left: 2.5px solid #0A1628;
	border-bottom: 2.5px solid #0A1628;
}

.case-gallery__prev::before {
	transform: rotate(45deg);
	margin-left: 4px;
}

.case-gallery__next::before {
	transform: rotate(-135deg);
	margin-right: 4px;
}

/* ---- ドットインジケーター ---- */
.case-gallery__dots {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 2;
}

.case-gallery__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	transition: background 0.3s;
	cursor: pointer;
}

.case-gallery__dot.is-active {
	background: #CFFF04;
}

/* ==============================================
   エディター専用スタイル
============================================== */

/* ---- エディタープレビューラッパー ---- */
.case-gallery__editor-wrap {
	border-radius: 12px;
	overflow: hidden;
}

.case-gallery__editor-wrap .case-gallery__slide {
	position: relative;
	height: 480px;
}

.case-gallery__editor-wrap .case-gallery__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.case-gallery__editor-wrap .case-gallery__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
	padding: 24px;
	min-height: 80px;
}

/* ---- キャプション入力欄（エディター） ---- */
.case-gallery__caption-input {
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	font-family: Helvetica, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
	padding: 4px 0;
	outline: none;
}

.case-gallery__caption-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.case-gallery__caption-input:focus {
	border-bottom-color: #CFFF04;
}

/* ---- エディター ナビゲーション ---- */
.case-gallery__editor-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 12px;
	background: #1F2937;
}

.case-gallery__nav-btn {
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	line-height: 1;
}

.case-gallery__nav-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.case-gallery__counter {
	color: #9CA3AF;
	font-size: 14px;
	font-weight: 500;
	min-width: 48px;
	text-align: center;
}

/* ---- サムネイルストリップ（エディター） ---- */
.case-gallery__thumbs {
	display: flex;
	gap: 4px;
	padding: 8px;
	background: #1F2937;
	overflow-x: auto;
}

.case-gallery__thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 36px;
	border-radius: 4px;
	overflow: hidden;
	border: 2px solid transparent;
	padding: 0;
	cursor: pointer;
	background: none;
	transition: border-color 0.2s;
}

.case-gallery__thumb.is-active {
	border-color: #CFFF04;
}

.case-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- レスポンシブ ---- */
@media only screen and (max-width: 640px) {
	.case-gallery__prev,
	.case-gallery__next {
		width: 32px;
		height: 32px;
	}

	.case-gallery__prev { left: 8px; }
	.case-gallery__next { right: 8px; }

	.case-gallery__prev::before,
	.case-gallery__next::before {
		width: 8px;
		height: 8px;
	}

	.case-gallery__overlay {
		padding: 16px;
	}

	.case-gallery__caption {
		font-size: 14px;
	}

	.case-gallery__dots {
		bottom: 8px;
		gap: 6px;
	}

	.case-gallery__dot {
		width: 6px;
		height: 6px;
	}
}
