/* ==========================================================================
   BS Gallery Carousel - Core Styles
   Author: Bala Vignesh | Brand Sharpner
   ========================================================================== */

.bsgc-wrapper {
	--bsgc-gap: 14px;
	--bsgc-card-width: 240px;
	--bsgc-expanded-width: 560px;
	--bsgc-transition-speed: 550ms;
	--bsgc-ease: cubic-bezier(0.22, 1, 0.36, 1);

	position: relative;
	width: 100%;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
}

.bsgc-wrapper *,
.bsgc-wrapper *::before,
.bsgc-wrapper *::after {
	box-sizing: border-box;
}

/* Viewport & Track */
.bsgc-viewport {
	width: 100%;
	overflow: hidden;
	position: relative;
	cursor: grab;
	touch-action: pan-y;
}

.bsgc-viewport.is-dragging {
	cursor: grabbing;
}

.bsgc-track {
	display: flex;
	align-items: stretch;
	gap: var(--bsgc-gap);
	will-change: transform;
	transition: transform var(--bsgc-transition-speed) var(--bsgc-ease);
}

.bsgc-track.is-no-transition {
	transition: none !important;
}

/* Individual Card */
.bsgc-card {
	position: relative;
	flex: 0 0 var(--bsgc-card-width);
	width: var(--bsgc-card-width);
	height: 460px;
	border-radius: 16px;
	overflow: hidden;
	background-color: #EAE7E0;
	transition:
		flex-basis var(--bsgc-transition-speed) var(--bsgc-ease),
		width var(--bsgc-transition-speed) var(--bsgc-ease);
	transform: translateZ(0);
}

.bsgc-card.is-expanded {
	flex: 0 0 var(--bsgc-expanded-width);
	width: var(--bsgc-expanded-width);
}

/* Shared Media Element */
.bsgc-media-el {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* ==========================================================================
   NORMAL STATE LAYER
   ========================================================================== */
.bsgc-normal-layer {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 1;
	visibility: visible;
	transition:
		opacity calc(var(--bsgc-transition-speed) * 0.65) ease,
		visibility calc(var(--bsgc-transition-speed) * 0.65) ease;
}

.bsgc-card.is-expanded .bsgc-normal-layer {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.bsgc-normal-media,
.bsgc-normal-overlay-bg {
	position: absolute;
	inset: 0;
}

.bsgc-normal-overlay-content {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	padding: 24px 24px 22px 24px;
}

.bsgc-normal-title {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #181818;
}

/* ==========================================================================
   EXPANDED STATE LAYER
   ========================================================================== */
.bsgc-expanded-layer {
	position: absolute;
	inset: 0;
	z-index: 3;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity calc(var(--bsgc-transition-speed) * 0.85) ease,
		visibility calc(var(--bsgc-transition-speed) * 0.85) ease;
}

.bsgc-card.is-expanded .bsgc-expanded-layer {
	opacity: 1;
	visibility: visible;
}

.bsgc-expanded-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.bsgc-expanded-media-inner {
	width: 100%;
	height: 100%;
	filter: blur(14px);
	transform: scale(1.08);
	transition: transform var(--bsgc-transition-speed) var(--bsgc-ease);
}

.bsgc-expanded-overlay-bg {
	position: absolute;
	inset: 0;
	background-color: rgba(38, 38, 36, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

/* Expanded Body Content */
.bsgc-expanded-body {
	position: relative;
	z-index: 3;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 28px 30px 24px 30px;
}

/* Top-Right Action Badge (OPEN ↗) */
.bsgc-expanded-top-bar {
	display: flex;
	justify-content: flex-end;
	width: 100%;
	margin-bottom: auto;
}

.bsgc-action-badge {
	position: relative;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #FFFFFF;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.bsgc-action-badge:hover {
	opacity: 1;
	transform: translate(1px, -1px);
}

/* Kicker ("THE QUESTION") */
.bsgc-expanded-kicker {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #C8D86D;
	margin-bottom: 14px;
}

/* Short Description */
.bsgc-expanded-description {
	font-size: 28px;
	font-weight: 400;
	line-height: 1.24;
	letter-spacing: -0.02em;
	color: #F5F5F3;
	max-width: 88%;
	margin-bottom: auto;
}

/* Bottom Row: Title Left + 3 Tag Chips Right */
.bsgc-expanded-footer-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin-top: 20px;
}

.bsgc-expanded-title {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #FFFFFF;
	flex-shrink: 0;
}

.bsgc-expanded-title a {
	color: inherit;
	text-decoration: none;
	position: relative;
	z-index: 5;
}

/* 3 Tag Chips */
.bsgc-tags-list {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.bsgc-tag-chip {
	display: inline-block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.3;
}

.bsgc-tag-sep {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 10px;
	color: rgba(255, 255, 255, 0.45);
}

/* Full Card Clickable Link */
.bsgc-card-cover-link {
	position: absolute;
	inset: 0;
	z-index: 4;
	text-indent: -9999px;
	overflow: hidden;
}

/* ==========================================================================
   NAVIGATION ARROWS & PAGINATION DOTS
   ========================================================================== */
.bsgc-nav-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
}

.bsgc-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background-color: rgba(24, 24, 24, 0.75);
	color: #FFFFFF;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
}

.bsgc-nav-btn:hover {
	background-color: #181818;
	transform: scale(1.05);
}

.bsgc-nav-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	transform: none;
}

.bsgc-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.bsgc-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease, border-radius 0.25s ease;
}

.bsgc-dot.is-active {
	width: 22px;
	border-radius: 99px;
	background-color: #FFFFFF;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 1024px) {
	.bsgc-expanded-description {
		font-size: 22px;
		max-width: 95%;
	}
}

@media (max-width: 767px) {
	.bsgc-expanded-body {
		padding: 20px 20px 18px 20px;
	}

	.bsgc-expanded-description {
		font-size: 19px;
		max-width: 100%;
	}

	.bsgc-expanded-footer-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.bsgc-tags-list {
		justify-content: flex-start;
	}
}
