/* RCI · Catálogo de cursos de MasterStudy (/cursos/ y listados de cursos)
   Replica las tarjetas de la landing "Aprende con RCI". */

:root {
	--rci-vino: #771840;
	--rci-vino-osc: #64133A;
	--rci-ciruela: #5C1438;
	--rci-texto: #273044;
	--rci-texto-2: #4D5E6F;
	--rci-fondo: #F4F4F5;
	--rci-linea: #E4E4E7;
	--rci-titulos: "Kumbh Sans", "Montserrat", sans-serif;
	--rci-cuerpo: "Montserrat", system-ui, sans-serif;
}

/* ---------- Encabezado: título, buscador y orden ---------- */
.stm_lms_courses_wrapper {
	font-family: var(--rci-cuerpo);
	color: var(--rci-texto);
}
.stm_lms_courses_wrapper .courses_filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 40px;
}
.stm_lms_courses_wrapper .courses_filters__title h1 {
	font-family: var(--rci-titulos);
	font-weight: 600;
	font-size: clamp(36px, 4vw, 56px);
	line-height: 1.05;
	letter-spacing: -0.035em;
	color: var(--rci-texto);
	margin: 0;
}
.stm_lms_courses_wrapper .courses_filters__activities {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	flex: 1 1 520px;
	justify-content: flex-end;
}
.stm_lms_courses_wrapper .lms_courses.search { flex: 1 1 280px; max-width: 460px; }
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1.5px solid var(--rci-linea);
	border-radius: 999px;
	padding: 4px 4px 4px 20px;
	height: auto;
}
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search:focus-within {
	border-color: var(--rci-vino);
	box-shadow: 0 0 0 3px rgba(119, 24, 64, .15);
}
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search input {
	flex: 1;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	height: 44px;
	padding: 0 !important;
	font-family: var(--rci-cuerpo);
	font-size: 16px;
	color: var(--rci-texto);
	outline: 0;
}
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search .lms-search-btn {
	position: static;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 999px !important;
	border: 0 !important;
	background: var(--rci-vino) !important;
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search .lms-search-btn:hover { background: var(--rci-vino-osc) !important; }
.stm_lms_courses_wrapper .lms_courses.search .stm_lms_courses__search .lms-search-btn i { color: #fff !important; font-size: 16px; }

.stm_lms_courses_wrapper .lms_courses.sort { display: flex; align-items: center; flex: 0 0 auto; }
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort {
	display: flex;
	align-items: center;
	gap: 12px;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	width: auto;
	max-width: none;
}
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort .sort_label {
	display: inline !important;
	background: transparent !important;
	color: var(--rci-texto-2) !important;
	font-family: var(--rci-cuerpo) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	height: auto !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	position: static !important;
}
/* el selector es una sola píldora blanca con flecha vino */
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort select {
	-webkit-appearance: none !important;
	appearance: none !important;
	height: 52px !important;
	min-width: 200px;
	width: auto !important;
	padding: 0 46px 0 20px !important;
	margin: 0 !important;
	border: 1.5px solid var(--rci-linea) !important;
	border-radius: 999px !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23771840' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 20px center !important;
	background-size: 12px 8px !important;
	box-shadow: none !important;
	outline: 0 !important;
	font-family: var(--rci-cuerpo) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--rci-texto) !important;
	cursor: pointer;
	text-overflow: ellipsis;
}
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort select:hover { border-color: var(--rci-vino) !important; }
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort select:focus,
.stm_lms_courses_wrapper .stm_lms_courses_grid__sort select:focus-visible {
	border-color: var(--rci-vino) !important;
	box-shadow: 0 0 0 3px rgba(119, 24, 64, .15) !important;
	outline: 0 !important;
}
/* la vista de lista no existe en la landing: solo cuadrícula */
.stm_lms_courses_wrapper .courses_filters__switcher { display: none !important; }

/* ---------- Cuadrícula ---------- */
.stm_lms_courses_wrapper .stm_lms_courses__archive_wrapper {
	display: flex;
	align-items: flex-start;
	gap: 32px;
}
.stm_lms_courses_wrapper .stm_lms_courses__archive { flex: 1 1 auto; min-width: 0; width: auto; }
.stm_lms_courses__grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin: 0 !important;
}
.stm_lms_courses__grid::before,
.stm_lms_courses__grid::after { display: none !important; }
.stm_lms_courses__grid .stm_lms_courses__single {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	z-index: auto !important;
}

