/* Siti pubblici: grafica allineata a asi-avellino.com */
:root {
    --asi-green: #0f611f;
    --asi-green-dark: #0b4a17;
    --asi-orange: #fe6500;
    --asi-gradient: linear-gradient(135deg, #0f611f 30%, #fe6500 100%);
    --asi-text: #48494c;
    --asi-muted: #6b6d74;
    --asi-footer: #1a1c20;

    --bs-primary: var(--asi-green);
    --bs-primary-rgb: 15, 97, 31;
    --bs-link-color: var(--asi-green);
    --bs-link-color-rgb: 15, 97, 31;
    --bs-link-hover-color: var(--asi-green-dark);
    --bs-link-hover-color-rgb: 11, 74, 23;
    --bs-body-font-family: "Montserrat", Helvetica, Arial, Verdana, sans-serif;
    --bs-body-font-size: 0.95rem;
    --bs-body-color: var(--asi-text);
    --bs-border-radius: 2px;
}

body.site { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.site-main { flex: 1 0 auto; }

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; padding: .5rem 1rem; background: #fff; color: var(--asi-green); }

.btn-primary {
    --bs-btn-bg: var(--asi-green); --bs-btn-border-color: var(--asi-green);
    --bs-btn-hover-bg: var(--asi-green-dark); --bs-btn-hover-border-color: var(--asi-green-dark);
    --bs-btn-active-bg: var(--asi-green-dark); --bs-btn-active-border-color: var(--asi-green-dark);
    font-weight: 600;
}
.btn-outline-primary {
    --bs-btn-color: var(--asi-green); --bs-btn-border-color: var(--asi-green);
    --bs-btn-hover-bg: var(--asi-green); --bs-btn-hover-border-color: var(--asi-green);
    --bs-btn-active-bg: var(--asi-green-dark);
}
.text-primary { color: var(--asi-green) !important; }
:focus-visible { outline: 3px solid var(--asi-orange); outline-offset: 2px; }

/* Barra superiore */
.site-topbar { background: #f5f5f5; border-bottom: 1px solid #e6e6e6; font-size: .8rem; padding: .4rem 0; color: var(--asi-muted); }
.site-topbar a { color: #333; text-decoration: none; }
.site-topbar a:hover, .site-topbar a[aria-current] { color: var(--asi-green); text-decoration: underline; }
.site-topbar .list-inline-item:not(:last-child) { margin-right: 1rem; }

/* Intestazione */
.site-header { background: #fff; padding-top: 1rem; }
.site-header .container { padding-bottom: 1rem; }
.site-logo img { height: 70px; width: auto; }
.site-title a { font-size: 1.5rem; font-weight: 700; color: #333; text-decoration: none; letter-spacing: -.01em; }
.site-title a:hover { color: var(--asi-green); }
.site-header-bar { height: 4px; background: var(--asi-gradient); }

/* Titolo pagina */
.page-title-bar { background: rgba(0, 0, 0, .04); padding: 1.75rem 0; }
.page-title-bar h1 { font-size: 1.6rem; font-weight: 700; color: #333; margin: 0; }
.breadcrumb { font-size: .8rem; margin-bottom: .5rem; }

h1, h2, h3, h4 { color: #333; }

/* Albo */
.albo-intro { font-size: .85rem; color: var(--asi-muted); max-width: 900px; }
.albo-table { font-size: .85rem; }
.albo-table thead th { background: #333; color: #fff; font-weight: 600; white-space: nowrap; }

/* Amministrazione trasparente: home */
.at-card { border: 1px solid #e3e5e8; border-top: 4px solid var(--asi-green); padding: 1.25rem; background: #fff; }
.at-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.at-card-title a { color: #222; text-decoration: none; }
.at-card-title a:hover { color: var(--asi-green); text-decoration: underline; }
.at-card-list { list-style: none; padding: 0; margin: 0; font-size: .875rem; }
.at-card-list li { padding: .3rem 0; border-top: 1px solid #f0f1f3; }
.at-card-list a { color: var(--asi-text); text-decoration: none; }
.at-card-list a:hover { color: var(--asi-green); text-decoration: underline; }

/* Amministrazione trasparente: pagina */
.at-sidenav { border: 1px solid #e3e5e8; font-size: .875rem; }
.at-sidenav-title { background: var(--asi-green); padding: .65rem 1rem; }
.at-sidenav-title a { color: #fff; font-weight: 600; text-decoration: none; }
.at-sidenav ul { list-style: none; margin: 0; padding: 0; }
.at-sidenav ul ul { padding-left: 1rem; background: #fafbfa; }
.at-sidenav li a { display: block; padding: .5rem 1rem; color: var(--asi-text); text-decoration: none; border-top: 1px solid #f0f1f3; }
.at-sidenav li a:hover { color: var(--asi-green); background: #f4f8f5; }
.at-sidenav li a.open { font-weight: 600; color: #222; }
.at-sidenav li a.current { font-weight: 700; color: var(--asi-green); border-left: 3px solid var(--asi-orange); }
.at-content { line-height: 1.65; overflow-wrap: anywhere; }
.at-content img { max-width: 100%; height: auto; }
.at-content table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.at-content table td, .at-content table th { border: 1px solid #dee2e6; padding: .4rem .6rem; vertical-align: top; }
.at-content a[href$=".pdf"]::after { content: " (PDF)"; font-size: .75em; color: var(--asi-muted); }
.at-updated { font-size: .8rem; color: var(--asi-muted); border-top: 1px solid #e3e5e8; padding-top: .75rem; margin-top: 2rem; }
.at-children { list-style: none; padding: 0; }
.at-children li a { display: flex; gap: .5rem; align-items: center; padding: .75rem 1rem; border: 1px solid #e3e5e8; margin-bottom: .5rem; color: #222; font-weight: 500; text-decoration: none; }
.at-children li a:hover { border-color: var(--asi-green); color: var(--asi-green); }
.at-results li { padding: 1rem 0; border-bottom: 1px solid #e3e5e8; }

/* Piè di pagina */
.site-footer { background: var(--asi-footer); color: #c6c7cb; font-size: .875rem; padding-top: 2.5rem; margin-top: 3rem; }
.site-footer h2 { color: #fff; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-bottom: 1rem; }
.site-footer a { color: #fff; }
.site-bottombar { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding: 1rem 0; font-size: .8rem; }

@media (max-width: 575.98px) {
    .site-logo img { height: 56px; }
    .site-title a { font-size: 1.2rem; }
}
