/* ==========================================================================
   Sweans Slider Addon — Frontend Styles
   ========================================================================== */

/* ── Box-sizing reset scoped to widget ── */
.sweans-slider,
.sweans-slider *,
.sweans-slider *::before,
.sweans-slider *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   DESKTOP — three-column row layout (default / largest breakpoint first)
   ========================================================================== */

/* ── Wrapper ── */
.sweans-slider {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	min-height: 480px;
	overflow: hidden;
	position: relative;
}

/* ── Left column: vertical tab list ── */
.sweans-slider-left {
	flex: 0 0 22%;
	max-width: 22%;
	display: flex;
	align-items: center;
	padding: 40px 30px 40px 20px;
	background-color: #0d3167;
	z-index: 2;
	overflow: hidden;
}

.sweans-tabs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.sweans-tab-item {
	display: block;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	text-align: right;
	padding: 5px 0;
	margin-bottom: 10px;
	transition: color 0.25s ease;
	user-select: none;
	outline: none;
	white-space: normal;
	word-break: break-word;
}

.sweans-tab-item:last-child {
	margin-bottom: 0;
}

.sweans-tab-item:hover {
	color: #ffffff;
}

.sweans-tab-item.sweans-active {
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
}

/* ── Center column: stacked images (opacity crossfade) ── */
.sweans-slider-center {
	flex: 0 0 46%;
	max-width: 46%;
	position: relative;
	overflow: hidden;
	background-color: #000000;
	/*
	 * On desktop, height comes from flex "align-items: stretch".
	 * The parent min-height drives the cross-axis height; this column
	 * inherits it and the absolutely-positioned images fill it.
	 */
}

.sweans-slide-image {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.45s ease;
	pointer-events: none;
}

.sweans-slide-image.sweans-active {
	opacity: 1;
	pointer-events: auto;
}

.sweans-slide-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Right column: description + arrow ── */
.sweans-slider-right {
	flex: 0 0 32%;
	max-width: 32%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px;
	background-color: #0a2a5e;
	position: relative;
}

/* Only the active content panel is shown; others are hidden */
.sweans-slide-content {
	display: none;
	flex-direction: column;
}

.sweans-slide-content.sweans-active {
	display: flex;
	animation: sweansFadeIn 0.35s ease forwards;
}

.sweans-description {
	color: #ffffff;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.8;
	margin: 0 0 24px 0;
}

/* ── Arrow button ── */
.sweans-arrow-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.25s ease;
	align-self: flex-start; /* don't stretch full width */
}

.sweans-arrow-btn:hover {
	opacity: 0.85;
}

.sweans-arrow-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: #1a56a0;
	flex-shrink: 0;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.sweans-arrow-btn:hover .sweans-arrow-icon-wrap {
	background-color: #2a66b0;
	transform: scale(1.05);
}

.sweans-arrow-icon-wrap i,
.sweans-arrow-icon-wrap svg {
	color: #ffffff;
	fill: #ffffff;
	font-size: 18px;
	width: 18px;
	height: 18px;
	display: block;
}

.sweans-arrow-label {
	color: #ffffff;
	font-size: 14px;
	font-weight: 400;
}

/* ── Fade-in animation ── */
@keyframes sweansFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   TABLET  ≤ 1024 px
   Stack columns vertically. Tab list becomes a horizontal scrollable bar.
   Images are kept as absolutely-positioned layers inside an aspect-ratio box.
   All !important rules exist solely to override Elementor inline styles.
   ========================================================================== */
