/* ==========================================================================
   Coschool Courses Carousel Widget
   ========================================================================== */

/* ── Sección ─────────────────────────────────────────────────────────────── */
.ccc-section {
	background-color: #0d0d0d;
	padding: 100px 80px;
	overflow: hidden;
}

/* ── Inner ───────────────────────────────────────────────────────────────── */
.ccc-inner {
	max-width: 1280px;
	margin: 0 auto;
}

/* ── Encabezado ──────────────────────────────────────────────────────────── */
.ccc-header {
	margin-bottom: 56px;
	text-align: center;
}

.ccc-title {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(32px, 3.5vw, 48px);
	font-weight: 600;
	line-height: 1.15;
	color: #ffffff;
	margin: 0 0 16px;
}

.ccc-title__highlight {
	font-style: italic;
	color: #e6d45d;
}

.ccc-subtitle {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(15px, 1.25vw, 18px);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
}

/* ── Carrusel ────────────────────────────────────────────────────────────── */
/*
 * Las flechas están en flujo natural (flex items), no con position:absolute.
 * Esto garantiza que el viewport tome exactamente el espacio disponible
 * sin cortar tarjetas ni clipear flechas en ningún breakpoint.
 */
.ccc-carousel {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ccc-viewport {
	flex: 1;
	min-width: 0; /* evita desbordamiento en flex */
	overflow: hidden;
}

.ccc-track {
	display: flex;
	gap: 24px;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

/* ── Tarjeta ─────────────────────────────────────────────────────────────── */
.ccc-card {
	flex: 0 0 auto;
	background-color: #1a1a1a;
	border: 1px solid #2d2d2d;
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.ccc-card:hover {
	border-color: #e6d45d;
	transform: translateY(-4px);
}

/* Imagen */
.ccc-card__image-wrap {
	position: relative;
	display: block;
	text-decoration: none;
	overflow: hidden;
}

.ccc-card__image {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 – sobreescrito por Elementor */
	overflow: hidden;
	background-color: #111;
}

.ccc-card__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ccc-card:hover .ccc-card__image img {
	transform: scale(1.04);
}

/* Badge */
.ccc-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background-color: #e6d45d;
	color: #000;
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 9999px;
	line-height: 1;
}

/* Cuerpo */
.ccc-card__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ccc-card__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	margin: 0 0 10px;
}

.ccc-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ccc-card__title a:hover {
	color: #e6d45d;
}

.ccc-card__desc {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.65);
	margin: 0 0 20px;
	flex: 1;
	/* Limitar a 3 líneas */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Pie de tarjeta: precio + botón */
.ccc-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.ccc-card__price {
	font-family: 'Montserrat', sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: #e6d45d;
	white-space: nowrap;
}

.ccc-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 9999px;
	background-color: #e6d45d;
	color: #000;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.ccc-card__btn:hover {
	background-color: #f5e57a;
	transform: translateY(-1px);
}

/* ── Flechas de navegación ───────────────────────────────────────────────── */
/* Flex items en línea con el viewport — sin position:absolute */
.ccc-arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(230, 212, 93, 0.3);
	background-color: rgba(230, 212, 93, 0.1);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	padding: 0;
}

.ccc-arrow:hover {
	background-color: #e6d45d;
	border-color: #e6d45d;
	transform: scale(1.08);
}

.ccc-arrow svg {
	stroke: #e6d45d;
	transition: stroke 0.2s ease;
}

.ccc-arrow:hover svg {
	stroke: #000;
}

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

/* ── Puntos de navegación ────────────────────────────────────────────────── */
.ccc-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}

.ccc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.3);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease, width 0.3s ease;
}

.ccc-dot.is-active {
	background-color: #e6d45d;
	width: 24px;
	border-radius: 9999px;
}

/* ── En el editor de Elementor ───────────────────────────────────────────── */
.elementor-editor-active .cs-anim {
	opacity: 1;
	transform: translateY(0);
	transition: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.ccc-section { padding: 80px 40px; }
}

@media (max-width: 768px) {
	/*
	 * Eliminar padding lateral para no duplicar el del contenedor Elementor.
	 * Las flechas en flujo natural (flex) no se clip-ean por overflow.
	 */
	.ccc-section {
		padding-top: 60px;
		padding-bottom: 60px;
		padding-left: 0;
		padding-right: 0;
	}

	.ccc-header { margin-bottom: 36px; }

	/* Flechas más pequeñas en tablet/móvil */
	.ccc-arrow {
		width: 36px;
		height: 36px;
	}

	/* Reducir gap entre flecha y viewport en pantallas pequeñas */
	.ccc-carousel { gap: 8px; }
}

@media (max-width: 480px) {
	.ccc-section {
		padding-top: 48px;
		padding-bottom: 48px;
		padding-left: 0;
		padding-right: 0;
	}

	.ccc-card__footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.ccc-card__btn { width: 100%; text-align: center; }
}

/* ── Preferencia de movimiento reducido ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.ccc-track    { transition: none; }
	.ccc-card     { transition: none; }
	.ccc-card__image img { transition: none; }
	.ccc-arrow    { transition: none; }
	.ccc-dot      { transition: none; }
}
