/* ===================================================================
   FluxBanner (플럭스배너) — 프론트 스타일
   - 테마 비의존, 중립(흑백) 기본값. 미니멀 패션 테마와 잘 어울림.
   - 모든 클래스는 .fxb- 프리픽스 사용.
   =================================================================== */

/* ===================
   1. 공통 변수 / 베이스
   =================== */
.fxb {
	--fxb-h: 520px;          /* 슬라이더/단일 기본 높이 */
	--fxb-cols: 2;           /* 그리드 열 수 */
	--fxb-caption-max: 1200px;
	--fxb-transition: 0.4s ease;
	box-sizing: border-box;
}
.fxb *,
.fxb *::before,
.fxb *::after {
	box-sizing: border-box;
}

/* 관리자 전용 플레이스홀더 안내 */
.fxb-placeholder {
	display: block;
	padding: 24px;
	margin: 8px 0;
	border: 1px dashed #bbb;
	border-radius: 6px;
	background: #fafafa;
	color: #777;
	font-size: 14px;
	text-align: center;
}

/* 캡션 공통 */
.fxb-caption {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: var(--fxb-caption-max);
	margin: 0 auto;
	padding: 0 24px;
	line-height: 1.4;
}
.fxb-caption .fxb-eyebrow {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.85;
}
.fxb-caption .fxb-title {
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}
.fxb-caption .fxb-subtitle {
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 400;
	opacity: 0.9;
}
.fxb-caption .fxb-btn {
	display: inline-block;
	align-self: flex-start;
	margin-top: 8px;
	padding: 12px 28px;
	border: 1px solid currentColor;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: background var(--fxb-transition), color var(--fxb-transition);
}
/* 정렬이 가운데/오른쪽이면 버튼도 따라감 */
.fxb-caption[style*="center"] .fxb-btn { align-self: center; }
.fxb-caption[style*="right"] .fxb-btn { align-self: flex-end; }

/* 링크형 배너 hover 시 버튼 반전 */
a.fxb-slide:hover .fxb-btn,
a.fxb-single__item:hover .fxb-btn,
a.fxb-grid__item:hover .fxb-btn {
	background: currentColor;
}
a.fxb-slide:hover .fxb-btn,
a.fxb-single__item:hover .fxb-btn {
	color: #000;
}

/* 이미지 기본 */
.fxb img {
	max-width: 100%;
	display: block;
}

/* ===================
   2. 슬라이더
   =================== */
.fxb-slider {
	position: relative;
	width: 100%;
	height: var(--fxb-h);
	overflow: hidden;
	color: #fff;
}
.fxb-slider .fxb-slides {
	position: relative;
	width: 100%;
	height: 100%;
}
.fxb-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: inherit;
	background-image: var(--fxb-bg);
	background-size: cover;
	background-position: center;
	opacity: 0;
	/* visibility:hidden 은 transition 을 끊어 전환 시 깜빡임을 유발하므로 사용하지 않음.
	   opacity 만으로 크로스페이드하고, 비활성 슬라이드는 pointer-events 로 비활성화한다. */
	pointer-events: none;
	transition: opacity 0.9s ease;
}
.fxb-slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}
.fxb-slide__inner {
	position: relative;
	width: 100%;
	z-index: 2;
}
/* 가독성 확보용 오버레이(스크림) — 밝은 이미지에서도 흰색 캡션이 읽히도록 */
.fxb-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.38) );
	z-index: 1;
}

/* 화살표 */
.fxb-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 48px;
	height: 48px;
	border: none;
	background: rgba(0, 0, 0, 0.28);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}
.fxb-arrow:hover,
.fxb-arrow:focus-visible { background: rgba(0, 0, 0, 0.55); }
.fxb-prev { left: 16px; }
.fxb-next { right: 16px; }

/* 도트 */
.fxb-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 10px;
}
.fxb-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}
.fxb-dot.is-active {
	background: #fff;
	transform: scale(1.15);
}

/* 포커스 접근성 */
.fxb-arrow:focus-visible,
.fxb-dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ===================
   3. 그리드
   =================== */
.fxb-grid {
	display: grid;
	grid-template-columns: repeat(var(--fxb-cols), 1fr);
	gap: 16px;
	width: 100%;
}
.fxb-grid__item {
	position: relative;
	display: block;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}
.fxb-grid__item .fxb-pic {
	display: block;
	width: 100%;
}
.fxb-grid__item .fxb-pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.fxb-grid__item:hover .fxb-pic img {
	transform: scale(1.04);
}
.fxb-grid__item .fxb-caption {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	padding: 24px;
}
.fxb-grid__item .fxb-caption::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.15);
	z-index: -1;
}

/* ===================
   4. 단일(풀폭)
   =================== */
.fxb-single {
	width: 100%;
}
.fxb-single__item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--fxb-h);
	text-decoration: none;
	color: #fff;
	background-image: var(--fxb-bg);
	background-size: cover;
	background-position: center;
}
.fxb-single__item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.18);
	z-index: 1;
}
.fxb-single__inner {
	position: relative;
	z-index: 2;
	width: 100%;
}

/* ===================
   5. 반응형
   =================== */

/* 태블릿 이하: 3열 이상 그리드는 2열로 */
@media (max-width: 1024px) {
	.fxb-grid { grid-template-columns: repeat(min(var(--fxb-cols), 2), 1fr); }
}

/* 모바일: 그리드 1열, 슬라이더/단일 높이 축소, 모바일 배경 전환 */
@media (max-width: 768px) {
	.fxb-grid { grid-template-columns: 1fr; }

	.fxb-slider { height: min(var(--fxb-h), 70vh); }

	.fxb-slide { background-image: var(--fxb-bg-m); }
	.fxb-single__item { background-image: var(--fxb-bg-m); }

	.fxb-arrow { width: 40px; height: 40px; font-size: 22px; }
	.fxb-prev { left: 8px; }
	.fxb-next { right: 8px; }
}

/* 모션 최소화 선호 시 전환 제거 */
@media (prefers-reduced-motion: reduce) {
	.fxb-slide,
	.fxb-grid__item .fxb-pic img,
	.fxb-caption .fxb-btn {
		transition: none;
	}
}
