/* =========================================================================
 * MARS Testimonials — frontend styles
 * Scoped under .mars-testimonials to avoid collisions with theme CSS.
 * ====================================================================== */

.mars-testimonials { margin: 2em 0; box-sizing: border-box; }
.mars-testimonials *, .mars-testimonials *::before, .mars-testimonials *::after { box-sizing: border-box; }
.mars-empty { font-style: italic; color: #888; }

/* --- Stars (shared) --- */
.mars-stars { display: inline-flex; gap: 2px; font-size: 1.1em; line-height: 1; margin-bottom: 12px; }
.mars-star.filled { color: #f5b50a; }
.mars-star.empty  { color: #d0d0d0; }

/* --- Card (used by grid) --- */
.mars-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	display: flex;
	flex-direction: column;
	min-height: 220px; /* keeps grid cards aligned */
}
.mars-quote {
	flex: 1;
	margin: 0 0 16px;
	font-size: 0.95em;
	line-height: 1.55;
	color: #333;
	border: 0;
	padding: 0;
	quotes: none;
}
.mars-cite {
	font-style: normal;
	font-weight: 600;
	color: #555;
	font-size: 0.9em;
}

/* =====================================================================
 * Style 1 — Grid
 * ================================================================== */
.mars-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
@media (max-width: 900px) { .mars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .mars-grid { grid-template-columns: 1fr; } }

/* =====================================================================
 * Style 2 — Featured (large centered quote)
 * ================================================================== */
.mars-featured { max-width: 720px; margin: 2em auto; }
.mars-featured-card {
	background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
	border-left: 4px solid #f5b50a;
	padding: 36px 40px;
	border-radius: 6px;
	text-align: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.mars-featured-card + .mars-featured-card { margin-top: 24px; }
.mars-featured-card .mars-stars { justify-content: center; font-size: 1.3em; }
.mars-featured-quote {
	font-size: 1.25em;
	line-height: 1.55;
	color: #222;
	margin: 16px 0 20px;
	border: 0;
	padding: 0;
	font-style: italic;
	quotes: none;
}
.mars-featured-cite { font-style: normal; font-weight: 600; color: #666; }
@media (max-width: 600px) {
	.mars-featured-card { padding: 24px 20px; }
	.mars-featured-quote { font-size: 1.05em; }
}

/* =====================================================================
 * Style 3 — Slider (auto-rotating, ported from MARS hard-coded version)
 * ================================================================== */
.mars-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Edge fade */
.mars-slider::before,
.mars-slider::after {
	content: '';
	position: absolute;
	top: 0; bottom: 0;
	width: 50px;
	pointer-events: none;
	z-index: 2;
}
.mars-slider::before { left: 0;  background: linear-gradient(to right, rgba(245,245,245,1), rgba(245,245,245,0)); }
.mars-slider::after  { right: 0; background: linear-gradient(to left,  rgba(245,245,245,1), rgba(245,245,245,0)); }

.mars-slider-track {
	display: flex;
	transition: transform 0.5s ease-in-out;
	will-change: transform;
}

.mars-slide {
	flex: 0 0 calc((100% / var(--mars-per-view, 3)) - 20px);
	box-sizing: border-box;
	padding: 28px 20px;
	margin: 0 10px;
	text-align: center;
	color: #ffffff;
	background-color: #2c3e50;
	/* Self-contained diamond pattern so the plugin works on any site.
	 * Override by targeting .mars-slide with your own background. */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 20 L20 0 L40 20 L20 40 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'/></svg>");
	background-repeat: repeat;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 180px;
}

.mars-slide .mars-stars { justify-content: center; margin: 0 0 10px; }
.mars-slide .mars-star.empty { color: rgba(255, 255, 255, 0.25); }

.mars-slide-text {
	font-size: 1.1em;
	line-height: 1.45;
	margin: 0 0 12px;
	color: #ffffff;
	font-weight: 500;
}
.mars-slide-name {
	margin: 6px 0 0;
	font-weight: 300;
	color: #eaeaea;
	font-size: 0.95em;
}

/* Nav arrows */
.mars-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	font-size: 2em;
	line-height: 1;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #333;
	padding: 0;
	transition: background 0.2s ease;
}
.mars-slider-arrow:hover { background: #ffffff; }
.mars-slider-arrow.prev { left: 8px; }
.mars-slider-arrow.next { right: 8px; }
.mars-slider-arrow:focus-visible { outline: 2px solid #f5b50a; outline-offset: 2px; }

/* Mobile: 1 per view */
@media (max-width: 768px) {
	.mars-slider { --mars-per-view: 1; }
	.mars-slide { flex-basis: calc(100% - 10px); margin: 0 5px; }
	.mars-slider::before, .mars-slider::after { width: 24px; }
}

/* Respect reduced-motion users — disable auto-advance animation */
@media (prefers-reduced-motion: reduce) {
	.mars-slider-track { transition: none; }
}
