/* LabMaster Content Widgets for Elementor — front-end styles (Hero Slider, Testimonials, Partners, Blog, Products) */

/* =========================================================
 * SHARED CAROUSEL ENGINE (Testimonials + Partners)
 * ========================================================= */
.lmhe-carousel {
	position: relative;
	padding: 0 50px;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
}

.lmhe-carousel-viewport {
	overflow: hidden;
	width: 100%;
}

.lmhe-carousel-track {
	display: flex;
	will-change: transform;
}

.lmhe-carousel-slide {
	box-sizing: border-box;
	flex-shrink: 0;
	width: 100%;
}

/* Guaranteed layout even before/without the carousel JS running:
   size each slide purely from CSS based on the widget's configured
   items-per-view, keyed off the data attribute set in PHP. JS still
   controls sliding/autoplay, but never needs to be the only thing
   giving slides a width. */
.lmhe-carousel[data-items-desktop="1"] .lmhe-carousel-slide { flex: 0 0 100%; max-width: 100%; }
.lmhe-carousel[data-items-desktop="2"] .lmhe-carousel-slide { flex: 0 0 50%; max-width: 50%; }
.lmhe-carousel[data-items-desktop="3"] .lmhe-carousel-slide { flex: 0 0 33.3333%; max-width: 33.3333%; }
.lmhe-carousel[data-items-desktop="4"] .lmhe-carousel-slide { flex: 0 0 25%; max-width: 25%; }
.lmhe-carousel[data-items-desktop="5"] .lmhe-carousel-slide { flex: 0 0 20%; max-width: 20%; }
.lmhe-carousel[data-items-desktop="6"] .lmhe-carousel-slide { flex: 0 0 16.6666%; max-width: 16.6666%; }
.lmhe-carousel[data-items-desktop="7"] .lmhe-carousel-slide { flex: 0 0 14.2857%; max-width: 14.2857%; }
.lmhe-carousel[data-items-desktop="8"] .lmhe-carousel-slide { flex: 0 0 12.5%; max-width: 12.5%; }

@media (max-width: 1024px) {
	.lmhe-carousel[data-items-tablet="1"] .lmhe-carousel-slide { flex: 0 0 100%; max-width: 100%; }
	.lmhe-carousel[data-items-tablet="2"] .lmhe-carousel-slide { flex: 0 0 50%; max-width: 50%; }
	.lmhe-carousel[data-items-tablet="3"] .lmhe-carousel-slide { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.lmhe-carousel[data-items-tablet="4"] .lmhe-carousel-slide { flex: 0 0 25%; max-width: 25%; }
	.lmhe-carousel[data-items-tablet="5"] .lmhe-carousel-slide { flex: 0 0 20%; max-width: 20%; }
	.lmhe-carousel[data-items-tablet="6"] .lmhe-carousel-slide { flex: 0 0 16.6666%; max-width: 16.6666%; }
}

@media (max-width: 767px) {
	.lmhe-carousel[data-items-mobile="1"] .lmhe-carousel-slide { flex: 0 0 100%; max-width: 100%; }
	.lmhe-carousel[data-items-mobile="2"] .lmhe-carousel-slide { flex: 0 0 50%; max-width: 50%; }
	.lmhe-carousel[data-items-mobile="3"] .lmhe-carousel-slide { flex: 0 0 33.3333%; max-width: 33.3333%; }
}

.lmhe-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid #1976c4;
	background: #ffffff;
	color: #1976c4;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	z-index: 2;
}

.lmhe-carousel-arrow:hover {
	background: #1976c4;
	color: #ffffff;
}

.lmhe-carousel-arrow.prev {
	left: 0;
}

.lmhe-carousel-arrow.next {
	right: 0;
}

.lmhe-carousel-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.lmhe-carousel-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #d5d5d5;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.lmhe-carousel-dot.active {
	background: #1976c4;
	transform: scale(1.25);
}

/* =========================================================
 * HERO SLIDER WIDGET
 * ========================================================= */
.lmhe-hero-slider {
	background-color: #f5f5f5;
}

.lmhe-hero-slider .lmhe-carousel-slide {
	width: 100%;
}

.lmhe-hero-slide {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 50px;
	padding: 50px 60px;
	background-color: #f5f5f5;
	width: 100%;
	box-sizing: border-box;
}

