:root {
	--fmt-accent: #7eb950;
	--fmt-ink: #1f2a1a;
	--fmt-muted: #6b7466;
	--fmt-card: #ffffff;
	--fmt-soft: #f4f8ef;
	--fmt-line: #e4eadd;
	--fmt-radius: 18px;
}

.fmt-page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; color: var(--fmt-ink); }
.fmt-back { margin: 0 0 18px; font-size: 14px; }
.fmt-back a { color: var(--fmt-muted); text-decoration: none; }
.fmt-kicker { display: inline-block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fmt-accent); font-weight: 700; margin-bottom: 8px; }

/* Hero */
.fmt-hero { margin-bottom: 28px; }
.fmt-hero--center { text-align: center; max-width: 820px; margin: 0 auto 32px; }
.fmt-hero__title { margin: 6px 0 14px; line-height: 1.15; }
.fmt-hero__intro { font-size: 18px; color: var(--fmt-muted); }
.fmt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* Chip / badge / bottoni */
.fmt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--fmt-line); background: #fff; color: var(--fmt-ink); font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer; transition: all .15s; }
.fmt-chip span { font-size: 12px; color: var(--fmt-muted); }
.fmt-chip:hover { border-color: var(--fmt-accent); }
.fmt-chip.is-active, .fmt-chip--fmt_challenge, .fmt-chip--challenge.is-active { background: var(--fmt-accent); border-color: var(--fmt-accent); color: #fff; }
.fmt-chip.is-active span { color: rgba(255,255,255,.85); }
.fmt-chip--challenge { border-style: dashed; }
.fmt-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--fmt-soft); color: #3c6a17; font-weight: 700; font-size: 14px; }
.fmt-badge--lg { font-size: 18px; padding: 8px 16px; }
.fmt-btn { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--fmt-accent); color: #fff !important; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.fmt-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.fmt-btn--ghost { background: transparent; color: var(--fmt-accent) !important; border: 2px solid var(--fmt-accent); }

/* Persona */
.fmt-who { display: flex; align-items: center; gap: 10px; }
.fmt-who__txt { display: flex; flex-direction: column; line-height: 1.25; }
.fmt-who__txt small { color: var(--fmt-muted); font-size: 13px; }
.fmt-avatar { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--fmt-accent); color: #fff; font-weight: 700; font-size: 15px; }
.fmt-stars { color: #f5a623; letter-spacing: 1px; font-size: 14px; }

/* Muro + griglia */
.fmt-wall { margin: 40px 0; }
.fmt-wall__title { text-align: center; margin-bottom: 20px; }
.fmt-wall__more { text-align: center; margin: 24px 0 0; }
/* padding invece di margin: Elementor/tema azzerano spesso i margini dei paragrafi */
.fmt-carousel .fmt-wall__more { margin: 0; padding-top: 28px; }
.fmt-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.fmt-grid { --fmt-cols: 3; columns: var(--fmt-cols) 300px; column-gap: 22px; }
.fmt-grid > .fmt-card { break-inside: avoid; margin-bottom: 22px; }
.fmt-card[hidden] { display: none; }

/* Card */
.fmt-card { display: flex; flex-direction: column; background: var(--fmt-card); border: 1px solid var(--fmt-line); border-radius: var(--fmt-radius); overflow: hidden; box-shadow: 0 2px 10px rgba(31,42,26,.04); transition: box-shadow .2s, transform .2s; }
.fmt-card:hover { box-shadow: 0 10px 30px rgba(31,42,26,.10); transform: translateY(-2px); }
.fmt-card .fmt-card__media { position: relative; display: block; width: 100%; height: 240px; margin: 0; overflow: hidden !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #eef2ea !important; box-shadow: none !important; cursor: zoom-in; }
.fmt-card .fmt-card__media img { display: block; width: 100%; height: 100% !important; max-width: none; object-fit: cover; object-position: top; }
.fmt-card__media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70px; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.fmt-card__count { position: absolute; z-index: 1; left: 12px; bottom: 10px; color: #fff; font-size: 13px; font-weight: 600; }
.fmt-card__count::before { content: "🔍 "; }
.fmt-card__body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.fmt-card__body .fmt-badge { align-self: flex-start; }
.fmt-card__quote { margin: 0; padding: 0; border: 0; font-size: 18px; line-height: 1.45; font-style: italic; color: var(--fmt-ink); background: none; }
.fmt-card__quote::before, .fmt-card__quote::after { display: none; }
.fmt-card__title { margin: 0; font-size: 16px; line-height: 1.35; }
.fmt-card__title a { color: inherit; text-decoration: none; }
.fmt-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.fmt-card__more { font-weight: 700; color: var(--fmt-accent); text-decoration: none; }
.fmt-card__more::after { content: " →"; }
.fmt-card__video { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #1f2a1a; color: #fff; text-decoration: none; }
.fmt-card--compatta .fmt-card__quote { font-size: 17px; }
.fmt-card--ricette .fmt-card__media, .fmt-card--community .fmt-card__media { height: 300px; }
.fmt-shot, .fmt-carousel__nav button, .fmt-chip { box-shadow: none; text-transform: none; letter-spacing: normal; }

/* Carosello */
.fmt-carousel { position: relative; margin: 40px 0; }
.fmt-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 44px) / 3); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 18px; scrollbar-width: none; }
.fmt-carousel__track::-webkit-scrollbar { display: none; }
.fmt-carousel__track > .fmt-card { scroll-snap-align: start; }
.fmt-carousel__track > .fmt-card[hidden] { display: none; }
.fmt-carousel--completa .fmt-carousel__track { align-items: start; }
.fmt-carousel.fmt-wall { margin: 40px 0; }
.fmt-carousel__nav { display: flex; justify-content: center; gap: 10px; }
.fmt-carousel__nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fmt-line); background: #fff; font-size: 24px; line-height: 1; cursor: pointer; color: var(--fmt-ink); }
.fmt-carousel__nav button:hover { border-color: var(--fmt-accent); color: var(--fmt-accent); }
@media (max-width: 1024px) { .fmt-carousel__track { grid-auto-columns: calc((100% - 22px) / 2); } }
@media (max-width: 640px) { .fmt-carousel__track { grid-auto-columns: 86%; } }

