@charset "utf-8";

/*	-------------------------------------------------------------------------- */
/*	Scheda corso (dettaglio): valori e regole dal PoC approvato (.works/poc_dettaglio_corso.html)
/*	Classi con prefisso cs-; misure in px (indipendenti dal font-size in vw di global.css)
/*	-------------------------------------------------------------------------- */

	body.cs-corso { margin: 0; background: #f6f6f4; font-family: "Google Sans Flex", system-ui, sans-serif; color: var(--hc-ink); -webkit-font-smoothing: antialiased; }
	.cs-page, .cs-page * { box-sizing: border-box; }
	.cs-page { max-width: 1200px; margin: 0 auto; padding: 24px 24px 72px; }

	.cs-back, .cs-back:visited { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--hc-muted); text-decoration: none; margin-bottom: 18px; transition: color .15s; }
	.cs-back:hover { color: var(--hc-red); }

	.cs-hero { border-radius: 20px; overflow: hidden; background: #111111; aspect-ratio: 1920 / 686; }
	.cs-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

	.cs-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; grid-template-areas: "head aside" "desc aside" "gallery aside"; column-gap: 48px; margin-top: 32px; align-items: start; }
	.cs-head { grid-area: head; }
	.cs-desc { grid-area: desc; }
	.cs-gallery { grid-area: gallery; }
	.cs-aside { grid-area: aside; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 20px; }
