/* MADA Idee · configuratore e card delle idee di progetto. Le regole con !important annullano gli stili di Flatsome su pulsanti ed elenchi. */
.mada-idee { --mi-y: #E7C43F; --mi-k: #111111; --mi-line: #e3e1d9; --mi-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --mi-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif; --mi-head: "Archivo", "Helvetica Neue", Arial, sans-serif; }

/* Configuratore */
.mada-idee .mada-idee-config { margin: 0 0 28px; padding: 30px 32px 28px; border-radius: 28px; color: #ffffff; background-color: var(--mi-k); background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 28px 28px; background-position: -1px -1px; }
.mada-idee .mada-idee-barra { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 22px; }
.mada-idee .mada-idee-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px !important; font-family: var(--mi-mono) !important; font-size: .78rem !important; letter-spacing: .12em; text-transform: uppercase; color: var(--mi-y) !important; }
.mada-idee .mada-idee-led { width: 8px; height: 8px; border-radius: 50%; background: var(--mi-y); box-shadow: 0 0 0 4px rgba(231,196,63,.22); animation: mada-idee-led 2s ease-in-out infinite; }
.mada-idee .mada-idee-domanda { margin: 0 !important; font-family: var(--mi-head) !important; font-weight: 800; font-size: 1.9rem !important; line-height: 1.1 !important; letter-spacing: -0.02em; color: #ffffff !important; }
.mada-idee .mada-idee-esito { margin: 0 !important; font-family: var(--mi-mono) !important; font-size: .95rem !important; color: #d8d8d8 !important; }
.mada-idee .mada-idee-n { display: inline-block; min-width: 1.4em; font-size: 2.2rem; font-weight: 500; line-height: 1; color: var(--mi-y); text-align: right; }
.mada-idee .mada-idee-gruppo { padding: 16px 0 0; border-top: 1px solid #2e2e2e; }
.mada-idee .mada-idee-gruppo + .mada-idee-gruppo { margin-top: 16px; }
.mada-idee .mada-idee-legenda { margin: 0 0 12px !important; font-family: var(--mi-sans) !important; font-size: .95rem !important; font-weight: 700; color: #ffffff !important; }
.mada-idee .mada-idee-legenda span { margin-right: 6px; font-family: var(--mi-mono); font-weight: 500; color: var(--mi-y); }
.mada-idee .mada-idee-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mada-idee .mada-idee-chip { display: inline-flex !important; align-items: center; min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 8px 16px !important; border: 1.5px solid #5a5a5a !important; border-radius: 99px !important; background: transparent !important; color: #ffffff !important; font-family: var(--mi-sans) !important; font-size: .92rem !important; font-weight: 500; line-height: 1.25 !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: none !important; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.mada-idee .mada-idee-chip:hover { border-color: #ffffff !important; }
.mada-idee .mada-idee-chip[aria-pressed="true"] { background: var(--mi-y) !important; border-color: var(--mi-y) !important; color: var(--mi-k) !important; font-weight: 700; }
.mada-idee .mada-idee-chip:focus-visible { outline: 3px solid var(--mi-y); outline-offset: 2px; }

/* Card */
.mada-idee .mada-idee-lista { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mada-idee .mada-idea { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.mada-idee .mada-idea[hidden] { display: none !important; }
.mada-idee .mada-idea::before, .mada-idee .mada-idea::marker { content: none !important; }
.mada-idee .mada-idea-card { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 24px 24px 22px; background: #ffffff; border: 1px solid var(--mi-line); border-radius: 22px; animation: mada-idee-entra .35s ease both; }
.mada-idee .mada-idea-testa { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.mada-idee .mada-idea-area { padding: 4px 12px; border-radius: 99px; font-family: var(--mi-sans); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--mi-y); color: var(--mi-k); border: 1.5px solid var(--mi-y); }
.mada-idee .mada-idea-infrastruttura .mada-idea-area { background: var(--mi-k); border-color: var(--mi-k); color: #ffffff; }
.mada-idee .mada-idea-digitale .mada-idea-area { background: transparent; border-color: var(--mi-k); }
.mada-idee .mada-idea-num { font-family: var(--mi-mono); font-size: .8rem; color: #8a877f; }
.mada-idee .mada-idea-titolo { margin: 0 0 8px !important; padding: 0; font-family: var(--mi-head) !important; font-size: 1.22rem !important; font-weight: 800; line-height: 1.25 !important; letter-spacing: -0.01em; color: var(--mi-k) !important; text-wrap: balance; }
.mada-idee .mada-idea-problema { margin: 0 0 18px !important; font-family: var(--mi-sans) !important; font-size: .97rem !important; line-height: 1.5 !important; color: #5a5a5a !important; }
.mada-idee .mada-idea-etichetta { margin: 0 0 10px !important; font-family: var(--mi-mono) !important; font-size: .72rem !important; letter-spacing: .12em; text-transform: uppercase; color: #8a877f !important; }

/* Il flusso in tre passi, con il punto giallo che lo percorre */
.mada-idee .mada-idea-flusso { position: relative; list-style: none !important; margin: 0 0 22px !important; padding: 0 !important; counter-reset: mada-passo; }
.mada-idee .mada-idea-flusso::after { content: ""; position: absolute; left: 10px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--mi-y); box-shadow: 0 0 0 4px rgba(231,196,63,.28); animation: mada-idee-flusso 3.6s ease-in-out infinite; }
.mada-idee .mada-idea-flusso li { position: relative; margin: 0 !important; padding: 3px 0 14px 42px !important; list-style: none !important; counter-increment: mada-passo; font-family: var(--mi-sans) !important; font-size: .95rem !important; line-height: 1.45 !important; color: #2a2a2a !important; }
.mada-idee .mada-idea-flusso li:last-child { padding-bottom: 0 !important; font-weight: 700; color: var(--mi-k) !important; }
.mada-idee .mada-idea-flusso li::marker { content: none; }
.mada-idee .mada-idea-flusso li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: repeating-linear-gradient(to bottom, #c9c6bd 0 4px, transparent 4px 8px); }
.mada-idee .mada-idea-flusso li::before { content: counter(mada-passo, decimal-leading-zero); position: absolute; z-index: 1; left: 0; top: 0; width: 28px; height: 28px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--mi-k); border-radius: 50%; background: #ffffff; font-family: var(--mi-mono); font-size: .68rem; font-weight: 500; color: var(--mi-k); }
.mada-idee .mada-idea-flusso li:last-child::before { background: var(--mi-y); border-color: var(--mi-y); }

.mada-idee .mada-idea-meta { margin: auto 0 18px !important; padding: 14px 0 0 !important; border-top: 1px solid var(--mi-line); }
.mada-idee .mada-idea-meta dt { margin: 0 0 3px !important; font-family: var(--mi-mono) !important; font-size: .68rem !important; font-weight: 500 !important; letter-spacing: .1em; text-transform: uppercase; color: #8a877f !important; }
.mada-idee .mada-idea-meta dd { margin: 0 !important; font-family: var(--mi-sans) !important; font-size: .88rem !important; line-height: 1.4 !important; color: #2a2a2a !important; }
.mada-idee .mada-idea-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 99px; background: var(--mi-k); color: #ffffff !important; font-family: var(--mi-sans); font-size: .92rem; font-weight: 700; text-decoration: none !important; transition: background-color .15s ease, color .15s ease; }
.mada-idee .mada-idea-cta:hover { background: var(--mi-y); color: var(--mi-k) !important; }
.mada-idee .mada-idea-cta:focus-visible { outline: 3px solid var(--mi-y); outline-offset: 2px; }
.mada-idee .mada-idea-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mada-idee .mada-idea-fatto { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: #F4F3EF; color: var(--mi-k); font-family: var(--mi-sans); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.mada-idee .mada-idea-risultato { margin: 0 0 18px !important; padding: 12px 14px !important; border-radius: 14px; background: #FBF3D1; font-family: var(--mi-sans) !important; font-size: .92rem !important; line-height: 1.45 !important; color: var(--mi-k) !important; }
.mada-idee .mada-idea-risultato-et { display: block; margin: 0 0 3px; font-family: var(--mi-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #6b5a14; }
.mada-idee .mada-idee-vuoto { margin: 8px 0 0 !important; font-family: var(--mi-sans) !important; color: #3a3a3a !important; }

@keyframes mada-idee-flusso { 0% { top: 16px; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { top: calc(100% - 46px); opacity: 0; } }
@keyframes mada-idee-led { 50% { box-shadow: 0 0 0 7px rgba(231,196,63,0); } }
@keyframes mada-idee-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 849px) { .mada-idee .mada-idee-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 549px) {
  .mada-idee .mada-idee-lista { grid-template-columns: minmax(0, 1fr); }
  .mada-idee .mada-idee-config { padding: 24px 18px 22px; border-radius: 22px; }
  .mada-idee .mada-idee-domanda { font-size: 1.55rem !important; }
  .mada-idee .mada-idee-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 0 18px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
  .mada-idee .mada-idee-chips::-webkit-scrollbar { display: none; }
  .mada-idee .mada-idee-chip { flex: none; }
  .mada-idee .mada-idee-n { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .mada-idee .mada-idea-flusso::after, .mada-idee .mada-idee-led, .mada-idee .mada-idea-card { animation: none; } .mada-idee .mada-idea-flusso::after { opacity: 0; } }
