/* Idee e strategie (/idee-e-strategie e /idee-e-strategie/{slug}).
   Mobile-first: le regole base sono per il telefono, i @media (min-width)
   allargano su tablet e desktop. Usa i token di services-public.css,
   quindi segue da solo il tema chiaro/scuro del sito. */

.is-wrap{position:relative; z-index:2; max-width:1080px; margin:0 auto; padding:0 16px 72px;}
.is-narrow{max-width:780px; margin:0 auto;}

/* Hero */
.is-hero{padding:104px 0 22px; text-align:center;}
.is-hero h1{font-size:clamp(28px,6vw,46px); line-height:1.12; margin:14px 0 12px; color:var(--text);}
.is-hero p{max-width:640px; margin:0 auto; font-size:16px; line-height:1.6; color:var(--text-dim);}
.is-hero-badges{list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:8px 18px; padding:0; margin:18px 0 0; font-size:13.5px; color:var(--text-dim);}
.is-hero-badges li{display:inline-flex; align-items:center; gap:6px;}
.is-hero-badges .material-symbols-outlined{font-size:18px; color:var(--teal);}
.is-hero-actions{display:flex; flex-direction:column; gap:10px; margin-top:22px;}
.is-hero-actions .pub-cta{justify-content:center; text-align:center; min-height:48px; display:inline-flex; align-items:center;}

/* Card e form a passi */
.is-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:22px 16px; scroll-margin-top:90px;}
.is-progress{margin-bottom:22px;}
.is-progress-bar{height:6px; border-radius:999px; background:var(--border-2); overflow:hidden;}
.is-progress-fill{height:100%; width:33%; background:linear-gradient(90deg, var(--accent), var(--teal)); border-radius:999px; transition:width .35s cubic-bezier(.2,.7,.2,1);}
.is-progress-cap{display:flex; justify-content:space-between; gap:10px; margin-top:10px; font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-mute);}
.is-progress-cap strong{color:var(--link);}
.is-step h2{font-size:clamp(20px,4vw,25px); margin:0 0 6px; color:var(--text); line-height:1.3;}
.is-step .is-intro{margin:0 0 20px; font-size:14.5px; line-height:1.6; color:var(--text-dim);}
.is-q{border:0; margin:0 0 20px; padding:0; min-width:0;}
.is-q legend, .is-field > label{display:block; font-weight:700; font-size:15px; color:var(--text); margin-bottom:9px; padding:0;}
.is-hint{margin:-4px 0 10px; font-size:12.5px; color:var(--text-mute);}
.req{color:var(--accent-2);}
.is-field{margin:0 0 18px;}
.is-field input, .is-field textarea, .is-field select, .is-filters select, .is-filters input{width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--border-2); background:var(--bg); color:var(--text); font-family:inherit; font-size:16px; resize:vertical;}
.is-field input:focus, .is-field textarea:focus, .is-filters select:focus, .is-filters input:focus{outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(31,173,151,.14);}

.is-options{display:flex; flex-wrap:wrap; gap:8px;}
.is-chip{position:relative; cursor:pointer;}
.is-chip input{position:absolute; opacity:0; width:1px; height:1px;}
.is-chip span{display:inline-flex; align-items:center; min-height:42px; padding:9px 14px; border-radius:999px; border:1px solid var(--border-2); background:var(--bg); font-size:13.5px; color:var(--text-dim); transition:all .16s ease; line-height:1.3; user-select:none;}
.is-chip input:checked + span{border-color:var(--teal); background:color-mix(in srgb, var(--teal) 15%, var(--surface)); color:var(--text); font-weight:600; box-shadow:0 0 0 1px var(--teal) inset;}
.is-chip input:focus-visible + span{outline:2px solid var(--teal); outline-offset:2px;}

.is-sectors{display:grid; grid-template-columns:1fr; gap:8px;}
.is-sector{position:relative; cursor:pointer;}
.is-sector input{position:absolute; opacity:0; width:1px; height:1px;}
.is-sector > span{display:flex; gap:12px; align-items:center; height:100%; padding:11px 12px; border-radius:14px; border:1px solid var(--border-2); background:var(--bg); transition:all .16s ease;}
.is-sector .material-symbols-outlined{flex:none; width:36px; height:36px; display:grid; place-items:center; border-radius:10px; color:var(--teal); background:color-mix(in srgb, var(--teal) 14%, transparent); font-size:20px;}
.is-sector b{display:block; font-size:14px; color:var(--text);}
.is-sector small{display:block; margin-top:1px; font-size:12px; line-height:1.35; color:var(--text-mute);}
.is-sector input:checked + span{border-color:var(--teal); background:color-mix(in srgb, var(--teal) 10%, var(--surface)); box-shadow:0 0 0 1px var(--teal) inset;}
.is-sector input:focus-visible + span{outline:2px solid var(--teal); outline-offset:2px;}

