/* telodiceunfesso theme — palette verde chiaro */
:root {
    --bg: #f4fbef;
    --surface: #ffffff;
    --green-light: #dcedc8;
    --green: #8bc34a;
    --green-dark: #558b2f;
    --green-darker: #33691e;
    --text: #2e3d23;
    --muted: #6b7a5e;
    --border: #c5e1a5;
    --max-width: 1200px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--green-dark); }

/* ---- Header ---- */
.site-header {
    background: linear-gradient(180deg, var(--green-light), var(--bg));
    border-bottom: 3px solid var(--green);
    text-align: center;
    padding: 1.5rem 1rem 1rem;
}
.site-header__inner { max-width: var(--max-width); margin: 0 auto; }
.site-title {
    display: inline-block;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--green-darker);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.site-subtitle {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    color: var(--muted);
    font-style: italic;
}

/* ---- Navbar principale (unica) ---- */
.main-nav {
    background: var(--green-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.main-nav__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}
.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 4px;
}
.main-nav a:hover { background: var(--green); }

/* ---- Corpo a 3 colonne ---- */
.layout-3col {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2.4fr 1fr; /* laterali strette, centrale larga */
    gap: 1.25rem;
    align-items: start;
}
.col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}
.col--center { padding: 1.25rem 1.5rem; }
.col__heading {
    margin-top: 0;
    font-size: 1.15rem;
    color: var(--green-darker);
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 0.4rem;
}
.col--center .col__heading { font-size: 1.5rem; }

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-bottom: 1px solid var(--green-light); }
.article-list li:last-child { border-bottom: 0; }
.article-list a {
    display: block;
    padding: 0.55rem 0;
    text-decoration: none;
    color: var(--text);
}
.article-list a:hover { color: var(--green-dark); }

/* ---- Feed novità (colonna centrale) ---- */
.news-feed { display: grid; gap: 1.1rem; }
.news-item {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--green-light);
}
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item h3 { margin: 0.2rem 0 0.35rem; font-size: 1.25rem; }
.news-item h3 a { color: var(--green-darker); text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p { margin: 0.35rem 0; }
.news-meta { color: var(--muted); font-size: 0.85rem; }
.news-more { font-weight: 600; text-decoration: none; }
.news-more:hover { text-decoration: underline; }
.news-tag {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}
.news-item--lead {
    background: var(--green-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}
.news-item--lead h3 { font-size: 1.45rem; }

/* ---- Footer ---- */
.site-footer {
    background: var(--green-darker);
    color: #eef6e3;
    margin-top: 2rem;
    padding: 1.25rem 1rem;
}
.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
}
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.25rem;
    margin: 0 0 0.6rem;
}
.footer-legal a { color: #d7ecc2; text-decoration: none; font-size: 0.9rem; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }
.footer-contact { margin: 0 0 0.6rem; }
.footer-contact a { color: #fff; text-decoration: none; font-size: 0.9rem; }
.footer-contact a:hover { text-decoration: underline; }
.site-footer__bottom { margin: 0; font-size: 0.8rem; color: #c7dcb2; }

/* ---- Pagine legali (colonna unica) ---- */
.legal-container {
    max-width: 820px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.legal-doc h1 { color: var(--green-darker); margin-top: 0; }
.legal-doc h2 {
    color: var(--green-dark);
    margin-top: 2rem;
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 0.3rem;
}
.legal-doc h3 { color: var(--green-darker); margin-top: 1.4rem; }
.legal-updated { color: var(--muted); font-size: 0.9rem; }
.legal-doc dl dt { font-weight: 700; margin-top: 0.7rem; }
.legal-doc dl dd { margin: 0 0 0.4rem; }
.legal-toc {
    background: var(--green-light);
    border-radius: 6px;
    padding: 0.8rem 1.2rem;
}
.legal-toc ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.92rem;
}
.legal-table th,
.legal-table td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
}
.legal-table th { background: var(--green-light); color: var(--green-darker); }

/* ---- Responsive: collassa a colonna singola ---- */
@media (max-width: 900px) {
    .layout-3col { grid-template-columns: 1fr; }
    .col--center { order: -1; } /* le novità in cima su mobile */
    .site-title { font-size: 2rem; }
}

/* Nasconde il box di login/logout iniettato dai plugin (es. adminUsers) sul sito pubblico.
   L'accesso all'area riservata resta possibile tramite URL diretto. */
#loginStatusBox { display: none !important; }
