/**
 * KS LP Testimonial — Frontend & Editor Styles
 */

/* ======================================================
   Block wrapper
   ====================================================== */
.kslp-testimonial-block {
	position: relative;
	overflow: hidden;
	padding: 80px 20px;
	box-sizing: border-box;
}

/* ======================================================
   Overlay
   ====================================================== */
.kslp-testimonial-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

/* ======================================================
   Inner container
   ====================================================== */
.kslp-testimonial-inner {
	position: relative;
	z-index: 1;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	box-sizing: border-box;
}

/* ======================================================
   Header
   ====================================================== */
.kslp-testimonial-header {
	margin-bottom: 48px;
}

.kslp-testimonial-sub {
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 12px;
	margin-top: 0;
}

.kslp-testimonial-title {
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 16px;
	margin-top: 0;
}

.kslp-testimonial-desc {
	line-height: 1.7;
	margin-top: 0;
	margin-bottom: 0;
}

/* Alignment variants */
.kslp-testimonial-block--center .kslp-testimonial-header {
	text-align: center;
}
.kslp-testimonial-block--left .kslp-testimonial-header {
	text-align: left;
}
.kslp-testimonial-block--right .kslp-testimonial-header {
	text-align: right;
}

/* ======================================================
   Grid
   ====================================================== */
.kslp-testimonial-grid {
	display: grid;
	/* grid-template-columns and gap are set via inline style */
	align-items: stretch;
}

/* ======================================================
   Card
   ====================================================== */
.kslp-testimonial-card {
	display: flex;
	flex-direction: column;
	/* padding, border-radius, border, background-color via inline style */
	box-sizing: border-box;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.kslp-testimonial-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	transform: translateY(-2px);
}

/* ======================================================
   Card Top Row (Quote & Stars Sejajar)
   ====================================================== */
.kslp-testimonial-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
	width: 100%;
}

/* ======================================================
   Quote icon
   ====================================================== */
.kslp-testimonial-quote {
	font-size: 40px;
	line-height: 1;
	margin-bottom: 0;
	opacity: 0.85;
	font-family: Georgia, serif;
	display: inline-flex;
	align-items: center;
}

/* ======================================================
   Stars
   ====================================================== */
.kslp-testimonial-stars {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 0;
	margin-left: auto;
}

.kslp-testimonial-star {
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

/* ======================================================
   Testimonial text
   ====================================================== */
.kslp-testimonial-text {
	flex: 1;
	line-height: 1.7;
	margin-bottom: 24px;
	margin-top: 0;
}

/* ======================================================
   Author row
   ====================================================== */
.kslp-testimonial-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
}

.kslp-testimonial-author-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

/* ======================================================
   Avatar image
   ====================================================== */
.kslp-testimonial-avatar {
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

/* Shape modifiers (also applied as a class from PHP) */
.kslp-testimonial-avatar--circle {
	border-radius: 50%;
}

.kslp-testimonial-avatar--rounded {
	border-radius: 12px;
}

.kslp-testimonial-avatar--square {
	border-radius: 0;
}

/* ======================================================
   Avatar placeholder (initials)
   ====================================================== */
.kslp-testimonial-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: linear-gradient(135deg, #1a4d31, #2d7a4f);
	color: #ffffff;
	font-weight: 700;
	box-sizing: border-box;
}

/* ======================================================
   Author text
   ====================================================== */
.kslp-testimonial-name {
	font-weight: 700;
	line-height: 1.3;
}

.kslp-testimonial-role {
	font-size: 0.875em;
	line-height: 1.3;
	opacity: 0.9;
}

/* ======================================================
   Full-width variant
   ====================================================== */
.kslp-testimonial-block--full {
	width: 100vw !important;
	max-width: 100vw !important;
}

/* ======================================================
   Responsive — mobile
   ====================================================== */
@media (max-width: 767px) {
	.kslp-testimonial-block {
		padding: 60px 20px;
	}

	.kslp-testimonial-header {
		margin-bottom: 32px;
	}

	.kslp-testimonial-title {
		font-size: clamp(24px, 7vw, 42px) !important;
	}

	.kslp-testimonial-grid {
		/* mobileCols override is injected via inline <style> in render.php */
		grid-template-columns: 1fr;
	}

	.kslp-testimonial-card:hover {
		transform: none;
		box-shadow: none;
	}

	.kslp-testimonial-quote {
		font-size: 36px;
	}
}

@media (max-width: 480px) {
	.kslp-testimonial-block {
		padding: 40px 16px;
	}
}

/* ======================================================
   Mobile Carousel Slider
   ====================================================== */
.kslp-testimonial-carousel-nav {
	display: none;
}

@media (max-width: 767px) {
	.kslp-testimonial-block--carousel .kslp-testimonial-grid {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		scroll-snap-type: x mandatory !important;
		-webkit-overflow-scrolling: touch !important;
		gap: 16px !important;
		scrollbar-width: none !important;
		-ms-overflow-style: none !important;
		padding-top: 4px !important;
		padding-bottom: 8px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		width: 100% !important;
		box-sizing: border-box !important;
		scroll-behavior: smooth;
	}

	.kslp-testimonial-block--carousel .kslp-testimonial-grid::-webkit-scrollbar {
		display: none !important;
	}

	.kslp-testimonial-block--carousel .kslp-testimonial-card {
		flex: 0 0 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		width: 100% !important;
		scroll-snap-align: start !important;
		scroll-snap-stop: always !important;
		box-sizing: border-box !important;
	}

	.kslp-testimonial-block--carousel .kslp-testimonial-carousel-nav {
		display: flex !important;
		align-items: center;
		justify-content: center;
		gap: 16px;
		margin-top: 24px;
	}

	.kslp-testimonial-carousel-btn {
		width: 44px;
		height: 44px;
		border-radius: 50%;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: all 0.25s ease;
		outline: none;
		padding: 0;
		border: none;
		user-select: none;
		-webkit-tap-highlight-color: transparent;
	}

	.kslp-testimonial-carousel-btn--prev {
		border: 1.5px solid #dcd3c4 !important;
		background-color: #fbf9f5 !important;
		color: #0c4430 !important;
	}

	.kslp-testimonial-carousel-btn--next {
		background-color: #0c4430 !important;
		color: #ffffff !important;
		border: none !important;
		box-shadow: 0 4px 12px rgba(12, 68, 48, 0.22);
	}

	.kslp-testimonial-carousel-btn:hover,
	.kslp-testimonial-carousel-btn:focus-visible {
		transform: scale(1.06);
	}

	.kslp-testimonial-carousel-btn:active {
		transform: scale(0.94);
	}

	.kslp-testimonial-carousel-dots {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.kslp-testimonial-carousel-dot {
		height: 6px;
		width: 6px;
		border-radius: 50%;
		background-color: #dcd3c4;
		border: none;
		padding: 0;
		cursor: pointer;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		outline: none;
	}

	.kslp-testimonial-carousel-dot.is-active {
		width: 24px;
		border-radius: 999px;
		background-color: #0c4430;
	}
}

@media (max-width: 480px) {
	.kslp-testimonial-block--carousel .kslp-testimonial-grid {
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.kslp-testimonial-block--carousel .kslp-testimonial-card {
		flex: 0 0 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}
}

/* ======================================================
   Editor-only: repeater panel styling
   ====================================================== */
.editor-styles-wrapper .kslp-icon-picker {
	padding: 8px;
	min-width: 280px;
}

.editor-styles-wrapper .kslp-icon-picker__label {
	font-size: 11px;
	font-weight: 600;
	color: #757575;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.editor-styles-wrapper .kslp-icon-picker-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 8px;
}
