/* ============================================
   STILE PER ARTICOLO FIDUCIARI GGG CAMPANIA
   ============================================ */

/* ---------- BASE ---------- */
.joomla-article {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.10);
    padding: 2.5rem 2.8rem;
}

/* ---------- INTESTAZIONE ---------- */
.article-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e9edf4;
    padding-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0b1e33;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-header h1 small {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
    margin-left: 0.25rem;
}

.article-header .badge-archivio {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 1rem;
    border-radius: 40px;
    margin-top: 0.25rem;
    letter-spacing: 0.3px;
}

.article-header .sub {
    color: #475569;
    margin-top: 0.3rem;
    font-size: 1rem;
    border-left: 4px solid #818cf8;
    padding-left: 1rem;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1rem;
}

/* ---------- TITOLI SEZIONE ---------- */
.section-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 2.8rem 0 1.2rem 0;
    color: #0f2b45;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 1.8rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #cbd5e1, transparent);
    margin-left: 0.5rem;
}

.section-title.prov {
    color: #1e3a5f;
}

/* ---------- PROVINCIA LABEL ---------- */
.provincia-label {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.8rem 0;
    padding: 0.4rem 0 0.4rem 1.2rem;
    border-left: 6px solid #818cf8;
    background: #f1f5f9;
    border-radius: 0 12px 12px 0;
    color: #0b1e33;
    display: flex;
    align-items: center;
    gap: 8px;
}

.provincia-label .pin {
    font-size: 1.2rem;
}

/* ---------- CARD ---------- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 800px) {
    .card-grid.two-col {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: #fafcff;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    padding: 1.2rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.08);
}

.card-header {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-header .tag {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.1rem 0.8rem;
    border-radius: 30px;
    line-height: 1.8;
}

/* ---------- ENTRY LIST ---------- */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.entry {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 0.35rem 0.2rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    transition: background 0.1s;
    border-radius: 6px;
}

.entry:hover {
    background: #f8faff;
}

.entry-date {
    min-width: 130px;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}

.entry-name {
    font-weight: 500;
    color: #0b1e33;
    margin-right: 6px;
}

.entry-role {
    font-size: 0.7rem;
    background: #e9edf4;
    padding: 0.05rem 0.7rem;
    border-radius: 40px;
    color: #334155;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    margin-left: 2px;
}

.entry-role.commissario {
    background: #fef3c7;
    color: #92400e;
}

.entry-role.reggente {
    background: #dbeafe;
    color: #1e40af;
}

/* ---------- NOTE BOX ---------- */
.note-box {
    background: #f1f6fe;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-top: 2.5rem;
    border-left: 6px solid #818cf8;
    color: #1e293b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.note-box strong {
    color: #1e3a5f;
}

/* ---------- FOOTER ---------- */
.footer-meta {
    margin-top: 2.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e9edf4;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-meta .update {
    background: #f1f5f9;
    padding: 0.1rem 0.9rem;
    border-radius: 40px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
    .joomla-article {
        padding: 1.5rem 1rem;
    }
    .article-header h1 {
        font-size: 1.6rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .entry-date {
        min-width: 100px;
        font-size: 0.8rem;
    }
    .entry {
        font-size: 0.85rem;
        padding: 0.3rem 0;
    }
    .card {
        padding: 1rem 1rem;
    }
    .provincia-label {
        font-size: 1.1rem;
        padding-left: 0.8rem;
    }
}

@media (max-width: 480px) {
    .entry-date {
        min-width: 85px;
    }
    .entry-name {
        font-size: 0.85rem;
    }
    .entry-role {
        font-size: 0.6rem;
        padding: 0 0.5rem;
    }
}

@media print {
    body { background: white; padding: 0.5in; }
    .joomla-article { box-shadow: none; border: 1px solid #ddd; }
    .card:hover { background: #fafcff; }
    .entry:hover { background: transparent; }
}