/* Numeri */
.fmt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 24px 0 40px; }
.fmt-stat { text-align: center; padding: 22px 14px; border-radius: var(--fmt-radius); background: var(--fmt-soft); }
.fmt-stat strong { display: block; font-size: clamp(34px, 5vw, 48px); line-height: 1; color: var(--fmt-accent); }
.fmt-stat span { display: block; margin-top: 8px; color: var(--fmt-muted); font-size: 14px; }

/* Muro screenshot */
.fmt-shots { margin: 48px 0; }
.fmt-shots__grid { columns: 4 200px; column-gap: 12px; }
.fmt-shot { display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #eef2ea; cursor: zoom-in; break-inside: avoid; }
.fmt-shot img { display: block; width: 100%; height: auto; transition: transform .25s; }
.fmt-shot:hover img { transform: scale(1.03); }
.fmt-note { text-align: center; color: var(--fmt-muted); font-size: 13px; margin-top: 8px; }

/* Singola storia */
.fmt-single__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.fmt-single__grid--full { grid-template-columns: minmax(0, 820px); justify-content: center; }
.fmt-single__aside { position: sticky; top: 100px; }
.fmt-aside__title { font-size: 18px; margin-bottom: 12px; }
.fmt-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fmt-proof .fmt-shot { margin: 0; }
.fmt-proof .fmt-shot:first-child:last-child { grid-column: 1 / -1; }
.fmt-results { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.fmt-fromto { font-size: 18px; color: var(--fmt-muted); }
.fmt-fromto strong { color: var(--fmt-ink); }
.fmt-bigquote { margin: 0 0 24px; padding: 22px 26px; border: 0; border-left: 5px solid var(--fmt-accent); border-radius: 0 var(--fmt-radius) var(--fmt-radius) 0; background: var(--fmt-soft); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.4; font-style: italic; }
.fmt-bigquote::before, .fmt-bigquote::after { display: none; }
.fmt-story { font-size: 18px; line-height: 1.7; }
.fmt-section { margin: 48px 0; }
.fmt-videos { display: flex; flex-wrap: wrap; gap: 20px; }
.fmt-video { flex: 0 1 340px; }
.fmt-video--orizzontale { flex-basis: 100%; }
/* Embed dal plugin Social: le sue regole valgono solo dentro .fm-sc, qui le replichiamo.
   !important perché gli script di resize del tema impostano altezze inline. */
.fmt-video .fm-sc-drive { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.fmt-video .fm-sc-shield { position: absolute; top: 0; right: 0; z-index: 2; width: 80px; height: 64px; }
.fmt-video .fm-sc-frame { display: block; width: 100% !important; max-width: 100%; margin: 0; border: 0; border-radius: 14px; aspect-ratio: 9 / 16; height: auto !important; }
.fmt-video .fm-sc-drive .fm-sc-frame { border-radius: 0; }
.fmt-video .fm-sc-frame--youtube, .fmt-video .fm-sc-frame--drive-orizzontale { aspect-ratio: 16 / 9; }
.fmt-video .fm-sc-frame--drive-quadrato { aspect-ratio: 1 / 1; }
.fmt-video .fm-sc-frame--instagram { aspect-ratio: auto; height: 640px !important; }
.fmt-video__title { font-size: 14px; color: var(--fmt-muted); margin-top: 6px; }
.fmt-transcript { margin: 28px 0; border: 1px solid var(--fmt-line); border-radius: 12px; background: #fff; }
.fmt-transcript summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.fmt-transcript__body { padding: 0 18px 12px; font-size: 15px; color: #3d4639; white-space: normal; }
.fmt-tags a { display: inline-block; margin: 0 8px 6px 0; color: var(--fmt-muted); text-decoration: none; font-size: 14px; }
.fmt-related .fmt-grid { columns: 3 260px; }

/* Challenge */
.fmt-challenge__head { text-align: center; max-width: 780px; margin: 0 auto 8px; }
.fmt-challenge__head p { font-size: 18px; color: var(--fmt-muted); }
.fmt-challenge-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.fmt-challenge-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--fmt-radius); background: var(--fmt-ink); color: #fff !important; text-decoration: none; transition: transform .2s; }
.fmt-challenge-card:hover { transform: translateY(-3px); }
.fmt-challenge-card strong { font-size: 20px; }
.fmt-challenge-card span { color: rgba(255,255,255,.75); font-size: 15px; }
.fmt-challenge-card em { font-style: normal; color: var(--fmt-accent); font-weight: 700; margin-top: auto; }

/* CTA + avvertenza */
.fmt-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 48px 0; padding: 30px 34px; border-radius: 24px; background: var(--fmt-ink); color: #fff; }
.fmt-cta h3 { color: #fff; margin: 0 0 6px; }
.fmt-cta p { margin: 0; color: rgba(255,255,255,.8); }
.fmt-disclaimer { max-width: 820px; margin: 24px auto 0; text-align: center; font-size: 12px; color: var(--fmt-muted); }

@media (max-width: 900px) {
	.fmt-single__grid { grid-template-columns: 1fr; gap: 28px; }
	.fmt-single__aside { position: static; }
	.fmt-cta { flex-direction: column; text-align: center; padding: 26px 20px; }
}
@media (max-width: 767px) {
	/* Filtri su una sola riga, scorrevole in orizzontale */
	.fmt-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; gap: 6px; margin: 0 -16px 20px; padding: 2px 16px 6px; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
	.fmt-filters::-webkit-scrollbar { display: none; }
	.fmt-filters .fmt-chip { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; white-space: nowrap; scroll-snap-align: start; }
	.fmt-wall__title { font-size: 26px; margin-bottom: 14px; }
}
@media (max-width: 640px) {
	.fmt-grid { columns: 1; }
	.fmt-story { font-size: 17px; }
}

/* Lightbox */
.fmt-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(15,20,12,.92); display: flex; align-items: center; justify-content: center; }
.fmt-lb[hidden] { display: none; }
.fmt-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.fmt-lb button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.fmt-lb button:hover { background: rgba(255,255,255,.25); }
.fmt-lb__close { top: 16px; right: 16px; }
.fmt-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.fmt-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.fmt-lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }
