/* ============================================================
   Nextraining Elementor Widgets — estilos acotados a .nx-ew.
   La tarjeta .nx-card replica EXACTAMENTE el diseño del catálogo
   de NX Ficha de Curso v2.7+ (radios 12px, borde fino, sombras
   sutiles, hover discreto 250 ms). No usa nada de The7.
   ============================================================ */

.nx-ew {
	--nxew-azul: #199BD7;
	--nxew-azul-hover: #1480b4;
	--nxew-azul-txt: #0F7FB2;
	--nxew-tinta: #0B0F1E;
	--nxew-verde: #1F8A47;
	font-family: 'Roboto', system-ui, -apple-system, sans-serif;
	color: var(--nxew-tinta);
	position: relative;
}

/* ---------- Tarjeta (idéntica al catálogo) ---------- */
.nx-ew .nx-card {
	position: relative;
	display: flex; flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid rgba(10, 15, 30, 0.08);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(10, 15, 30, 0.04);
	overflow: hidden;
	cursor: pointer;
	transition: all .25s ease;
	text-align: left;
}
.nx-ew .nx-card:hover {
	box-shadow: 0 12px 28px rgba(10, 15, 30, 0.08);
	transform: translateY(-3px);
	border-color: rgba(10, 15, 30, 0.12);
}
.nx-ew .nx-card__link-total { position: absolute; inset: 0; z-index: 1; }

.nx-ew .nx-card__top { padding: 22px 22px 0; }
.nx-ew .nx-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.nx-ew .nx-card__info { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; min-width: 0; }
.nx-ew .nx-card__cat {
	font-size: 11px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: var(--nxew-azul-txt); display: block;
}
.nx-ew .nx-card__badge { font-size: 12px; font-weight: 500; }
.nx-ew .nx-card__badge--sub { color: var(--nxew-verde); }
.nx-ew .nx-card__badge--bon { color: rgba(10,15,30,.55); }
.nx-ew .nx-card__foto { flex: none; width: 56px; height: 56px; object-fit: contain; background: transparent; border-radius: 8px; }

.nx-ew .nx-card__title {
	margin: 10px 0 0; font-size: 16.5px; line-height: 1.3; font-weight: 700;
	color: var(--nxew-tinta); min-height: 64px;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	transition: color .25s ease;
}
.nx-ew .nx-card:hover .nx-card__title { color: var(--nxew-azul-txt); }

.nx-ew .nx-card__date {
	margin: 8px 22px 0; min-height: 50px;
	display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
}
.nx-ew .nx-card__date-t { font-size: 13.5px; font-weight: 700; color: var(--nxew-tinta); }
.nx-ew .nx-card__date-s { font-size: 11.5px; color: rgba(10,15,30,.5); }