@media (max-width: 1024px) {

	/* ── Wrapper: vertical stack ── */
	.sweans-slider {
		flex-direction: column !important;
		min-height: 0 !important;      /* override Elementor min-height inline */
		align-items: stretch;
	}

	/* ── Force all columns to full width ── */
	.sweans-slider-left,
	.sweans-slider-center,
	.sweans-slider-right {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	/* ─────────────────────────────────────────────
	   Left column: horizontal scrollable tab bar
	   ───────────────────────────────────────────── */
	.sweans-slider-left {
		display: block !important;       /* remove flex centering */
		padding: 0 !important;
		overflow: hidden;
	}

	.sweans-tabs-list {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;    /* single row — scroll, no wrap */
		align-items: stretch;
		gap: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;           /* Firefox */
		padding: 0;
		margin: 0;
		width: 100%;
	}

	/* Hide webkit scrollbar */
	.sweans-tabs-list::-webkit-scrollbar {
		display: none;
	}

	.sweans-tab-item {
		flex: 0 0 auto !important;      /* don't shrink below natural width */
		text-align: center !important;
		white-space: nowrap;
		margin-bottom: 0 !important;
		padding: 14px 20px !important;
		font-size: 13px !important;
		position: relative;
		border-bottom: 3px solid transparent;
		transition: color 0.25s ease, border-color 0.25s ease;
	}

	.sweans-tab-item:hover {
		border-bottom-color: rgba(255, 255, 255, 0.3);
	}

	.sweans-tab-item.sweans-active {
		font-size: 13px !important;     /* same size — bold is the indicator */
		font-weight: 700 !important;
		border-bottom-color: #ffffff;
	}

	/* ─────────────────────────────────────────────
	   Center column: aspect-ratio image container
	   Images stay absolutely positioned for crossfade.
	   ───────────────────────────────────────────── */
	.sweans-slider-center {
		position: relative !important;
		overflow: hidden;
		min-height: 0 !important;
		/* 16:9 for tablet — tall enough to feel substantial */
		aspect-ratio: 16 / 9;
		height: auto !important;
	}

	/* Images keep the same position:absolute crossfade on tablet */
	.sweans-slide-image {
		position: absolute !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: 100% !important;
		opacity: 0 !important;
		display: block !important;      /* always rendered; opacity hides/shows */
		transition: opacity 0.45s ease !important;
		pointer-events: none !important;
	}

	.sweans-slide-image.sweans-active {
		opacity: 1 !important;
		pointer-events: auto !important;
	}

	.sweans-slide-image img {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
	}

	/* ─────────────────────────────────────────────
	   Right column: description + arrow
	   ───────────────────────────────────────────── */
	.sweans-slider-right {
		padding: 28px 32px !important;
		justify-content: flex-start;
	}

	.sweans-slide-content.sweans-active {
		display: flex;
	}

	.sweans-description {
		font-size: 14px;
		line-height: 1.75;
		margin-bottom: 20px;
	}
}

/* ==========================================================================
   MOBILE  ≤ 767 px
   Compact spacing, tighter image ratio.
   ========================================================================== */
@media (max-width: 767px) {

	/* Tab bar: smaller padding, full-bleed */
	.sweans-slider-left {
		padding: 0 !important;
	}

	.sweans-tab-item {
		padding: 12px 14px !important;
		font-size: 12px !important;
	}

	.sweans-tab-item.sweans-active {
		font-size: 12px !important;
	}

	/* Image: square-ish ratio on mobile */
	.sweans-slider-center {
		aspect-ratio: 4 / 3 !important;
	}

	/* Description */
	.sweans-slider-right {
		padding: 24px 20px !important;
	}

	.sweans-description {
		font-size: 13px;
		line-height: 1.7;
		margin-bottom: 18px;
	}

	/* Arrow */
	.sweans-arrow-icon-wrap {
		width: 42px;
		height: 42px;
	}

	.sweans-arrow-icon-wrap i,
	.sweans-arrow-icon-wrap svg {
		font-size: 15px;
		width: 15px;
		height: 15px;
	}

	.sweans-arrow-label {
		font-size: 13px;
	}
}

/* ==========================================================================
   SMALL MOBILE  ≤ 480 px
   Very narrow devices (iPhone SE, Galaxy A series, etc.)
   ========================================================================== */
@media (max-width: 480px) {

	.sweans-tab-item {
		padding: 10px 12px !important;
		font-size: 11.5px !important;
	}

	.sweans-tab-item.sweans-active {
		font-size: 11.5px !important;
	}

	/* Slightly taller image on very narrow screens */
	.sweans-slider-center {
		aspect-ratio: 3 / 2 !important;
	}

	.sweans-slider-right {
		padding: 20px 16px !important;
	}

	.sweans-description {
		font-size: 13px;
		line-height: 1.65;
		margin-bottom: 16px;
	}

	.sweans-arrow-btn {
		gap: 10px;
	}

	.sweans-arrow-icon-wrap {
		width: 38px;
		height: 38px;
	}

	.sweans-arrow-icon-wrap i,
	.sweans-arrow-icon-wrap svg {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}
}
