:root {
    --ec5-sidebar-bg: #172334;
    --ec5-sidebar-bg-soft: #1d2b3d;
    --ec5-sidebar-text: #dbe4ef;
    --ec5-sidebar-muted: #8190a3;
    --ec5-header-bg: #111b28;
    --ec5-accent: #e6d94a;
    --ec5-accent-soft: rgba(230, 217, 74, 0.12);
    --ec5-body-bg: #f4f6f9;
    --ec5-border-soft: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--ec5-body-bg);
}

/* ============================================================
   AREA TECNICA - HEADER
   ============================================================ */

.ec5-admin-header {
    min-height: 68px;
    padding: 0.55rem 0;
    background: var(--ec5-header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 18px rgba(8, 17, 29, 0.10);
}

.ec5-admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-decoration: none;
}

.ec5-admin-brand:hover {
    color: #ffffff;
}

.ec5-admin-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border-radius: 9px;
    background: var(--ec5-accent);
    color: #172334;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.ec5-admin-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.ec5-admin-brand-text strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.ec5-admin-brand-text small {
    margin-top: 0.22rem;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ec5-admin-user {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.ec5-admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.82);
}

.ec5-admin-user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ec5-accent);
    font-size: 0.9rem;
}

.ec5-admin-user-name {
    font-size: 0.88rem;
    font-weight: 500;
}

.ec5-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    font-size: 0.82rem;
}

.ec5-btn-logout:hover,
.ec5-btn-logout:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.42);
}

/* ============================================================
   AREA TECNICA - SIDEBAR
   ============================================================ */

.sidebar-tecnico {
    min-height: calc(100vh - 68px);
    background: var(--ec5-sidebar-bg);
    border-right: 1px solid rgba(17, 27, 40, 0.12);
}

.sidebar-tecnico-inner {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 68px);
    padding: 1.05rem 0.75rem 0.9rem;
}

.sidebar-tecnico-sezione {
    padding: 0.55rem 0.7rem 0.38rem;
    color: var(--ec5-sidebar-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sidebar-tecnico-menu {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    margin-bottom: 0.78rem;
}

.sidebar-tecnico-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 44px;
    padding: 0.62rem 0.72rem;
    border-radius: 9px;
    color: var(--ec5-sidebar-text);
    text-decoration: none;
    font-size: 0.91rem;
    font-weight: 500;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.sidebar-tecnico-link i {
    width: 20px;
    flex: 0 0 20px;
    color: #91a2b6;
    font-size: 0.98rem;
    text-align: center;
    transition: color 0.15s ease;
}

.sidebar-tecnico-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.sidebar-tecnico-link:hover i {
    color: #ffffff;
}

.sidebar-tecnico-link.active {
    color: #ffffff;
    background:
        linear-gradient(
            90deg,
            var(--ec5-accent-soft),
            rgba(255, 255, 255, 0.035)
        );
    box-shadow: inset 3px 0 0 var(--ec5-accent);
}

.sidebar-tecnico-link.active i {
    color: var(--ec5-accent);
}

.sidebar-tecnico-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.75rem 0.7rem 0.1rem;
    border-top: 1px solid var(--ec5-border-soft);
    color: var(--ec5-sidebar-muted);
    font-size: 0.72rem;
}

.sidebar-tecnico-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4bc27b;
    box-shadow: 0 0 0 3px rgba(75, 194, 123, 0.12);
}

.sidebar-tecnico .list-group-item {
    background-color: transparent;
    color: var(--ec5-sidebar-text);
    border-color: var(--ec5-border-soft);
}

.sidebar-tecnico .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar-tecnico .list-group-item.disabled {
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 767.98px) {

    .ec5-admin-header {
        min-height: 64px;
    }

    .ec5-admin-brand-text small,
    .ec5-admin-user-name {
        display: none;
    }

    .ec5-admin-user {
        gap: 0.5rem;
    }

    .ec5-btn-logout span {
        display: none;
    }

    .sidebar-tecnico {
        min-height: auto;
    }

    .sidebar-tecnico-inner {
        min-height: auto;
        position: static;
        padding: 0.75rem;
    }

    .sidebar-tecnico-footer {
        display: none;
    }
}

.card {
    border-radius: 0.8rem;
}

