/* ----------------------------------------------------------------------- *
 * PESI cards — faithful port of the FCP Liquidplan theme card styles.
 * The original CSS lived inline inside each shortcode; it is reproduced here
 * verbatim so the cards look exactly like on the original site.
 * ----------------------------------------------------------------------- */

/* Clearfix wrapper so the floated cards are contained. */
.pesi-cards-wrap::after {
	content: "";
	display: table;
	clear: both;
}

/* Griglia flessibile: righe con card ad altezza uguale e colonne responsive
   (desktop 3 · tablet 2 · mobile 1). Ambito limitato a .pesi-cards-wrap così le
   altre card (banner, ecc.) restano invariate. */
.pesi-cards-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 2%;
	align-items: stretch;
}
.pesi-cards-wrap .ondemand-corsi {
	float: none;
	width: 32%;      /* 3 colonne (32*3 + 2*2% gap = 100%) */
	margin: 0 0 20px;
	height: auto;    /* flex "stretch" uniforma l'altezza della riga */
}

/* --- Grid cards (ondemand-corsi square) -------------------------------- */

.ondemand-recensioni,
.inevidenzia-recensioni {
	display: table;
	margin-top: 10px !important;
}

.ondemand-corsi,
.ondemand-label {
	padding: 10px;
	display: inline-block;
}

.ondemand-corsi {
	height: 360px;
	background: #fff;
	box-shadow: 1px 1px 32px rgb(0 0 0 / 25%);
	border-radius: 4px;
	width: 31.33%;
	margin: 1%;
	float: left;
}

/* Product image at the site's standard 2:1 (horizontal) ratio, filling the
   card width. Targeted at the image only so the labels overlaid inside
   .ondemand-immagine are not clipped. object-fit keeps it tidy if an upload
   isn't exactly 2:1. */
.ondemand-corsi .ondemand-immagine img {
	width: 100%;
	aspect-ratio: 2 / 1;
	height: auto;
	object-fit: cover;
	display: block;
	border-radius: 4px;
}

/* Labels wrapper: transparent in the faithful theme (labels behave as before). */
.ondemand-labels {
	display: contents;
}

.ondemand-titolo {
	font-family: 'Titillium Web';
	font-style: normal;
	font-weight: 700;
	font-size: 15px;
	line-height: 130%;
	color: #3a3a3a;
	margin-top: -40px;
	height: 45px;
}

/* Consistent spacing for the installment line under the price (overrides the
   theme's line-height:50% on the price and the global .rate-corso rule from the
   horizontal card, which otherwise make the gap vary between boxes). */
.ondemand-corsi .ondemand-prezzo {
	line-height: 1.2;
}

.ondemand-corsi .rate-corso {
	margin-top: 4px;
	line-height: 1.3;
	font-size: 12px;
	font-weight: 400;
	text-align: left;
	color: #3a3a3a;
}

/* Author byline under the card title ("con NOMBRE y otros N") */
.pesi-card-autori {
	font-family: 'Titillium Web', sans-serif;
	font-size: 13px;
	line-height: 130%;
	color: #6a6a6a;
	margin-top: 2px;
}

.pesi-card-autori .pesi-autore {
	color: #3a3a3a;
	font-weight: 600;
	text-decoration: none;
}

.pesi-card-autori .pesi-autore:hover {
	text-decoration: underline;
}

.ondemand-label,
.ondemand-rate {
	font-size: 12px;
	font-weight: 700;
	font-family: 'Titillium Web';
	font-style: normal;
}

.ondemand-divisore {
	border: 1px solid #cecece;
	flex: none;
	order: 1;
	flex-grow: 0;
	margin-top: 10px;
	margin-bottom: 10px;
}

