/**
 * Learn From Best Widget Styles
 */

/* Widget Container */
.lfb-widget {
	width: 100%;
	padding: 48px 0;
}

/* Section Title */
.lfb-section-title {
	font-family: var(--iabt-font-family);
	font-size: var(--iabt-h2);
	font-weight: var(--iabt-font-bold);
	line-height: var(--iabt-line-height-heading);
	color: var(--iabt-text-heading);
	text-align: center;
	margin-bottom: 30px;
	text-transform: uppercase;
	letter-spacing: var(--iabt-letter-spacing-normal);
}

/* Tabs Navigation */
.lfb-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 30px;
	justify-content: center;
}

.lfb-tab-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	gap: 4px;
	background-color: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 200px;
	max-width: 200px;
	text-align: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lfb-tab-button:hover {
	transform: scale(0.95);
}

.lfb-tab-button.active {
	background-color: transparent;
	border: none;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lfb-tab-icon {
	width: 100%;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lfb-tab-icon img {
	width: auto;
	height: 100% !important;
	object-fit: contain;
}

.lfb-tab-title {
	font-size: var(--iabt-text-xs);
	font-weight: var(--iabt-font-semibold);
	text-transform: uppercase;
	letter-spacing: var(--iabt-letter-spacing-normal);
	line-height: var(--iabt-line-height-tight);
	color: var(--iabt-text-primary);
	flex: 0 0 auto;
	max-width: 100%;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/* Tabs Content */
.lfb-tabs-content {
	position: relative;
	min-height: 400px;
	transition: height 0.4s ease;
	overflow: hidden;
}

.lfb-tab-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.4s ease,
		visibility 0.4s ease;
}

.lfb-tab-content.active {
	opacity: 1;
	visibility: visible;
	animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lfb-tab-content-inner {
	display: flex;
	gap: 40px;
	/* min-height: 400px; */
	align-items: center;
	justify-content: center;
	max-width: 1200px;
	padding: 0 20px 36px 20px;
	margin: 0 auto;
}

.lfb-tab-content-inner.reverse {
	flex-direction: row-reverse;
}

.lfb-tab-image {
	flex: 0 1 auto;
	max-width: 40%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lfb-tab-image img {
	max-width: 100%;
	height: 100%;
	max-height: 400px;
	display: block;
	border-radius: 8px;
	object-fit: contain;
}

.lfb-tab-text {
	flex: 1;
	display: flex;
	align-items: center;
}

.lfb-tab-description {
	font-size: var(--iabt-text-sm);
	line-height: 1.6;
	color: var(--iabt-text-body);
	width: 100%;
}

.lfb-tab-description p:last-child {
	margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
	.lfb-tabs-nav {
		gap: 8px;
	}

	.lfb-tab-button {
		padding: 12px 16px;
	}

	.lfb-tab-icon {
		width: 100%;
		height: 35px;
	}

	.lfb-tab-title {
		font-size: var(--iabt-text-xs);
	}

	.lfb-tab-content-inner {
		gap: 30px;
	}
}

@media (max-width: 768px) {
	.lfb-tabs-nav {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
		margin-bottom: 25px;
		max-width: 640px;
		margin-right: auto;
		margin-left: auto;
	}

	.lfb-tab-button {
		width: 100%;
		max-width: none;
		min-height: 88px;
		padding: 10px 12px;
		gap: 5px;
	}

	.lfb-tab-icon {
		width: 100%;
		height: 30px;
	}

	.lfb-tab-title {
		font-size: var(--iabt-text-xs);
		white-space: normal;
	}

	.lfb-tab-content-inner {
		flex-direction: column !important;
		gap: 20px;
	}

	.lfb-tab-content-inner.reverse {
		flex-direction: column !important;
	}

	.lfb-tab-image {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.lfb-tab-text {
		text-align: center;
	}

	.lfb-tab-description {
		font-size: var(--iabt-text-sm);
	}

	.lfb-section-title {
		font-size: var(--iabt-h3);
	}
}

@media (max-width: 480px) {
	.lfb-tabs-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		padding: 0 16px;
	}

	.lfb-tab-button {
		min-width: 0;
		min-height: 78px;
		padding: 8px 10px;
	}

	.lfb-tab-icon {
		width: 100%;
		height: 25px;
	}

	.lfb-tab-title {
		font-size: var(--iabt-text-xs);
	}

	.lfb-tab-description {
		font-size: var(--iabt-text-sm);
	}

	.lfb-section-title {
		font-size: var(--iabt-h4);
	}
}

/* Elementor Editor Compatibility */
.elementor-widget-learn-from-best .elementor-widget-container {
	overflow: visible;
}