.is-sector-block{padding:14px; margin:0 0 20px; border-radius:14px; background:var(--surface-2, var(--bg)); border:1px dashed var(--border-2);}
.is-sector-block .is-q:last-child, .is-sector-block .is-field:last-child{margin-bottom:0;}
.is-privacy{display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.55; color:var(--text-dim); background:var(--surface-2, var(--bg)); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin:4px 0 0;}
.is-privacy .material-symbols-outlined{color:var(--teal); font-size:20px; flex:none;}
.is-actions{display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; margin-top:24px; padding-top:18px; border-top:1px solid var(--border);}
.is-actions .pub-cta{flex:1 1 auto; justify-content:center; text-align:center; min-height:46px;}
.is-actions .is-back[hidden]{display:none;}
.is-error{margin-top:14px; padding:11px 14px; border-radius:10px; background:#fee2e2; color:#991b1b; font-size:14px;}
.is-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;}
.is-saved{font-size:12px; color:var(--text-mute); text-align:center; margin:12px 0 0;}

/* Attesa */
.is-loading{text-align:center; padding:34px 6px;}
.is-spinner{width:44px; height:44px; margin:0 auto 16px; border-radius:50%; border:4px solid var(--border-2); border-top-color:var(--teal); animation:is-spin .9s linear infinite;}
.is-loading p{color:var(--text-dim); font-size:15px; margin:0;}
@keyframes is-spin{to{transform:rotate(360deg);}}

/* Strategia completa */
.is-full{color:var(--text);}
.is-full-title{font-size:clamp(22px,5vw,32px); line-height:1.2; margin:12px 0 8px;}
.is-for{margin:0 0 10px; font-size:14px; color:var(--text-dim);}
.is-summary{font-size:16px; line-height:1.6; color:var(--text-dim); margin:0 0 18px;}
.is-badges{display:flex; flex-wrap:wrap; gap:6px;}
.is-badge{display:inline-flex; align-items:center; font-size:12px; font-weight:600; padding:4px 10px; border-radius:999px; background:var(--surface-2, var(--bg)); border:1px solid var(--border-2); color:var(--text-dim);}
.is-ch-online{background:color-mix(in srgb, #2563eb 12%, var(--surface)); border-color:color-mix(in srgb, #2563eb 35%, transparent); color:var(--text);}
.is-ch-offline{background:color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color:color-mix(in srgb, var(--accent) 40%, transparent); color:var(--text);}
.is-ch-misto{background:color-mix(in srgb, var(--teal) 14%, var(--surface)); border-color:color-mix(in srgb, var(--teal) 40%, transparent); color:var(--text);}
.is-offer{display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:14px; background:color-mix(in srgb, var(--accent) 9%, var(--surface)); border:1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin:0 0 22px;}
.is-offer .material-symbols-outlined{color:var(--accent-2); font-size:22px; flex:none;}
.is-offer b{display:block; font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--accent-2); margin-bottom:4px;}
.is-offer p{margin:0; font-size:15.5px; line-height:1.55;}
.is-h{display:flex; align-items:center; gap:8px; font-size:17px; margin:0 0 10px; color:var(--text);}
.is-h .material-symbols-outlined{font-size:20px; color:var(--teal);}
.is-steps{counter-reset:is; list-style:none; padding:0; margin:0 0 22px;}
.is-steps li{counter-increment:is; position:relative; padding:0 0 14px 42px; line-height:1.55; font-size:15px; color:var(--text);}
.is-steps li::before{content:counter(is); position:absolute; left:0; top:-2px; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-weight:700; font-size:13px; color:#fff; background:var(--teal);}
.is-cols{display:grid; grid-template-columns:1fr; gap:12px; margin-bottom:18px;}
.is-box{padding:14px 16px; border-radius:14px; border:1px solid var(--border); background:var(--surface-2, var(--bg));}
.is-box ul{margin:0; padding-left:18px; font-size:14.5px; line-height:1.55; color:var(--text-dim);}
.is-box li{margin-bottom:5px;}
.is-warn .is-h .material-symbols-outlined{color:var(--accent-2);}
.is-variant{font-size:14.5px; line-height:1.6; color:var(--text-dim); padding:12px 14px; border-left:3px solid var(--teal); background:var(--surface-2, var(--bg)); border-radius:0 10px 10px 0; margin:0 0 18px;}
.is-fits{display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:13px; color:var(--text-mute);}
.is-fits a{font-size:12.5px; padding:4px 10px; border-radius:999px; border:1px solid var(--border-2); color:var(--link); text-decoration:none;}
.is-fits a:hover{border-color:var(--teal);}
.is-result-actions{display:flex; flex-direction:column; gap:10px; margin-top:22px; padding-top:18px; border-top:1px solid var(--border);}
.is-result-actions .pub-cta{justify-content:center; text-align:center; min-height:46px;}

/* Enciclopedia */
.is-section{margin-top:56px; scroll-margin-top:80px;}
.is-section-head h2{font-size:clamp(23px,5vw,34px); margin:0 0 8px; color:var(--text); line-height:1.2;}
.is-section-head p{margin:0 0 18px; color:var(--text-dim); font-size:15px; line-height:1.6; max-width:720px;}
.is-filters{display:grid; grid-template-columns:1fr; gap:10px; padding:14px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); margin-bottom:14px;}
.is-filters label{display:block; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--text-mute); margin-bottom:5px;}
.is-filters .is-f-actions{display:flex; gap:8px; align-items:flex-end;}
.is-filters .is-f-actions .pub-cta{flex:1; justify-content:center; min-height:46px;}
.is-channel-tabs{display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; margin-bottom:14px; padding-bottom:2px;}
.is-channel-tabs::-webkit-scrollbar{display:none;}
.is-channel-tabs a{flex:none; font-size:13.5px; padding:8px 14px; border-radius:999px; border:1px solid var(--border-2); color:var(--text-dim); text-decoration:none; background:var(--surface);}
.is-channel-tabs a.on{background:var(--teal); border-color:var(--teal); color:#fff; font-weight:600;}
.is-count{font-size:13.5px; color:var(--text-mute); margin:0 0 12px;}
.is-grid{display:grid; grid-template-columns:1fr; gap:12px;}
.is-item{display:flex; flex-direction:column; gap:8px; padding:16px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); text-decoration:none; color:inherit; transition:border-color .16s, transform .16s;}
.is-item:hover{border-color:var(--teal); transform:translateY(-2px);}
.is-item h3{font-size:16.5px; line-height:1.3; margin:0; color:var(--text);}
.is-item .is-item-for{font-size:12.5px; color:var(--link); font-weight:600;}
.is-item p{margin:0; font-size:14px; line-height:1.5; color:var(--text-dim); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.is-item .is-badges{margin-top:auto;}
.is-empty{text-align:center; padding:30px 12px; border:1px dashed var(--border-2); border-radius:var(--radius); color:var(--text-dim);}
.is-pager{display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:20px;}
.is-pager a, .is-pager span{min-width:42px; min-height:42px; display:inline-flex; align-items:center; justify-content:center; padding:0 12px; border-radius:10px; border:1px solid var(--border-2); text-decoration:none; color:var(--text-dim); font-size:14px; background:var(--surface);}
.is-pager span.on{background:var(--teal); border-color:var(--teal); color:#fff; font-weight:700;}

/* Come funziona + chiusura */
.is-how{display:grid; grid-template-columns:1fr; gap:12px; margin-top:18px;}
.is-how div{padding:16px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface);}
.is-how b{display:flex; align-items:center; gap:8px; font-size:15px; color:var(--text); margin-bottom:6px;}
.is-how b .material-symbols-outlined{color:var(--teal);}
.is-how p{margin:0; font-size:14px; line-height:1.55; color:var(--text-dim);}
.is-final{margin-top:48px; padding:24px 18px; border-radius:var(--radius); text-align:center; background:linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--teal) 12%, var(--surface))); border:1px solid var(--border);}
.is-final h2{font-size:clamp(21px,4.5vw,28px); margin:0 0 8px; color:var(--text);}
.is-final p{margin:0 auto 18px; max-width:560px; color:var(--text-dim); font-size:15px; line-height:1.6;}
.is-final .pub-cta{width:100%; justify-content:center; min-height:48px;}
.is-crumb{margin-top:6px;}