.nx-ew .nx-card__foot {
	margin-top: auto; padding: 12px 22px 18px;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.nx-ew .nx-card__cta { font-size: 15px; font-weight: 700; color: var(--nxew-azul-txt); }
.nx-ew .nx-card:hover .nx-card__cta { text-decoration: underline; }
.nx-ew .nx-card__arrow {
	position: relative; z-index: 2;
	flex: none; width: 36px; height: 36px; border-radius: 50%;
	border: 1.5px solid rgba(10,15,30,.2); background: transparent;
	color: var(--nxew-tinta);
	display: flex; align-items: center; justify-content: center;
	font-size: 15px; transition: all .25s ease;
}
.nx-ew .nx-card:hover .nx-card__arrow {
	border-color: var(--nxew-azul); background: var(--nxew-azul);
	color: #fff; transform: translateX(4px);
}
.nx-ew .nxf-consultar {
	display: inline-block; font-size: 12px; font-weight: 700;
	color: #2E8B3D; background: #E4F4E7; border-radius: 999px; padding: 5px 14px;
}

/* ---------- Carrusel ---------- */
.nx-ew-carousel { --nxew-gap: 24px; --nxew-visibles: 3; padding: 4px 0 8px; }
.nx-ew-viewport { overflow: hidden; }
.nx-ew-track {
	display: flex; gap: var(--nxew-gap);
	transition: transform .45s ease;
	align-items: stretch;
}
.nx-ew-slide {
	flex: 0 0 calc((100% - (var(--nxew-visibles) - 1) * var(--nxew-gap)) / var(--nxew-visibles));
	display: flex; min-width: 0;
}
.nx-ew-eq .nx-ew-slide .nx-card { width: 100%; }

.nx-ew-flecha {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid rgba(10,15,30,.15); background: #fff; color: var(--nxew-tinta);
	font-size: 16px; cursor: pointer; z-index: 3;
	box-shadow: 0 2px 8px rgba(10,15,30,.08);
	display: flex; align-items: center; justify-content: center;
	transition: all .25s ease;
}
.nx-ew-flecha:hover { background: var(--nxew-azul); border-color: var(--nxew-azul); color: #fff; }
.nx-ew-flecha[disabled] { opacity: .35; cursor: default; }
.nx-ew-flecha[disabled]:hover { background: #fff; color: var(--nxew-tinta); border-color: rgba(10,15,30,.15); }
.nx-ew-prev { left: -14px; }
.nx-ew-next { right: -14px; }

.nx-ew-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.nx-ew-dot {
	width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0;
	background: rgba(10,15,30,.18); cursor: pointer; transition: all .25s ease;
}
.nx-ew-dot.nx-ew-dot-activo { background: var(--nxew-azul); transform: scale(1.25); }

/* ---------- Cuadrícula ---------- */
.nx-ew-grid {
	--nxew-cols: 3; --nxew-gap-h: 24px; --nxew-gap-v: 24px;
	display: grid;
	grid-template-columns: repeat(var(--nxew-cols), minmax(0, 1fr));
	column-gap: var(--nxew-gap-h);
	row-gap: var(--nxew-gap-v);
	align-items: stretch;
}
.nx-ew-celda { display: flex; min-width: 0; }
.nx-ew-eq .nx-ew-celda .nx-card { width: 100%; }
.nx-ew-libre .nx-ew-celda { align-items: start; }
.nx-ew-celda.nx-ew-oculta { display: none; }
.nx-ew-vermas-wrap { text-align: center; margin-top: 26px; }
.nx-ew-vermas {
	border: none; border-radius: 999px; background: var(--nxew-azul); color: #fff;
	font: 700 14px 'Roboto', sans-serif; padding: 12px 30px; cursor: pointer;
	transition: background .25s ease;
}
.nx-ew-vermas:hover { background: var(--nxew-azul-hover); }

/* ---------- Lista compacta ---------- */
.nx-ew-lista { display: flex; flex-direction: column; gap: 12px; }
.nx-ew-row {
	display: flex; align-items: center; gap: 18px;
	background: #fff; border: 1px solid rgba(10,15,30,.08); border-radius: 12px;
	box-shadow: 0 1px 2px rgba(10,15,30,.04);
	padding: 14px 18px;
	transition: all .25s ease;
}
.nx-ew-row:hover {
	box-shadow: 0 8px 20px rgba(10,15,30,.08);
	transform: translateY(-2px);
	border-color: rgba(10,15,30,.12);
}
.nx-ew-row__logo { flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.nx-ew-row__main { flex: 1; min-width: 0; }
.nx-ew-row__titulo {
	display: block; font-size: 15.5px; font-weight: 700; color: var(--nxew-tinta);
	text-decoration: none; line-height: 1.35; margin-bottom: 4px;
	transition: color .25s ease;
}
.nx-ew-row__titulo:hover { color: var(--nxew-azul-txt); }
.nx-ew-row__metas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: rgba(10,15,30,.55); }
.nx-ew-row__meta { white-space: nowrap; }
.nx-ew-row__fecha { font-weight: 700; color: var(--nxew-tinta); }
.nx-ew-row__precio { font-weight: 700; color: var(--nxew-tinta); }
.nx-ew-row__sep { opacity: .5; }
.nx-ew-row .nxf-consultar { font-size: 11px; padding: 3px 10px; }
.nx-ew-row__btn {
	flex: none; font-size: 13.5px; font-weight: 700; color: var(--nxew-azul-txt);
	text-decoration: none; white-space: nowrap;
	border: 1.5px solid rgba(10,15,30,.15); border-radius: 999px; padding: 9px 18px;
	transition: all .25s ease;
}
.nx-ew-row__btn:hover { background: var(--nxew-azul); border-color: var(--nxew-azul); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.nx-ew-carousel { --nxew-visibles: var(--nxew-visibles-t, 2); }
}
@media (max-width: 767px) {
	.nx-ew-carousel { --nxew-visibles: var(--nxew-visibles-m, 1); }
	.nx-ew-prev { left: 4px; }
	.nx-ew-next { right: 4px; }
	.nx-ew-row { flex-wrap: wrap; }
	.nx-ew-row__btn { margin-left: auto; }
}