.colore-servizio {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.card-link {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.servizio-check-card {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 66px;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    background-color: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.servizio-check-card:hover {
    border-color: #86b7fe;
    background-color: #f8fbff;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.06);
}

.servizio-check-card:has(.form-check-input:checked) {
    border-color: #0d6efd;
    background-color: #eef5ff;
}

.servizio-check-disattivo {
    opacity: 0.65;
    background-color: #f8f9fa;
}

.logo-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    background-color: #ffffff;
}

.logo-preview {
    display: block;
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.titolo-ec5 {
    color: #075d3c;
}

.totem-body {
    min-height: 100vh;
    background-color: #f4f6f9;
}

.totem-logo {
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
}

.totem-cliente {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.totem-titolo {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.totem-sottotitolo {
    font-size: 1.25rem;
    color: #6c757d;
}

.totem-servizio {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 190px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #212529;
    background-color: #ffffff;
    border: 4px solid var(--servizio-colore);
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.08);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.totem-servizio:hover,
.totem-servizio:focus {
    color: #212529;
    transform: translateY(-3px);
    box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.13);
}

.totem-servizio:active {
    transform: scale(0.98);
}

.totem-servizio-nome {
    font-size: 2rem;
    font-weight: 700;
}

.totem-servizio-descrizione {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    color: #6c757d;
}

.totem-servizio-attesa {
    margin-top: 1rem;
    font-size: 1rem;
}

button.totem-servizio {
    font-family: inherit;
    cursor: pointer;
}

.ticket-emesso-card {
    padding: 3rem 2rem;
    text-align: center;
    background-color: #ffffff;
    border: 5px solid var(--ticket-colore);
    border-radius: 1.25rem;
    box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.12);
}

.ticket-emesso-numero {
    margin-top: 0.5rem;
    font-size: clamp(5rem, 15vw, 10rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ticket-colore);
}

.ticket-emesso-servizio {
    margin-top: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

/* ============================================================
   TABELLONE
   ============================================================ */

html,
body {
    height: 100%;
}

.tabellone-body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;

    background-color: #101722;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #ffffff;
}


/* AVVIO */

.tabellone-start {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f4f6f9;
    color: #1d2a3a;
}

.tabellone-start-logo {
    max-width: 280px;
    max-height: 130px;
    object-fit: contain;
}


/* STRUTTURA */

.tabellone-principale {
    min-height: 100vh;

    display: none;
    flex-direction: column;
}

.tabellone-header {
    min-height: 120px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 32px;

    background: rgba(0, 0, 0, 0.60);

    backdrop-filter: blur(5px);
}

.tabellone-logo {
    max-width: 180px;
    max-height: 85px;
    object-fit: contain;
}

.tabellone-cliente {
    font-size: 1.15rem;
    opacity: .8;
}

.tabellone-titolo {
    font-size: 2rem;
    font-weight: 700;
}

.tabellone-sottotitolo {
    opacity: .75;
}

.tabellone-dataora {
    white-space: nowrap;
    font-size: 1.15rem;
}

.tabellone-ora {
    font-size: 2.2rem;
    font-weight: 700;
}


/* CORPO */

.tabellone-main {
    flex: 1;

    min-height: 0;

    display: flex;
    gap: 22px;

    padding: 22px 30px;
}

.tabellone-chiamate {
    flex: 1;
    min-width: 0;
}


/* LISTA */

.tabellone-lista-header,
.tabellone-riga {
    display: grid;

    grid-template-columns:
        minmax(180px, 0.8fr)
        minmax(250px, 1.6fr)
        minmax(220px, 1fr);

    gap: 20px;

    align-items: center;
}

.tabellone-lista-header {
    padding: 0 24px 12px;

    font-size: 1rem;
    font-weight: 600;

    opacity: .65;
}

.tabellone-riga {
    margin-bottom: 12px;
    padding: 18px 24px;

    border-radius: 16px;

    background: rgba(0, 0, 0, .62);

    box-shadow:
        0 8px 22px
        rgba(0, 0, 0, .18);
}

.tabellone-riga-prima {
    background: rgba(0, 0, 0, .82);
}

.tabellone-numero {
    font-size: 3rem;
    line-height: 1;

    font-weight: 800;

    letter-spacing: .04em;
}

.ticket-size-medio .tabellone-numero {
    font-size: 2.4rem;
}

.ticket-size-grande .tabellone-numero {
    font-size: 3.2rem;
}

.ticket-size-molto_grande .tabellone-numero {
    font-size: 4rem;
}

.tabellone-servizio {
    font-size: 1.55rem;
    font-weight: 600;
}

.tabellone-sportello {
    text-align: right;

    font-size: 1.75rem;
    font-weight: 700;
}

.tabellone-vuoto {
    padding: 80px 20px;

    text-align: center;

    font-size: 2rem;

    opacity: .65;
}


/* CARD */

.tabellone-card-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(300px, 1fr)
        );

    gap: 18px;
}

.tabellone-servizio-card {
    min-height: 260px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 24px;

    text-align: center;

    border-top:
        8px solid #ffffff;

    border-radius: 18px;

    background:
        rgba(0, 0, 0, .68);
}

.tabellone-servizio-card-titolo {
    font-size: 1.45rem;

    font-weight: 700;

    text-transform: uppercase;
}

.tabellone-servizio-card-numero {
    margin: 18px 0;

    font-size: 5rem;

    line-height: 1;

    font-weight: 800;
}

.ticket-size-medio
.tabellone-servizio-card-numero {
    font-size: 4rem;
}

.ticket-size-grande
.tabellone-servizio-card-numero {
    font-size: 5rem;
}

.ticket-size-molto_grande
.tabellone-servizio-card-numero {
    font-size: 6rem;
}

.tabellone-servizio-card-sportello {
    font-size: 1.8rem;
    font-weight: 700;
}

.tabellone-servizio-card-attesa {
    margin-top: 25px;

    font-size: 4rem;

    opacity: .4;
}


/* LATERALE */

.tabellone-laterale {
    width: min(31vw, 480px);

    display: flex;
    flex-direction: column;

    gap: 18px;
}

.tabellone-media-box {
    min-height: 240px;
    flex: 1;

    overflow: hidden;

    border-radius: 18px;

    background: #000000;
}

.tabellone-media-box img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: opacity .25s ease;
}

