/* ============================================
   NOVA CARDS WIDGET
   ============================================ */

.nova-cards-widget {
	width: 100%;
	position: relative;
}
.nova-cards-slider-navigation {
    justify-content: end !important;
}
.nova-cards-grid {
	display: grid;
	/* grid-template-columns will be set dynamically via JavaScript based on config */
	/* No default value to avoid conflicts - JS will set it with !important */
	gap: 30px;
	width: 100%;
}
.nova-cards-slider-nav {
    padding: 0 !important;
}
/* CSS fallback using data attribute - applies when inline styles are removed by Elementor */
.nova-cards-grid[data-grid-columns="1"] {
	grid-template-columns: repeat(1, 1fr) !important;
}
.nova-cards-grid[data-grid-columns="2"] {
	grid-template-columns: repeat(2, 1fr) !important;
}
.nova-cards-grid[data-grid-columns="3"] {
	grid-template-columns: repeat(3, 1fr) !important;
}
.nova-cards-grid[data-grid-columns="4"] {
	grid-template-columns: repeat(4, 1fr) !important;
}
.nova-cards-grid[data-grid-columns="5"] {
	grid-template-columns: repeat(5, 1fr) !important;
}
.nova-cards-grid[data-grid-columns="6"] {
	grid-template-columns: repeat(6, 1fr) !important;
}

/* CSS fallback for pixels mode with auto-center */
.nova-cards-grid[data-grid-mode="pixels"] {
	justify-items: center;
}


.nova-card-item {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-height: 300px;
	overflow: hidden;
	border-radius: 8px;
	background: #f0f0f0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	/* Animation initial state */
	opacity: 0;
	transform: translateY(30px);
	filter: blur(5px);
	transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
	will-change: opacity, transform, filter;
}

/* Remove min-height when aspect-ratio is applied (for creative background cards) */
.nova-card-item[style*="aspect-ratio"] {
	min-height: 0;
	height: auto;
}

.nova-card-item.animated {
	opacity: 1 !important;
	transform: translateY(0) !important;
	filter: blur(0) !important;
}

.nova-card-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
	/* Smooth transition for hover effects */
	transition: transform 0.5s ease, filter 0.5s ease;
	transform-origin: center center;
}

.nova-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	/* Overlay gradient will be set via inline style */
}

.nova-card-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: #ffffff;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.nova-card-text.nova-card-text-1 h3 {
    margin: 0;
}

.nova-card-text p:last-child {
    margin: 0;
}
.nova-card-text {
	width: 100%;
}

.nova-card-text-1 {
	/* Styles pour le premier texte */
}

.nova-card-text-2 {
	/* Styles pour le deuxième texte */
}
a.nova-card-button {
    text-decoration: initial !important;
}
.nova-card-item {
	text-decoration: none;
	color: inherit;
}

.elementor-editor-active .nova-card-item {
    opacity: 1 !important;
    filter: initial !important;
    transform: initial !important;
    overflow: initial !important;
}

.nova-card-item.has-link {
	cursor: pointer;
}

.nova-card-button-wrap {
	display: flex;
	justify-content: center;
	margin-top: 1.5rem;
}

.nova-card-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
	pointer-events: auto;
}

/* Force !important for button typography styles to override theme styles */
.elementor-widget-nova-cards .nova-card-button {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	font-style: inherit !important;
	line-height: inherit !important;
	letter-spacing: inherit !important;
	text-decoration: inherit !important;
	text-transform: inherit !important;
	text-align: inherit !important;
}

.nova-card-button:hover {
	background: rgba(255, 255, 255, 0.28);
	color: #ffffff;
	transform: translateY(-2px);
}

/* Creative Background Styles */
.nova-card-creative-background {
	background-position: center !important;
	background-repeat: no-repeat !important;
	/* background-size will be set via inline style (contain by default) */
	/* Smooth transition for hover effects */
	transition: transform 0.5s ease;
	transform-origin: center center;
	will-change: transform;
}

/* Disable border and background styles when creative background is enabled */
.nova-cards-widget.creative-background-enabled .nova-card-item.has-creative-background {
	border: none !important;
	border-width: 0 !important;
	border-style: none !important;
	border-color: transparent !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	-moz-box-shadow: none !important;
}

/* Ensure no border styles are applied to creative background cards */
.nova-cards-widget.creative-background-enabled .nova-card-item.has-creative-background,
.nova-cards-widget.creative-background-enabled .nova-card-item.has-creative-background::before,
.nova-cards-widget.creative-background-enabled .nova-card-item.has-creative-background::after {
	border: none !important;
	box-shadow: none !important;
}

/* Responsive Grid */
@media (max-width: 1024px) {
	.nova-cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.nova-cards-grid {
		grid-template-columns: 1fr;
	}
}


/* ============================================
   NOVA CARDS - MOBILE OWL CAROUSEL SLIDER
   ============================================ */

.nova-cards-slider-wrapper { width: 100%; position: relative; }

/* When owl active — kill grid layout */
.nova-cards-widget.nova-cards-slider-active .nova-cards-grid,
.nova-cards-widget .nova-cards-grid.owl-loaded {
	display: block !important;
	grid-template-columns: none !important;
}

/* Cards visible inside owl — override animation inline styles */
.nova-cards-widget.nova-cards-slider-active .nova-card-item,
.nova-cards-widget .nova-cards-grid.owl-loaded .nova-card-item {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	width: 100%;
	transition: none !important;
}

/* Navigation container */
.nova-cards-slider-navigation {
	display: none;
	flex-direction: row;
	gap: 4px;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 12px;
}

/* Nav buttons — same style as .nova-carousel-nav */
.nova-cards-slider-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #ddd;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s ease;
	/* color and background-color intentionally not set here — controlled by Elementor */
}
.nova-cards-slider-nav:hover { background-color: #f5f5f5; border-color: #0073aa; }
.nova-cards-slider-nav svg  { width: 24px; height: 24px; }

/* Hide Owl native nav — we use custom SVG buttons */
.nova-cards-slider-wrapper .owl-nav,
.nova-cards-grid.owl-loaded .owl-nav {
	display: none !important;
}

/* Owl dots */
.nova-cards-slider-wrapper .owl-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 14px;
}
.nova-cards-slider-wrapper .owl-dot span {
	display: block;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #dddddd !important;
	transition: background 0.3s ease;
}
.nova-cards-slider-wrapper .owl-dot.active span { background: #0073aa !important; }