.lmhe-hero-slide.lmhe-content-right {
	flex-direction: row-reverse;
}

.lmhe-hero-content {
	flex: 1 1 50%;
	max-width: 90%;
}

.lmhe-hero-heading {
	margin: 0 0 18px;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.25;
	color: #16181d;
}

.lmhe-hero-text {
	margin: 0 0 26px;
	font-size: 16px;
	line-height: 1.7;
	color: #4a4a4a;
}

.lmhe-hero-btn {
	display: inline-block;
	background: #1976c4;
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 14px 34px;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.lmhe-hero-image {
	flex: 1 1 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lmhe-hero-image img {
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

@media (max-width: 991px) {
	.lmhe-hero-slide {
		padding: 40px 30px;
		gap: 30px;
	}

	.lmhe-hero-heading {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	.lmhe-hero-slide,
	.lmhe-hero-slide.lmhe-content-right {
		flex-direction: column-reverse;
		text-align: center;
		padding: 30px 24px;
		gap: 24px;
	}

	.lmhe-hero-content {
		max-width: 100%;
	}

	.lmhe-hero-heading {
		font-size: 24px;
	}

	.lmhe-hero-text {
		font-size: 14px;
	}

	.lmhe-hero-image img {
		max-height: 260px;
	}
}

@media (max-width: 480px) {
	.lmhe-hero-slide,
	.lmhe-hero-slide.lmhe-content-right {
		padding: 24px 18px;
		gap: 18px;
	}

	.lmhe-hero-heading {
		font-size: 20px;
	}

	.lmhe-hero-btn {
		padding: 12px 24px;
		font-size: 13px;
	}

	.lmhe-hero-image img {
		max-height: 200px;
	}

	.lmhe-carousel {
		padding: 0 30px;
	}

	.lmhe-carousel-arrow {
		width: 30px;
		height: 30px;
	}
}

/* =========================================================
 * SHARED SCROLL-REVEAL ANIMATION
 * ========================================================= */
.lmhe-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.lmhe-reveal.lmhe-revealed {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.lmhe-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* =========================================================
 * BLOG / NEWS & EVENTS WIDGET
 * ========================================================= */
.lmhe-blog {
	width: 100%;
	box-sizing: border-box;
}

.lmhe-blog-empty {
	text-align: center;
	color: #8a8a8a;
	font-size: 15px;
	padding: 30px;
}

.lmhe-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	width: 100%;
}

.lmhe-blog-card {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
	display: flex;
	flex-direction: column;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.lmhe-blog-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.13);
}

.lmhe-blog-image-link {
	display: block;
}

.lmhe-blog-image {
	position: relative;
	height: 210px;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.lmhe-blog-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.18) 100%);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.lmhe-blog-card:hover .lmhe-blog-image::after {
	opacity: 1;
}

.lmhe-blog-image {
	transition: transform 0.5s ease;
}

.lmhe-blog-card:hover .lmhe-blog-image {
	transform: scale(1.06);
}

.lmhe-blog-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: #1976c4;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 20px;
	z-index: 1;
}

.lmhe-blog-body {
	padding: 22px 22px 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.lmhe-blog-date {
	color: #8a8a8a;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.lmhe-blog-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	color: #16181d;
}

.lmhe-blog-title a {
	color: inherit;
	transition: color 0.2s ease;
}

.lmhe-blog-card:hover .lmhe-blog-title a {
	color: #1976c4;
}

.lmhe-blog-excerpt {
	color: #4a4a4a;
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 18px;
	flex-grow: 1;
}

.lmhe-blog-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #1976c4;
	font-size: 14px;
	font-weight: 700;
	width: fit-content;
}

.lmhe-blog-readmore svg {
	transition: transform 0.25s ease;
}

.lmhe-blog-card:hover .lmhe-blog-readmore svg {
	transform: translateX(5px);
}

@media (max-width: 1024px) {
	.lmhe-blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.lmhe-blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.lmhe-blog-image {
		height: 180px;
	}

	.lmhe-blog-body {
		padding: 18px 18px 20px;
	}

	.lmhe-blog-title {
		font-size: 17px;
	}

	.lmhe-blog-excerpt {
		font-size: 13px;
	}

	.lmhe-blog-badge {
		font-size: 10px;
		padding: 5px 10px;
	}
}

