/* Hero LP — Swiper + estilos do protótipo V5 */

/* Pré-init: evita CLS antes do Swiper inicializar */
.cortex-pb-hero-lp:not(.swiper-initialized) {
	overflow: hidden;
}

.cortex-pb-hero-lp:not(.swiper-initialized) .swiper-wrapper {
	display: flex;
	flex-direction: row;
}

.cortex-pb-hero-lp:not(.swiper-initialized) .swiper-slide {
	flex: 0 0 100%;
	width: 100%;
}

.cortex-pb-hero-lp .hero-slide {
	position: relative;
	height: auto;
}

@media (min-width: 640px) {
	.cortex-pb-hero-lp .hero-slide {
		min-height: 88vh;
	}
}

.cortex-pb-hero-lp .hero-slide-bg {
	position: absolute;
	inset: 0;
	background-color: #e7e9e7;
	overflow: hidden;
}

.cortex-pb-hero-lp .hero-slide-bg__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: 88% center;
}

.cortex-pb-hero-lp .hero-slide-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 78% 55%, rgba(245, 154, 61, 0.14), transparent 42%),
		linear-gradient(90deg, #e7e9e7 0%, #e7e9e7 38%, transparent 68%);
}

.cortex-pb-hero-lp .hero-slide-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		rgba(29, 68, 34, 0.94) 0%,
		rgba(29, 68, 34, 0.78) 32%,
		rgba(58, 61, 59, 0.35) 58%,
		rgba(231, 233, 231, 0.08) 100%
	);
}

/* Mobile: conteúdo em cima (fundo verde) e imagem embaixo em faixa de altura fixa */
@media (max-width: 639px) {
	.cortex-pb-hero-lp {
		--hero-lp-green: #2a4e2e;
		--hero-lp-media-h: min(52vw, 300px);
	}

	.cortex-pb-hero-lp .hero-slide {
		display: flex;
		flex-direction: column;
		background-color: var(--hero-lp-green);
	}

	/* Faixa de transição verde → cinza: começa na altura dos CTAs e termina dentro da imagem */
	.cortex-pb-hero-lp .hero-slide::before {
		content: "";
		position: absolute;
		inset: auto 0 0;
		height: calc(var(--hero-lp-media-h) + 8rem);
		pointer-events: none;
		background: linear-gradient(
			180deg,
			rgba(231, 233, 231, 0) 0%,
			rgba(231, 233, 231, 0.06) 12%,
			rgba(231, 233, 231, 0.16) 24%,
			rgba(231, 233, 231, 0.32) 36%,
			rgba(231, 233, 231, 0.54) 48%,
			rgba(231, 233, 231, 0.76) 60%,
			rgba(231, 233, 231, 0.92) 72%,
			#e7e9e7 84%
		);
	}

	.cortex-pb-hero-lp .hero-slide-bg {
		position: relative;
		inset: auto;
		order: 2;
		flex-shrink: 0;
		height: var(--hero-lp-media-h);
		background-color: transparent;
	}

	.cortex-pb-hero-lp .hero-slide-bg__img {
		object-fit: cover;
		object-position: center;
	}

	.cortex-pb-hero-lp .hero-slide--conjunto .hero-slide-bg__img {
		transform: scale(1.2);
	}

	.cortex-pb-hero-lp .hero-slide-bg::before {
		background: radial-gradient(ellipse at 50% 60%, rgba(245, 154, 61, 0.14), transparent 60%);
	}

	.cortex-pb-hero-lp .hero-slide-bg::after {
		display: none;
	}

	.cortex-pb-hero-lp__controls {
		bottom: calc(var(--hero-lp-media-h) + 1.25rem);
	}
}

@media (min-width: 1024px) {
	.cortex-pb-hero-lp .hero-slide--conjunto .hero-slide-bg::after {
		background: linear-gradient(
			105deg,
			rgba(29, 68, 34, 0.94) 0%,
			rgba(29, 68, 34, 0.8) 30%,
			rgba(29, 68, 34, 0.2) 46%,
			rgba(231, 233, 231, 0) 58%
		);
	}
}

/* Controles do hero: acima do conteúdo, sem CSS default do Swiper */
.cortex-pb-hero-lp__controls {
	z-index: 30;
}

.cortex-pb-hero-lp .hero-lp-nav {
	position: static !important;
	inset: auto !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	margin: 0 !important;
	width: 2.75rem;
	height: 2.75rem;
	color: #fff;
}

.cortex-pb-hero-lp .hero-lp-nav::after,
.cortex-pb-hero-lp .hero-lp-nav .swiper-navigation-icon {
	display: none !important;
}

/* Pagination custom (dots do protótipo) */
.cortex-pb-hero-lp__pagination.swiper-pagination {
	position: static !important;
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	width: auto !important;
	transform: none !important;
}

.cortex-pb-hero-lp__pagination .dot-btn {
	position: relative;
	display: block;
	flex-shrink: 0;
	height: 0.5rem;
	width: 0.5rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.4);
	opacity: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	border: none;
	transition: width 0.3s ease, background 0.3s ease;
}

.cortex-pb-hero-lp__pagination .dot-btn::before {
	content: "";
	position: absolute;
	inset: -18px;
}

.cortex-pb-hero-lp__pagination .dot-btn.is-active {
	background: #f59a3d;
	width: 1.75rem;
}

@media (prefers-reduced-motion: reduce) {
	.cortex-pb-hero-lp .swiper-wrapper {
		transition-duration: 0ms !important;
	}
}
