/**
 * VIVA Premium Slider styles.
 * Includes the minimal Swiper structural CSS so the widget doesn't depend on
 * Elementor's Swiper stylesheet being present.
 */

/* --- Swiper base (minimal) --- */
.viva-slider .swiper { position: relative; overflow: hidden; width: 100%; height: 100%; }
.viva-slider .swiper-wrapper {
	position: relative;
	display: flex;
	width: 100%;
	height: 100%;
	box-sizing: content-box;
	transition-property: transform;
}
.viva-slider .swiper-slide {
	position: relative;
	flex-shrink: 0;
	width: 100%;
	height: 100%;
}
.viva-slider .swiper-fade .swiper-slide { transition-property: opacity; }
.viva-slider .swiper-fade .swiper-slide-active { pointer-events: auto; }

/* --- Slider shell --- */
.viva-slider {
	--viva-slider-h: 78vh;
	--viva-gold: #f5b21c;
	position: relative;
	height: var(--viva-slider-h);
	min-height: 360px;
	overflow: hidden;
	background: #071f3b;
	font-family: 'Poppins', sans-serif;
}
/* Poppins throughout the slider (Elementor typography controls still override). */
.viva-slider .viva-eyebrow,
.viva-slider .viva-title,
.viva-slider .viva-desc,
.viva-slider .viva-btn {
	font-family: 'Poppins', sans-serif;
}

/* --- Slide --- */
.viva-slide { overflow: hidden; }
.viva-slide-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	will-change: transform;
	transform: scale(1.04);
}
.viva-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(7, 31, 59, 0.86) 0%, rgba(7, 31, 59, 0.55) 55%, rgba(7, 31, 59, 0.25) 100%);
}

/* --- Content --- */
.viva-slide-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	height: 100%;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 64px);
	box-sizing: border-box;
}
.viva-slide-content { max-width: 620px; color: #fff; }

.viva-eyebrow {
	display: inline-block;
	margin-bottom: 18px;
	padding: 7px 16px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--viva-gold);
	background: rgba(245, 178, 28, 0.14);
	border: 1px solid rgba(245, 178, 28, 0.35);
	border-radius: 999px;
}
.viva-title {
	margin: 0 0 18px;
	color: #fff;
	font-size: clamp(2rem, 4.4vw, 3.6rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.5px;
}
.viva-desc {
	margin: 0 0 32px;
	color: rgba(255, 255, 255, 0.85);
	font-size: clamp(1rem, 1.4vw, 1.2rem);
	line-height: 1.6;
	max-width: 52ch;
}

/* --- Buttons --- */
.viva-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.viva-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 30px;
	font-weight: 700;
	font-size: 1rem;
	border-radius: 999px;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.viva-btn-primary {
	background: var(--viva-gold);
	color: #071f3b;
	box-shadow: 0 10px 24px rgba(245, 178, 28, 0.34);
}
.viva-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(245, 178, 28, 0.46); }
.viva-btn-ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.55);
}
.viva-btn-ghost:hover { background: #fff; color: #071f3b; transform: translateY(-3px); }

/* --- Ken Burns (active slide only) --- */
.viva-slider.viva-kenburns .swiper-slide-active .viva-slide-bg {
	animation: viva-kenburns 8s ease-out both;
}
@keyframes viva-kenburns {
	from { transform: scale(1.04); }
	to   { transform: scale(1.16); }
}

/* --- Content entrance animation (re-runs each active slide) --- */
.viva-slider .swiper-slide-active .viva-eyebrow,
.viva-slider .swiper-slide-active .viva-title,
.viva-slider .swiper-slide-active .viva-desc,
.viva-slider .swiper-slide-active .viva-actions {
	animation: viva-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.viva-slider .swiper-slide-active .viva-title   { animation-delay: 0.12s; }
.viva-slider .swiper-slide-active .viva-desc    { animation-delay: 0.24s; }
.viva-slider .swiper-slide-active .viva-actions { animation-delay: 0.36s; }
@keyframes viva-rise {
	from { opacity: 0; transform: translateY(26px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* --- Arrows --- */
.viva-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgba(7, 31, 59, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.viva-arrow:hover { background: var(--viva-gold); border-color: var(--viva-gold); color: #071f3b; }
.viva-arrow svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none !important;
	stroke: #ffffff !important; /* hardcoded, not currentColor — theme was overriding the colour to dark */
	stroke-width: 2.4;
}
.viva-arrow svg path {
	fill: none !important;
	stroke: #ffffff !important;
}
/* On hover the button turns gold, so make the chevron navy for contrast. */
.viva-arrow:hover svg,
.viva-arrow:hover svg path {
	stroke: #071f3b !important;
}
.viva-prev { left: 26px; }
.viva-next { right: 26px; }
.viva-arrow.swiper-button-disabled { opacity: 0.35; cursor: default; }
/* Elementor's bundled Swiper CSS hides nav with .swiper-button-lock/-hidden;
   keep our custom arrows visible regardless. */
.viva-slider .viva-arrow.swiper-button-lock,
.viva-slider .viva-arrow.swiper-button-hidden {
	display: flex !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/* --- Pagination --- */
.viva-slider-pagination {
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: 26px;
	display: flex;
	justify-content: center;
	gap: 10px;
}
.viva-slider-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.45);
	opacity: 1;
	cursor: pointer;
	transition: width 0.3s ease, background 0.3s ease;
}
.viva-slider-pagination .swiper-pagination-bullet-active {
	width: 34px;
	background: var(--viva-gold);
}

/* --- Responsive --- */
@media (max-width: 767px) {
	.viva-slide-overlay { background: linear-gradient(180deg, rgba(7, 31, 59, 0.7) 0%, rgba(7, 31, 59, 0.85) 100%); }
	.viva-slide-inner { justify-content: center; text-align: center; }
	.viva-slide-content { margin: 0 auto; }
	.viva-actions { justify-content: center; }
	.viva-arrow { display: none; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.viva-slider.viva-kenburns .swiper-slide-active .viva-slide-bg,
	.viva-slider .swiper-slide-active .viva-eyebrow,
	.viva-slider .swiper-slide-active .viva-title,
	.viva-slider .swiper-slide-active .viva-desc,
	.viva-slider .swiper-slide-active .viva-actions {
		animation: none;
	}
}
