/**
 * Estilos para el Grid de Cards de Captura con Hover Scroll y Filtros (BellivanScrollportolfio)
 */

.bellivan-hover-scroll-grid-wrapper {
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Barra de Filtros */
.bellivan-hover-scroll-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 30px;
	justify-content: center; /* Controlado dinámicamente por la alineación en Elementor */
}

.bellivan-filter-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 8px 20px;
	cursor: pointer;
	border: 1px solid #e0e0e0;
	background-color: #ffffff;
	color: #666666;
	border-radius: 30px;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	outline: none;
}

.bellivan-filter-btn:hover {
	color: #1a1a1a;
	border-color: #b5b5b5;
	background-color: #f9f9f9;
}

.bellivan-filter-btn.active {
	color: #ffffff;
	border-color: #0073aa; /* Controlado por el color activo en Elementor */
	background-color: #0073aa;
}

/* Contenedor del Grid */
.bellivan-hover-scroll-grid {
	display: grid;
	width: 100%;
	gap: 20px;
}

/* Columnas de Grid Estáticas para Escritorio */
.bellivan-hover-scroll-grid.bellivan-grid-cols-1 {
	grid-template-columns: repeat(1, 1fr) !important;
}
.bellivan-hover-scroll-grid.bellivan-grid-cols-2 {
	grid-template-columns: repeat(2, 1fr) !important;
}
.bellivan-hover-scroll-grid.bellivan-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr) !important;
}
.bellivan-hover-scroll-grid.bellivan-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr) !important;
}