/* ---------- Tarjeta ---------- */
.stm_lms_courses__single .stm_lms_courses__single__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 0 !important;
	border-radius: 24px;
	padding: 16px;
	box-shadow: none !important;
	transform: none !important;
	transition: box-shadow .2s ease;
	overflow: hidden;
}
.stm_lms_courses__single:hover .stm_lms_courses__single__inner {
	box-shadow: 0 18px 40px -28px rgba(39, 48, 68, .45) !important;
}
/* sin el recuadro emergente de MasterStudy: la tarjeta ya muestra lo necesario */
.stm_lms_courses__single .stm_lms_courses__single--info { display: none !important; }

.stm_lms_courses__single .stm_lms_courses__single--image { margin: 0; }
.stm_lms_courses__single .stm_lms_courses__single--image > a { display: block; width: 100%; }
/* MasterStudy pone capas grises cuadradas sobre la foto: se veían en las esquinas redondeadas */
.stm_lms_courses__single .stm_lms_courses__single--image::before,
.stm_lms_courses__single .stm_lms_courses__single--image::after,
.stm_lms_courses__single .stm_lms_courses__single--image__container::before,
.stm_lms_courses__single .stm_lms_courses__single--image__container::after { display: none !important; content: none !important; }
.stm_lms_courses__single .stm_lms_courses__single--image .featured-course-container { display: none; }
.stm_lms_courses__single .stm_lms_courses__single--image__container {
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--rci-fondo);
}
.stm_lms_courses__single .stm_lms_courses__single--image__container img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	display: block;
	border: 0 !important;
	transform: none !important;
}

.stm_lms_courses__single .stm_lms_courses__single--inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 22px 6px 6px !important;
	border: 0 !important;
}

/* categoría como chip, igual a "Curso en línea" */
.stm_lms_courses__single .stm_lms_courses__single--terms { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.stm_lms_courses__single .stm_lms_courses__single--term {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--rci-vino);
	border-radius: 999px;
	padding: 5px 14px;
	font-family: var(--rci-cuerpo);
	font-size: 13px !important;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rci-vino) !important;
	line-height: 1.3;
}

.stm_lms_courses__single .stm_lms_courses__single--title { margin: 0 0 10px; min-height: 0 !important; }
.stm_lms_courses__single .stm_lms_courses__single--title h5 {
	font-family: var(--rci-titulos) !important;
	font-weight: 600 !important;
	font-size: 22px !important;
	line-height: 1.22 !important;
	letter-spacing: -0.02em;
	color: var(--rci-texto) !important;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	transition: color .2s ease;
}
.stm_lms_courses__single .stm_lms_courses__single--title a:hover h5 { color: var(--rci-vino) !important; }

.stm_lms_courses__single .rci-curso-extracto {
	font-family: var(--rci-cuerpo);
	font-size: 16px;
	line-height: 1.6;
	color: var(--rci-texto-2);
	margin: 0 0 14px;
}
.stm_lms_courses__single .rci-curso-extracto p { margin: 0; }

/* duración */
.stm_lms_courses__single .stm_lms_courses__single--meta {
	display: flex !important;
	align-items: center;
	gap: 8px;
	padding: 0 !important;
	margin: 0 0 18px;
	border: 0 !important;
	font-family: var(--rci-cuerpo);
	font-size: 15px;
	color: var(--rci-texto-2);
}
.stm_lms_courses__single .stm_lms_courses__hours { display: flex; align-items: center; gap: 8px; color: var(--rci-texto-2); }
.stm_lms_courses__single .stm_lms_courses__hours i { color: var(--rci-vino); }

