/* ══ Variabili ══ */
:root {
    --blue-dark:   #003399;
    --green-main:  #1f613c;
    --green-dark:  #1f6040;
    --green-light: #f0f7f3;
    --orange:      #e07b00;
    --red:         #c0392b;
    --purple:      #7a0086;
    --text:        #1a1a1a;
    --gray:        #475466;
    --border:      #e5e7eb;
}

/* Ripristina i punti elenco per le liste degli articoli */
.articolo-lista {
    list-style-type: disc !important;
    margin-left: 20px !important;
    padding-left: 10px !important;
    margin-bottom: 18px !important;;
}
.articolo-lista li {
    margin-bottom: 8px; /* Rende l'elenco più traspirante e leggibile */
}

/* ══ Layout sezioni ══ */
.incentivi-section {
    padding: 4rem 0;
    background: #fff;
}
.incentivi-section:nth-child(even) {
    background: #f8fafc;
}
.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green-main);
    margin-bottom: .5rem;
}
.section-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: .8rem;
}
.section-lead {
    max-width: 800px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 2rem;
}

/* ══ Schede incentivo ══ */
.incentivo-card {
    background: #fff;
    border: 1px solid var(--border);
    border-top: 4px solid var(--green-main);
    border-radius: 10px;
    padding: 1.6rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.incentivo-card.blue { border-top-color: var(--blue-dark); }
.incentivo-card.orange { border-top-color: var(--orange); }
.incentivo-card.purple { border-top-color: var(--purple); }
.incentivo-card.red { border-top-color: var(--red); }

.incentivo-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.incentivo-card h3 i { font-size: 1rem; }
.incentivo-card p {
    font-size: .95rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: .8rem;
}
.incentivo-card p:last-child { margin-bottom: 0; }

/* ══ Parametri tecnici evidenziati ══ */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}
.tech-item {
    background: var(--green-light);
    border: 1px solid #c6e6d5;
    border-radius: 8px;
    padding: .8rem 1rem;
}
.tech-item.blue-bg {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.tech-item.orange-bg {
    background: #fff7ed;
    border-color: #fed7aa;
}
.tech-item.red-bg {
    background: #fff1f2;
    border-color: #fecdd3;
}
.tech-item label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
    margin-bottom: .2rem;
}
.tech-item strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.tech-item span {
    font-size: .78rem;
    color: var(--gray);
}

/* ══ Avvisi tecnici ══ */
.tech-alert {
    padding: .9rem 1.2rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
    font-size: .9rem;
    line-height: 1.6;
}
.tech-alert.warning {
    background: #fff8e1;
    border-left: 4px solid #f0c040;
}
.tech-alert.info {
    background: var(--green-light);
    border-left: 4px solid var(--green-main);
}
.tech-alert.danger {
    background: #fff1f2;
    border-left: 4px solid var(--red);
}
.tech-alert.blue {
    background: #eef2ff;
    border-left: 4px solid var(--blue-dark);
}

/* ══ Tabelle ══ */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
    margin: 1.5rem 0;
}
.table-wrap.is-scrollable::after {
    content: 'scorri per vedere tutto →';
    display: block;
    text-align: right;
    font-size: .75rem;
    color: #94a3b8;
    padding: .3rem .5rem .1rem;
}
.data-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .9rem;
    background: #fff;
}
.data-table thead tr { background: var(--green-main); color: #fff; }
.data-table thead tr.blue { background: var(--blue-dark); }
.data-table thead tr.orange { background: var(--orange); }
.data-table th { padding: .75rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #f8fafc; }
.data-table tr:hover td { background: var(--green-light); }
.table-note { font-size: .8rem; color: var(--gray); margin-top: .5rem; }

/* ══ Badge ══ */
.badge {
    display: inline-block;
    padding: .18rem .55rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* ══ Tabella decisionale ══ */
.decision-table { width: 100%; min-width: 800px; border-collapse: collapse; font-size: .88rem; }
.decision-table th { background: #1a2e1f; color: #fff; padding: .7rem .9rem; text-align: left; }
.decision-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.decision-table tr:nth-child(even) td { background: #f8fafc; }
.decision-table .winner { font-weight: 700; color: var(--green-main); }
.decision-table .scenario { font-weight: 600; color: var(--text); }

/* ══ Cumulabilità matrix ══ */
.matrix-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .88rem; text-align: center; }
.matrix-table th { background: #1a2e1f; color: #fff; padding: .65rem .8rem; }
.matrix-table td { padding: .6rem .8rem; border: 1px solid var(--border); }
.matrix-table .header-col { background: var(--green-main); color: #fff; font-weight: 600; text-align: left; }
.matrix-ok  { background: #dcfce7; font-size: 1.1rem; }
.matrix-no  { background: #fee2e2; font-size: 1.1rem; }
.matrix-cond { background: #fef9c3; font-size: .8rem; color: #854d0e; font-weight: 600; }

/* ══ Indice rapido ══ */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.quick-nav a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--green-main);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
    transition: box-shadow .2s, transform .2s;
}
.quick-nav a:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
.quick-nav a i { color: var(--green-main); font-size: 1rem; flex-shrink: 0; }

/* ══ Link correlati ══ */
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.2rem;
}
.related-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem;
    background: var(--green-light);
    border: 1px solid #c6e6d5;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--green-dark);
    text-decoration: none;
    transition: background .2s;
}
.related-link:hover { background: #c6e6d5; }
.related-link.blue-link {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--blue-dark);
}
.related-link.blue-link:hover { background: #c7d2fe; }

/* ══ Confronto Ecobonus vs Conto Termico ══ */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin: 1.2rem 0;
}
.compare-card {
    padding: 1.2rem;
    border-radius: 8px;
    border: 2px solid transparent;
}
.compare-card.eco {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.compare-card.ct {
    background: var(--green-light);
    border-color: #c6e6d5;
}
.compare-card h4 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.compare-card ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: .88rem;
    line-height: 1.9;
    color: #374151;
}

@media (max-width: 640px) {
    .compare-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: 1fr 1fr; }
    .data-table { font-size: .8rem; }
    .data-table th, .data-table td { padding: .5rem .6rem; }
}