/*
Theme Name:   WGS Theme Italia
Theme URI:    https://webgenesys.it
Author:       WebGenesys / Antonio
Author URI:   https://webgenesys.it
Description:  Tema per comuni italiani basato su Bootstrap Italia. Configurazione colori, menu e footer da JSON remoto (/municipio-config.json/).
Version:      1.1.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  wgs-theme-italia
Tags:         bootstrap-italia, agid, comuni, pubblica-amministrazione, pa
*/

/* ─── Reset / Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ─── Variabili colori (override dinamico via PHP) ─────────────────────────── */
:root {
    --wgs-color-primary:      #003882;
    --wgs-color-primary-dark: #001d42;
    --wgs-color-accent:       #003882;
    --wgs-color-footer:       #202a2e;
}

/* ─── Brand logo nell'header ────────────────────────────────────────────────── */
.wgs-brand-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}
.wgs-brand-logo {
    height: 60px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}
.wgs-slim-logo {
    height: 20px;
    width: auto;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.it-footer {
    background-color: var(--wgs-color-footer);
    color: #fff;
}
.it-footer .footer-heading {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgba(255,255,255,.5);
    margin-bottom: .75rem;
}
.it-footer .footer-list .list-item {
    color: rgba(255,255,255,.8) !important;
    font-size: .875rem;
    padding: .2rem 0;
}
.it-footer .footer-list .list-item:hover {
    color: #fff !important;
    text-decoration: underline;
}
.it-footer-small-prints {
    background-color: rgba(0,0,0,.2);
}
.footer-logo {
    border-radius: 4px;
    background: rgba(255,255,255,.1);
    padding: 4px;
}

/* ─── Breadcrumb ────────────────────────────────────────────────────────────── */
#briciole {
    background: #f5f5f5;
    padding: .5rem 0;
}
.breadcrumb-container .breadcrumb {
    margin: 0;
    background: transparent;
}
.breadcrumb-item .separator {
    margin: 0 .25rem;
    color: #999;
}

/* ─── Back to top ───────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wgs-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity .2s;
}
.back-to-top:hover { opacity: .85; }

/* ─── Header slim button outline ────────────────────────────────────────────── */
.it-header-slim-wrapper .btn-outline-light {
    border-color: rgba(255,255,255,.5);
    color: #fff;
    font-size: .75rem;
    padding: .15rem .6rem;
}
.it-header-slim-wrapper .btn-outline-light:hover {
    background: rgba(255,255,255,.15);
}

/* ─── Contenuto principale ─────────────────────────────────────────────────── */
.site-main {
    min-height: 60vh;
}

/* ─── Utility ───────────────────────────────────────────────────────────────── */
.wgs-section-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ─── Sezione Servizi / Card Categorie ──────────────────────────────────────── */
#sezione-servizi {
    background-color: #f2f7fc;
}
#sezione-servizi .wgs-section-title {
    color: #17324d;
}
.wgs-service-card {
    border: none;
    border-radius: 8px;
    transition: transform .15s, box-shadow .15s;
}
.wgs-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15) !important;
}
.wgs-service-card .link-list .list-item {
    padding: .3rem 0;
    font-size: .85rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: block;
}
.wgs-service-card .link-list .list-item:last-child {
    border-bottom: none;
}
.wgs-service-card-simple {
    border: none;
    border-radius: 6px;
    transition: transform .15s, box-shadow .15s;
}
.wgs-service-card-simple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12) !important;
}

/* ─── Section last news ──────────────────────────────────────────────────────── */
.scheda.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .15s;
}
.scheda.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.scheda .scheda-testo h4 a {
    text-decoration: none;
    font-weight: 600;
}