.ondemand-label1 { background: #fff; border-radius: 5px; color: #009b80; }
.ondemand-label2 { background: #fff; border-radius: 5px; color: #e11010; }
.ondemand-label3 { background: #fff; border-radius: 5px; color: #bf38ff; }

.ondemand-label {
	height: 36px;
	border-radius: 5px;
	flex: none;
	line-height: 120%;
	text-align: center;
	position: relative;
	margin-right: 5px;
	margin-top: 15px;
	bottom: 60px;
	box-shadow: -1px 2px #ccc, 1px 0 0.3em #ccc;
}

.ondemand-blocco3-1,
.ondemand-blocco3-2,
.ondemand-blocco3-3,
.ondemand-blocco3-4 {
	width: 50%;
	float: left;
	margin-top: 25px;
}

.ondemand-blocco3-2,
.ondemand-blocco3-4 { padding-left: 5px; }
.ondemand-blocco3-1,
.ondemand-blocco3-3 { padding-right: 5px; }

.ondemand-bottone {
	background: #27a9e0;
	border: 1px solid #27a9e0;
	border-radius: 6px;
	order: 0;
	flex-grow: 1;
	color: #fff;
	text-align: center;
	padding: 5px;
	display: block;
	bottom: 0px;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
}

.ondemand-bottone:hover { color: #fff; }
.ondemand-bottone.disabled,
.ondemand-bottone[disabled] { background: #ccc; border-color: #ccc; cursor: not-allowed; }

/* <button> add-to-cart: reset native styling so it matches the theme button */
button.ondemand-bottone,
button.inevidenzia-bottone,
button.aggiungialcarrello-corso {
	font-family: 'Titillium Web', sans-serif;
}

button.ondemand-bottone,
button.inevidenzia-bottone { width: 100%; }

button.inevidenzia-bottone { border: none; }

.pesi-add-to-cart { cursor: pointer; }
.pesi-add-to-cart.loading { opacity: 0.7; pointer-events: none; }

.ondemand-rate { line-height: 24px; color: #3a3a3a; }

.ondemand-prezzo {
	font-family: 'Titillium Web';
	font-style: normal;
	font-weight: 700;
	font-size: 24px;
	line-height: 50%;
	color: #3a3a3a;
}

.ondemand-prezzo del { font-weight: 400; color: #999; }
.ondemand-prezzo-old { font-weight: 400; color: #999; text-decoration: line-through; margin-right: 6px; }
.ondemand-prezzo-free { color: #16a34a; font-weight: 700; }

.ondemand-blocco3-1,
.ondemand-blocco3-2 { height: 150px; }

.ondemand-blocco3-2 {
	font-family: 'Titillium Web';
	font-style: normal;
	font-size: 16px;
	line-height: 130%;
	color: #3a3a3a;
}

.ondemand-blocco3-1 {
	font-family: 'Titillium Web';
	font-style: normal;
	font-size: 14px;
	line-height: 150%;
	color: #3a3a3a;
}

.ondemand-blocco3-1 ul { list-style: none; margin: 0; padding-left: 2px; }
.ondemand-blocco3-2 a { color: #3a3a3a; text-decoration: revert; text-decoration-color: #ccc; }

/* Tablet: 2 colonne */
@media only screen and (max-width: 1199px) {
	.pesi-cards-wrap .ondemand-corsi { width: 49%; margin: 0 0 20px; }
	.corsiondemand-raw { width: 100% !important; }
}
/* Mobile: 1 colonna */
@media only screen and (max-width: 640px) {
	.pesi-cards-wrap { gap: 0; }
	.pesi-cards-wrap .ondemand-corsi { width: 100%; margin: 0 0 20px; }
}

.rate-corso { font-size: 12px; }

/* --- My courses (enrolled list) --------------------------------------- */

.pesi-mycourses {
	font-family: 'Titillium Web', sans-serif;
	max-width: 1100px;
}

.pesi-course-row {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	padding: 22px 28px;
	margin-bottom: 22px;
}

.pesi-course-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
}

.pesi-mc-badge {
	display: inline-block;
	padding: 5px 13px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}

.pesi-mc-badge--ecm      { background: #2ba84a; }
.pesi-mc-badge--status   { background: #f5a623; }
.pesi-mc-badge--done     { background: #2ba84a; }
.pesi-mc-badge--expired  { background: #e11010; }

.pesi-course-name {
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1a1a;
	text-decoration: none;
}

.pesi-course-name:hover { color: #27a9e0; }

.pesi-course-line {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	color: #2a2a2a;
	margin-top: 14px;
}

.pesi-course-line i { width: 18px; text-align: center; color: #1a1a1a; }
.pesi-course-line a { color: #2a2a2a; text-decoration: none; }
.pesi-course-line a:hover { text-decoration: underline; }
.pesi-course-line--expired { color: #e11010; }
.pesi-course-line--expired i { color: #e11010; }

@media (max-width: 600px) {
	.pesi-course-row { padding: 18px 18px; }
	.pesi-course-name { font-size: 18px; }
	.pesi-course-line { font-size: 15px; }
}

/* --- Banner card (inevidenzia-corsi) ---------------------------------- */

.inevidenzia-immagine { text-align: right; }
.inevidenzia-recensioni > .star-rating { color: black; font-weight: 300; }
.inevidenzia-immagine img { border-radius: 10px; max-height: 200px; }

.inevidenzia-descrizione,
.inevidenzia-label,
.inevidenzia-titolo {
	font-family: 'Titillium Web';
	font-style: normal;
}

.inevidenzia-corsi {
	background: #fff;
	box-shadow: 1px 1px 32px rgb(0 0 0 / 25%);
	border-radius: 4px;
	display: inline-block;
	width: 100%;
	padding: 30px;
}

.inevidenzia-blocco1,
.inevidenzia-blocco3 { width: 60%; float: left; }
.inevidenzia-blocco2,
.inevidenzia-blocco4 { width: 40%; float: left; }
.inevidenzia-riga1,
.inevidenzia-riga2 { width: 100%; display: block; }

.inevidenzia-titolo { font-weight: 700; font-size: 36px; line-height: 130%; color: #3a3a3a; }
.inevidenzia-descrizione { font-weight: 400; font-size: 16px; line-height: 150%; color: #3a3a3a; }
.inevidenzia-immagine img { border-radius: 10px; }

.inevidenzia-label {
	box-shadow: -1px 2px #ccc, 1px 0 0.3em #ccc;
	padding: 10px;
	width: 120px;
	height: 36px;
	border-radius: 5px;
	flex: none;
	font-weight: 700;
	font-size: 12px;
	line-height: 120%;
	text-align: center;
	position: relative;
	display: inline-block;
	margin-right: 5px;
	margin-top: 15px;
}

.inevidenzia-label1 { background: #fff; border-radius: 5px; color: #009b80; }
.inevidenzia-label2 { background: #fff; border-radius: 5px; color: #e11010; }
.inevidenzia-label3 { background: #fff; border-radius: 5px; color: #bf38ff; }

.inevidenzia-meta,
.inevidenzia-prezzo,
.inevidenzia-rate,
.inevidenzia-recensioni {
	font-family: 'Titillium Web';
	font-style: normal;
	color: #3a3a3a;
}

.inevidenzia-meta { font-weight: 400; font-size: 16px; line-height: 150%; margin-top: 15px; }
.inevidenzia-recensioni { font-weight: 700; font-size: 12px; line-height: 150%; margin-top: 10px; }
.inevidenzia-divisore { border: 1px solid #cecece; margin-top: 15px; margin-bottom: 15px; }
.inevidenzia-prezzo { font-weight: 600; font-size: 39px; line-height: 64.3%; text-align: right; }
.inevidenzia-prezzo del { font-size: 20px; font-weight: 400; color: #999; }
.inevidenzia-rate { font-weight: 600; font-size: 16px; text-align: right; }

.inevidenzia-bottone {
	background: #27a9e0;
	border-radius: 6px;
	flex: none;
	order: 0;
	flex-grow: 1;
	color: #fff;
	text-align: center;
	width: 100%;
	padding: 10px;
	margin-top: 20px;
	font-family: 'Titillium Web';
	font-style: normal;
	font-weight: 600;
	display: block;
	text-decoration: none;
	cursor: pointer;
}

.inevidenzia-bottone:hover { color: #fff; }

.inevidenzia-blocco3-1,
.inevidenzia-blocco3-2,
.inevidenzia-blocco3-2 a {
	font-family: 'Titillium Web';
	font-style: normal;
	font-size: 16px;
	line-height: 150%;
	color: #3a3a3a;
}

.inevidenzia-blocco3-1,
.inevidenzia-blocco3-2 { font-weight: 200; }
.inevidenzia-blocco3-1 ul,
.inevidenzia-blocco3-2 ul { list-style: none; margin: 10px 0 0; padding: 0; }
.inevidenzia-blocco3-1 { width: 40%; display: inline-block; float: left; }
.inevidenzia-blocco3-2 { width: 60%; display: inline-block; }
.inevidenzia-blocco3-2 a { text-decoration: revert; text-decoration-color: #ccc; }

@media only screen and (max-width: 1199px) {
	.inevidenzia-riga1 { width: 100%; display: flex; flex-direction: column; }
	.inevidenzia-descrizione { display: none; }
	.inevidenzia-blocco2 { width: 100%; order: 1; flex-direction: column; }
	.inevidenzia-blocco1 { width: 100%; order: 2; flex-direction: column; }
	.inevidenzia-label { position: relative; top: -200px; }
	.inevidenzia-meta { margin-top: -45px; }
	.inevidenzia-blocco3,
	.inevidenzia-blocco4 { width: 100%; }
	.inevidenzia-blocco4-1,
	.inevidenzia-blocco4-2 { width: 50%; float: left; padding: 10px; }
	.inevidenzia-prezzo,
	.inevidenzia-rate { text-align: left; margin-top: 20px; }
	.inevidenzia-blocco3-2 { width: 50%; }
}

.pesi-cards-empty {
	font-family: 'Titillium Web', sans-serif;
	color: #888;
	padding: 16px 0;
}

/* --- Horizontal "in partenza" list wrapper ----------------------------- */
/* Single stacked column. Must NOT inherit the 3-column grid of .pesi-cards-wrap,
   which would squash the horizontal cards into a third of the width. */
.pesi-list-wrap { display: block; width: 100%; }
.pesi-material .pesi-list-wrap { display: block; }

/* --- Horizontal "in partenza" card (contenitore-corsi) ----------------- */

.mobile-corso { display: none; }

.contenitore-corsi {
	background: #fff;
	/* Material look by default (rounded + elevation), flex, no fixed height. */
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.20);
	margin: 24px 0;
	display: flex;
	align-items: stretch;
	overflow: hidden;
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.contenitore-corsi:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 17px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.14);
}

.contenitore-corsi-dx { flex: 1 1 60%; width: 60%; padding: 18px 22px; box-sizing: border-box; display: flex; flex-direction: column; }
/* La colonna immagine NON si stira all'altezza del testo (align-self:flex-start):
   così l'immagine mantiene il suo rapporto 2:1 (es. 1024×512) e non viene tagliata
   da object-fit per riempire una colonna troppo alta. Resta in alto a sinistra. */
.contenitore-corsi-sx { flex: 0 0 40%; width: 40%; position: relative; align-self: flex-start; }
img.img-corsi { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }

.etichetta-corso {
	box-shadow: -1px 2px #ccc, 1px 0 0.3em #ccc;
	padding: 10px;
	gap: 8px;
	width: 100px;
	height: 36px;
	border-radius: 5px;
	flex: none;
	font-family: 'Titillium Web';
	font-style: normal;
	font-weight: 700;
	font-size: 12px;
	line-height: 120%;
	text-align: center;
	position: relative;
	bottom: 60px;
	display: inline-block;
	margin-left: 5px;
}

.prezzo1-corso,
.rate-corso { text-align: right; font-family: 'Titillium Web'; font-style: normal; }

.etichetta1-corso { color: #007f9b; background: #fff; }
.etichetta2-corso { color: #e11010; background: #fff; }
.etichetta3-corso { color: #1de424; background: #fff; }

.titolo-corso,
.titolo-corso a {
	font-family: 'Titillium Web';
	font-style: normal;
	font-weight: 700;
	font-size: 18px;
	line-height: 130%;
	color: #3a3a3a;
}

.divisore-corso { border: 1px solid #cecece; margin: 10px 0; display: inline-block; width: 100%; }
.descrizione-corso { font-family: 'Titillium Web'; font-style: normal; font-weight: 400; font-size: 16px; line-height: 150%; color: #3a3a3a; }
.prezzo-corso { margin-bottom: 8px; }
.prezzo1-corso { font-weight: 700; font-size: 24px; line-height: 1.1; color: #3a3a3a; text-align: right; }
.prezzo1-corso del { font-size: 16px; font-weight: 400; color: #999; }
.rate-corso { font-weight: 300; font-size: 14px; line-height: 25px; color: #3a3a3a; }

/* Bottom row: "Cosa contiene" | dates+docenti | price+button (right). Flex, not
   float, and pinned to the bottom of the card so rows line up regardless of the
   description length. */
.meta-corso {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-top: auto;
	padding-top: 16px;
}
.meta1-corso,
.meta2-corso { flex: 1 1 0; width: auto; float: none; min-width: 0; }
.meta3-corso {
	flex: 0 0 auto; width: auto; float: none;
	display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
}

.contienetitolo-corso { font-family: 'Titillium Web'; font-style: normal; font-weight: 700; font-size: 16px; line-height: 150%; color: #3a3a3a; flex: none; order: 0; flex-grow: 0; margin-bottom: 4px; }
.meta1-corso .meta-corso-dtls,
.meta2-corso .meta-corso-dtls { margin-top: 2px; }

.aggiungialcarrello-corso,
.meta-corso-dtls { font-family: 'Titillium Web'; font-style: normal; order: 1; }
.meta-corso-dtls { font-weight: 400; font-size: 14px; line-height: 150%; color: #3a3a3a; flex: none; flex-grow: 0; }
.docenti-corso.meta-corso-dtls a { color: #3a3a3a; text-decoration: underline; }

.aggiungialcarrello-corso {
	font-weight: 700;
	font-size: 16px;
	line-height: 120%;
	color: #fff;
	text-align: center;
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	padding: 0 24px;
	gap: 8px;
	height: 54px;
	background: #27a9e0;
	border: 1px solid #27a9e0;
	border-radius: 8px;
	flex: none;
	order: 0;
	flex-grow: 0;
	width: 200px;
	max-width: 100%;
	margin: 0 0 0 auto;
	text-decoration: none;
	box-shadow: 0 2px 4px rgba(39, 169, 224, 0.35);
	transition: background 0.18s ease, box-shadow 0.18s ease;
}

.aggiungialcarrello-corso:hover { color: #fff; }

@media only screen and (max-width: 1199px) {
	.contenitore-corsi-dx,
	.contenitore-corsi-sx { flex: none; width: 100%; }
	.mobile-corso,
	.mobile-corso > .meta3-corso,
	.mobile-corso > .prezzo-corso { display: block; }
	/* Stack the two columns, still no fixed height. */
	.contenitore-corsi { flex-direction: column; width: 500px; margin: 0 auto 30px; max-width: 100%; }
	.contenitore-corsi-dx { padding: 12px; }
	img.img-corsi { width: 100%; height: auto; }
	.meta1-corso,
	.meta2-corso { width: 50%; }
	.aggiungialcarrello-corso,
	.data-corso,
	.descrizione-corso,
	.prezzo-corso { display: none; }
	.mobile-corso > .meta3-corso > .aggiungialcarrello-corso { display: flex; }
	.meta3-corso,
	.prezzo-corso { float: left; padding: 0; width: 50%; text-align: left; }
	.prezzo1-corso,
	.rate-corso { text-align: left; }
}

/* ======================================================================= *
 * MATERIAL DESIGN — applied only inside .pesi-material (the Elementor
 * widget wraps its output in this class). Cards placed via plain shortcodes
 * keep the faithful theme look.
 * ======================================================================= */

/* Price + button wrapper. In faithful cards it just contains the two floated
   blocks (clearfix), so the layout is unchanged; in material it becomes a
   flex row pinned to the bottom (see below). */
.pesi-price-row::after {
	content: "";
	display: table;
	clear: both;
}

/* Grid layout: CSS grid so cards in a row keep equal height and align, and can
   GROW with their content (author byline, live date, installment line...)
   instead of being clipped at the theme's fixed 360px height. */
.pesi-material .pesi-cards-wrap {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.pesi-material .pesi-cards-wrap { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.pesi-material .pesi-cards-wrap { grid-template-columns: 1fr; }
}

/* --- Grid cards -------------------------------------------------------- */
/* Flex column with reserved "slots": every line has its own space (empty when
   unused) and the price/button row is pinned to the bottom, so all cards line
   up regardless of how much text each one has. */
.pesi-material .ondemand-corsi {
	display: flex;
	flex-direction: column;
	width: auto;
	margin: 0;
	float: none;
	height: auto;
	min-height: 360px;
	padding: 0;
	border-radius: 16px;
	overflow: hidden; /* clip the full-bleed image to the rounded corners */
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.20);
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pesi-material .ondemand-corsi:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 17px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.14);
}

/* Full-bleed image (card padding is 0 here, so no negative margin needed). */
.pesi-material .ondemand-corsi > a:first-of-type {
	display: block;
	margin: 0;
}

.pesi-material .ondemand-corsi .ondemand-immagine img {
	border-radius: 0;
}

/* Image box is exactly the image height: overlay the badges absolutely so they
   don't add flow height below the picture. */
.pesi-material .ondemand-immagine {
	position: relative;
	display: block;
	line-height: 0;
}

.pesi-material .ondemand-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	line-height: normal;
}

.pesi-material .ondemand-label {
	position: static; /* cancel the theme's bottom:60px offset */
	bottom: auto;
	margin: 0;
	height: auto;
}

/* Reserved slots. The title is capped at 2 lines and top-aligned, so it never
   takes more than its share and any spare space stays BELOW the text, not above. */
.pesi-material .ondemand-titolo {
	margin: 14px 16px 0;
	height: auto;
	min-height: 2.6em; /* reserve up to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pesi-material .ondemand-datapartenza {
	margin: 8px 16px 0;
	min-height: 2.8em; /* reserve the live-date space even when empty */
	font-family: 'Titillium Web', sans-serif;
	font-size: 16px;
	line-height: 1.3;
	color: #3a3a3a;
}

/* Price + button pinned to the bottom, side by side. */
.pesi-material .pesi-price-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: auto 16px 16px;
	padding-top: 12px;
}

.pesi-material .pesi-price-row .ondemand-blocco3-3,
.pesi-material .pesi-price-row .ondemand-blocco3-4 {
	float: none;
	margin: 0;
	flex: 1 1 50%;
	min-width: 0;
}

/* Button fills its whole 50% column. */
.pesi-material .pesi-price-row .ondemand-bottone {
	width: 100%;
	box-sizing: border-box;
}

/* Pill badges with a soft elevation. */
.pesi-material .ondemand-label {
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Rounder, elevated buttons. The horizontal-list button (.aggiungialcarrello-corso)
   keeps its rounded-rect shape to match the reference, so it is not pill-ed here. */
.pesi-material .ondemand-bottone,
.pesi-material .inevidenzia-bottone {
	border-radius: 999px;
	box-shadow: 0 2px 4px rgba(39, 169, 224, 0.35);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pesi-material .ondemand-bottone:hover,
.pesi-material .inevidenzia-bottone:hover,
.pesi-material .aggiungialcarrello-corso:hover {
	box-shadow: 0 4px 10px rgba(39, 169, 224, 0.45);
}

/* --- Featured banner --------------------------------------------------- */
.pesi-material .inevidenzia-corsi {
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.20);
}

.pesi-material .inevidenzia-immagine img {
	border-radius: 16px;
}

/* --- Horizontal "upcoming" list --------------------------------------- */
.pesi-material .contenitore-corsi {
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.20);
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pesi-material .contenitore-corsi:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 17px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.14);
}

/* Edge-to-edge image: the card's overflow:hidden clips the outer corners, so the
   image itself stays a straight rectangle (flush against the text column). */
.pesi-material img.img-corsi {
	border-radius: 0;
}

/* ======================================================================= *
 * BANNER V2 — compact clean card: 2:1 hero image (fits horizontal uploads)
 * with a "starting soon" pill, category pills, title, a date/hours/teachers
 * meta row, a dashed divider and a price + enrol footer. Uniform height.
 * ======================================================================= */
.pesi-bv2 {
	font-family: 'Titillium Web', sans-serif;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 20px;
	padding: 14px;
	box-shadow: 0 14px 40px rgba(20, 30, 60, 0.09);
	margin: 0 0 20px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* 2:1 hero image (matches the horizontal images typically uploaded). */
.pesi-bv2__hero {
	position: relative;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	aspect-ratio: 2 / 1;
	background: #eef4fb;
	text-decoration: none;
}

.pesi-bv2__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* "LIVE · starting soon" pill (only within the start window). */
.pesi-bv2__live {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #12151b;
	color: #fff;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.pesi-bv2__live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ff4d4f;
	animation: pesi-bv2-pulse 1.8s infinite;
}

@keyframes pesi-bv2-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.55); }
	70%  { box-shadow: 0 0 0 6px rgba(255, 77, 79, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

/* Category / credits / book pills. */
.pesi-bv2__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 13px;
}

.pesi-bv2__pill {
	display: inline-block;
	border-radius: 999px;
	padding: 4px 11px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
}

.pesi-bv2__pill--cat1 { background: #fde7e3; color: #e0654f; }
.pesi-bv2__pill--cat2 { background: #dcecfb; color: #2f8fd6; }
.pesi-bv2__pill--ects { background: #1f6fe0; color: #fff; }
.pesi-bv2__pill--book { background: #e3f5ea; color: #46a878; }

/* Title (2-line clamp). */
.pesi-bv2__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 12px 0 0;
	color: #141821;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.pesi-bv2__title:hover,
.pesi-bv2__title:focus { color: #141821; }

/* Meta row: dates · hours · teachers. */
.pesi-bv2__metas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 10px;
	color: #6b7280;
	font-size: 13.5px;
}

.pesi-bv2__meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pesi-bv2__icon {
	width: 15px;
	height: 15px;
	flex: none;
	color: #9aa2ad;
}

.pesi-bv2__divider {
	border-top: 1px dashed #d7dbe0;
	margin: 14px 0 12px;
}

.pesi-bv2__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: auto;
}

.pesi-bv2__price {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.pesi-bv2__amount {
	font-size: 26px;
	font-weight: 700;
	color: #12161d;
}

.pesi-bv2__amount del {
	font-size: 16px;
	font-weight: 400;
	color: #9aa0a8;
	margin-right: 5px;
}

.pesi-bv2__rate {
	font-size: 12.5px;
	color: #8a9099;
	margin-top: 4px;
}

.pesi-bv2__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #2f6bed;
	color: #fff;
	border-radius: 12px;
	padding: 11px 20px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(47, 107, 237, 0.30);
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.pesi-bv2__btn:hover,
.pesi-bv2__btn:focus {
	background: #255fd6;
	color: #fff;
	box-shadow: 0 10px 22px rgba(47, 107, 237, 0.4);
}

.pesi-bv2__btn-arrow { font-size: 16px; line-height: 1; }

@media (max-width: 600px) {
	.pesi-bv2__title { font-size: 18px; }
	.pesi-bv2__amount { font-size: 23px; }
	.pesi-bv2__btn { width: 100%; justify-content: center; }
}

/* ======================================================================= *
 * SHARED CTA — all card buttons ("Inscríbete") use the v2 blue button look.
 * Applied via the .pesi-cta class added in add_to_cart(); !important lets it
 * win over the older per-context button rules (ondemand/list/material).
 * ======================================================================= */
.pesi-cta {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #2f6bed !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 11px 20px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 8px 18px rgba(47, 107, 237, 0.30) !important;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.pesi-cta:hover,
.pesi-cta:focus,
.pesi-cta:active,
.pesi-cta:visited {
	background: #255fd6 !important;
	color: #fff !important;
	box-shadow: 0 10px 22px rgba(47, 107, 237, 0.40) !important;
}

.pesi-cta.disabled,
.pesi-cta[disabled] {
	background: #cfd4dc !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: not-allowed;
}

.pesi-cta__arrow { font-size: 16px; line-height: 1; }

/* ======================================================================= *
 * Speakers line on the grid cards (first 2 + "y otros N") and the
 * instalment line for the single product ([plazos-producto]).
 * ======================================================================= */
.ondemand-ponentes {
	margin: 6px 0 0;
	font-family: 'Titillium Web', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #6b7280;
	min-height: 1.4em; /* reserved slot so cards keep the same height */
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pesi-material .ondemand-ponentes { margin: 6px 16px 0; }

.ondemand-ponentes__label { font-weight: 700; color: #3a3a3a; }
.ondemand-ponentes a { color: #3a3a3a; text-decoration: underline; }
.ondemand-ponentes a:hover { color: #2f6bed; }

/* Horas de formación (grid card) */
.ondemand-ore {
	margin: 4px 0 0;
	font-family: 'Titillium Web', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #6b7280;
	min-height: 1.4em; /* reserved slot so cards keep the same height */
}
.ondemand-ore i { margin-right: 5px; color: #3a3a3a; }
.pesi-material .ondemand-ore { margin: 4px 16px 0; }

/* [plazos-producto] — instalment line, single product only */
.pesi-plazos {
	font-family: 'Titillium Web', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #6a6a6a;
	margin: 4px 0;
}

/* ======================================================================= *
 * Pagination (grid / horizontal list when paginate="yes")
 * ======================================================================= */
.pesi-cards-pagination { clear: both; text-align: center; margin: 28px 0 8px; }
.pesi-cards-pagination ul {
	list-style: none; display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0;
}
.pesi-cards-pagination a,
.pesi-cards-pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
	border: 1px solid #d9dee8; color: #1a3270; font-weight: 700; text-decoration: none;
	font-family: 'Titillium Web', system-ui, sans-serif; font-size: 15px;
}
.pesi-cards-pagination a:hover { background: #eef2f9; }
.pesi-cards-pagination .current { background: #2f6bed; border-color: #2f6bed; color: #fff; }
.pesi-cards-pagination .dots { border-color: transparent; }

/* ======================================================================= *
 * [docente_foto] — foto grande y redonda del autor (página de autor).
 * ======================================================================= */
.pesi-docente-foto { text-align: center; line-height: 0; }
.pesi-docente-foto__img {
	width: var(--pesi-foto-size, 200px);
	height: var(--pesi-foto-size, 200px);
	object-fit: cover;
	border-radius: 50%;
	display: block;
	margin: 0 auto;
	border: 5px solid #fff;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
}

/* ======================================================================= *
 * [prezzo_landing_ondemand] — precio con rebaja para landings on-demand.
 * ======================================================================= */
.pesi-landing-precio {
	font-family: 'Titillium Web', system-ui, sans-serif;
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	line-height: 1.2;
	font-size: 30px;
}
.pesi-landing-precio .pll-precio__label { font-weight: 600; color: #4a5568; }
.pesi-landing-precio .pll-precio { font-weight: 700; }
.pesi-landing-precio .pll-precio__original {
	color: #94a3b8;
	font-weight: 400;
	text-decoration: line-through;
	font-size: 0.8em;
}
.pesi-landing-precio .pll-precio__oferta { color: #e02424; font-weight: 700; text-decoration: none; }
.pesi-landing-precio ins { text-decoration: none; }
.pesi-landing-precio .pll-precio--gratis { color: #16a34a; }

/* ======================================================================= *
 * [meta-singolo-prodotto] — filas de meta (fecha, ponentes, duración, precio).
 * ======================================================================= */
.pesi-meta-single {
	font-family: 'Titillium Web', system-ui, sans-serif;
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: #2d3748;
}
.pesi-meta-single__row { line-height: 1.35; }
.pesi-meta-single__label { font-weight: 700; color: #4a5568; margin-right: 4px; }
.pesi-meta-single__row--precio-curso .pesi-meta-single__value { font-weight: 700; }

/* ======================================================================= *
 * [pesi_cat_menu] / [menu_categorias] — menú (tarjeta) de subcategorías.
 * ======================================================================= */
.pesi-catmenu {
	font-family: 'Titillium Web', system-ui, sans-serif;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	box-shadow: 0 6px 18px rgba(20, 30, 60, 0.05);
	padding: 12px 8px;
}
.pesi-catmenu__title {
	margin: 6px 12px 10px;
	font-size: 18px;
	font-weight: 700;
	color: #0f1a37;
}
.pesi-catmenu__list { list-style: none; margin: 0; padding: 0; }
.pesi-catmenu__item { margin: 2px 0; }
.pesi-catmenu__item a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 10px;
	color: #2d3748;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	transition: background 0.15s ease, color 0.15s ease;
}
.pesi-catmenu__item a:hover {
	background: #f2f6ff;
	color: #2f6bed;
}
.pesi-catmenu__count {
	flex: 0 0 auto;
	color: #9aa3b2;
	font-weight: 600;
	font-size: 13px;
}
.pesi-catmenu__item a:hover .pesi-catmenu__count { color: #2f6bed; }

/* [pesi_cat_menu] — forma móvil/tablet (<=1024px): botón "pastilla" que abre la
   lista al pulsar (checkbox hack, sin JS). En escritorio se ve la lista entera. */
.pesi-catmenu__chk {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.pesi-catmenu__toggle { display: none; } /* oculto en escritorio */

@media only screen and (max-width: 1024px) {
	.pesi-catmenu { padding: 8px; }
	.pesi-catmenu__title { display: none; } /* el título va dentro del botón */

	.pesi-catmenu__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		cursor: pointer;
		user-select: none;
		padding: 12px 16px;
		border-radius: 12px;
		background: linear-gradient(135deg, #2f6bed, #1a3270);
		color: #fff;
		font-family: 'Titillium Web', system-ui, sans-serif;
		font-size: 15px;
		font-weight: 700;
		box-shadow: 0 6px 16px rgba(47, 107, 237, 0.25);
	}
	.pesi-catmenu__caret { transition: transform 0.2s ease; font-size: 14px; }
	.pesi-catmenu__panel { display: none; margin-top: 8px; }

	.pesi-catmenu__chk:checked ~ .pesi-catmenu__panel { display: block; }
	.pesi-catmenu__chk:checked ~ .pesi-catmenu__toggle .pesi-catmenu__caret { transform: rotate(180deg); }
}
