/*
 * Evolutive 2026, Fase 3: elenchi, card e caroselli (inc/evolutive-2026-elenchi.php).
 * Layout e colori dal Figma; misure dalla scala del tema (html 18px, rem), non dai px del Figma.
 * Colori: primario #33347C, secondario (giallo) var(--e-global-color-secondary), fondo chiaro #F5F8FF, fondo news #EFEFEF.
 */

/* ---------- tab degli ambiti (faccetta FacetWP «ambiti», radio) ---------- */
.fcrt-elenco .fcrt-elenco__titolo { margin: 0 0 1.38rem; }
.fcrt-tab { margin: 0 0 3rem; }
.fcrt-tab .facetwp-facet-ambiti {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	margin: 0;
	border-bottom: 1px solid var(--e-global-color-secondary, #FCC137);
}
.fcrt-tab .facetwp-facet-ambiti .facetwp-radio {
	background: none !important;
	margin: 0 0 -1px;
	padding: 0 0 1.1rem;
	border-bottom: 2px solid transparent;
	color: #000;
	cursor: pointer;
	white-space: nowrap;
}
.fcrt-tab .facetwp-facet-ambiti .facetwp-radio.checked { border-bottom-color: #000; font-weight: 600; }
.fcrt-tab .facetwp-facet-ambiti .facetwp-radio.disabled { opacity: .4; cursor: default; }
.fcrt-tab .facetwp-radio[data-value=""] { order: 0; }
.fcrt-tab .facetwp-radio[data-value="cura"], .fcrt-tab .facetwp-radio[data-value="care"] { order: 1; }
.fcrt-tab .facetwp-radio[data-value="crescita"], .fcrt-tab .facetwp-radio[data-value="growth"] { order: 2; }
.fcrt-tab .facetwp-radio[data-value="meraviglia"], .fcrt-tab .facetwp-radio[data-value="wonder"] { order: 3; }
.fcrt-tab .facetwp-counter { display: none; }

/* ---------- griglie ---------- */
.fcrt-griglia { display: grid; grid-template-columns: repeat(var(--fcrt-col, 3), minmax(0, 1fr)); gap: 1rem; }
.fcrt-griglia--3 { --fcrt-col: 3; }
.fcrt-griglia--4 { --fcrt-col: 4; }
.fcrt-griglia .bp_card, .fcrt-carosello .bp_card { flex: none; padding: 0; }
/* larghi come header e footer anche dove la sezione Elementor è a 1140 senza margine interno (Community dei talenti) */
.fcrt-elenco, .fcrt-carosello, .fcrt-evidenza, .fcrt-altri-ambiti { max-width: 1120px; margin-inline: auto; }
/* card Bandi (template 409): il bordo giallo del Figma al posto del colore della vecchia categoria */
body .fcrt-griglia .bp_cardColumn, body .fcrt-carosello .bp_cardColumn { border-bottom: 2px solid var(--e-global-color-secondary, #FCC137); }
.fcrt-elenco .facetwp-facet-pagination { margin: 2em 0 0; }

/* ---------- card ---------- */
.fcrt-card { position: relative; display: flex; flex-direction: column; }
body .fcrt-card a, body .fcrt-card a:hover { display: flex; flex-direction: column; flex: 1; color: #000; text-decoration: none; }
.fcrt-card__img { position: relative; overflow: hidden; background: #DCDCDC; }
.fcrt-card__img img, .fcrt-card__vuota { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.fcrt-card:hover .fcrt-card__img img { transform: scale(1.04); }
.fcrt-card__testo { display: flex; flex-direction: column; flex: 1; }
.fcrt-card__ambiti { margin: 0 0 .3rem; color: #33347C; font-weight: 600; line-height: 1.25; }
.fcrt-card .fcrt-card__titolo { margin: 0; font-family: 'Barlow', sans-serif; font-weight: 600; line-height: 1.2; color: #000; }
.fcrt-card__estratto { margin: .8rem 0 0; font-size: .8rem; line-height: 1.3; }

/* Story: bordo blu, «Vai all'articolo» con il tratto giallo */
.fcrt-card--storia { background: #fff; border: 1px solid #33347C; }
.fcrt-card--storia .fcrt-card__img { aspect-ratio: 10 / 7; }
.fcrt-card--storia .fcrt-card__testo { padding: 1.1rem 2.2rem 1.4rem 1.1rem; }
.fcrt-card--storia .fcrt-card__titolo { font-size: 1.25rem; }
.fcrt-card--storia .fcrt-card__estratto { margin-bottom: 2rem; }
.fcrt-card__vai { margin-top: auto; padding: .15rem 0 .15rem .5rem; border-left: 2px solid var(--e-global-color-secondary, #FCC137); font-size: .8rem; }

/* News: fondo grigio, categoria sull'immagine, tag in basso */
.fcrt-card--news { background: #EFEFEF; }
.fcrt-card--news .fcrt-card__img { aspect-ratio: 12 / 7; }
.fcrt-card__cat { position: absolute; left: 0; bottom: 0; padding: .15rem .4rem; background: rgba(255, 255, 255, .85); color: #969696; font-size: .6rem; line-height: 1.25; }
.fcrt-card--news .fcrt-card__testo { padding: 1rem 1.33rem 1.33rem; }
.fcrt-card--news .fcrt-card__titolo { font-size: 1.1rem; }
.fcrt-card--news .fcrt-card__ambiti { font-size: 1.1rem; }
.fcrt-card--news .fcrt-card__estratto { color: #5A5A5A; }
.fcrt-card__tag { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.fcrt-card__tag li { padding: .4rem .55rem; background: #fff; border: 1px solid #969696; color: #969696; font-size: .6rem; font-weight: 500; text-transform: uppercase; line-height: 1; }

/* ---------- caroselli (pagine degli ambiti) ---------- */
.fcrt-carosello__testa { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.fcrt-carosello .fcrt-carosello__titolo { margin: 0; }
body .fcrt-pulsante { flex: none; padding: .4rem .7rem; border: 1px solid #33347C; color: #33347C; font-size: .8rem; text-decoration: none; white-space: nowrap; }
body .fcrt-pulsante:hover { background: #33347C; color: #fff; }
.fcrt-carosello__binario {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3rem) / 4);
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.fcrt-carosello__binario::-webkit-scrollbar { display: none; }
.fcrt-carosello--storie .fcrt-carosello__binario { grid-auto-columns: calc((100% - 2rem) / 3); }
.fcrt-carosello__binario > * { scroll-snap-align: start; }
.fcrt-carosello__frecce { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.fcrt-carosello .fcrt-carosello__freccia { width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid #33347C; border-radius: 50%; background: #fff; color: #33347C; font-family: 'Barlow', sans-serif; font-size: 1rem; line-height: 1; }
.fcrt-carosello .fcrt-carosello__freccia:hover { background: #33347C; color: #fff; }

/* ---------- news in evidenza (pagine degli ambiti) ---------- */
.fcrt-evidenza { display: flex; flex-direction: column; gap: 1rem; }
.fcrt-evidenza__blocco { display: grid; grid-template-columns: 1fr 1fr; }
.fcrt-evidenza__blocco:nth-child(even) .fcrt-evidenza__testo { order: 2; }
.fcrt-evidenza__testo { display: flex; flex-direction: column; padding: 2.2rem; background: #F5F8FF; border: 1px solid #E3E8F4; color: #33347C; }
.fcrt-evidenza .fcrt-evidenza__titolo { margin: 0 0 1rem; font-size: 1.953rem; font-weight: 600; line-height: 1.2; }
body .fcrt-evidenza__titolo a { color: #33347C; }
.fcrt-evidenza__testo p { margin: 0 0 2rem; }
body .fcrt-evidenza__leggi { margin-top: auto; color: var(--e-global-color-secondary, #FCC137); }
.fcrt-evidenza__img { min-height: 18rem; background: #DCDCDC; }
.fcrt-evidenza__img img, .fcrt-evidenza__img .fcrt-card__vuota { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- riquadri verso gli altri ambiti ---------- */
.fcrt-altri-ambiti { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
body .fcrt-altri-ambiti__box { display: flex; flex-direction: column; justify-content: space-between; width: 17.5rem; max-width: 100%; aspect-ratio: 16 / 7; padding: 1rem; background: #33347C; color: #fff; text-decoration: none; }
body .fcrt-altri-ambiti__box:hover { background: #26275e; color: #fff; }
.fcrt-altri-ambiti__nome { font-size: 1.25rem; }
.fcrt-altri-ambiti__freccia { align-self: flex-end; }

/* ---------- storia in evidenza (pagina Stories) ---------- */
.fcrt-storia-evidenza { max-width: 1120px; margin-inline: auto; }
.fcrt-storia-evidenza .fcrt-storia-evidenza__sezione { margin: 0 0 1.38rem; }
.fcrt-storia-evidenza__box { display: grid; grid-template-columns: 1fr 1fr; }
.fcrt-storia-evidenza__testo { display: flex; flex-direction: column; padding: 2.2rem; background: #33347C; color: #fff; }
.fcrt-storia-evidenza__etichetta { margin: 0 0 1.38rem; font-weight: 600; }
.fcrt-storia-evidenza__occhiello { margin: 0; font-size: 1.25rem; font-weight: 300; }
.fcrt-storia-evidenza .fcrt-storia-evidenza__titolo { margin: 0 0 1rem; font-size: 1.953rem; font-weight: 600; line-height: 1.2; }
body .fcrt-storia-evidenza__titolo a, body .fcrt-storia-evidenza__titolo a:hover { color: #fff; }
.fcrt-storia-evidenza__testo p:not([class]) { margin: 0 0 2rem; }
body .fcrt-storia-evidenza__leggi { margin-top: auto; color: var(--e-global-color-secondary, #FCC137); font-size: .8rem; }
.fcrt-storia-evidenza__img { min-height: 22rem; background: #DCDCDC; }
.fcrt-storia-evidenza__img img, .fcrt-storia-evidenza__img .fcrt-card__vuota { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- sezioni inserite nelle pagine degli ambiti (pagine.php, classe fcrt-fase3) ---------- */
.elementor-section.fcrt-fase3 { padding: 2.5rem 0; }
.elementor-section.fcrt-fascia { margin-top: 2.5rem; padding: 5rem 0; background: #F5F8FF; }
.fcrt-fascia .elementor-widget-shortcode + .elementor-widget-shortcode { margin-top: 5rem; }

/* ---------- tablet e mobile ---------- */
@media (max-width: 1024px) {
	.fcrt-griglia--4 { --fcrt-col: 2; }
	.fcrt-carosello__binario, .fcrt-carosello--storie .fcrt-carosello__binario { grid-auto-columns: calc((100% - 1rem) / 2); }
}
@media (max-width: 767px) {
	.fcrt-griglia { --fcrt-col: 1; }
	.fcrt-elenco--bandi .fcrt-griglia { --fcrt-col: 2; }
	.fcrt-tab .facetwp-facet-ambiti { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
	.fcrt-carosello__binario, .fcrt-carosello--storie .fcrt-carosello__binario { grid-auto-columns: 80%; }
	.fcrt-carosello__testa { flex-direction: column; align-items: flex-start; }
	.fcrt-evidenza__blocco { grid-template-columns: 1fr; }
	.fcrt-evidenza__blocco .fcrt-evidenza__testo, .fcrt-evidenza__blocco:nth-child(even) .fcrt-evidenza__testo { order: 2; }
	.fcrt-evidenza__img { min-height: 0; aspect-ratio: 3 / 2; }
	.fcrt-evidenza .fcrt-evidenza__titolo, .fcrt-storia-evidenza .fcrt-storia-evidenza__titolo { font-size: 1.563rem; }
	.fcrt-storia-evidenza__box { grid-template-columns: 1fr; }
	.fcrt-storia-evidenza__testo { order: 2; }
	.fcrt-storia-evidenza__img { min-height: 0; aspect-ratio: 3 / 2; }
}