/* ─── Header Slim ────────────────────────────────────────────────────────────── */
.it-header-slim-wrapper .navbar-brand {
    color: #fff !important;
    font-size: .875rem;
    text-decoration: none;
    opacity: .9;
}
.wgs-slim-links {
    gap: 0;
}
.wgs-slim-link {
    color: rgba(255,255,255,.85) !important;
    font-size: .8125rem;
    text-decoration: none;
    padding: 0 18px;
    border-right: 1px solid rgba(255,255,255,.3);
    line-height: 1;
    transition: color .15s;
}
.wgs-slim-link:first-child { border-left: 1px solid rgba(255,255,255,.3); }
.wgs-slim-link:hover { color: #fff !important; }
.wgs-slim-sep {
    color: rgba(255,255,255,.3);
    padding: 0 8px;
    font-size: .875rem;
}
.wgs-slim-user {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: .8125rem;
    padding: 0;
    box-shadow: none !important;
}
.wgs-slim-user:hover { opacity: .85; }
.wgs-slim-accedi {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: .8125rem;
    padding: 0;
    box-shadow: none !important;
}
.wgs-slim-accedi:hover { opacity: .85; }

/* ─── Header Center ──────────────────────────────────────────────────────────── */
.it-brand-link { text-decoration: none !important; }
.wgs-brand-logo {
    height: 64px;
    width: auto;
    margin-right: 12px;
}
.it-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.it-brand-tagline {
    font-size: .8125rem;
    color: rgba(255,255,255,.75);
    margin-top: 2px;
}
.wgs-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: .85;
    transition: opacity .15s;
}
.wgs-social-icon:hover { opacity: 1; }
.it-search-wrapper .rounded-icon {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255,255,255,.6);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background .15s, border-color .15s;
}
.it-search-wrapper .rounded-icon:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
}
.it-search-wrapper span { color: #fff; font-size: .875rem; }

/* ─── Header Navbar ──────────────────────────────────────────────────────────── */
.wgs-tutti-argomenti {
    font-weight: 700 !important;
    letter-spacing: .01em;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.wgs-footer-border { border-color: rgba(255,255,255,.15) !important; }

.wgs-footer-logo-eu  { height: 64px;  width: auto; }
.wgs-footer-logo-comune { height: 48px; width: auto; border-radius: 4px; }

.wgs-footer-title {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.2);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.wgs-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wgs-footer-list li { margin-bottom: 5px; }
.wgs-footer-list a {
    color: rgba(255,255,255,.75);
    font-size: .8125rem;
    text-decoration: none;
    transition: color .15s;
}
.wgs-footer-list a:hover { color: #fff; text-decoration: underline; }
.wgs-footer-muted { color: rgba(255,255,255,.6) !important; }
.wgs-footer-link-light { color: rgba(255,255,255,.85); }
.wgs-footer-link-light:hover { color: #fff; }

.wgs-footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    transition: background .15s, border-color .15s;
}
.wgs-footer-social-icon:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.6);
}

.it-footer-small-prints { background: rgba(0,0,0,.2); }
.wgs-footer-small-link {
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    text-decoration: none;
}
.wgs-footer-small-link:hover { color: rgba(255,255,255,.85); }


/*AMMINISTRAZIONE TRASPARENTE*/
.at-tableclass {
    width: 50% !important;
    padding: 0px 5px 0px 0px !important;
}

.at-number {
    border-radius: unset !important;
    background-color: transparent !important;
    border: unset !important;
    padding-right: 30px;
}

li a:hover {
    color: #000000;
    text-decoration: underline !important;
}


.it-card-title.it-card-title-icon a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.it-card-title-icon-wrapper {
    flex: 0 0 auto;
}

.it-card-border-top-primary::after{
    background: #003882 !important;
}

.it-card-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* 3 righe, cambia a 4 se vuoi */
    overflow: hidden;
}