.tabellone-media-box img.cambio {
    opacity: 0;
}

.tabellone-news-box {
    padding: 20px;

    border-radius: 18px;

    background:
        rgba(0, 0, 0, .68);
}

.tabellone-news-titolo {
    margin-bottom: 10px;

    font-size: 1.2rem;
    font-weight: 700;
}

.tabellone-news-contenuto {
    opacity: .8;
}


/* TICKER */

.tabellone-ticker {
    height: 58px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: rgba(0, 0, 0, .88);

    border-top:
        1px solid
        rgba(255, 255, 255, .12);
}

.tabellone-ticker-track {
    white-space: nowrap;

    padding-left: 100%;

    font-size: 1.4rem;
    font-weight: 600;

    animation:
        tabelloneTicker
        24s linear
        infinite;
}

@keyframes tabelloneTicker {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-200%);
    }
}


/* OVERLAY */

.tabellone-overlay {
    position: fixed;

    inset: 0;

    z-index: 9000;

    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;

    background:
        rgba(0, 0, 0, .88);

    transition:
        opacity .2s ease,
        visibility .2s ease;
}

.tabellone-overlay.attivo {
    visibility: visible;
    opacity: 1;
}

.tabellone-overlay-box {
    width: min(900px, 88vw);

    padding: 60px 40px;

    text-align: center;

    border-radius: 28px;

    background:
        rgba(20, 28, 40, .98);

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, .65);
}

.tabellone-overlay-label {
    font-size: 1.4rem;

    letter-spacing: .12em;

    opacity: .65;
}

.tabellone-overlay-ticket {
    margin: 10px 0;

    font-size: clamp(
        6rem,
        15vw,
        12rem
    );

    line-height: .95;

    font-weight: 900;
}

.tabellone-overlay-servizio {
    font-size: 2rem;

    font-weight: 600;
}

.tabellone-overlay-sportello {
    margin-top: 6px;

    font-size: 3.5rem;

    font-weight: 800;
}


/* PICCOLI SCHERMI */

@media (max-width: 1000px) {

    .tabellone-laterale {
        display: none;
    }

    .tabellone-header {
        padding:
            14px 20px;
    }

    .tabellone-main {
        padding:
            15px 20px;
    }

}

.tabellone-news-item {
    font-size: 1.35rem;
    line-height: 1.45;
    font-weight: 600;

    animation:
        tabelloneNewsIngresso
        .35s ease;
}

