/* =========================================================
 * Carrusel de Noticias para Elementor
 * ========================================================= */

.nce-carousel {
	position: relative;
	width: 100%;
}

/* Pista deslizante (es el contenedor con scroll) */
.nce-track {
	display: flex;
	gap: var(--nce-gap, 24px);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;            /* Firefox */
	-ms-overflow-style: none;          /* IE/Edge */
	padding: 6px 2px 16px;             /* espacio para sombra y elevación */
	margin: 0;
	list-style: none;
}

.nce-track::-webkit-scrollbar {
	display: none;                     /* Chrome/Safari */
}

/* Cada diapositiva: ancho = (100% - huecos) / nº de tarjetas visibles */
.nce-slide {
	flex: 0 0 calc((100% - (var(--nce-gap, 24px) * (var(--nce-slides, 3) - 1))) / var(--nce-slides, 3));
	scroll-snap-align: start;
	min-width: 0;
	display: flex;
}

/* Tarjeta */
.nce-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background-color: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nce-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

/* Imagen */
.nce-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: #eee;
}

.nce-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.nce-card:hover .nce-card__image img {
	transform: scale(1.05);
}

/* Etiqueta de categoría */
.nce-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background-color: #d6263a;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.nce-card__badge--inline {
	position: static;
	align-self: flex-start;
	margin-bottom: 4px;
}

/* Cuerpo */
.nce-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 22px;
	flex: 1;
}

.nce-card__title {
	margin: 0;
	line-height: 1.3;
	color: inherit;
	transition: color 0.2s ease;
}

.nce-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: inherit;
}

.nce-card__meta span {
	position: relative;
}

.nce-card__meta span + span::before {
	content: "•";
	margin-right: 10px;
	color: #bbb;
}

.nce-card__excerpt {
	margin: 0;
	line-height: 1.55;
	color: inherit;
}

.nce-card__more {
	margin-top: auto;
	padding-top: 6px;
	font-size: 0.88rem;
	font-weight: 600;
	color: #d6263a;
}

/* Flechas */
.nce-arrow {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background-color: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	z-index: 5;
	padding: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.nce-arrow:hover {
	transform: translateY(-50%) scale(1.08);
}

.nce-arrow--prev {
	left: 6px;
}

.nce-arrow--next {
	right: 6px;
}

.nce-arrow[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* Puntos */
.nce-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
}

.nce-dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #cccccc;
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease, border-radius 0.25s ease;
}

.nce-dots button.is-active {
	width: 24px;
	border-radius: 4px;
	background-color: #1a1a1a;
}

/* Aviso en el editor */
.nce-empty {
	padding: 24px;
	text-align: center;
	border: 1px dashed #c4c4c4;
	border-radius: 8px;
	color: #777;
	font-size: 0.95rem;
}