/* card contenitore */
.card-risultato {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* titolo */
.card-risultato .it-card-title {
    font-weight: 700;
    font-size: 2rem;          /* regola in base al tuo layout */
    line-height: 1.15;
}

/* link titolo: niente underline di default */
.card-risultato .card-title-link {
    color: var(--bs-heading-color, #17324d);
    text-decoration: none;
    font-weight: 700;
}

/* underline solo hover/focus */
.card-risultato .card-title-link:hover,
.card-risultato .card-title-link:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* excerpt non bold */
.card-risultato .card-excerpt {
    font-weight: 400;
    color: #5c6f82; /* tono BI */
    line-height: 1.5;

    /* clamp opzionale per uniformare le card */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 2 righe come nello screenshot */
    overflow: hidden;
}

/* footer in basso */
.card-risultato .it-card-footer {
    margin-top: auto;
    padding-top: 1rem;
}

/* data */
.card-risultato .it-card-date {
    color: #5c6f82;
    font-size: .95rem;
}

/* link "Leggi di più" */
.card-risultato .card-readmore {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-weight: 700;
    text-decoration: none;
}

.card-risultato .card-readmore:hover,
.card-risultato .card-readmore:focus {
    text-decoration: underline;
    text-underline-offset: 2px;
}

a {
    text-decoration: none !important;
}


.pagination .page-item .page-link[aria-current] {
    border: 1px solid #06c;
    color: #fff !important;
    pointer-events: none;
}

/*:root {*/
/*    --bs-body-bg: #eceff1;*/
/*}*/


.wgs-at-bi h2 a { text-decoration: none; }
.wgs-at-bi h2 a:hover,
.wgs-at-bi h2 a:focus { text-decoration: underline; text-underline-offset: 3px; }

.wgs-at-bi ul li { margin-bottom: .25rem; }

/*LINK*/

.entry-content a {
    color: #0056b3;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

.entry-content a:hover,
.entry-content a:focus {
    color: #003d80;
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
}

.entry-content a[target="_blank"]::after {
    font-size: 0.9em;
}

/* ─── Single amm-trasparente: sidebar AGID ───────────────────────────────────── */

.border-col {
    border-right: 1px solid #e6ecf2;
}

.cmp-navscroll .accordion-item  { border: none; background: transparent; }
.cmp-navscroll .accordion-button {
    background: transparent !important;
    box-shadow: none !important;
    color: #17324d;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: .75rem 1rem;
}
.cmp-navscroll .accordion-button::after { display: none; }
.cmp-navscroll .accordion-button .icon { margin-left: auto; }

.cmp-navscroll .progress { height: 2px; border-radius: 0; background: #e6ecf2; }
.cmp-navscroll .it-navscroll-progressbar { background: var(--bs-primary, #0066cc); }

.cmp-navscroll .link-list .nav-item { position: relative; }
.cmp-navscroll .link-list .nav-link {
    color: #5c7080;
    font-size: .875rem;
    padding: .4rem 1rem;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
.cmp-navscroll .link-list .nav-link:hover { color: var(--bs-primary, #0066cc); }
.cmp-navscroll .link-list .nav-link.active,
.cmp-navscroll .link-list .nav-item.active > .nav-link {
    color: var(--bs-primary, #0066cc);
    border-left-color: var(--bs-primary, #0066cc);
    font-weight: 600;
}

.cmp-navscroll .list-item {
    font-size: .8125rem;
    color: var(--bs-primary, #0066cc);
    padding: .3rem 1rem;
    display: block;
    text-decoration: none;
}
.cmp-navscroll .list-item:hover { text-decoration: underline; }
.cmp-navscroll .list-item.active { font-weight: 600 !important; }
.cmp-navscroll .list-item.fw-bold { color: #17324d; font-weight: 700 !important; }
.cmp-navscroll hr { border-color: #e6ecf2; margin: .5rem 0; }
.cmp-navscroll.sticky-top { top: 80px; }

@media (min-width: 992px) {
    .it-page-sections-container { padding-left: .5rem; }
    .border-col { padding-right: 1.5rem; }
}

.it-page-section.anchor-offset { scroll-margin-top: 100px; }

.h3.fw-semibold:hover {
    text-decoration: underline !important;
}

/* Sidebar amm-trasparente: separatore sezione visibile */
.cmp-navscroll hr {
    border-color: #c0cdd8;
    border-top-width: 2px;
    opacity: 1;
}