/* =============================================================
 * Mars Society Slider — frontend styles
 * ============================================================= */

/* ----- Elementor Container compatibility -----
 * Containers render widgets as flex children. Flex children default
 * to min-width: auto / min-height: auto which lets them collapse and
 * makes percentage-based descendants render at 0×0. Force the widget
 * wrapper to fill its parent regardless of section/container parent.
 */
.elementor-widget-mars_society_slider {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 0;
	flex: 1 1 auto;
	align-self: stretch;
}

.elementor-widget-mars_society_slider > .elementor-widget-container {
	width: 100%;
	min-width: 0;
}

.mars-slider {
	display: block;
	position: relative;
	overflow: hidden;
	width: 100%;
	min-width: 0;
	min-height: 200px;
	background: #111;
}

.mars-slider * {
	box-sizing: border-box;
}

.mars-slider__viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.mars-slider__track {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

/* SLIDE EFFECT (default) */
.mars-slider--effect-slide .mars-slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	position: relative;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

/* FADE EFFECT */
.mars-slider--effect-fade .mars-slider__track {
	display: block;
	transition: none;
}
.mars-slider--effect-fade .mars-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	flex: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 600ms ease, visibility 600ms ease;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}
.mars-slider--effect-fade .mars-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

/* Overlay layer for any future global tint */
.mars-slide__overlay {
	position: absolute;
	inset: 0;
	background: transparent;
	pointer-events: none;
}

/* ---------- Content box ---------- */
.mars-slide__content {
	position: absolute;
	z-index: 2;
	width: 70%;
	max-width: 800px;
	color: #fff;
	background-color: rgba(0, 0, 0, 0.45);
	padding: 40px 48px;
	border-radius: 8px;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Position variants */
.mars-slide--pos-top-left      .mars-slide__content { top: 5%;    left: 5%;     transform: none; }
.mars-slide--pos-top-center    .mars-slide__content { top: 5%;    left: 50%;    transform: translateX(-50%); }
.mars-slide--pos-top-right     .mars-slide__content { top: 5%;    right: 5%;    transform: none; }
.mars-slide--pos-middle-left   .mars-slide__content { top: 50%;   left: 5%;     transform: translateY(-50%); }
.mars-slide--pos-middle-center .mars-slide__content { top: 50%;   left: 50%;    transform: translate(-50%, -50%); }
.mars-slide--pos-middle-right  .mars-slide__content { top: 50%;   right: 5%;    transform: translateY(-50%); }
.mars-slide--pos-bottom-left   .mars-slide__content { bottom: 5%; left: 5%;     transform: none; }
.mars-slide--pos-bottom-center .mars-slide__content { bottom: 5%; left: 50%;    transform: translateX(-50%); }
.mars-slide--pos-bottom-right  .mars-slide__content { bottom: 5%; right: 5%;    transform: none; }

/* ---------- Heading / Description / Button ---------- */
.mars-slide__heading {
	margin: 0 0 16px 0;
	font-size: clamp(1.75rem, 4vw, 3.25rem);
	line-height: 1.15;
	color: #fff;
}

.mars-slide__description {
	margin: 0 0 24px 0;
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	line-height: 1.55;
	color: #f1f1f1;
}

.mars-slide__description p { margin: 0 0 0.8em; }
.mars-slide__description p:last-child { margin-bottom: 0; }
.mars-slide__description ul,
.mars-slide__description ol { margin: 0 0 0.8em 1.5em; padding: 0; }
.mars-slide__description li { margin-bottom: 0.25em; }
.mars-slide__description a { color: inherit; text-decoration: underline; }
.mars-slide__description a:hover { opacity: 0.85; }
.mars-slide__description strong { font-weight: 700; }
.mars-slide__description em { font-style: italic; }

/* Button wrapper — alignment is primarily set via inline styles in the
   render output (highest specificity), which makes it immune to theme
   or Elementor overrides. These classes are kept as documentation and
   as a fallback if inline styles are stripped by a sanitiser. */
.mars-slide__button-wrap {
	display: block;
	width: 100%;
	margin: 0;
	text-align: center;
	clear: both;
}

.mars-slide__button-wrap.mars-slide__button-wrap--left   { text-align: left   !important; }
.mars-slide__button-wrap.mars-slide__button-wrap--center { text-align: center !important; }
.mars-slide__button-wrap.mars-slide__button-wrap--right  { text-align: right  !important; }
.mars-slide__button-wrap.mars-slide__button-wrap--full   { text-align: center !important; }

.mars-slide__button-wrap--full .mars-slide__button {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.mars-slide__button {
	display: inline-block;
	padding: 14px 32px;
	background-color: #c1440e;
	color: #fff;
	text-decoration: none;
	text-align: center;
	border: 0;
	border-radius: 4px;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}
.mars-slide__button:hover,
.mars-slide__button:focus {
	background-color: #8a2f0a;
	color: #fff;
	transform: translateY(-1px);
}

/* ---------- Arrows ---------- */
.mars-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	padding: 0;
}
.mars-slider__arrow:hover,
.mars-slider__arrow:focus {
	background-color: rgba(0, 0, 0, 0.6);
	outline: none;
}
.mars-slider__arrow--prev { left: 16px; }
.mars-slider__arrow--next { right: 16px; }

/* ---------- Dots ---------- */
.mars-slider__dots {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 10;
}
.mars-slider__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 0;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.mars-slider__dot:hover { transform: scale(1.15); }
.mars-slider__dot.is-active { background-color: #fff; }
.mars-slider__dot:focus { outline: 2px solid rgba(255,255,255,0.8); outline-offset: 2px; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767px) {
	.mars-slide__content {
		width: 90%;
		padding: 24px;
	}
	.mars-slider__arrow {
		width: 36px;
		height: 36px;
	}
	.mars-slider__arrow--prev { left: 8px; }
	.mars-slider__arrow--next { right: 8px; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.mars-slider__track,
	.mars-slider--effect-fade .mars-slide {
		transition: none !important;
	}
}