/* pie: precio + botón, siempre pegado abajo */
.stm_lms_courses__single .rci-curso-pie {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 18px;
	border-top: 1px solid var(--rci-linea);
}
.stm_lms_courses__single .rci-curso-pie .stm_lms_courses__single--price {
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
}
.stm_lms_courses__single .rci-curso-pie .stm_lms_courses__single--price strong,
.stm_lms_courses__single .rci-curso-pie .stm_lms_courses__single--price span {
	font-family: var(--rci-titulos) !important;
	font-size: 24px !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
	color: var(--rci-vino) !important;
	white-space: nowrap;
}
.stm_lms_courses__single .rci-curso-pie .stm_lms_courses__single--price span { font-size: 16px !important; color: var(--rci-texto-2) !important; text-decoration: line-through; margin-right: 6px; }
.stm_lms_courses__single .rci-curso-boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--rci-vino);
	color: #fff !important;
	border-radius: 999px;
	padding: 12px 22px;
	font-family: var(--rci-cuerpo);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .2s ease;
}
.stm_lms_courses__single .rci-curso-boton:hover { background: var(--rci-vino-osc); color: #fff !important; }

/* ---------- Filtros (barra lateral) ---------- */
.stm_lms_courses__archive_filter { flex: 0 0 280px; max-width: 280px; }
.stm_lms_courses__archive_filter form {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
}
.stm_lms_courses__archive_filters {
	background: #fff !important;
	border: 0 !important;
	border-radius: 24px;
	box-shadow: none !important;
}
.stm_lms_courses__archive_filters { padding: 20px 15px 20px !important; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter:first-child { padding-top: 0 !important; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter {
	border: 0 !important;
	border-bottom: 1px solid var(--rci-linea) !important;
	border-radius: 0 !important;
	padding: 15px 0 !important;
	margin: 0 !important;
	background: transparent !important;
	display: block !important;
	height: auto !important;
	box-shadow: none !important;
}
/* encabezado arriba y opciones debajo (acordeón vertical) */
.stm_lms_courses__archive_filter .stm_lms_courses__filter_heading {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}
.stm_lms_courses__archive_filter .stm_lms_courses__filter.active .stm_lms_courses__filter_content {
	display: block;
	width: 100%;
	padding: 12px 0 0 !important;
	margin: 0 !important;
}
.stm_lms_courses__archive_filter .stm_lms_courses__filter_content > * { margin: 0 0 8px !important; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter_content > *:last-child { margin-bottom: 0 !important; }
.stm_lms_courses__archive_filter label { display: flex !important; align-items: center; gap: 10px; line-height: 1.35; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter_heading h3 {
	font-family: var(--rci-titulos) !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	letter-spacing: -0.01em;
	color: var(--rci-texto) !important;
	margin: 0 !important;
}
.stm_lms_courses__archive_filter .stm_lms_courses__filter_heading { position: relative; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter_heading .toggler { right: 0 !important; }
.stm_lms_courses__archive_filter .toggler::before,
.stm_lms_courses__archive_filter .toggler::after { background-color: var(--rci-vino) !important; }
.stm_lms_courses__archive_filter label,
.stm_lms_courses__archive_filter .stm_lms_styled_checkbox span,
.stm_lms_courses__archive_filter h5 {
	font-family: var(--rci-cuerpo) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	color: var(--rci-texto) !important;
}
.stm_lms_courses__archive_filter .stm_lms_styled_checkbox__inner {
	border: 1.5px solid var(--rci-linea) !important;
	background: #fff !important;
	border-radius: 6px !important;
}
.stm_lms_courses__archive_filter input:checked + .stm_lms_styled_checkbox__inner {
	border-color: var(--rci-vino) !important;
	background: var(--rci-vino) !important;
}
/* radios de valoración: el círculo lo dibuja .wpcfto_radio__fake; el contenedor no lleva borde */
.stm_lms_courses__archive_filter .wpcfto_radio {
	position: relative;
	display: inline-block;
	flex: 0 0 18px;
	width: 18px !important;
	height: 18px !important;
	border: 0 !important;
	background: transparent !important;
	top: 0 !important;
}
.stm_lms_courses__archive_filter .wpcfto_radio__fake::before {
	box-sizing: border-box;
	background: #fff !important;
	border: 1.5px solid var(--rci-linea) !important;
	top: 0 !important;
	left: 0 !important;
}
.stm_lms_courses__archive_filter .wpcfto_radio input:checked + .wpcfto_radio__fake::before { border-color: var(--rci-vino) !important; }
.stm_lms_courses__archive_filter .wpcfto_radio input:checked + .wpcfto_radio__fake::after { background: var(--rci-vino) !important; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter_actions { padding: 15px 0 0 !important; margin: 0 !important; text-align: center; }
.stm_lms_courses__archive_filter .stm_lms_courses__filter_reset { display: inline-flex; margin-top: 12px; }
.stm_lms_courses__archive_filter .btn:not(.stm_lms_courses__archive_filter_toggle),
.stm_lms_courses__archive_filter button[type="submit"],
.stm_lms_courses__archive_filter input[type="submit"],
.stm_lms_courses__archive_filter .stm_lms_courses__filter_actions input[type="submit"].heading_font {
	width: 100%;
	background: var(--rci-vino) !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #fff !important;
	font-family: var(--rci-cuerpo) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	padding: 13px 20px !important;
	height: auto !important;
	margin-top: 0;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	white-space: normal;
}
.stm_lms_courses__archive_filter .btn:not(.stm_lms_courses__archive_filter_toggle):hover,
.stm_lms_courses__archive_filter button[type="submit"]:hover { background: var(--rci-vino-osc) !important; }
.stm_lms_courses__archive_filter a:not(.btn) { color: var(--rci-texto-2) !important; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1024px) {
	.stm_lms_courses_wrapper .stm_lms_courses__archive_wrapper { flex-direction: column; }
	.stm_lms_courses__archive_filter { flex: 0 0 auto; max-width: none; width: 100%; }
	.stm_lms_courses_wrapper .courses_filters__activities { justify-content: flex-start; }
}
@media (max-width: 767px) {
	.stm_lms_courses_wrapper .courses_filters { margin-bottom: 24px; }
	.stm_lms_courses_wrapper .lms_courses.search { max-width: none; flex: 1 1 100%; }
	.stm_lms_courses_wrapper .lms_courses.sort { flex: 1 1 100%; }
	.stm_lms_courses_wrapper .stm_lms_courses_grid__sort { width: 100%; }
	.stm_lms_courses__grid { grid-template-columns: 1fr; gap: 20px; }
	.stm_lms_courses__single .stm_lms_courses__single--title h5 { font-size: 20px !important; }
	.stm_lms_courses__single .rci-curso-pie .stm_lms_courses__single--price strong { font-size: 20px !important; }
	.stm_lms_courses__single .rci-curso-boton { padding: 11px 18px; font-size: 15px; }
	.stm_lms_courses_wrapper .lms_courses.sort,
	.stm_lms_courses_wrapper .stm_lms_courses_grid__sort { min-width: 0; max-width: 100%; box-sizing: border-box; }
	.stm_lms_courses_wrapper .stm_lms_courses_grid__sort select { flex: 1; min-width: 0; width: 100% !important; }
	.stm_lms_courses_wrapper .stm_lms_courses_grid__sort .sort_label { flex: 0 0 auto !important; min-width: 0 !important; max-width: none !important; }
	.stm_lms_courses__archive_filter .stm_lms_courses__archive_filter_toggle {
		background: var(--rci-vino) !important;
		border: 0 !important;
		border-radius: 999px !important;
		color: #fff !important;
		font-family: var(--rci-cuerpo) !important;
		font-weight: 600 !important;
		text-transform: none !important;
		letter-spacing: 0 !important;
		padding: 12px 24px !important;
	}
}