@keyframes tabelloneNewsIngresso {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   LAYOUT TABELLONE
   ============================================================ */

.layout-solo_chiamate .tabellone-chiamate {
    width: 100%;
}

.layout-laterale_normale .tabellone-laterale {
    width: min(31vw, 480px);
}

.layout-laterale_ridotta .tabellone-laterale {
    width: min(21vw, 340px);
}

.layout-laterale_ridotta .tabellone-numero {
    font-size: 3.6rem;
}

.layout-laterale_ridotta
.tabellone-servizio-card-numero {
    font-size: 5.5rem;
}

/* ============================================================
   LISTA TABELLONE - PRIORITÀ ALLA LEGGIBILITÀ
   ============================================================ */

.tabellone-numero {
    font-weight: 800;
}

.tabellone-servizio,
.tabellone-sportello {
    font-weight: 700;
}


/* 1 - 5 */

.densita-xl .tabellone-riga {
    min-height: 108px;
    padding: 16px 0;
}

.densita-xl .tabellone-numero {
    font-size: 4.8rem;
}

.densita-xl .tabellone-servizio,
.densita-xl .tabellone-sportello {
    font-size: 2rem;
}


/* 6 - 7 */

.densita-grande .tabellone-riga {
    min-height: 88px;
    padding: 11px 0;
}

.densita-grande .tabellone-numero {
    font-size: 4.2rem;
}

.densita-grande .tabellone-servizio,
.densita-grande .tabellone-sportello {
    font-size: 1.9rem;
}


/* 8 - 10 */

.densita-media .tabellone-riga {
    min-height: 68px;
    padding: 5px 0;
}

.densita-media .tabellone-numero {
    font-size: 3.5rem;
}

.densita-media .tabellone-servizio,
.densita-media .tabellone-sportello {
    font-size: 1.7rem;
}


/* 11 - 14 */

.densita-compatta .tabellone-riga {
    min-height: 52px;
    padding: 2px 0;
}

.densita-compatta .tabellone-numero {
    font-size: 2.8rem;
}

.densita-compatta .tabellone-servizio,
.densita-compatta .tabellone-sportello {
    font-size: 1.45rem;
}


/* 15 - 20 */

.densita-molto_compatta .tabellone-riga {
    min-height: 42px;
    padding: 0;
}

.densita-molto_compatta .tabellone-numero {
    font-size: 2.25rem;
}

.densita-molto_compatta .tabellone-servizio,
.densita-molto_compatta .tabellone-sportello {
    font-size: 1.2rem;
}

/* ============================================================
   LISTA TABELLONE - ALLINEAMENTO COLONNE
   ============================================================ */

.tabellone-lista-header,
.tabellone-riga {
    display: grid;
    grid-template-columns: 25% 45% 30%;
    align-items: center;

    box-sizing: border-box;

    /* IMPORTANTE: niente width 100% + margini */
    width: auto;

    margin-left: 28px;
    margin-right: 28px;

    padding-left: 28px;
    padding-right: 28px;

    column-gap: 0;
}

.tabellone-numero,
.tabellone-servizio,
.tabellone-sportello {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.tabellone-numero {
    text-align: left;
    white-space: nowrap;
    padding-left: 14px;
}

.tabellone-servizio {
    text-align: left;
    padding-left: 10px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabellone-sportello {
    text-align: right;

    padding-right: 14px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   CARD SERVIZI - GRIGLIA INTELLIGENTE DEFINITIVA
   ============================================================ */

/*
 * Il corpo centrale deve occupare tutto lo spazio rimasto
 * tra header e ticker.
 */

.tabellone-main {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.tabellone-chiamate {
    flex: 1 1 auto;
    display: flex;

    min-width: 0;
    min-height: 0;

    height: auto;
    overflow: hidden;
}


/*
 * Contenitore card
 */

.tabellone-card-grid {
    flex: 1 1 auto;

    display: grid;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    gap: 16px;

    box-sizing: border-box;
}


/*
 * Singola card
 */

.tabellone-servizio-card {
    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;
    min-height: unset;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 22px;

    text-align: center;

    border-top: 8px solid #ffffff;
    border-radius: 18px;

    background: rgba(0, 0, 0, .68);

    box-sizing: border-box;
    overflow: hidden;
}


/* ============================================================
   MATRICE IN BASE AL NUMERO DI SERVIZI
   ============================================================ */

/* 1 servizio: 1 x 1 */

.tabellone-card-grid.card-grid-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}


/* 2 servizi: 2 x 1 */

.tabellone-card-grid.card-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    grid-template-rows: 1fr;
}


/* 3 servizi: 3 x 1 */

.tabellone-card-grid.card-grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows: 1fr;
}


/* 4 servizi: 2 x 2 */

.tabellone-card-grid.card-grid-4 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    grid-template-rows:
        repeat(2, minmax(0, 1fr));
}


/* 5 - 6 servizi: 3 x 2 */

.tabellone-card-grid.card-grid-6 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows:
        repeat(2, minmax(0, 1fr));
}