@media (min-width:600px){
  .is-card{padding:28px 30px;}
  .is-hero-actions{flex-direction:row; justify-content:center;}
  .is-sectors{grid-template-columns:repeat(2, 1fr);}
  .is-cols{grid-template-columns:repeat(2, 1fr);}
  .is-grid{grid-template-columns:repeat(2, 1fr);}
  .is-filters{grid-template-columns:repeat(2, 1fr);}
  .is-result-actions{flex-direction:row; flex-wrap:wrap;}
  .is-actions .pub-cta{flex:0 0 auto;}
  .is-final .pub-cta{width:auto;}
  .is-how{grid-template-columns:repeat(3, 1fr);}
}
@media (min-width:960px){
  .is-cols{grid-template-columns:repeat(3, 1fr);}
  .is-grid{grid-template-columns:repeat(3, 1fr);}
  .is-filters{grid-template-columns:2fr 1.3fr 1.3fr 1fr auto;}
  .is-sectors{grid-template-columns:repeat(3, 1fr);}
}
@media (prefers-reduced-motion: reduce){
  .is-progress-fill, .is-item{transition:none;}
  .is-item:hover{transform:none;}
  .is-spinner{animation-duration:2.5s;}
}

/* Immagini in evidenza (scelte da Stefania su Pexels) */
.is-cover{margin:0 0 16px; border-radius:14px; overflow:hidden; background:var(--surface-2, var(--bg)); position:relative;}
.is-cover img{display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover;}
.is-cover figcaption{position:absolute; right:8px; bottom:8px; font-size:11px; color:#fff; background:rgba(0,0,0,.5); padding:2px 8px; border-radius:999px;}
.is-hub-cover{margin-bottom:16px; border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.is-hub-cover img{aspect-ratio:21/9;}
.is-thumb{display:block; width:calc(100% + 32px); max-width:none; margin:-16px -16px 4px; aspect-ratio:16/9; object-fit:cover; border-radius:var(--radius) var(--radius) 0 0;}
.is-item{overflow:hidden;}