/* Columnas de Grid Estáticas para Tableta (max-width: 1024px) */
@media (max-width: 1024px) {
	.bellivan-hover-scroll-grid.bellivan-grid-cols-tablet-1 {
		grid-template-columns: repeat(1, 1fr) !important;
	}
	.bellivan-hover-scroll-grid.bellivan-grid-cols-tablet-2 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.bellivan-hover-scroll-grid.bellivan-grid-cols-tablet-3 {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

/* Columnas de Grid Estáticas para Móvil (max-width: 767px) */
@media (max-width: 767px) {
	.bellivan-hover-scroll-grid.bellivan-grid-cols-mobile-1 {
		grid-template-columns: repeat(1, 1fr) !important;
	}
	.bellivan-hover-scroll-grid.bellivan-grid-cols-mobile-2 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Tarjeta (Card) */
.bellivan-hover-scroll-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
	width: 100%;
	opacity: 1;
	background-color: transparent;
	/* Fix para recortar correctamente los bordes de elementos absolutos en Safari y Chrome */
	transform: translate3d(0, 0, 0);
	isolation: isolate;
}

.bellivan-hover-scroll-card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.bellivan-hover-scroll-container {
	position: relative;
	overflow: hidden;
	display: block;
	width: 100%;
	/* La altura y el valor de --container-height son inyectados dinámicamente por el Slider en Elementor */
	height: 400px;
	background-color: transparent;
	border: none;
	text-decoration: none;
	outline: none;
}

.bellivan-hover-scroll-image {
	width: 100%;
	height: auto;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	transform: translateY(0);
	/* La velocidad de transición es de 4s por defecto y controlada dinámicamente por Elementor */
	transition-property: transform;
	transition-duration: 4s;
	transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover Scroll e interactividad táctil en móviles (Se activa al hacer hover en toda la tarjeta) */
.bellivan-hover-scroll-card:hover .bellivan-hover-scroll-image,
.bellivan-hover-scroll-container.is-scrolling .bellivan-hover-scroll-image {
	transform: translateY(calc(-100% + var(--container-height, 400px)));
}

/* Botón disparador de scroll en móviles (SVG Inline) */
.bellivan-mobile-scroll-trigger {
	position: absolute;
	bottom: 15px;
	right: 15px;
	z-index: 10;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.95) !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	color: #333333 !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
	display: none; /* Oculto en pantallas grandes de escritorio */
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	outline: none;
	padding: 0;
}

.bellivan-mobile-scroll-trigger svg {
	width: 14px !important;
	height: 14px !important;
	fill: #333333 !important; /* Forzar el color del icono a gris oscuro para evitar que se vea blanco */
	transition: transform 0.3s ease;
	display: block;
}

/* Rotación del icono cuando ha completado el scroll y está abajo del todo */
.bellivan-hover-scroll-container.has-scrolled-to-bottom .bellivan-mobile-scroll-trigger svg {
	transform: rotate(180deg);
}

@media (max-width: 1024px) {
	.bellivan-mobile-scroll-trigger {
		display: flex;
	}
}

/* Detalles e Info de la Tarjeta */
.bellivan-hover-scroll-info {
	padding: 15px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background-color: inherit;
}

.bellivan-hover-scroll-title-container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.bellivan-hover-scroll-title {
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	transition: color 0.3s ease;
}

.bellivan-hover-scroll-card:hover .bellivan-hover-scroll-title {
	color: #0073aa; /* Controlado dinámicamente por el color de hover en Elementor */
}

/* Enlace de texto subrayado debajo del título */
.bellivan-hover-scroll-link-btn {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	display: inline-block !important;
	align-self: flex-start !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
	text-decoration-style: solid !important;
	text-underline-position: under !important;
	margin-top: 4px !important;
	position: static !important;
	transition: color 0.3s ease, opacity 0.3s ease;
	cursor: pointer !important;
}

.bellivan-hover-scroll-link-btn:hover {
	color: #1a1a1a;
	text-decoration: underline !important;
}

/* Evitar que temas o plugins externos agreguen iconos de enlace externo a nuestros links */
.bellivan-hover-scroll-link-btn::before,
.bellivan-hover-scroll-link-btn::after,
.bellivan-hover-scroll-container::before,
.bellivan-hover-scroll-container::after {
	display: none !important;
	content: "" !important;
}

/* Estilos Específicos del Carrusel Swiper (Estructuras de seguridad) */
.bellivan-hover-scroll-grid-wrapper.layout-carousel {
	position: relative;
	width: 100%;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .elementor-swiper {
	position: relative;
	width: 100%;
	padding: 10px 0 45px 0;
}

/* Seguridad estructural para que Swiper no apile los elementos verticalmente */
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-container,
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper {
	width: 100% !important;
	overflow: hidden !important;
	position: relative !important;
	display: block !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-wrapper {
	display: flex !important;
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 1 !important;
	transition-property: transform !important;
	box-sizing: content-box !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-slide {
	flex-shrink: 0 !important;
	height: auto !important;
	position: relative !important;
	transition-property: transform !important;
	width: 100%; /* Fallback móvil: previene que se encojan antes de que Swiper JS se inicialice */
}

@media (min-width: 768px) {
	.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-slide {
		width: 50%; /* Fallback tableta */
	}
}

@media (min-width: 1024px) {
	.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-slide {
		width: 33.33%; /* Fallback escritorio */
	}
}

/* Paginación y Navegación del Carrusel */
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-pagination {
	position: absolute;
	bottom: 10px;
	left: 0;
	width: 100%;
	text-align: center;
	z-index: 10;
	display: block !important;
	white-space: nowrap !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-pagination-bullet {
	width: 10px !important;
	height: 10px !important;
	background-color: #333333 !important;
	opacity: 0.25 !important;
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
	display: inline-block !important;
	margin: 0 5px !important;
	border-radius: 50% !important;
	cursor: pointer !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-pagination-bullet-active {
	opacity: 1 !important;
	transform: scale(1.25) !important;
	background-color: #0073aa !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-next,
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-prev {
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: 50%;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	color: #333333;
	position: absolute;
	top: 50%;
	transform: translateY(-50%) scale(0.9);
	z-index: 10;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-next {
	right: 10px;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-prev {
	left: 10px;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-next:hover,
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-prev:hover {
	background-color: #ffffff;
	color: #0073aa;
	transform: translateY(-50%) scale(1.05);
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Custom CSS navigation arrows to prevent double icon bugs and font loading failures */
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-next::after,
.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-prev::after {
	display: none !important;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-prev::before {
	content: "" !important;
	display: block !important;
	width: 10px;
	height: 10px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-left: 4px;
}

.bellivan-hover-scroll-grid-wrapper.layout-carousel .swiper-button-next::before {
	content: "" !important;
	display: block !important;
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-top: 2px solid currentColor;
	transform: rotate(45deg);
	margin-right: 4px;
}

/* Soporte para Diseño Responsivo Híbrido (Grid / Carrusel) */
.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .elementor-swiper {
	padding-bottom: 0 !important;
}

.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-container,
.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper {
	overflow: visible !important;
	display: block !important;
}

.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-wrapper {
	display: grid !important;
	transform: none !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-slide {
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	flex-shrink: 1 !important;
	transform: none !important;
}

.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-pagination,
.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-button-next,
.bellivan-hover-scroll-grid-wrapper.bellivan-active-grid .swiper-button-prev {
	display: none !important;
}