/* 7 - 9 servizi: 3 x 3 */

.tabellone-card-grid.card-grid-9 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows:
        repeat(3, minmax(0, 1fr));
}


/* 10 - 12 servizi: 4 x 3 */

.tabellone-card-grid.card-grid-12 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    grid-template-rows:
        repeat(3, minmax(0, 1fr));
}


/* 13 - 16 servizi: 4 x 4 */

.tabellone-card-grid.card-grid-16 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    grid-template-rows:
        repeat(4, minmax(0, 1fr));
}


/* 17 - 20 servizi: 5 x 4 */

.tabellone-card-grid.card-grid-20 {
    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    grid-template-rows:
        repeat(4, minmax(0, 1fr));
}


/* ============================================================
   TESTI CARD
   ============================================================ */

.tabellone-servizio-card-titolo {
    font-weight: 700;
    text-transform: uppercase;
}

.tabellone-servizio-card-numero {
    margin: 14px 0;

    line-height: 1;

    font-weight: 800;
}

.tabellone-servizio-card-sportello {
    font-weight: 700;
}


/* 1 - 3 servizi */

.card-grid-1 .tabellone-servizio-card-numero,
.card-grid-2 .tabellone-servizio-card-numero,
.card-grid-3 .tabellone-servizio-card-numero {
    font-size: clamp(5rem, 8vw, 9rem);
}

.card-grid-1 .tabellone-servizio-card-titolo,
.card-grid-2 .tabellone-servizio-card-titolo,
.card-grid-3 .tabellone-servizio-card-titolo {
    font-size: clamp(1.8rem, 2.4vw, 3rem);
}

.card-grid-1 .tabellone-servizio-card-sportello,
.card-grid-2 .tabellone-servizio-card-sportello,
.card-grid-3 .tabellone-servizio-card-sportello {
    font-size: clamp(1.6rem, 2vw, 2.6rem);
}


/* 4 - 6 servizi */

.card-grid-4 .tabellone-servizio-card-numero,
.card-grid-6 .tabellone-servizio-card-numero {
    font-size: clamp(4rem, 6vw, 7rem);
}

.card-grid-4 .tabellone-servizio-card-titolo,
.card-grid-6 .tabellone-servizio-card-titolo {
    font-size: clamp(1.5rem, 2vw, 2.4rem);
}

.card-grid-4 .tabellone-servizio-card-sportello,
.card-grid-6 .tabellone-servizio-card-sportello {
    font-size: clamp(1.35rem, 1.7vw, 2rem);
}


/* 7 - 12 servizi */

.card-grid-9 .tabellone-servizio-card-numero,
.card-grid-12 .tabellone-servizio-card-numero {
    font-size: clamp(3rem, 4vw, 5rem);
}

.card-grid-9 .tabellone-servizio-card-titolo,
.card-grid-12 .tabellone-servizio-card-titolo {
    font-size: clamp(1.2rem, 1.5vw, 1.8rem);
}

.card-grid-9 .tabellone-servizio-card-sportello,
.card-grid-12 .tabellone-servizio-card-sportello {
    font-size: clamp(1.1rem, 1.35vw, 1.6rem);
}


/* 13 - 20 servizi */

.card-grid-16 .tabellone-servizio-card-numero,
.card-grid-20 .tabellone-servizio-card-numero {
    font-size: clamp(2.3rem, 3vw, 3.8rem);
}

.card-grid-16 .tabellone-servizio-card-titolo,
.card-grid-20 .tabellone-servizio-card-titolo {
    font-size: clamp(1rem, 1.2vw, 1.45rem);
}

.card-grid-16 .tabellone-servizio-card-sportello,
.card-grid-20 .tabellone-servizio-card-sportello {
    font-size: clamp(.95rem, 1.1vw, 1.3rem);
}

/* ============================================================
   AREA TECNICA - TITOLO PAGINA
   ============================================================ */

.sidebar-tecnico + main h1.h3 {
    color: #173f6b;
    font-weight: 700;
    letter-spacing: -0.02em;
}