/*	Nessuna barra di scorrimento interna: il contenuto della colonna e' sempre tutto visibile. Se le card superano l'altezza della finestra
/*	(molte fasi, laptop basso) la colonna smette di essere sticky e scorre con la pagina (classe messa dallo script della scheda) */
	.cs-aside.cs-aside-lunga { position: static; }
	.cs-aside > .cs-card { flex-shrink: 0; }

	.cs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
	.cs-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: #ffffff; border: 1px solid var(--hc-line); color: var(--hc-muted); }
	a.cs-tag, a.cs-tag:visited { text-decoration: none; color: var(--hc-muted); }
	a.cs-tag:hover, a.cs-tag:focus-visible { background: var(--hc-red); border-color: var(--hc-red); color: #ffffff; }
	.cs-tag.red { background: var(--hc-red); border-color: var(--hc-red); color: #ffffff; }
	.cs-head h1 { margin: 0 0 6px; padding: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -.015em; text-transform: uppercase; color: var(--hc-ink); }

/*	Testo dal CMS */
	.cs-rich { font-size: 16px; line-height: 1.7; color: #2b2b2b; margin-top: 24px; }
	.cs-rich p { margin: 0 0 16px; font-size: inherit; line-height: inherit; color: inherit; }
	.cs-rich strong { color: var(--hc-ink); font-weight: 700; }
	.cs-rich > p:first-child { font-size: 17px; padding: 16px 20px; background: #ffffff; border-left: 3px solid var(--hc-red); border-radius: 0 10px 10px 0; line-height: 1.55; }

	h2.cs-sec { margin: 44px 0 16px; padding: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--hc-ink); text-transform: none; }

/*	Fotogallery */
	.cs-photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
	.cs-photo { all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: auto; height: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #dddddd; display: block; }
	.cs-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
	.cs-photo::after { content: "\f00e"; font-family: "Font Awesome 6 Pro"; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; color: #ffffff; font-size: 22px; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; }
	.cs-photo:hover::after, .cs-photo:focus-visible::after { opacity: 1; }

/*	Card laterali */
	.cs-card { background: #ffffff; border-radius: var(--hc-radius); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05); overflow: hidden; }
	.cs-card-h { padding: 18px 22px 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-muted); }
	.cs-info { list-style: none; margin: 0; padding: 14px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
	.cs-info li { display: flex; gap: 12px; font-size: 14px; line-height: 1.45; margin: 0; padding: 0; }
	.cs-info i { flex: 0 0 18px; color: var(--hc-red); font-size: 16px; margin-top: 2px; text-align: center; }
	.cs-info b { display: block; font-weight: 600; }
	.cs-info small { display: block; color: var(--hc-muted); font-size: 13px; }
	.cs-info a, .cs-info a:visited { color: var(--hc-red); text-decoration: none; font-size: 13px; font-weight: 500; }
	.cs-info a:hover { text-decoration: underline; }

	.cs-fasi { list-style: none; margin: 0; padding: 6px 0 0; }
	.cs-fasi-sep { margin: 0; text-align: center; padding: 12px 22px; border-top: 1px solid var(--hc-line); background: #f6f6f4; font-size: 14px; font-weight: 700; color: var(--hc-ink); }
	.cs-fase { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--hc-line); margin: 0; }
	.cs-fase:first-child { border-top: 0; }
	.cs-fase-n { font-size: 15px; font-weight: 700; line-height: 1.3; }
	.cs-fase-d { grid-column: 1; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--hc-muted); }
	.cs-fase-d i { color: var(--hc-red); }
	.cs-fase-p { grid-column: 2; grid-row: 1; padding-left: 20px; font-size: 15px; font-weight: 700; text-align: right; white-space: nowrap; }
	.cs-fase-a { grid-column: 2; grid-row: 2 / span 2; align-self: end; justify-self: end; text-align: right; font-size: 12px; color: var(--hc-muted); line-height: 1.3; }
	.cs-pill-free { display: inline-block; margin: 5px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 0; border: 1px solid #c9e3d2; background: #e8f5ec; color: #1f8a46; }
	.cs-btn-sm, .cs-btn-sm:visited { display: inline-flex; align-items: center; background: var(--hc-red); color: #ffffff; border: 0; border-radius: 10px; padding: 8px 16px; font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s; }
	.cs-btn-sm:hover { background: var(--hc-red-dark); color: #ffffff; }
/*	Fase in vendita che l'utente non puo ancora prenotare: pulsante grigio ma cliccabile (apre l'avviso con il motivo) */
	.cs-btn-sm.cs-btn-off, .cs-btn-sm.cs-btn-off:hover { background: #e4e4e2; color: #6b6b6b; }
	.cs-fase-posti { grid-column: 1; }
	.cs-fase-ok { grid-column: 1; font-weight: 700; color: #1f8a46; }
	.cs-fase-ok i { color: #1f8a46; }
	.cs-fase-attesa { grid-column: 1; font-weight: 600; color: #8a6d00; }
	.cs-fase-attesa i { color: #8a6d00; }
	.cs-fase:not(:has(.cs-fase-posti)) .cs-fase-a { grid-row: 2; }
	.cs-fase:not(:has(.cs-fase-p)) .cs-fase-a { grid-row: 1 / span 3; }
	.cs-fase:not(:has(.cs-fase-p)):not(:has(.cs-fase-posti)) .cs-fase-a { grid-row: 1 / span 2; }

	.cs-avviso { margin: 0 22px 20px; padding: 16px; border-radius: 12px; background: #fdf1f2; font-size: 14px; line-height: 1.5; }
	.cs-avviso p { margin: 0 0 12px; font-size: inherit; line-height: inherit; }
	.cs-avviso .hc-btn-red { width: 100%; }
	.cs-notes { padding-top: 16px; border-top: 1px solid var(--hc-line); }
	.cs-note { margin: 0 22px 20px; font-size: 12px; color: var(--hc-muted); line-height: 1.5; display: flex; gap: 8px; }
	.cs-note i { color: var(--hc-red); margin-top: 2px; }
	.cs-note a, .cs-note a:visited { color: var(--hc-red); font-weight: 600; text-decoration: none; }
	.cs-note a:hover { text-decoration: underline; }
	.cs-note + .cs-note { margin-top: -10px; }

	@media (max-width: 1080px) {
		.cs-layout { grid-template-columns: minmax(0,1fr) 320px; column-gap: 32px; }
	}

	@media (max-width: 860px) {
	/*	una colonna: titolo, info, descrizione, fasi, gallery */
		.cs-layout { grid-template-columns: 1fr; grid-template-areas: "head" "info" "desc" "fasi" "gallery"; margin-top: 24px; }
		.cs-aside { display: contents; }
		.cs-card-info { grid-area: info; margin-top: 20px; }
		.cs-card-fasi { grid-area: fasi; margin-top: 12px; }
	}

	@media (max-width: 760px) {
		.cs-head h1 { font-size: 30px; }
	}

	@media (max-width: 560px) {
		.cs-page { padding: 16px 16px 56px; }
		.cs-back { margin-bottom: 12px; }
		.cs-hero { border-radius: 14px; }
		.cs-head h1 { font-size: 26px; }
		.cs-rich { font-size: 15px; }
		.cs-rich > p:first-child { font-size: 15px; padding: 14px 16px; }
		h2.cs-sec { margin: 36px 0 14px; font-size: 20px; }
		.cs-photos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
		.cs-photo { width: auto; height: auto; aspect-ratio: 1; }
		.cs-fase { padding: 14px 18px; }
		.cs-card-h { padding: 16px 18px 0; }
		.cs-fasi-sep { padding: 10px 18px; }
		.cs-info { padding: 12px 18px 18px; }
		.cs-avviso, .cs-note { margin-left: 18px; margin-right: 18px; }
	}
